diff --git a/generated/8.1/apache.php b/generated/8.1/apache.php index e6fd372c..8f72116c 100644 --- a/generated/8.1/apache.php +++ b/generated/8.1/apache.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ApacheException; /** - * Fetch the Apache version. - * - * @return string Returns the Apache version on success. + * @return string * @throws ApacheException * */ @@ -23,12 +21,9 @@ function apache_get_version(): string /** - * Retrieve an Apache environment variable specified by - * variable. - * - * @param string $variable The Apache environment variable - * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. - * @return string The value of the Apache environment variable on success + * @param string $variable + * @param bool $walk_to_top + * @return string * @throws ApacheException * */ @@ -44,39 +39,8 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string /** - * This performs a partial request for a URI. It goes just far - * enough to obtain all the important information about the given - * resource. - * - * @param string $filename The filename (URI) that's being requested. - * @return object An object of related URI information. The properties of - * this object are: - * - * - * status - * the_request - * status_line - * method - * content_type - * handler - * uri - * filename - * path_info - * args - * boundary - * no_cache - * no_local_copy - * allowed - * send_bodyct - * bytes_sent - * byterange - * clength - * unparsed_uri - * mtime - * request_time - * - * - * Returns FALSE on failure. + * @param string $filename + * @return object * @throws ApacheException * */ @@ -92,10 +56,7 @@ function apache_lookup_uri(string $filename): object /** - * Fetches all HTTP request headers from the current request. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -111,10 +72,7 @@ function apache_request_headers(): array /** - * Fetch all HTTP response headers. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An array of all Apache response headers on success. + * @return array * @throws ApacheException * */ @@ -130,13 +88,9 @@ function apache_response_headers(): array /** - * apache_setenv sets the value of the Apache - * environment variable specified by - * variable. - * - * @param string $variable The environment variable that's being set. - * @param string $value The new variable value. - * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @param string $variable + * @param string $value + * @param bool $walk_to_top * @throws ApacheException * */ @@ -151,13 +105,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals /** - * Fetches all HTTP headers from the current request. - * - * This function is an alias for apache_request_headers. - * Please read the apache_request_headers - * documentation for more information on how this function works. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -173,19 +121,7 @@ function getallheaders(): array /** - * virtual is an Apache-specific function which - * is similar to <!--#include virtual...--> in - * mod_include. - * It performs an Apache sub-request. It is useful for including - * CGI scripts or .shtml files, or anything else that you would - * parse through Apache. Note that for a CGI script, the script - * must generate valid CGI headers. At the minimum that means it - * must generate a Content-Type header. - * - * To run the sub-request, all buffers are terminated and flushed to the - * browser, pending headers are sent too. - * - * @param string $uri The file that the virtual command will be performed on. + * @param string $uri * @throws ApacheException * */ diff --git a/generated/8.1/apcu.php b/generated/8.1/apcu.php index a8ec70b4..f47fec43 100644 --- a/generated/8.1/apcu.php +++ b/generated/8.1/apcu.php @@ -5,12 +5,8 @@ use Safe\Exceptions\ApcuException; /** - * Retrieves cached information and meta-data from APC's data store. - * - * @param bool $limited If limited is TRUE, the - * return value will exclude the individual list of cache entries. This - * is useful when trying to optimize calls for statistics gathering. - * @return array Array of cached data (and meta-data) + * @param bool $limited + * @return array * @throws ApcuException * */ @@ -26,13 +22,9 @@ function apcu_cache_info(bool $limited = false): array /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value - * with the value of the new parameter. - * - * @param string $key The key of the value being updated. - * @param int $old The old value (the value currently stored). - * @param int $new The new value to update to. + * @param string $key + * @param int $old + * @param int $new * @throws ApcuException * */ @@ -47,14 +39,11 @@ function apcu_cas(string $key, int $old, int $new): void /** - * Decreases a stored integer value. - * - * @param string $key The key of the value being decreased. - * @param int $step The step, or value to decrease. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -70,14 +59,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Increases a stored number. - * - * @param string $key The key of the value being increased. - * @param int $step The step, or value to increase. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -93,11 +79,8 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Retrieves APCu Shared Memory Allocation information. - * - * @param bool $limited When set to FALSE (default) apcu_sma_info will - * return a detailed information about each segment. - * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @param bool $limited + * @return array * @throws ApcuException * */ diff --git a/generated/8.1/array.php b/generated/8.1/array.php index 38f818c7..0e92aef9 100644 --- a/generated/8.1/array.php +++ b/generated/8.1/array.php @@ -5,15 +5,9 @@ use Safe\Exceptions\ArrayException; /** - * Creates an array by using the values from the - * keys array as keys and the values from the - * values array as the corresponding values. - * - * @param array $keys Array of keys to be used. Illegal values for key will be - * converted to string. - * @param array $values Array of values to be used - * @return array Returns the combined array, FALSE if the number of elements - * for each array isn't equal. + * @param array $keys + * @param array $values + * @return array * @throws ArrayException * */ @@ -29,21 +23,8 @@ function array_combine(array $keys, array $values): array /** - * array_flip returns an array in flip - * order, i.e. keys from array become values and values - * from array become keys. - * - * Note that the values of array need to be valid - * keys, i.e. they need to be either int or - * string. A warning will be emitted if a value has the wrong - * type, and the key/value pair in question will not be included - * in the result. - * - * If a value has several occurrences, the latest key will be - * used as its value, and all others will be lost. - * - * @param array $array An array of key/value pairs to be flipped. - * @return array Returns the flipped array on success. + * @param array $array + * @return array * @throws ArrayException * */ @@ -59,27 +40,9 @@ function array_flip(array $array): array /** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second array - * are both arrays, array_replace_recursive will replace - * their respective value recursively. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * @throws ArrayException * */ @@ -99,22 +62,9 @@ function array_replace_recursive(array $array, array ...$replacements): array /** - * array_replace replaces the values of - * array with values having the same keys in each of the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later arrays overwriting the previous values. - * - * array_replace is not recursive : it will replace - * values in the first array by whatever type is in the second array. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * @throws ArrayException * */ @@ -134,24 +84,9 @@ function array_replace(array $array, array ...$replacements): array /** - * Applies the user-defined callback function to each - * element of the array. This function will recurse - * into deeper arrays. - * - * @param array|object $array The input array. - * @param callable $callback Typically, callback takes on two parameters. - * The array parameter's value being the first, and - * the key/index second. - * - * If callback needs to be working with the - * actual values of the array, specify the first parameter of - * callback as a - * reference. Then, - * any changes made to those elements will be made in the - * original array itself. - * @param mixed $arg If the optional arg parameter is supplied, - * it will be passed as the third parameter to the - * callback. + * @param array|object $array + * @param callable $callback + * @param mixed $arg * @throws ArrayException * */ @@ -170,11 +105,7 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void /** - * This function shuffles (randomizes the order of the elements in) an array. - * It uses a pseudo random number generator that is not suitable for - * cryptographic purposes. - * - * @param array $array The array. + * @param array $array * @throws ArrayException * */ diff --git a/generated/8.1/bzip2.php b/generated/8.1/bzip2.php index 2ac21619..6205be66 100644 --- a/generated/8.1/bzip2.php +++ b/generated/8.1/bzip2.php @@ -5,10 +5,7 @@ use Safe\Exceptions\Bzip2Exception; /** - * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -23,12 +20,7 @@ function bzclose($bz): void /** - * This function is supposed to force a write of all buffered bzip2 data for the file pointer - * bz, - * but is implemented as null function in libbz2, and as such does nothing. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -43,14 +35,9 @@ function bzflush($bz): void /** - * bzopen opens a bzip2 (.bz2) file for reading or - * writing. - * - * @param resource|string $file The name of the file to open, or an existing stream resource. - * @param string $mode The modes 'r' (read), and 'w' (write) are supported. - * Everything else will cause bzopen to return FALSE. - * @return resource If the open fails, bzopen returns FALSE, otherwise - * it returns a pointer to the newly opened file. + * @param resource|string $file + * @param string $mode + * @return resource * @throws Bzip2Exception * */ @@ -66,17 +53,9 @@ function bzopen($file, string $mode) /** - * bzread reads from the given bzip2 file pointer. - * - * Reading stops when length (uncompressed) bytes have - * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param int $length 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 Returns the uncompressed data. + * @param resource $bz + * @param int $length + * @return string * @throws Bzip2Exception * */ @@ -92,16 +71,10 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file - * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param string $data The written data. - * @param int|null $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of - * data is reached, whichever comes first. - * @return int Returns the number of bytes written. + * @param resource $bz + * @param string $data + * @param int|null $length + * @return int * @throws Bzip2Exception * */ diff --git a/generated/8.1/calendar.php b/generated/8.1/calendar.php index bdbe04db..f426ef08 100644 --- a/generated/8.1/calendar.php +++ b/generated/8.1/calendar.php @@ -5,13 +5,8 @@ use Safe\Exceptions\CalendarException; /** - * Return the Julian Day for a Unix timestamp - * (seconds since 1.1.1970), or for the current day if no - * timestamp is given. Either way, the time is regarded - * as local time (not UTC). - * - * @param int|null $timestamp A unix timestamp to convert. - * @return int A julian day number as integer. + * @param int|null $timestamp + * @return int * @throws CalendarException * */ diff --git a/generated/8.1/classobj.php b/generated/8.1/classobj.php index 06141e26..4f70129b 100644 --- a/generated/8.1/classobj.php +++ b/generated/8.1/classobj.php @@ -5,13 +5,9 @@ use Safe\Exceptions\ClassobjException; /** - * Creates an alias named alias - * based on the user defined class class. - * The aliased class is exactly the same as the original class. - * - * @param string $class The original class. - * @param string $alias The alias name for the class. - * @param bool $autoload Whether to autoload if the original class is not found. + * @param string $class + * @param string $alias + * @param bool $autoload * @throws ClassobjException * */ diff --git a/generated/8.1/com.php b/generated/8.1/com.php index 9f5f7fe2..81ba5b88 100644 --- a/generated/8.1/com.php +++ b/generated/8.1/com.php @@ -5,12 +5,7 @@ use Safe\Exceptions\ComException; /** - * Generates a Globally Unique Identifier (GUID). - * - * A GUID is generated in the same way as DCE UUID's, except that the - * Microsoft convention is to enclose a GUID in curly braces. - * - * @return string Returns the GUID as a string. + * @return string * @throws ComException * */ @@ -26,24 +21,9 @@ function com_create_guid(): string /** - * Instructs COM to sink events generated by - * variant into the PHP object - * sink_object. - * - * Be careful how you use this feature; if you are doing something similar - * to the example below, then it doesn't really make sense to run it in a - * web server context. - * * @param object $variant - * @param object $sink_object sink_object should be an instance of a class with - * methods named after those of the desired dispinterface; you may use - * com_print_typeinfo to help generate a template class - * for this purpose. - * @param mixed $sink_interface PHP will attempt to use the default dispinterface type specified by - * the typelibrary associated with variant, but - * you may override this choice by setting - * sink_interface to the name of the dispinterface - * that you want to use. + * @param object $sink_object + * @param mixed $sink_interface * @throws ComException * */ @@ -62,54 +42,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = /** - * Loads a type-library and registers its constants in the engine, as though - * they were defined using define. - * - * Note that it is much more efficient to use the configuration setting to pre-load and - * register the constants, although not so flexible. - * - * If you have turned on , then - * PHP will attempt to automatically register the constants associated with a - * COM object when you instantiate it. This depends on the interfaces - * provided by the COM object itself, and may not always be possible. - * - * @param string $typelib typelib can be one of the following: - * - * - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * - * - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * - * - * - * PHP will attempt to resolve the type library in this order, as the - * process gets more and more expensive as you progress down the list; - * searching for the type library by name is handled by physically - * enumerating the registry until we find a match. - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * @param bool $case_insensitive The case_insensitive behaves inversely to - * the parameter $case_insensitive in the define - * function. + * @param string $typelib + * @param bool $case_insensitive * @throws ComException * */ @@ -124,17 +58,9 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void /** - * The purpose of this function is to help generate a skeleton class for use - * as an event sink. You may also use it to generate a dump of any COM - * object, provided that it supports enough of the introspection interfaces, - * and that you know the name of the interface you want to display. - * - * @param object $variant variant should be either an instance of a COM - * object, or be the name of a typelibrary (which will be resolved according - * to the rules set out in com_load_typelib). - * @param null|string $dispatch_interface The name of an IDispatch descendant interface that you want to display. - * @param bool $display_sink If set to TRUE, the corresponding sink interface will be displayed - * instead. + * @param object $variant + * @param null|string $dispatch_interface + * @param bool $display_sink * @throws ComException * */ @@ -155,12 +81,8 @@ function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, /** - * Converts variant from a VT_DATE - * (or similar) value into a Unix timestamp. This allows easier - * interopability between the Unix-ish parts of PHP and COM. - * - * @param object $variant The variant. - * @return int Returns a unix timestamp. + * @param object $variant + * @return int * @throws ComException * */ @@ -176,12 +98,9 @@ function variant_date_to_timestamp(object $variant): int /** - * Returns the value of value rounded to - * decimals decimal places. - * - * @param mixed $value The variant. - * @param int $decimals Number of decimal places. - * @return mixed Returns the rounded value. + * @param mixed $value + * @param int $decimals + * @return mixed * @throws ComException * */ diff --git a/generated/8.1/cubrid.php b/generated/8.1/cubrid.php index 423f0cc5..40c5f695 100644 --- a/generated/8.1/cubrid.php +++ b/generated/8.1/cubrid.php @@ -5,122 +5,10 @@ use Safe\Exceptions\CubridException; /** - * The cubrid_bind function is used to bind values to a - * corresponding named or question mark placeholder in the SQL statement that - * was passed to cubrid_prepare. If - * bind_value_type is not given, string will be the - * default. - * - * The following table shows the types of substitute values. - * - * - * CUBRID Bind Date Types - * - * - * - * Support - * Bind Type - * Corresponding SQL Type - * - * - * - * - * Supported - * STRING - * CHAR, VARCHAR - * - * - * - * NCHAR - * NCHAR, NVARCHAR - * - * - * - * BIT - * BIT, VARBIT - * - * - * - * NUMERIC or NUMBER - * SHORT, INT, NUMERIC - * - * - * - * FLOAT - * FLOAT - * - * - * - * DOUBLE - * DOUBLE - * - * - * - * TIME - * TIME - * - * - * - * DATE - * DATE - * - * - * - * TIMESTAMP - * TIMESTAMP - * - * - * - * OBJECT - * OBJECT - * - * - * - * ENUM - * ENUM - * - * - * - * BLOB - * BLOB - * - * - * - * CLOB - * CLOB - * - * - * - * NULL - * NULL - * - * - * Not supported - * SET - * SET - * - * - * - * MULTISET - * MULTISET - * - * - * - * SEQUENCE - * SEQUENCE - * - * - * - * - * - * @param resource $req_identifier Request identifier as a result of - * cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type A type of the value to bind. (It is omitted by default. - * Thus, the system internally uses string by default. However, you need to - * specify the exact type of the value as an argument when they are NCHAR, - * BIT, or BLOB/CLOB). + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -139,14 +27,10 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bin /** - * The cubrid_col_size function is used to get the - * number of elements in a collection type (set, multiset, sequence) - * attribute. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID the instance that you want to work with. - * @param string $attr_name Name of the attribute that you want to work with. - * @return int Number of elements, when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @return int * @throws CubridException * */ @@ -162,11 +46,8 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int /** - * The cubrid_column_names function is used to get the - * column names of the query result by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column names, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -182,11 +63,8 @@ function cubrid_column_names($req_identifier): array /** - * The cubrid_column_types function gets column types of - * query results by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column types, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -202,18 +80,7 @@ function cubrid_column_types($req_identifier): array /** - * The cubrid_commit function is used to execute commit - * on the transaction pointed by conn_identifier, - * currently in progress. Connection to the server is closed after the - * cubrid_commit function is called; However, - * the connection handle is still valid. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction management. - * You can set it by using cubrid_set_autocommit. - * You can get its status by using cubrid_get_autocommit. Before you start a transaction, - * remember to disable the auto-commit mode. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -228,78 +95,11 @@ function cubrid_commit($conn_identifier): void /** - * The cubrid_connect_with_url function is used to - * establish the environment for connecting to your server by using connection - * information passed with an url string argument. If the HA feature is - * enabled in CUBRID, you must specify the connection information of the - * standby server, which is used for failover when failure occurs, in the url - * string argument of this function. If the user name and password is not - * given, then the "PUBLIC" connection will be made by default. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @param bool $new_link If a second call is made to - * cubrid_connect_with_url with the same arguments, - * no new connection will be established, but instead, the connection - * identifier of the already opened connection will be returned. The - * new_link parameter modifies this behavior and - * makes cubrid_connect_with_url always open a new - * connection, even if cubrid_connect_with_url was - * called before with the same parameters. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -323,27 +123,13 @@ function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?stri /** - * The cubrid_connect function is used to establish the - * environment for connecting to your server by using your server address, - * port number, database name, user name, and password. If the user name and - * password is not given, then the "PUBLIC" connection will be made by - * default. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. If not given, the default - * value is "public". - * @param string $passwd User password. If not given, the default value is "". - * @param bool $new_link If a second call is made to - * cubrid_connect with the same arguments, no new - * connection will be established, but instead, the connection identifier - * of the already opened connection will be 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 Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -367,14 +153,8 @@ function cubrid_connect(string $host, int $port, string $dbname, ?string $userid /** - * The cubrid_current_oid function is used to get the - * oid of the current cursor location from the query result. To use - * cubrid_current_oid, the query executed must be a - * updatable query, and the CUBRID_INCLUDE_OID option must be included during - * the query execution. - * - * @param resource $req_identifier Request identifier. - * @return string Oid of current cursor location, when process is successful. + * @param resource $req_identifier + * @return string * @throws CubridException * */ @@ -390,11 +170,7 @@ function cubrid_current_oid($req_identifier): string /** - * The cubrid_disconnect function closes the connection - * handle and disconnects from server. If any request handle is not closed at this point, - * it will be closed. It is similar to the CUBRID MySQL compatible function cubrid_close. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -413,11 +189,8 @@ function cubrid_disconnect($conn_identifier = null): void /** - * The cubrid_drop function is used to delete an - * instance from database by using the oid of the instance. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid Oid of the instance that you want to delete. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -432,12 +205,7 @@ function cubrid_drop($conn_identifier, string $oid): void /** - * This function frees the memory occupied by the result data. It returns - * TRUE on success. Note that it can only frees the - * client fetch buffer now, and if you want free all memory, use function - * cubrid_close_request. - * - * @param resource $req_identifier This is the request identifier. + * @param resource $req_identifier * @throws CubridException * */ @@ -452,12 +220,8 @@ function cubrid_free_result($req_identifier): void /** - * This function returns the current CUBRID connection charset and is similar - * to the CUBRID MySQL compatible function - * cubrid_client_encoding. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID connection charset on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -473,13 +237,9 @@ function cubrid_get_charset($conn_identifier): string /** - * The cubrid_get_class_name function is used to get the - * class name from oid. It doesn't work when selecting data from the system tables, - * for example db_class. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to check the existence. - * @return string Class name when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @return string * @throws CubridException * */ @@ -495,9 +255,7 @@ function cubrid_get_class_name($conn_identifier, string $oid): string /** - * This function returns a string that represents the client library version. - * - * @return string A string that represents the client library version on success. + * @return string * @throws CubridException * */ @@ -513,115 +271,8 @@ function cubrid_get_client_info(): string /** - * This function returns the CUBRID database parameters. - * It returns an associative array with the values for the following parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * PARAM_MAX_STRING_LENGTH - * PARAM_AUTO_COMMIT - * - * - * - * Database parameters - * - * - * - * Parameter - * Description - * - * - * - * - * PARAM_ISOLATION_LEVEL - * The transaction isolation level. - * - * - * LOCK_TIMEOUT - * CUBRID provides the lock timeout feature, which sets the waiting - * time (in seconds) for the lock until the transaction lock setting is - * allowed. The default value of the lock_timeout_in_secs parameter is - * -1, which means the application client will wait indefinitely until - * the transaction lock is allowed. - * - * - * - * PARAM_AUTO_COMMIT - * In CUBRID PHP, auto-commit mode is disabled by default for - * transaction management. It can be set by using - * cubrid_set_autocommit. - * - * - * - * - * - * - * The following table shows the isolation levels from 1 to 6. It consists of - * table schema (row) and isolation level: - * - * Levels of Isolation Supported by CUBRID - * - * - * - * Name - * Description - * - * - * - * - * SERIALIZABLE (6) - * In this isolation level, problems concerning concurrency (e.g. - * dirty read, non-repeatable read, phantom read, etc.) do not - * occur. - * - * - * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience phantom read for the record R that was - * inserted by another transaction T2 when it is repeatedly retrieving a - * specific record. - * - * - * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience R read (non-repeatable read) that was - * updated and committed by another transaction T2 when it is repeatedly - * retrieving the record R. - * - * - * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) - * Default isolation level. Another transaction T2 cannot update - * the schema of table A while transaction T1 is viewing table A. - * Transaction T1 may experience R' read (dirty read) for the record that - * was updated but not committed by another transaction T2. - * - * - * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is viewing table A repeatedly. Transaction T1 may experience - * R' read (non-repeatable read) for the record that was updated and - * committed by another transaction T2 while it is retrieving the record - * R repeatedly. - * - * - * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is repeatedly viewing table A. Transaction T1 may experience - * R' read (dirty read) for the record that was updated but not committed - * by another transaction T2. - * - * - * - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @return array An associative array with CUBRID database parameters; on success. + * @param resource $conn_identifier + * @return array * @throws CubridException * */ @@ -637,11 +288,8 @@ function cubrid_get_db_parameter($conn_identifier): array /** - * The cubrid_get_query_timeout function is used to get - * the query timeout of the request. - * - * @param resource $req_identifier Request identifier. - * @return int Returns the query timeout value in milliseconds of the current request on success. + * @param resource $req_identifier + * @return int * @throws CubridException * */ @@ -657,10 +305,8 @@ function cubrid_get_query_timeout($req_identifier): int /** - * This function returns a string that represents the CUBRID server version. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID server version on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -676,19 +322,8 @@ function cubrid_get_server_info($conn_identifier): string /** - * The cubrid_insert_id function retrieves the ID - * generated for the AUTO_INCREMENT column which is updated by the previous - * INSERT query. It returns 0 if the previous query does not generate new - * rows. - * - * @param resource $conn_identifier The connection identifier previously obtained by a call to - * cubrid_connect. - * @return string A string representing the ID generated for an AUTO_INCREMENT column by the - * previous query, on success. - * - * 0, if the previous query does not generate new rows. - * - * FALSE on failure. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -708,10 +343,7 @@ function cubrid_insert_id($conn_identifier = null): string /** - * cubrid_lob_close is used to close all BLOB/CLOB - * returned from cubrid_lob_get. - * - * @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get. + * @param array $lob_identifier_array * @throws CubridException * */ @@ -726,12 +358,9 @@ function cubrid_lob_close(array $lob_identifier_array): void /** - * cubrid_lob_export is used to get BLOB/CLOB data from CUBRID database, and saves its contents to a file. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. - * @param string $path_name Path name of the file. + * @param resource $conn_identifier + * @param resource $lob_identifier + * @param string $path_name * @throws CubridException * */ @@ -746,15 +375,9 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) /** - * cubrid_lob_get is used to get BLOB/CLOB meta info from CUBRID database, - * CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. - * Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. - * - * Remember to use cubrid_lob_close to release the LOBs if you don't need it any more. - * - * @param resource $conn_identifier Connection identifier. - * @param string $sql SQL statement to be executed. - * @return array Return an array of LOB resources, when process is successful. + * @param resource $conn_identifier + * @param string $sql + * @return array * @throws CubridException * */ @@ -770,11 +393,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array /** - * cubrid_lob_send reads BLOB/CLOB data and passes it straight through to the browser. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. + * @param resource $conn_identifier + * @param resource $lob_identifier * @throws CubridException * */ @@ -789,10 +409,8 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void /** - * cubrid_lob_size is used to get BLOB/CLOB data size. - * - * @param resource $lob_identifier LOB identifier. - * @return string A string representing LOB data size, when process is successful. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -808,17 +426,10 @@ function cubrid_lob_size($lob_identifier): string /** - * The cubrid_lob2_bind function is used to bind BLOB/CLOB datas - * to a corresponding question mark placeholder in the SQL statement that was passed - * to cubrid_prepare. If bind_value_type - * is not given, string will be "BLOB" as the default. But if you use - * cubrid_lob2_new before, bind_value_type - * will be consistent with type in cubrid_lob2_new as the default. - * - * @param resource $req_identifier Request identifier as a result of cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type It must be "BLOB" or "CLOB" and it won't be case-sensitive. If it not be given, the default value is "BLOB". + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -837,10 +448,7 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string /** - * The cubrid_lob2_close function is used to close LOB object - * returned from cubrid_lob2_new or got from the result set. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @param resource $lob_identifier * @throws CubridException * */ @@ -855,15 +463,8 @@ function cubrid_lob2_close($lob_identifier): void /** - * The cubrid_lob2_export function is used to save the - * contents of BLOB/CLOB data to a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID - * database first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to store BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -878,15 +479,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void /** - * The cubrid_lob2_import function is used to save the - * contents of BLOB/CLOB data from a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID database - * first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to import BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -901,14 +495,9 @@ function cubrid_lob2_import($lob_identifier, string $file_name): void /** - * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). - * This function should be used before you bind a lob object. - * - * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, - * the last connection opened by cubrid_connect or - * cubrid_connect_with_url is assumed. - * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". - * @return resource Lob identifier when it is successful. + * @param resource $conn_identifier + * @param string $type + * @return resource * @throws CubridException * */ @@ -930,12 +519,9 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") /** - * The cubrid_lob2_read function reads len bytes from the - * LOB data and returns the bytes read. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $len Length from buffer you want to read from the lob data. - * @return string Returns the contents as a string, FALSE when there is no more data. + * @param resource $lob_identifier + * @param int $len + * @return string * @throws CubridException * */ @@ -951,30 +537,9 @@ function cubrid_lob2_read($lob_identifier, int $len): string /** - * The cubrid_lob2_seek function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move - * backward offset units from the end of LOB object and - * offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param int $offset + * @param int $origin * @throws CubridException * */ @@ -989,31 +554,9 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR /** - * The cubrid_lob2_seek64 function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * If the offset you want to move is larger than an integer - * data can be stored, you can use this function. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move backward - * offset units from the end of LOB object and offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param string $offset + * @param int $origin * @throws CubridException * */ @@ -1028,10 +571,8 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI /** - * The cubrid_lob2_size function is used to get the size of a lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the size of the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1047,13 +588,8 @@ function cubrid_lob2_size($lob_identifier): int /** - * The cubrid_lob2_size64 function is used to get the - * size of a lob object. If the size of a lob object is larger than an - * integer data can be stored, you can use this function and it will return - * the size as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the size of the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1069,10 +605,8 @@ function cubrid_lob2_size64($lob_identifier): string /** - * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the cursor position on the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1088,13 +622,8 @@ function cubrid_lob2_tell($lob_identifier): int /** - * The cubrid_lob2_tell64 function is used to tell the - * cursor position of the LOB object. If the size of a lob object is larger - * than an integer data can be stored, you can use this function and it will - * return the position information as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1110,12 +639,8 @@ function cubrid_lob2_tell64($lob_identifier): string /** - * The cubrid_lob2_write function reads as much as data - * from buf and stores it to the LOB object. Note that - * this function can only append characters now. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $buf Data that need to be written to the lob object. + * @param resource $lob_identifier + * @param string $buf * @throws CubridException * */ @@ -1130,11 +655,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void /** - * The cubrid_lock_read function is used to put read - * lock on the instance pointed by given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put read lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1149,11 +671,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void /** - * The cubrid_lock_write function is used to put write - * lock on the instance pointed by the given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put write lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1168,26 +687,10 @@ function cubrid_lock_write($conn_identifier, string $oid): void /** - * The cubrid_move_cursor function is used to move the - * current cursor location of req_identifier by the - * value set in the offset argument, to the direction - * set in the origin argument. To set the - * origin argument, you can use CUBRID_CURSOR_FIRST - * for the first part of the result, CUBRID_CURSOR_CURRENT for the current - * location of the result, or CUBRID_CURSOR_LAST for the last part of the - * result. If origin argument is not explicitly - * designated, then the function uses CUBRID_CURSOR_CURRENT as its default - * value. - * - * If the value of cursor movement range goes over the valid limit, then the - * cursor moves to the next location after the valid range for the cursor. - * For example, if you move 20 units in the result with the size of 10, then - * the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. - * - * @param resource $req_identifier Request identifier. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. - * @return int Returns TRUE on success. + * @param resource $req_identifier + * @param int $offset + * @param int $origin + * @return int * @throws CubridException * */ @@ -1203,12 +706,7 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C /** - * The cubrid_next_result function is used to get - * results of next query if multiple SQL statements are executed and - * CUBRID_EXEC_QUERY_ALL flag is set upon - * cubrid_execute. - * - * @param resource $result result comes from a call to cubrid_execute + * @param resource $result * @throws CubridException * */ @@ -1223,80 +721,10 @@ function cubrid_next_result($result): void /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect_with_url acts very much like - * cubrid_connect_with_url with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect_with_url). - * - * This type of link is therefore called 'persistent'. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1318,30 +746,12 @@ function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?str /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect acts very much like - * cubrid_connect with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect). - * - * This type of link is therefore called 'persistent'. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1363,20 +773,10 @@ function cubrid_pconnect(string $host, int $port, string $dbname, ?string $useri /** - * The cubrid_prepare function is a sort of API which represents SQL statements - * compiled previously to a given connection handle. This pre-compiled SQL statement will be included - * in the cubrid_prepare. - * - * Accordingly, you can use this statement effectively to execute several times repeatedly or to - * process long data. Only a single statement can be used and a parameter may put a question mark (?) - * to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES - * clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a - * MARK(?) by using the cubrid_bind function only. - * - * @param resource $conn_identifier Connection identifier. - * @param string $prepare_stmt Prepare query. - * @param int $option OID return option CUBRID_INCLUDE_OID. - * @return resource Request identifier, if process is successful. + * @param resource $conn_identifier + * @param string $prepare_stmt + * @param int $option + * @return resource * @throws CubridException * */ @@ -1392,20 +792,10 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) /** - * The cubrid_put function is used to update an - * attribute of the instance of the given oid. - * - * You can update single attribute by using string data type to set - * attr. In such case, you can use integer, - * floating point or string type data for the value - * argument. To update multiple number of attributes, you can disregard the - * attr argument, and set - * value argument with associative array data type. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to update. - * @param string $attr Name of the attribute that you want to update. - * @param mixed $value New value that you want to assign to the attribute. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr + * @param mixed $value * @throws CubridException * */ @@ -1426,15 +816,7 @@ function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value /** - * The cubrid_rollback function executes rollback on the - * transaction pointed by conn_identifier, currently in - * progress. - * - * Connection to server is closed after calling - * cubrid_rollback. Connection handle, however, is - * still valid. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -1449,391 +831,11 @@ function cubrid_rollback($conn_identifier): void /** - * The cubrid_schema function is used to get the - * requested schema information from database. To get information about specific class, - * set the class_name, to get information about specific attribute - * (can be used only with CUBRID_SCH_ATTR_PRIVILEGE), - * set the attr_name. - * - * The result of the cubrid_schema function is returned as a two-dimensional - * array (column (associative array) * row (numeric array)). The following - * tables shows types of schema and the column structure of the result array to - * be returned based on the schema type. - * - * - * Result Composition of Each Type - * - * - * - * Schema - * Column Number - * Column Name - * Value - * - * - * - * - * CUBRID_SCH_CLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_VCLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 1:vclass - * - * - * - * CUBRID_SCH_QUERY_SPEC - * 1 - * QUERY_SPEC - * - * - * - * - * CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE - * 1 - * ATTR_NAME - * - * - * - * - * 2 - * DOMAIN - * - * - * - * - * 3 - * SCALE - * - * - * - * - * 4 - * PRECISION - * - * - * - * - * 5 - * INDEXED - * 1:indexed - * - * - * - * 6 - * NOT NULL - * 1:not null - * - * - * - * 7 - * SHARED - * 1:shared - * - * - * - * 8 - * UNIQUE - * 1:unique - * - * - * - * 9 - * DEFAULT - * - * - * - * - * 10 - * ATTR_ORDER - * base:1 - * - * - * - * 11 - * CLASS_NAME - * - * - * - * - * 12 - * SOURCE_CLASS - * - * - * - * - * 13 - * IS_KEY - * 1:key - * - * - * - * CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD - * 1 - * NAME - * - * - * - * - * 2 - * RET_DOMAIN - * - * - * - * - * 3 - * ARG_DOMAIN - * - * - * - * - * CUBRID_SCH_METHOD_FILE - * 1 - * METHOD_FILE - * - * - * - * - * CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_CONSTRAINT - * 1 - * TYPE - * 0:unique 1:index 2:reverse unique 3:reverse index - * - * - * - * 2 - * NAME - * - * - * - * - * 3 - * ATTR_NAME - * - * - * - * - * 4 - * NUM_PAGES - * - * - * - * - * 5 - * NUM_KEYS - * - * - * - * - * 6 - * PRIMARY_KEY - * 1:primary key - * - * - * - * 7 - * KEY_ORDER - * base:1 - * - * - * - * CUBRID_SCH_TRIGGER - * 1 - * NAME - * - * - * - * - * 2 - * STATUS - * - * - * - * - * 3 - * EVENT - * - * - * - * - * 4 - * TARGET_CLASS - * - * - * - * - * 5 - * TARGET_ATTR - * - * - * - * - * 6 - * ACTION_TIME - * - * - * - * - * 7 - * ACTION - * - * - * - * - * 8 - * PRIORITY - * - * - * - * - * 9 - * CONDITION_TIME - * - * - * - * - * 10 - * CONDITION - * - * - * - * - * CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE - * 1 - * CLASS_NAME / ATTR_NAME - * - * - * - * - * 2 - * PRIVILEGE - * - * - * - * - * 3 - * GRANTABLE - * - * - * - * - * CUBRID_SCH_PRIMARY_KEY - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * ATTR_NAME - * - * - * - * - * 3 - * KEY_SEQ - * base:1 - * - * - * - * 4 - * KEY_NAME - * - * - * - * - * CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE - * 1 - * PKTABLE_NAME - * - * - * - * - * 2 - * PKCOLUMN_NAME - * - * - * - * - * 3 - * FKTABLE_NAME - * base:1 - * - * - * - * 4 - * FKCOLUMN_NAME - * - * - * - * - * 5 - * KEY_SEQ - * base:1 - * - * - * - * 6 - * UPDATE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 7 - * DELETE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 8 - * FK_NAME - * - * - * - * - * 9 - * PK_NAME - * - * - * - * - * - * - * @param resource $conn_identifier Connection identifier. - * @param int $schema_type Schema data that you want to know. - * @param string $class_name Class you want to know the schema of. - * @param string $attr_name Attribute you want to know the schema of. - * @return array Array containing the schema information, when process is successful. + * @param resource $conn_identifier + * @param int $schema_type + * @param string $class_name + * @param string $attr_name + * @return array * @throws CubridException * */ @@ -1855,14 +857,10 @@ function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = /** - * The cubrid_seq_drop function is used to delete an - * element you request from the given sequence type attribute in the - * database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to delete an element from. - * @param int $index Index of the element that you want to delete (1-based). + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index * @throws CubridException * */ @@ -1877,14 +875,11 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ /** - * The cubrid_col_insert function is used to insert an - * element to a sequence type attribute in a requested location. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an instance to. - * @param int $index Location of the element, you want to insert the element to (1-based). - * @param string $seq_element Content of the element that you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1899,14 +894,11 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int /** - * The cubrid_seq_put function is used to update the - * content of the requested element in a sequent type attribute using OID. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to update an element. - * @param int $index Index (1-based) of the element that you want to update. - * @param string $seq_element New content that you want to use for the update. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1921,14 +913,10 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i /** - * The cubrid_set_add function is used to insert a - * single element to a set type attribute (set, multiset, sequence) you - * requested. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an element. - * @param string $set_element Content of the element you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -1943,20 +931,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string /** - * The cubrid_set_autocommit function is used to set the - * CUBRID database auto-commit mode of the current database connection. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction - * management. When auto-commit mode is truned from off to on, any pending work is - * automatically committed. - * - * @param resource $conn_identifier Connection identifier. - * @param bool $mode Auto-commit mode. The following constants can be used: - * - * - * CUBRID_AUTOCOMMIT_FALSE - * CUBRID_AUTOCOMMIT_TRUE - * + * @param resource $conn_identifier + * @param bool $mode * @throws CubridException * */ @@ -1971,19 +947,9 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void /** - * The cubrid_set_db_parameter function is used to set - * the CUBRID database parameters. It can set the following CUBRID database - * parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @param int $param_type Database parameter type. - * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @param resource $conn_identifier + * @param int $param_type + * @param int $param_value * @throws CubridException * */ @@ -1998,14 +964,10 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v /** - * The cubrid_set_drop function is used to delete an - * element that you request from the given set type (set, multiset) attribute - * of the database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to delete an element from. - * @param string $set_element Content of the element you want to delete. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -2020,11 +982,8 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin /** - * The cubrid_set_query_timeout function is used to set - * the timeout time of query execution. - * - * @param resource $req_identifier Request identifier. - * @param int $timeout Timeout time in milliseconds. + * @param resource $req_identifier + * @param int $timeout * @throws CubridException * */ diff --git a/generated/8.1/curl.php b/generated/8.1/curl.php index 7ecd1829..aa5895b9 100644 --- a/generated/8.1/curl.php +++ b/generated/8.1/curl.php @@ -5,3135 +5,155 @@ use Safe\Exceptions\CurlException; /** - * Copies a cURL handle keeping the same preferences. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return \CurlHandle Returns a new cURL handle. - * @throws CurlException - * - */ -function curl_copy_handle(\CurlHandle $handle): \CurlHandle -{ - error_clear_last(); - $safeResult = \curl_copy_handle($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * This function URL encodes the given string according to RFC 3986. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The string to be encoded. - * @return string Returns escaped string. - * @throws CurlException - * - */ -function curl_escape(\CurlHandle $handle, string $string): string -{ - error_clear_last(); - $safeResult = \curl_escape($handle, $string); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Execute the given cURL session. - * - * This function should be called after initializing a cURL session and all - * the options for the session are set. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return bool|string Returns TRUE on success. However, if the CURLOPT_RETURNTRANSFER - * option is set, it will return - * the result on success. - * @throws CurlException - * - */ -function curl_exec(\CurlHandle $handle) -{ - error_clear_last(); - $safeResult = \curl_exec($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Gets information about the last transfer. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int|null $option This may be one of the following constants: - * - * - * - * CURLINFO_EFFECTIVE_URL - Last effective URL - * - * - * - * - * CURLINFO_HTTP_CODE - The last response code. - * As of cURL 7.10.8, this is a legacy alias of - * CURLINFO_RESPONSE_CODE - * - * - * - * - * CURLINFO_FILETIME - Remote time of the retrieved document, with the CURLOPT_FILETIME enabled; if -1 is returned the time of the document is unknown - * - * - * - * - * CURLINFO_TOTAL_TIME - Total transaction time in seconds for last transfer - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME - Time in seconds until name resolving was complete - * - * - * - * - * CURLINFO_CONNECT_TIME - Time in seconds it took to establish the connection - * - * - * - * - * CURLINFO_PRETRANSFER_TIME - Time in seconds from start until just before file transfer begins - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME - Time in seconds until the first byte is about to be transferred - * - * - * - * - * CURLINFO_REDIRECT_COUNT - Number of redirects, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_TIME - Time in seconds of all redirection steps before final transaction was started, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_URL - With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found in the last transaction, that should be requested manually next. With the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The redirect URL in this case is available in CURLINFO_EFFECTIVE_URL - * - * - * - * - * CURLINFO_PRIMARY_IP - IP address of the most recent connection - * - * - * - * - * CURLINFO_PRIMARY_PORT - Destination port of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_IP - Local (source) IP address of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_PORT - Local (source) port of the most recent connection - * - * - * - * - * CURLINFO_SIZE_UPLOAD - Total number of bytes uploaded - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD - Total number of bytes downloaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD - Average download speed - * - * - * - * - * CURLINFO_SPEED_UPLOAD - Average upload speed - * - * - * - * - * CURLINFO_HEADER_SIZE - Total size of all headers received - * - * - * - * - * CURLINFO_HEADER_OUT - The request string sent. For this to - * work, add the CURLINFO_HEADER_OUT option to the handle by calling - * curl_setopt - * - * - * - * - * CURLINFO_REQUEST_SIZE - Total size of issued requests, currently only for HTTP requests - * - * - * - * - * CURLINFO_SSL_VERIFYRESULT - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD - Content length of download, read from Content-Length: field - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD - Specified size of upload - * - * - * - * - * CURLINFO_CONTENT_TYPE - Content-Type: of the requested document. NULL indicates server did not send valid Content-Type: header - * - * - * - * - * CURLINFO_PRIVATE - Private data associated with this cURL handle, previously set with the CURLOPT_PRIVATE option of curl_setopt - * - * - * - * - * CURLINFO_RESPONSE_CODE - The last response code - * - * - * - * - * CURLINFO_HTTP_CONNECTCODE - The CONNECT response code - * - * - * - * - * CURLINFO_HTTPAUTH_AVAIL - Bitmask indicating the authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_PROXYAUTH_AVAIL - Bitmask indicating the proxy authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_OS_ERRNO - Errno from a connect failure. The number is OS and system specific. - * - * - * - * - * CURLINFO_NUM_CONNECTS - Number of connections curl had to create to achieve the previous transfer - * - * - * - * - * CURLINFO_SSL_ENGINES - OpenSSL crypto-engines supported - * - * - * - * - * CURLINFO_COOKIELIST - All known cookies - * - * - * - * - * CURLINFO_FTP_ENTRY_PATH - Entry path in FTP server - * - * - * - * - * CURLINFO_APPCONNECT_TIME - Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CERTINFO - TLS certificate chain - * - * - * - * - * CURLINFO_CONDITION_UNMET - Info on unmet time conditional - * - * - * - * - * CURLINFO_RTSP_CLIENT_CSEQ - Next RTSP client CSeq - * - * - * - * - * CURLINFO_RTSP_CSEQ_RECV - Recently received CSeq - * - * - * - * - * CURLINFO_RTSP_SERVER_CSEQ - Next RTSP server CSeq - * - * - * - * - * CURLINFO_RTSP_SESSION_ID - RTSP session ID - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD_T - The content-length of the download. This is the value read from the Content-Type: field. -1 if the size isn't known - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD_T - The specified size of the upload. -1 if the size isn't known - * - * - * - * - * CURLINFO_HTTP_VERSION - The version used in the last HTTP connection. The return value will be one of the defined CURL_HTTP_VERSION_* constants or 0 if the version can't be determined - * - * - * - * - * CURLINFO_PROTOCOL - The protocol used in the last HTTP connection. The returned value will be exactly one of the CURLPROTO_* values - * - * - * - * - * CURLINFO_PROXY_SSL_VERIFYRESULT - The result of the certificate verification that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER option). Only used for HTTPS proxies - * - * - * - * - * CURLINFO_SCHEME - The URL scheme used for the most recent connection - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD_T - Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer - * - * - * - * - * CURLINFO_SIZE_UPLOAD_T - Total number of bytes that were uploaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD_T - The average download speed in bytes/second that curl measured for the complete download - * - * - * - * - * CURLINFO_SPEED_UPLOAD_T - The average upload speed in bytes/second that curl measured for the complete upload - * - * - * - * - * CURLINFO_APPCONNECT_TIME_T - Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CONNECT_TIME_T - Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed - * - * - * - * - * CURLINFO_FILETIME_T - Remote time of the retrieved document (as Unix timestamp), an alternative to CURLINFO_FILETIME to allow systems with 32 bit long variables to extract dates outside of the 32bit timestamp range - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME_T - Time in microseconds from the start until the name resolving was completed - * - * - * - * - * CURLINFO_PRETRANSFER_TIME_T - Time taken from the start until the file transfer is just about to begin, in microseconds - * - * - * - * - * CURLINFO_REDIRECT_TIME_T - Total time, in microseconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME_T - Time, in microseconds, it took from the start until the first byte is received - * - * - * - * - * CURLINFO_TOTAL_TIME_T - Total time in microseconds for the previous transfer, including name resolving, TCP connect etc. - * - * - * - * @return mixed If option is given, returns its value. - * Otherwise, returns an associative array with the following elements - * (which correspond to option): - * - * - * - * "url" - * - * - * - * - * "content_type" - * - * - * - * - * "http_code" - * - * - * - * - * "header_size" - * - * - * - * - * "request_size" - * - * - * - * - * "filetime" - * - * - * - * - * "ssl_verify_result" - * - * - * - * - * "redirect_count" - * - * - * - * - * "total_time" - * - * - * - * - * "namelookup_time" - * - * - * - * - * "connect_time" - * - * - * - * - * "pretransfer_time" - * - * - * - * - * "size_upload" - * - * - * - * - * "size_download" - * - * - * - * - * "speed_download" - * - * - * - * - * "speed_upload" - * - * - * - * - * "download_content_length" - * - * - * - * - * "upload_content_length" - * - * - * - * - * "starttransfer_time" - * - * - * - * - * "redirect_time" - * - * - * - * - * "certinfo" - * - * - * - * - * "primary_ip" - * - * - * - * - * "primary_port" - * - * - * - * - * "local_ip" - * - * - * - * - * "local_port" - * - * - * - * - * "redirect_url" - * - * - * - * - * "request_header" (This is only set if the CURLINFO_HEADER_OUT - * is set by a previous call to curl_setopt) - * - * - * - * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. - * @throws CurlException - * - */ -function curl_getinfo(\CurlHandle $handle, ?int $option = null) -{ - error_clear_last(); - if ($option !== null) { - $safeResult = \curl_getinfo($handle, $option); - } else { - $safeResult = \curl_getinfo($handle); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Initializes a new session and return a cURL handle for use with the - * curl_setopt, curl_exec, - * and curl_close functions. - * - * @param null|string $url If provided, the CURLOPT_URL option will be set - * to its value. You can manually set this using the - * curl_setopt function. - * - * The file protocol is disabled by cURL if - * open_basedir is set. - * @return \CurlHandle Returns a cURL handle on success. - * @throws CurlException - * - */ -function curl_init(?string $url = null): \CurlHandle -{ - error_clear_last(); - if ($url !== null) { - $safeResult = \curl_init($url); - } else { - $safeResult = \curl_init(); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * Ask the multi handle if there are any messages or information from the individual transfers. - * Messages may include information such as an error code from the transfer or just the fact - * that a transfer is completed. - * - * Repeated calls to this function will return a new result each time, until a FALSE is returned - * as a signal that there is no more to get at this point. The integer pointed to with - * queued_messages will contain the number of remaining messages after this - * function was called. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int|null $queued_messages Number of messages that are still in the queue - * @return array On success, returns an associative array for the message. - * - * - * Contents of the returned array - * - * - * - * Key: - * Value: - * - * - * - * - * msg - * The CURLMSG_DONE constant. Other return values - * are currently not available. - * - * - * result - * One of the CURLE_* constants. If everything is - * OK, the CURLE_OK will be the result. - * - * - * handle - * Resource of type curl indicates the handle which it concerns. - * - * - * - * - * @throws CurlException - * - */ -function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array -{ - error_clear_last(); - $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } - return $safeResult; -} - - -/** - * Allows the processing of multiple cURL handles asynchronously. - * - * @return \CurlMultiHandle Returns a cURL multi handle on success. - * @throws CurlException - * - */ -function curl_multi_init(): \CurlMultiHandle -{ - error_clear_last(); - $safeResult = \curl_multi_init(); - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * - * - * @param \CurlMultiHandle $multi_handle - * @param int $option One of the CURLMOPT_* constants. - * @param mixed $value The value to be set on option. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLMOPT_PIPELINING - * - * Pass 1 to enable or 0 to disable. Enabling pipelining on a multi - * handle will make it attempt to perform HTTP Pipelining as far as - * possible for transfers using this handle. This means that if you add - * a second request that can use an already existing connection, the - * second request will be "piped" on the same connection. - * As of cURL 7.43.0, the value is a bitmask, and you can also pass 2 to try to multiplex the new - * transfer over an existing HTTP/2 connection if possible. - * Passing 3 instructs cURL to ask for pipelining and multiplexing - * independently of each other. - * As of cURL 7.62.0, setting the pipelining bit has no effect. - * Instead of integer literals, you can also use the CURLPIPE_* - * constants if available. - * - * - * - * CURLMOPT_MAXCONNECTS - * - * Pass a number that will be used as the maximum amount of - * simultaneously open connections that libcurl may cache. - * By default the size will be enlarged to fit four times the number - * of handles added via curl_multi_add_handle. - * When the cache is full, curl closes the oldest one in the cache - * to prevent the number of open connections from increasing. - * - * - * - * CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the chunk length threshold for pipelining - * in bytes. - * - * - * - * CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the size threshold for pipelining - * penalty in bytes. - * - * - * - * CURLMOPT_MAX_HOST_CONNECTIONS - * - * Pass a number that specifies the maximum number of connections to a - * single host. - * - * - * - * CURLMOPT_MAX_PIPELINE_LENGTH - * - * Pass a number that specifies the maximum number of requests in a - * pipeline. - * - * - * - * CURLMOPT_MAX_TOTAL_CONNECTIONS - * - * Pass a number that specifies the maximum number of simultaneously - * open connections. - * - * - * - * CURLMOPT_PUSHFUNCTION - * - * Pass a callable that will be registered to handle server - * pushes and should have the following signature: - * - * intpushfunction - * resourceparent_ch - * resourcepushed_ch - * arrayheaders - * - * - * - * parent_ch - * - * - * The parent cURL handle (the request the client made). - * - * - * - * - * pushed_ch - * - * - * A new cURL handle for the pushed request. - * - * - * - * - * headers - * - * - * The push promise headers. - * - * - * - * - * The push function is supposed to return either - * CURL_PUSH_OK if it can handle the push, or - * CURL_PUSH_DENY to reject it. - * - * - * - * - * - * - * The parent cURL handle (the request the client made). - * - * A new cURL handle for the pushed request. - * - * The push promise headers. - * @throws CurlException - * - */ -function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void -{ - error_clear_last(); - $safeResult = \curl_multi_setopt($multi_handle, $option, $value); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } -} - - -/** - * Sets an option on the given cURL session handle. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int $option The CURLOPT_XXX option to set. - * @param mixed $value The value to be set on option. - * - * value should be a bool for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_AUTOREFERER - * - * TRUE to automatically set the Referer: field in - * requests where it follows a Location: redirect. - * - * - * - * - * - * CURLOPT_COOKIESESSION - * - * TRUE to mark this as a new cookie "session". It will force libcurl - * to ignore all cookies it is about to load that are "session cookies" - * from the previous session. By default, libcurl always stores and - * loads all cookies, independent if they are session cookies or not. - * Session cookies are cookies without expiry date and they are meant - * to be alive and existing for this "session" only. - * - * - * - * - * - * CURLOPT_CERTINFO - * - * TRUE to output SSL certification information to STDERR - * on secure transfers. - * - * - * Added in cURL 7.19.1. - * Requires CURLOPT_VERBOSE to be on to have an effect. - * - * - * - * CURLOPT_CONNECT_ONLY - * - * TRUE tells the library to perform all the required proxy authentication - * and connection setup, but no data transfer. This option is implemented for - * HTTP, SMTP and POP3. - * - * - * Added in 7.15.2. - * - * - * - * CURLOPT_CRLF - * - * TRUE to convert Unix newlines to CRLF newlines - * on transfers. - * - * - * - * - * - * CURLOPT_DISALLOW_USERNAME_IN_URL - * - * TRUE to not allow URLs that include a username. Usernames are allowed by default (0). - * - * - * Added in cURL 7.61.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_SHUFFLE_ADDRESSES - * - * TRUE to shuffle the order of all returned addresses so that they will be used - * in a random order, when a name is resolved and more than one IP address is returned. - * This may cause IPv4 to be used before IPv6 or vice versa. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_HAPROXYPROTOCOL - * - * TRUE to send an HAProxy PROXY protocol v1 header at the start of the connection. - * The default action is not to send this header. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_SSH_COMPRESSION - * - * TRUE to enable built-in SSH compression. This is a request, not an order; - * the server may or may not do it. - * - * - * Added in cURL 7.56.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_USE_GLOBAL_CACHE - * - * TRUE to use a global DNS cache. This option is not thread-safe. - * It is conditionally enabled by default if PHP is built for non-threaded use - * (CLI, FCGI, Apache2-Prefork, etc.). - * - * - * - * - * - * CURLOPT_FAILONERROR - * - * TRUE to fail verbosely if the HTTP code returned - * is greater than or equal to 400. The default behavior is to return - * the page normally, ignoring the code. - * - * - * - * - * - * CURLOPT_SSL_FALSESTART - * - * TRUE to enable TLS false start. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_FILETIME - * - * TRUE to attempt to retrieve the modification - * date of the remote document. This value can be retrieved using - * the CURLINFO_FILETIME option with - * curl_getinfo. - * - * - * - * - * - * CURLOPT_FOLLOWLOCATION - * - * TRUE to follow any - * "Location: " header that the server sends as - * part of the HTTP header. - * See also CURLOPT_MAXREDIRS. - * - * - * - * - * - * CURLOPT_FORBID_REUSE - * - * TRUE to force the connection to explicitly - * close when it has finished processing, and not be pooled for reuse. - * - * - * - * - * - * CURLOPT_FRESH_CONNECT - * - * TRUE to force the use of a new connection - * instead of a cached one. - * - * - * - * - * - * CURLOPT_FTP_USE_EPRT - * - * TRUE to use EPRT (and LPRT) when doing active - * FTP downloads. Use FALSE to disable EPRT and LPRT and use PORT - * only. - * - * - * - * - * - * CURLOPT_FTP_USE_EPSV - * - * TRUE to first try an EPSV command for FTP - * transfers before reverting back to PASV. Set to FALSE - * to disable EPSV. - * - * - * - * - * - * CURLOPT_FTP_CREATE_MISSING_DIRS - * - * TRUE to create missing directories when an FTP operation - * encounters a path that currently doesn't exist. - * - * - * - * - * - * CURLOPT_FTPAPPEND - * - * TRUE to append to the remote file instead of - * overwriting it. - * - * - * - * - * - * CURLOPT_TCP_NODELAY - * - * TRUE to disable TCP's Nagle algorithm, which tries to minimize - * the number of small packets on the network. - * - * - * Available for versions compiled with libcurl 7.11.2 or - * greater. - * - * - * - * CURLOPT_FTPASCII - * - * An alias of - * CURLOPT_TRANSFERTEXT. Use that instead. - * - * - * - * - * - * CURLOPT_FTPLISTONLY - * - * TRUE to only list the names of an FTP - * directory. - * - * - * - * - * - * CURLOPT_HEADER - * - * TRUE to include the header in the output. - * - * - * - * - * - * CURLINFO_HEADER_OUT - * - * TRUE to track the handle's request string. - * - * - * The CURLINFO_ - * prefix is intentional. - * - * - * - * CURLOPT_HTTP09_ALLOWED - * - * Whether to allow HTTP/0.9 responses. Defaults to FALSE as of libcurl 7.66.0; - * formerly it defaulted to TRUE. - * - * - * Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0 - * - * - * - * CURLOPT_HTTPGET - * - * TRUE to reset the HTTP request method to GET. - * Since GET is the default, this is only necessary if the request - * method has been changed. - * - * - * - * - * - * CURLOPT_HTTPPROXYTUNNEL - * - * TRUE to tunnel through a given HTTP proxy. - * - * - * - * - * - * CURLOPT_HTTP_CONTENT_DECODING - * - * FALSE to get the raw HTTP response body. - * - * - * Available if built against libcurl >= 7.16.2. - * - * - * - * CURLOPT_KEEP_SENDING_ON_ERROR - * - * TRUE to keep sending the request body if the HTTP code returned is - * equal to or larger than 300. The default action would be to stop sending - * and close the stream or connection. Suitable for manual NTLM authentication. - * Most applications do not need this option. - * - * - * Available as of PHP 7.3.0 if built against libcurl >= 7.51.0. - * - * - * - * CURLOPT_MUTE - * - * TRUE to be completely silent with regards to - * the cURL functions. - * - * - * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead) - * - * - * - * CURLOPT_NETRC - * - * TRUE to scan the ~/.netrc - * file to find a username and password for the remote site that - * a connection is being established with. - * - * - * - * - * - * CURLOPT_NOBODY - * - * TRUE to exclude the body from the output. - * Request method is then set to HEAD. Changing this to FALSE does - * not change it to GET. - * - * - * - * - * - * CURLOPT_NOPROGRESS - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * - * - * - * - * CURLOPT_NOSIGNAL - * - * TRUE to ignore any cURL function that causes a - * signal to be sent to the PHP process. This is turned on by default - * in multi-threaded SAPIs so timeout options can still be used. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_PATH_AS_IS - * - * TRUE to not handle dot dot sequences. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PIPEWAIT - * - * TRUE to wait for pipelining/multiplexing. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POST - * - * TRUE to do a regular HTTP POST. This POST is the - * normal application/x-www-form-urlencoded kind, - * most commonly used by HTML forms. - * - * - * - * - * - * CURLOPT_PUT - * - * TRUE to HTTP PUT a file. The file to PUT must - * be set with CURLOPT_INFILE and - * CURLOPT_INFILESIZE. - * - * - * - * - * - * CURLOPT_RETURNTRANSFER - * - * TRUE to return the transfer as a string of the - * return value of curl_exec instead of outputting - * it directly. - * - * - * - * - * - * CURLOPT_SASL_IR - * - * TRUE to enable sending the initial response in the first packet. - * - * - * Added in cURL 7.31.10. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_ALPN - * - * FALSE to disable ALPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_NPN - * - * FALSE to disable NPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's - * certificate. Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * - * - * TRUE by default as of cURL 7.10. Default bundle installed as of - * cURL 7.10. - * - * - * - * CURLOPT_SSL_VERIFYSTATUS - * - * TRUE to verify the certificate's status. - * - * - * Added in cURL 7.41.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's certificate. - * Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * When set to false, the peer certificate verification succeeds regardless. - * - * - * TRUE by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_SUPPRESS_CONNECT_HEADERS - * - * TRUE to suppress proxy CONNECT response headers from the user callback functions - * CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION, - * when CURLOPT_HTTPPROXYTUNNEL is used and a CONNECT request is made. - * - * - * Added in cURL 7.54.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_TCP_FASTOPEN - * - * TRUE to enable TCP Fast Open. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TFTP_NO_OPTIONS - * - * TRUE to not send TFTP options requests. - * - * - * Added in cURL 7.48.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TRANSFERTEXT - * - * TRUE to use ASCII mode for FTP transfers. - * For LDAP, it retrieves data in plain text instead of HTML. On - * Windows systems, it will not set STDOUT to binary - * mode. - * - * - * - * - * - * CURLOPT_UNRESTRICTED_AUTH - * - * TRUE to keep sending the username and password - * when following locations (using - * CURLOPT_FOLLOWLOCATION), even when the - * hostname has changed. - * - * - * - * - * - * CURLOPT_UPLOAD - * - * TRUE to prepare for an upload. - * - * - * - * - * - * CURLOPT_VERBOSE - * - * TRUE to output verbose information. Writes - * output to STDERR, or the file specified using - * CURLOPT_STDERR. - * - * - * - * - * - * - * - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_BUFFERSIZE - * - * The size of the buffer to use for each read. There is no guarantee - * this request will be fulfilled, however. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_CONNECTTIMEOUT - * - * The number of seconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * - * - * - * - * CURLOPT_CONNECTTIMEOUT_MS - * - * The number of milliseconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_DNS_CACHE_TIMEOUT - * - * The number of seconds to keep DNS entries in memory. This - * option is set to 120 (2 minutes) by default. - * - * - * - * - * - * CURLOPT_EXPECT_100_TIMEOUT_MS - * - * The timeout for Expect: 100-continue responses in milliseconds. - * Defaults to 1000 milliseconds. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS - * - * Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts - * to connect to both IPv4 and IPv6 addresses for dual-stack hosts, - * preferring IPv6 first for timeout milliseconds. - * Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_FTPSSLAUTH - * - * The FTP authentication method (when is activated): - * CURLFTPAUTH_SSL (try SSL first), - * CURLFTPAUTH_TLS (try TLS first), or - * CURLFTPAUTH_DEFAULT (let cURL decide). - * - * - * Added in cURL 7.12.2. - * - * - * - * CURLOPT_HEADEROPT - * - * How to deal with headers. One of the following constants: - * - * CURLHEADER_UNIFIED: the headers specified in - * CURLOPT_HTTPHEADER will be used in requests - * both to servers and proxies. With this option enabled, - * CURLOPT_PROXYHEADER will not have any effect. - * - * - * CURLHEADER_SEPARATE: makes - * CURLOPT_HTTPHEADER headers only get sent to - * a server and not to a proxy. Proxy headers must be set with - * CURLOPT_PROXYHEADER to get used. Note that if - * a non-CONNECT request is sent to a proxy, libcurl will send both - * server headers and proxy headers. When doing CONNECT, libcurl will - * send CURLOPT_PROXYHEADER headers only to the - * proxy and then CURLOPT_HTTPHEADER headers - * only to the server. - * - * - * Defaults to CURLHEADER_SEPARATE as of cURL - * 7.42.1, and CURLHEADER_UNIFIED before. - * - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP_VERSION - * - * CURL_HTTP_VERSION_NONE (default, lets CURL - * decide which version to use), - * CURL_HTTP_VERSION_1_0 (forces HTTP/1.0), - * CURL_HTTP_VERSION_1_1 (forces HTTP/1.1), - * CURL_HTTP_VERSION_2_0 (attempts HTTP 2), - * CURL_HTTP_VERSION_2 (alias of CURL_HTTP_VERSION_2_0), - * CURL_HTTP_VERSION_2TLS (attempts HTTP 2 over TLS (HTTPS) only) or - * CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade). - * - * - * - * - * - * CURLOPT_HTTPAUTH - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * - * - * - * - * CURLOPT_INFILESIZE - * - * The expected size, in bytes, of the file when uploading a file to - * a remote site. Note that using this option will not stop libcurl - * from sending more data, as exactly what is sent depends on - * CURLOPT_READFUNCTION. - * - * - * - * - * - * CURLOPT_LOW_SPEED_LIMIT - * - * The transfer speed, in bytes per second, that the transfer should be - * below during the count of CURLOPT_LOW_SPEED_TIME - * seconds before PHP considers the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_LOW_SPEED_TIME - * - * The number of seconds the transfer speed should be below - * CURLOPT_LOW_SPEED_LIMIT before PHP considers - * the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_MAXCONNECTS - * - * The maximum amount of persistent connections that are allowed. - * When the limit is reached, - * CURLOPT_CLOSEPOLICY is used to determine - * which connection to close. - * - * - * - * - * - * CURLOPT_MAXREDIRS - * - * The maximum amount of HTTP redirections to follow. Use this option - * alongside CURLOPT_FOLLOWLOCATION. - * Default value of 20 is set to prevent infinite redirects. - * Setting to -1 allows inifinite redirects, and 0 - * refuses all redirects. - * - * - * - * - * - * CURLOPT_PORT - * - * An alternative port number to connect to. - * - * - * - * - * - * CURLOPT_POSTREDIR - * - * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) - * and 4 (303 See Other) if the HTTP POST method should be maintained - * when CURLOPT_FOLLOWLOCATION is set and a - * specific type of redirect occurs. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PROTOCOLS - * - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_PROXYAUTH - * - * The HTTP authentication method(s) to use for the proxy connection. - * Use the same bitmasks as described in - * CURLOPT_HTTPAUTH. For proxy authentication, - * only CURLAUTH_BASIC and - * CURLAUTH_NTLM are currently supported. - * - * - * Added in cURL 7.10.7. - * - * - * - * CURLOPT_PROXYPORT - * - * The port number of the proxy to connect to. This port number can - * also be set in CURLOPT_PROXY. - * - * - * - * - * - * CURLOPT_PROXYTYPE - * - * Either CURLPROXY_HTTP (default), - * CURLPROXY_SOCKS4, - * CURLPROXY_SOCKS5, - * CURLPROXY_SOCKS4A or - * CURLPROXY_SOCKS5_HOSTNAME. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_REDIR_PROTOCOLS - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in a transfer that it follows to in - * a redirect when CURLOPT_FOLLOWLOCATION is enabled. - * This allows you to limit specific transfers to only be allowed to use a subset - * of protocols in redirections. By default libcurl will allow all protocols - * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions - * which unconditionally would follow to all protocols supported. - * See also CURLOPT_PROTOCOLS for protocol constant values. - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_RESUME_FROM - * - * The offset, in bytes, to resume a transfer from. - * - * - * - * - * - * CURLOPT_SOCKS5_AUTH - * - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_BASIC allows username/password authentication. - * - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * - * CURLAUTH_NONE allows no authentication. - * - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * - * - * Available as of 7.3.0 and curl >= 7.55.0. - * - * - * - * CURLOPT_SSL_OPTIONS - * - * Set SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. - * - * - * - * Added in cURL 7.25.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYHOST - * - * 2 to verify that a Common Name field or a Subject Alternate Name - * field in the SSL peer certificate matches the provided hostname. - * 0 to not check the names. - * 1 should not be used. - * In production environments the value of this option - * should be kept at 2 (default value). - * - * - * Support for value 1 removed in cURL 7.28.1. - * - * - * - * CURLOPT_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT (0), - * CURL_SSLVERSION_TLSv1 (1), - * CURL_SSLVERSION_SSLv2 (2), - * CURL_SSLVERSION_SSLv3 (3), - * CURL_SSLVERSION_TLSv1_0 (4), - * CURL_SSLVERSION_TLSv1_1 (5) or - * CURL_SSLVERSION_TLSv1_2 (6). - * The maximum TLS version can be set by using one of the CURL_SSLVERSION_MAX_* - * constants. It is also possible to OR one of the CURL_SSLVERSION_* - * constants with one of the CURL_SSLVERSION_MAX_* constants. - * CURL_SSLVERSION_MAX_DEFAULT (the maximum version supported by the library), - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, or - * CURL_SSLVERSION_MAX_TLSv1_3. - * - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * - * - * - * - * - * - * CURLOPT_PROXY_SSL_OPTIONS - * - * Set proxy SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. (curl >= 7.44.0) - * - * - * CURLSSLOPT_NO_PARTIALCHAIN: do not accept "partial" - * certificate chains, which it otherwise does by default. (curl >= 7.68.0) - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYHOST - * - * Set to 2 to verify in the HTTPS proxy's certificate name fields against the proxy name. - * When set to 0 the connection succeeds regardless of the names used in the certificate. - * Use that ability with caution! - * 1 treated as a debug option in curl 7.28.0 and earlier. - * From curl 7.28.1 to 7.65.3 CURLE_BAD_FUNCTION_ARGUMENT is returned. - * From curl 7.66.0 onwards 1 and 2 is treated as the same value. - * In production environments the value of this option should be kept at 2 (default value). - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT, - * CURL_SSLVERSION_TLSv1, - * CURL_SSLVERSION_TLSv1_0, - * CURL_SSLVERSION_TLSv1_1, - * CURL_SSLVERSION_TLSv1_2, - * CURL_SSLVERSION_TLSv1_3, - * CURL_SSLVERSION_MAX_DEFAULT, - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, - * CURL_SSLVERSION_MAX_TLSv1_3 or - * CURL_SSLVERSION_SSLv3. - * - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_STREAM_WEIGHT - * - * Set the numerical stream weight (a number between 1 and 256). - * - * - * Added in cURL 7.46.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TCP_KEEPALIVE - * - * If set to 1, TCP keepalive probes will be sent. The delay and - * frequency of these probes can be controlled by the CURLOPT_TCP_KEEPIDLE - * and CURLOPT_TCP_KEEPINTVL options, provided the operating system - * supports them. If set to 0 (default) keepalive probes are disabled. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPIDLE - * - * Sets the delay, in seconds, that the operating system will wait while the connection is - * idle before sending keepalive probes, if CURLOPT_TCP_KEEPALIVE is - * enabled. Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPINTVL - * - * Sets the interval, in seconds, that the operating system will wait between sending - * keepalive probes, if CURLOPT_TCP_KEEPALIVE is enabled. - * Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TIMECONDITION - * - * How CURLOPT_TIMEVALUE is treated. - * Use CURL_TIMECOND_IFMODSINCE to return the - * page only if it has been modified since the time specified in - * CURLOPT_TIMEVALUE. If it hasn't been modified, - * a "304 Not Modified" header will be returned - * assuming CURLOPT_HEADER is TRUE. - * Use CURL_TIMECOND_IFUNMODSINCE for the reverse - * effect. Use CURL_TIMECOND_NONE to ignore - * CURLOPT_TIMEVALUE and always return the page. - * CURL_TIMECOND_NONE is the default. - * - * - * Before cURL 7.46.0 the default was - * CURL_TIMECOND_IFMODSINCE. - * - * - * - * CURLOPT_TIMEOUT - * - * The maximum number of seconds to allow cURL functions to execute. - * - * - * - * - * - * CURLOPT_TIMEOUT_MS - * - * The maximum number of milliseconds to allow cURL functions to - * execute. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_TIMEVALUE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. - * - * - * - * - * - * CURLOPT_TIMEVALUE_LARGE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. Defaults to zero. - * The difference between this option and CURLOPT_TIMEVALUE - * is the type of the argument. On systems where 'long' is only 32 bit wide, - * this option has to be used to set dates beyond the year 2038. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_MAX_RECV_SPEED_LARGE - * - * If a download exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_MAX_SEND_SPEED_LARGE - * - * If an upload exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_SSH_AUTH_TYPES - * - * A bitmask consisting of one or more of - * CURLSSH_AUTH_PUBLICKEY, - * CURLSSH_AUTH_PASSWORD, - * CURLSSH_AUTH_HOST, - * CURLSSH_AUTH_KEYBOARD. Set to - * CURLSSH_AUTH_ANY to let libcurl pick one. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_IPRESOLVE - * - * Allows an application to select what kind of IP addresses to use when - * resolving host names. This is only interesting when using host names that - * resolve addresses using more than one version of IP, possible values are - * CURL_IPRESOLVE_WHATEVER, - * CURL_IPRESOLVE_V4, - * CURL_IPRESOLVE_V6, by default - * CURL_IPRESOLVE_WHATEVER. - * - * - * Added in cURL 7.10.8. - * - * - * - * CURLOPT_FTP_FILEMETHOD - * - * Tell curl which method to use to reach a file on a FTP(S) server. Possible values are - * CURLFTPMETHOD_MULTICWD, - * CURLFTPMETHOD_NOCWD and - * CURLFTPMETHOD_SINGLECWD. - * - * - * Added in cURL 7.15.1. - * - * - * - * - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_BASIC allows username/password authentication. - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * CURLAUTH_NONE allows no authentication. - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * value should be a string for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_ABSTRACT_UNIX_SOCKET - * - * Enables the use of an abstract Unix domain socket instead of - * establishing a TCP connection to a host and sets the path to - * the given string. This option shares the same semantics - * as CURLOPT_UNIX_SOCKET_PATH. These two options - * share the same storage and therefore only one of them can be set - * per handle. - * - * - * Available since PHP 7.3.0 and cURL 7.53.0 - * - * - * - * CURLOPT_CAINFO - * - * The name of a file holding one or more certificates to verify the - * peer with. This only makes sense when used in combination with - * CURLOPT_SSL_VERIFYPEER. - * - * - * Might require an absolute path. - * - * - * - * CURLOPT_CAPATH - * - * A directory that holds multiple CA certificates. Use this option - * alongside CURLOPT_SSL_VERIFYPEER. - * - * - * - * - * - * CURLOPT_COOKIE - * - * The contents of the "Cookie: " header to be - * used in the HTTP request. - * Note that multiple cookies are separated with a semicolon followed - * by a space (e.g., "fruit=apple; colour=red") - * - * - * - * - * - * CURLOPT_COOKIEFILE - * - * The name of the file containing the cookie data. The cookie file can - * be in Netscape format, or just plain HTTP-style headers dumped into - * a file. - * If the name is an empty string, no cookies are loaded, but cookie - * handling is still enabled. - * - * - * - * - * - * CURLOPT_COOKIEJAR - * - * The name of a file to save all internal cookies to when the handle is closed, - * e.g. after a call to curl_close. - * - * - * - * - * - * CURLOPT_COOKIELIST - * - * A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular - * HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store. - * "ALL" erases all cookies held in memory. - * "SESS" erases all session cookies held in memory. - * "FLUSH" writes all known cookies to the file specified by CURLOPT_COOKIEJAR. - * "RELOAD" loads all cookies from the files specified by CURLOPT_COOKIEFILE. - * - * - * Available since cURL 7.14.1. - * - * - * - * CURLOPT_CUSTOMREQUEST - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * - * - * - * - * CURLOPT_DEFAULT_PROTOCOL - * - * The default protocol to use if the URL is missing a scheme name. - * - * - * Added in cURL 7.45.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_INTERFACE - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP4 - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP6 - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_EGDSOCKET - * - * Like CURLOPT_RANDOM_FILE, except a filename - * to an Entropy Gathering Daemon socket. - * - * - * - * - * - * CURLOPT_ENCODING - * - * The contents of the "Accept-Encoding: " header. - * This enables decoding of the response. Supported encodings are - * "identity", "deflate", and - * "gzip". If an empty string, "", - * is set, a header containing all supported encoding types is sent. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_FTPPORT - * - * The value which will be used to get the IP address to use - * for the FTP "PORT" instruction. The "PORT" instruction tells - * the remote server to connect to our specified IP address. The - * string may be a plain IP address, a hostname, a network - * interface name (under Unix), or just a plain '-' to use the - * systems default IP address. - * - * - * - * - * - * CURLOPT_INTERFACE - * - * The name of the outgoing network interface to use. This can be an - * interface name, an IP address or a host name. - * - * - * - * - * - * CURLOPT_KEYPASSWD - * - * The password required to use the CURLOPT_SSLKEY - * or CURLOPT_SSH_PRIVATE_KEYFILE private key. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_KRB4LEVEL - * - * The KRB4 (Kerberos 4) security level. Any of the following values - * (in order from least to most powerful) are valid: - * "clear", - * "safe", - * "confidential", - * "private".. - * If the string does not match one of these, - * "private" is used. Setting this option to NULL - * will disable KRB4 security. Currently KRB4 security only works - * with FTP transactions. - * - * - * - * - * - * CURLOPT_LOGIN_OPTIONS - * - * Can be used to set protocol specific login options, such as the - * preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", - * and should be used in conjunction with the - * CURLOPT_USERNAME option. - * - * - * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PINNEDPUBLICKEY - * - * Set the pinned public key. - * The string can be the file name of your pinned public key. The file - * format expected is "PEM" or "DER". The string can also be any - * number of base64 encoded sha256 hashes preceded by "sha256//" and - * separated by ";". - * - * - * Added in cURL 7.39.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POSTFIELDS - * - * - * The full data to post in a HTTP "POST" operation. - * This parameter can either be - * passed as a urlencoded string like 'para1=val1&para2=val2&...' - * or as an array with the field name as key and field data as value. - * If value is an array, the - * Content-Type header will be set to - * multipart/form-data. - * - * - * Files can be sent using CURLFile, - * in which case value must be an array. - * - * - * - * - * - * - * CURLOPT_PRIVATE - * - * Any data that should be associated with this cURL handle. This data - * can subsequently be retrieved with the - * CURLINFO_PRIVATE option of - * curl_getinfo. cURL does nothing with this data. - * When using a cURL multi handle, this private data is typically a - * unique key to identify a standard cURL handle. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_PRE_PROXY - * - * Set a string holding the host name or dotted numerical - * IP address to be used as the preproxy that curl connects to before - * it connects to the HTTP(S) proxy specified in the - * CURLOPT_PROXY option for the upcoming request. - * The preproxy can only be a SOCKS proxy and it should be prefixed with - * [scheme]:// to specify which kind of socks is used. - * A numerical IPv6 address must be written within [brackets]. - * Setting the preproxy to an empty string explicitly disables the use of a preproxy. - * To specify port number in this string, append :[port] - * to the end of the host name. The proxy's port number may optionally be - * specified with the separate option CURLOPT_PROXYPORT. - * Defaults to using port 1080 for proxies if a port is not specified. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY - * - * The HTTP proxy to tunnel requests through. - * - * - * - * - * - * CURLOPT_PROXY_SERVICE_NAME - * - * The proxy authentication service name. - * - * - * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_CAINFO - * - * The path to proxy Certificate Authority (CA) bundle. Set the path as a - * string naming a file holding one or more certificates to - * verify the HTTPS proxy with. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * Defaults set to the system path where libcurl's cacert bundle is assumed - * to be stored. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CAPATH - * - * The directory holding multiple CA certificates to verify the HTTPS proxy with. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CRLFILE - * - * Set the file name with the concatenation of CRL (Certificate Revocation List) - * in PEM format to use in the certificate validation that occurs during - * the SSL exchange. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_KEYPASSWD - * - * Set the string be used as the password required to use the - * CURLOPT_PROXY_SSLKEY private key. You never needed a - * passphrase to load a certificate but you need one to load your private key. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_PINNEDPUBLICKEY - * - * Set the pinned public key for HTTPS proxy. The string can be the file name - * of your pinned public key. The file format expected is "PEM" or "DER". - * The string can also be any number of base64 encoded sha256 hashes preceded by - * "sha256//" and separated by ";" - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERT - * - * The file name of your client certificate used to connect to the HTTPS proxy. - * The default format is "P12" on Secure Transport and "PEM" on other engines, - * and can be changed with CURLOPT_PROXY_SSLCERTTYPE. - * With NSS or Secure Transport, this can also be the nickname of the certificate - * you wish to authenticate with as it is named in the security database. - * If you want to use a file from the current directory, please precede it with - * "./" prefix, in order to avoid confusion with a nickname. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERTTYPE - * - * The format of your client certificate used when connecting to an HTTPS proxy. - * Supported formats are "PEM" and "DER", except with Secure Transport. - * OpenSSL (versions 0.9.3 and later) and Secure Transport - * (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for - * PKCS#12-encoded files. Defaults to "PEM". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_CIPHER_LIST - * - * The list of ciphers to use for the connection to the HTTPS proxy. - * The list must be syntactically correct, it consists of one or more cipher - * strings separated by colons. Commas or spaces are also acceptable separators - * but colons are normally used, !, - and + can be used as operators. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection to a proxy. - * The list must be syntactically correct, it consists of one or more - * cipher suite strings separated by colons. This option is currently used - * only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_PROXY_SSLKEY - * - * The file name of your private key used for connecting to the HTTPS proxy. - * The default format is "PEM" and can be changed with - * CURLOPT_PROXY_SSLKEYTYPE. - * (iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled. - * - * - * - * CURLOPT_PROXY_SSLKEYTYPE - * - * The format of your private key. Supported formats are "PEM", "DER" and "ENG". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_PASSWORD - * - * The password to use for the TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_USERNAME option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_TYPE - * - * The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP". - * - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_USERNAME - * - * Tusername to use for the HTTPS proxy TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXYUSERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection to the proxy. - * - * - * - * - * - * CURLOPT_RANDOM_FILE - * - * A filename to be used to seed the random number generator for SSL. - * - * - * - * - * - * CURLOPT_RANGE - * - * Range(s) of data to retrieve in the format - * "X-Y" where X or Y are optional. HTTP transfers - * also support several intervals, separated with commas in the format - * "X-Y,N-M". - * - * - * - * - * - * CURLOPT_REFERER - * - * The contents of the "Referer: " header to be used - * in a HTTP request. - * - * - * - * - * - * CURLOPT_SERVICE_NAME - * - * The authentication service name. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 - * - * A string containing 32 hexadecimal digits. The string should be the - * MD5 checksum of the remote host's public key, and libcurl will reject - * the connection to the host unless the md5sums match. - * This option is only for SCP and SFTP transfers. - * - * - * Added in cURL 7.17.1. - * - * - * - * CURLOPT_SSH_PUBLIC_KEYFILE - * - * The file name for your public key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, - * and just "id_dsa.pub" in the current directory if HOME is not set. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSH_PRIVATE_KEYFILE - * - * The file name for your private key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa if the HOME environment variable is set, - * and just "id_dsa" in the current directory if HOME is not set. - * If the file is password-protected, set the password with - * CURLOPT_KEYPASSWD. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSL_CIPHER_LIST - * - * A list of ciphers to use for SSL. For example, - * RC4-SHA and TLSv1 are valid - * cipher lists. - * - * - * - * - * - * CURLOPT_SSLCERT - * - * The name of a file containing a PEM formatted certificate. - * - * - * - * - * - * CURLOPT_SSLCERTPASSWD - * - * The password required to use the - * CURLOPT_SSLCERT certificate. - * - * - * - * - * - * CURLOPT_SSLCERTTYPE - * - * The format of the certificate. Supported formats are - * "PEM" (default), "DER", - * and "ENG". - * As of OpenSSL 0.9.3, "P12" (for PKCS#12-encoded files) - * is also supported. - * - * - * Added in cURL 7.9.3. - * - * - * - * CURLOPT_SSLENGINE - * - * The identifier for the crypto engine of the private SSL key - * specified in CURLOPT_SSLKEY. - * - * - * - * - * - * CURLOPT_SSLENGINE_DEFAULT - * - * The identifier for the crypto engine used for asymmetric crypto - * operations. - * - * - * - * - * - * CURLOPT_SSLKEY - * - * The name of a file containing a private SSL key. - * - * - * - * - * - * CURLOPT_SSLKEYPASSWD - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * - * - * - * - * CURLOPT_SSLKEYTYPE - * - * The key type of the private SSL key specified in - * CURLOPT_SSLKEY. Supported key types are - * "PEM" (default), "DER", - * and "ENG". - * - * - * - * - * - * CURLOPT_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection. The list must be - * syntactically correct, it consists of one or more cipher suite strings separated by colons. - * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_UNIX_SOCKET_PATH - * - * Enables the use of Unix domain sockets as connection endpoint and - * sets the path to the given string. - * - * - * Added in cURL 7.40.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_URL - * - * The URL to fetch. This can also be set when initializing a - * session with curl_init. - * - * - * - * - * - * CURLOPT_USERAGENT - * - * The contents of the "User-Agent: " header to be - * used in a HTTP request. - * - * - * - * - * - * CURLOPT_USERNAME - * - * The user name to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PASSWORD - * - * The password to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_USERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection. - * - * - * - * - * - * CURLOPT_XOAUTH2_BEARER - * - * Specifies the OAuth 2.0 access token. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * - * - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * The default protocol to use if the URL is missing a scheme name. - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * value should be an array for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_CONNECT_TO - * - * Connect to a specific host and port instead of the URL's host and port. - * Accepts an array of strings with the format - * HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP200ALIASES - * - * An array of HTTP 200 responses that will be treated as valid - * responses and not as errors. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_HTTPHEADER - * - * An array of HTTP header fields to set, in the format - * - * array('Content-type: text/plain', 'Content-length: 100') - * - * - * - * - * - * - * CURLOPT_POSTQUOTE - * - * An array of FTP commands to execute on the server after the FTP - * request has been performed. - * - * - * - * - * - * CURLOPT_PROXYHEADER - * - * An array of custom HTTP headers to pass to proxies. - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_QUOTE - * - * An array of FTP commands to execute on the server prior to the FTP - * request. - * - * - * - * - * - * CURLOPT_RESOLVE - * - * Provide a custom address for a specific host and port pair. An array - * of hostname, port, and IP address strings, each element separated by - * a colon. In the format: - * - * array("example.com:80:127.0.0.1") - * - * - * - * Added in cURL 7.21.3. - * - * - * - * - * - * - * value should be a stream resource (using - * fopen, for example) for the following values of the - * option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLOPT_FILE - * - * The file that the transfer should be written to. The default - * is STDOUT (the browser window). - * - * - * - * CURLOPT_INFILE - * - * The file that the transfer should be read from when uploading. - * - * - * - * CURLOPT_STDERR - * - * An alternative location to output errors to instead of - * STDERR. - * - * - * - * CURLOPT_WRITEHEADER - * - * The file that the header part of the transfer is written to. - * - * - * - * - * - * - * value should be the name of a valid function or a Closure - * for the following values of the option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLOPT_HEADERFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, the second is a - * string with the header data to be written. The header data must - * be written by this callback. Return the number of - * bytes written. - * - * - * - * CURLOPT_PASSWDFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * string containing a password prompt, and the third is the maximum - * password length. Return the string containing the password. - * - * - * - * CURLOPT_PROGRESSFUNCTION - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * - * - * - * CURLOPT_READFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * stream resource provided to cURL through the option - * CURLOPT_INFILE, and the third is the maximum - * amount of data to be read. The callback must return a string - * with a length equal or smaller than the amount of data requested, - * typically by reading it from the passed stream resource. It should - * return an empty string to signal EOF. - * - * - * - * CURLOPT_WRITEFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, and the second is a - * string with the data to be written. The data must be saved by - * this callback. It must return the exact number of bytes written - * or the transfer will be aborted with an error. - * - * - * - * - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * Other values: - * - * - * - * - * Option - * Set value to - * - * + * @param \CurlHandle $handle + * @return \CurlHandle + * @throws CurlException * + */ +function curl_copy_handle(\CurlHandle $handle): \CurlHandle +{ + error_clear_last(); + $safeResult = \curl_copy_handle($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param string $string + * @return string + * @throws CurlException * - * CURLOPT_SHARE + */ +function curl_escape(\CurlHandle $handle, string $string): string +{ + error_clear_last(); + $safeResult = \curl_escape($handle, $string); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @return bool|string + * @throws CurlException * - * A result of curl_share_init. Makes the cURL - * handle to use the data from the shared handle. + */ +function curl_exec(\CurlHandle $handle) +{ + error_clear_last(); + $safeResult = \curl_exec($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param int|null $option + * @return mixed + * @throws CurlException * + */ +function curl_getinfo(\CurlHandle $handle, ?int $option = null) +{ + error_clear_last(); + if ($option !== null) { + $safeResult = \curl_getinfo($handle, $option); + } else { + $safeResult = \curl_getinfo($handle); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param null|string $url + * @return \CurlHandle + * @throws CurlException * + */ +function curl_init(?string $url = null): \CurlHandle +{ + error_clear_last(); + if ($url !== null) { + $safeResult = \curl_init($url); + } else { + $safeResult = \curl_init(); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int|null $queued_messages + * @return array + * @throws CurlException * + */ +function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array +{ + error_clear_last(); + $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } + return $safeResult; +} + + +/** + * @return \CurlMultiHandle + * @throws CurlException * + */ +function curl_multi_init(): \CurlMultiHandle +{ + error_clear_last(); + $safeResult = \curl_multi_init(); + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int $option + * @param mixed $value + * @throws CurlException * + */ +function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void +{ + error_clear_last(); + $safeResult = \curl_multi_setopt($multi_handle, $option, $value); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } +} + + +/** + * @param \CurlHandle $handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -3148,11 +168,8 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void /** - * Return an integer containing the last share curl error number. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @return int Returns an integer containing the last share curl error number. + * @param \CurlShareHandle $share_handle + * @return int * @throws CurlException * */ @@ -3168,68 +185,9 @@ function curl_share_errno(\CurlShareHandle $share_handle): int /** - * Sets an option on the given cURL share handle. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. + * @param \CurlShareHandle $share_handle * @param int $option - * - * - * - * Option - * Description - * - * - * - * - * CURLSHOPT_SHARE - * - * Specifies a type of data that should be shared. - * - * - * - * CURLSHOPT_UNSHARE - * - * Specifies a type of data that will be no longer shared. - * - * - * - * - * * @param mixed $value - * - * - * - * Value - * Description - * - * - * - * - * CURL_LOCK_DATA_COOKIE - * - * Shares cookie data. - * - * - * - * CURL_LOCK_DATA_DNS - * - * Shares DNS cache. Note that when you use cURL multi handles, - * all handles added to the same multi handle will share DNS cache - * by default. - * - * - * - * CURL_LOCK_DATA_SSL_SESSION - * - * 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 within the same handle by default. - * - * - * - * - * * @throws CurlException * */ @@ -3244,12 +202,9 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): /** - * This function decodes the given URL encoded string. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The URL encoded string to be decoded. - * @return string Returns decoded string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ diff --git a/generated/8.1/datetime.php b/generated/8.1/datetime.php index 4f616061..d9519c5c 100644 --- a/generated/8.1/datetime.php +++ b/generated/8.1/datetime.php @@ -5,11 +5,9 @@ use Safe\Exceptions\DatetimeException; /** - * Returns associative array with detailed info about given date/time. - * - * @param string $format Format accepted by DateTime::createFromFormat. - * @param string $datetime String representing the date/time. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time. + * @param string $format + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -25,12 +23,8 @@ function date_parse_from_format(string $format, string $datetime): ?array /** - * - * - * @param string $datetime Date/time in format accepted by - * DateTimeImmutable::__construct. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time - * on success. + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -46,97 +40,10 @@ function date_parse(string $datetime): ?array /** - * - * - * @param int $timestamp Unix timestamp. - * @param float $latitude Latitude in degrees. - * @param float $longitude Longitude in degrees. - * @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} Returns array on success. - * 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. - * - * - * - * - * - * The values of the array elements are either UNIX timestamps, 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. + * @param int $timestamp + * @param float $latitude + * @param float $longitude + * @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} * @throws DatetimeException * */ @@ -152,84 +59,13 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array /** - * date_sunrise returns the sunrise time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunrise - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunrise_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunrise: the point where the sun becomes visible. - * - * - * 96° - * Civil twilight: conventionally used to signify the start of dawn. - * - * - * 102° - * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunrise time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not rise at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -255,84 +91,13 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ? /** - * date_sunset returns the sunset time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunset - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunset_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunset: the point where the sun becomes invisible. - * - * - * 96° - * Civil twilight: conventionally used to signify the end of dusk. - * - * - * 102° - * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunset time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not set at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -358,19 +123,9 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f /** - * Returns a string formatted according to the given format string using the - * given integer timestamp or the current time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * @param string $format Format accepted by DateTimeInterface::format. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns a formatted date string. If a non-numeric value is used for - * timestamp, FALSE is returned and an - * E_WARNING level error is emitted. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -390,34 +145,13 @@ function date(string $format, ?int $timestamp = null): string /** - * Identical to mktime except the passed parameters represents a - * GMT date. gmmktime internally uses mktime - * so only times valid in derived local time can be used. - * - * Like mktime, arguments may be left out in order - * from right to left, with any omitted arguments being set to the - * current corresponding GMT value. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year The year - * @return int Returns a int Unix timestamp on success. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -445,23 +179,9 @@ function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $mon /** - * Behaves the same as strftime except that the - * time returned is Greenwich Mean Time (GMT). For example, when run - * in Eastern Standard Time (GMT -0500), the first line below prints - * "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 - * 01:00:00". - * - * @param string $format See description in strftime. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * On failure, FALSE is returned. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -481,109 +201,9 @@ function gmstrftime(string $format, ?int $timestamp = null): string /** - * Returns a number formatted according to the given format string using the - * given integer timestamp or the current local time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * Unlike the function date, idate - * accepts just one char in the format parameter. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format character - * Description - * - * - * - * - * B - * Swatch Beat/Internet Time - * - * - * d - * Day of the month - * - * - * h - * Hour (12 hour format) - * - * - * H - * Hour (24 hour format) - * - * - * i - * Minutes - * - * - * I (uppercase i) - * returns 1 if DST is activated, - * 0 otherwise - * - * - * L (uppercase l) - * returns 1 for leap year, - * 0 otherwise - * - * - * m - * Month number - * - * - * s - * Seconds - * - * - * t - * Days in current month - * - * - * U - * Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - - * this is the same as time - * - * - * w - * Day of the week (0 on Sunday) - * - * - * W - * ISO-8601 week number of year, weeks starting on - * Monday - * - * - * y - * Year (1 or 2 digits - check note below) - * - * - * Y - * Year (4 digits) - * - * - * z - * Day of the year - * - * - * Z - * Timezone offset in seconds - * - * - * - * - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return int Returns an int on success. - * - * As idate always returns an int and - * as they can't start with a "0", idate may return - * fewer digits than you would expect. See the example below. + * @param int|null $timestamp + * @return int * @throws DatetimeException * */ @@ -603,41 +223,13 @@ function idate(string $format, ?int $timestamp = null): int /** - * Returns the Unix timestamp corresponding to the arguments - * given. This timestamp is a long integer containing the number of - * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time - * specified. - * - * Arguments may be left out in order from right to left; any - * arguments thus omitted will be set to the current value according - * to the local date and time. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year 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 - * is somewhere between 1901 and 2038. - * @return int mktime returns the Unix timestamp of the arguments - * given. - * If the arguments are invalid, the function returns FALSE. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -665,310 +257,9 @@ function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month /** - * Format the time and/or date according to locale settings. Month and weekday - * names and other language-dependent strings respect the current locale set - * with setlocale. - * - * Not all conversion specifiers may be supported by your C library, in which - * case they will not be supported by PHP's strftime. - * Additionally, not all platforms support negative timestamps, so your - * date range may be limited to no earlier than the Unix epoch. This means that - * %e, %T, %R and, %D (and possibly others) - as well as dates prior to - * Jan 1, 1970 - will not work on Windows, some Linux - * distributions, and a few other operating systems. For Windows systems, a - * complete overview of supported conversion specifiers can be found at - * MSDN. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format - * Description - * Example returned values - * - * - * - * - * Day - * --- - * --- - * - * - * %a - * An abbreviated textual representation of the day - * Sun through Sat - * - * - * %A - * A full textual representation of the day - * Sunday through Saturday - * - * - * %d - * Two-digit day of the month (with leading zeros) - * 01 to 31 - * - * - * %e - * - * Day of the month, with a space preceding single digits. Not - * implemented as described on Windows. See below for more information. - * - * 1 to 31 - * - * - * %j - * Day of the year, 3 digits with leading zeros - * 001 to 366 - * - * - * %u - * ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * - * %w - * Numeric representation of the day of the week - * 0 (for Sunday) through 6 (for Saturday) - * - * - * Week - * --- - * --- - * - * - * %U - * Week number of the given year, starting with the first - * Sunday as the first week - * 13 (for the 13th full week of the year) - * - * - * %V - * ISO-8601:1988 week number of the given year, starting with - * the first week of the year with at least 4 weekdays, with Monday - * being the start of the week - * 01 through 53 (where 53 - * accounts for an overlapping week) - * - * - * %W - * A numeric representation of the week of the year, starting - * with the first Monday as the first week - * 46 (for the 46th week of the year beginning - * with a Monday) - * - * - * Month - * --- - * --- - * - * - * %b - * Abbreviated month name, based on the locale - * Jan through Dec - * - * - * %B - * Full month name, based on the locale - * January through December - * - * - * %h - * Abbreviated month name, based on the locale (an alias of %b) - * Jan through Dec - * - * - * %m - * Two digit representation of the month - * 01 (for January) through 12 (for December) - * - * - * Year - * --- - * --- - * - * - * %C - * Two digit representation of the century (year divided by 100, truncated to an integer) - * 19 for the 20th Century - * - * - * %g - * Two digit representation of the year going by ISO-8601:1988 standards (see %V) - * Example: 09 for the week of January 6, 2009 - * - * - * %G - * The full four-digit version of %g - * Example: 2008 for the week of January 3, 2009 - * - * - * %y - * Two digit representation of the year - * Example: 09 for 2009, 79 for 1979 - * - * - * %Y - * Four digit representation for the year - * Example: 2038 - * - * - * Time - * --- - * --- - * - * - * %H - * Two digit representation of the hour in 24-hour format - * 00 through 23 - * - * - * %k - * Hour in 24-hour format, with a space preceding single digits - * 0 through 23 - * - * - * %I - * Two digit representation of the hour in 12-hour format - * 01 through 12 - * - * - * %l (lower-case 'L') - * Hour in 12-hour format, with a space preceding single digits - * 1 through 12 - * - * - * %M - * Two digit representation of the minute - * 00 through 59 - * - * - * %p - * UPPER-CASE 'AM' or 'PM' based on the given time - * Example: AM for 00:31, PM for 22:23 - * - * - * %P - * lower-case 'am' or 'pm' based on the given time - * Example: am for 00:31, pm for 22:23 - * - * - * %r - * Same as "%I:%M:%S %p" - * Example: 09:34:17 PM for 21:34:17 - * - * - * %R - * Same as "%H:%M" - * Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM - * - * - * %S - * Two digit representation of the second - * 00 through 59 - * - * - * %T - * Same as "%H:%M:%S" - * Example: 21:34:17 for 09:34:17 PM - * - * - * %X - * Preferred time representation based on locale, without the date - * Example: 03:59:16 or 15:59:16 - * - * - * %z - * The time zone offset. Not implemented as described on - * Windows. See below for more information. - * Example: -0500 for US Eastern Time - * - * - * %Z - * The time zone abbreviation. Not implemented as described on - * Windows. See below for more information. - * Example: EST for Eastern Time - * - * - * Time and Date Stamps - * --- - * --- - * - * - * %c - * Preferred date and time stamp based on locale - * Example: Tue Feb 5 00:45:10 2009 for - * February 5, 2009 at 12:45:10 AM - * - * - * %D - * Same as "%m/%d/%y" - * Example: 02/05/09 for February 5, 2009 - * - * - * %F - * Same as "%Y-%m-%d" (commonly used in database datestamps) - * Example: 2009-02-05 for February 5, 2009 - * - * - * %s - * Unix Epoch Time timestamp (same as the time - * function) - * Example: 305815200 for September 10, 1979 08:40:00 AM - * - * - * %x - * Preferred date representation based on locale, without the time - * Example: 02/05/09 for February 5, 2009 - * - * - * Miscellaneous - * --- - * --- - * - * - * %n - * A newline character ("\n") - * --- - * - * - * %t - * A Tab character ("\t") - * --- - * - * - * %% - * A literal percentage character ("%") - * --- - * - * - * - * - * - * Windows only: - * - * The %e modifier is not supported in the Windows - * implementation of this function. To achieve this value, the - * %#d modifier can be used instead. The example below - * illustrates how to write a cross platform compatible function. - * - * The %z and %Z modifiers both - * return the time zone name instead of the offset or abbreviation. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * The function returns FALSE if format is empty, contains unsupported - * conversion specifiers, or if the length of the returned string would be greater than - * 4095. + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -988,74 +279,9 @@ function strftime(string $format, ?int $timestamp = null): string /** - * strptime returns an array with the - * timestamp parsed. - * - * Month and weekday names and other language dependent strings respect the - * current locale set with setlocale (LC_TIME). - * - * @param string $timestamp The string to parse (e.g. returned from strftime). - * @param string $format The format used in timestamp (e.g. the same as - * used in strftime). Note that some of the format - * options available to strftime may not have any - * effect within strptime; the exact subset that are - * supported will vary based on the operating system and C library in - * use. - * - * For more information about the format options, read the - * strftime page. - * @return array Returns an array. - * - * - * The following parameters are returned in the array - * - * - * - * parameters - * Description - * - * - * - * - * "tm_sec" - * Seconds after the minute (0-61) - * - * - * "tm_min" - * Minutes after the hour (0-59) - * - * - * "tm_hour" - * Hour since midnight (0-23) - * - * - * "tm_mday" - * Day of the month (1-31) - * - * - * "tm_mon" - * Months since January (0-11) - * - * - * "tm_year" - * Years since 1900 - * - * - * "tm_wday" - * Days since Sunday (0-6) - * - * - * "tm_yday" - * Days since January 1 (0-365) - * - * - * "unparsed" - * the timestamp part which was not - * recognized using the specified format - * - * - * - * + * @param string $timestamp + * @param string $format + * @return array * @throws DatetimeException * */ @@ -1071,16 +297,9 @@ function strptime(string $timestamp, string $format): array /** - * Each parameter of this function uses the default time zone unless a - * time zone is specified in that parameter. Be careful not to use - * different time zones in each parameter unless that is intended. - * See date_default_timezone_get on the various - * ways to define the default time zone. - * - * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. - * @param int|null $baseTimestamp The timestamp which is used as a base for the calculation of relative - * dates. - * @return int Returns a timestamp on success. + * @param string $datetime + * @param int|null $baseTimestamp + * @return int * @throws DatetimeException * */ @@ -1100,23 +319,10 @@ function strtotime(string $datetime, ?int $baseTimestamp = null): int /** - * - * - * @param string $abbr Time zone abbreviation. - * @param int $utcOffset 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 Daylight saving time indicator. Defaults to -1, which means that - * whether the time zone has daylight saving or not is not taken into - * consideration when searching. If this is set to 1, then the - * utcOffset is assumed to be an offset with - * daylight saving in effect; if 0, then utcOffset - * is assumed to be an offset without daylight saving in effect. If - * abbr doesn't exist then the time zone is - * searched solely by the utcOffset and - * isDST. - * @return string Returns time zone name on success. + * @param string $abbr + * @param int $utcOffset + * @param int $isDST + * @return string * @throws DatetimeException * */ diff --git a/generated/8.1/dir.php b/generated/8.1/dir.php index 03a68274..a9c1288a 100644 --- a/generated/8.1/dir.php +++ b/generated/8.1/dir.php @@ -5,10 +5,7 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to - * directory. - * - * @param string $directory The new current directory + * @param string $directory * @throws DirException * */ @@ -23,18 +20,7 @@ function chdir(string $directory): void /** - * Changes the root directory of the current process to - * directory, and changes the current - * working directory to "/". - * - * This function is only available to GNU and BSD systems, and - * only when using the CLI, CGI or Embed SAPI. Also, this function - * requires root privileges. - * - * Calling this function does not change the values of the __DIR__ - * and __FILE__ magic constants. - * - * @param string $directory The path to change the root directory to. + * @param string $directory * @throws DirException * */ @@ -49,13 +35,9 @@ function chroot(string $directory): void /** - * A pseudo-object-oriented mechanism for reading a directory. The - * given directory is opened. - * - * @param string $directory Directory to open - * @param null|resource $context A context stream - * resource. - * @return \Directory Returns an instance of Directory, or FALSE in case of error. + * @param string $directory + * @param null|resource $context + * @return \Directory * @throws DirException * */ @@ -75,15 +57,7 @@ function dir(string $directory, $context = null): \Directory /** - * Gets the current working directory. - * - * @return non-empty-string Returns the current working directory on success. - * - * On some Unix variants, getcwd will return - * FALSE if any one of the parent directories does not have the - * readable or search mode set, even if the current directory - * does. See chmod for more information on - * modes and permissions. + * @return non-empty-string * @throws DirException * */ @@ -99,15 +73,9 @@ function getcwd(): string /** - * Opens up a directory handle to be used in subsequent - * closedir, readdir, and - * rewinddir calls. - * - * @param string $directory The directory path that is to be opened - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return resource Returns a directory handle resource on success + * @param string $directory + * @param null|resource $context + * @return resource * @throws DirException * */ @@ -127,21 +95,10 @@ function opendir(string $directory, $context = null) /** - * Returns an array of files and directories from the - * directory. - * - * @param string $directory The directory that will be scanned. - * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order By default, the sorted order is alphabetical in ascending order. If - * the optional sorting_order is set to - * SCANDIR_SORT_DESCENDING, then the sort order is - * alphabetical in descending order. If it is set to - * SCANDIR_SORT_NONE then the result is unsorted. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return list Returns an array of filenames on success. If directory is not a directory, then - * boolean FALSE is returned, and an error of level - * E_WARNING is generated. + * @param string $directory + * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order + * @param null|resource $context + * @return list * @throws DirException * */ diff --git a/generated/8.1/eio.php b/generated/8.1/eio.php index de2f742e..4fd10a55 100644 --- a/generated/8.1/eio.php +++ b/generated/8.1/eio.php @@ -5,17 +5,11 @@ use Safe\Exceptions\EioException; /** - * eio_busy artificially increases load taking - * delay seconds to execute. May be used for debugging, - * or benchmarking. - * - * @param int $delay Delay in seconds - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. - * @param callable|null $callback This callback is called when all the group requests are done. - * @param mixed $data Arbitrary variable passed to callback. - * @return resource eio_busy returns request resource on success. + * @param int $delay + * @param int $pri + * @param callable|null $callback + * @param mixed $data + * @return resource * @throws EioException * */ @@ -31,43 +25,12 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = /** - * eio_chmod changes file, or directory permissions. The - * new permissions are specified by mode. - * - * @param string $path Path to the target file or directory - * Avoid relative - * paths - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -83,43 +46,13 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * Changes file, or directory permissions. - * - * @param string $path Path to file or directory. - * Avoid relative - * paths - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chown returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -135,40 +68,11 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** - * eio_close closes file specified by - * fd. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_close returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -184,50 +88,11 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_custom executes custom function specified by - * execute processing it just like any other eio_* call. - * - * @param callable $execute Specifies the request function that should match the following prototype: - * - * - * callback is event completion callback that should match the following - * prototype: - * - * - * data is the data passed to - * execute via data argument - * without modifications - * result value returned by execute - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param callable $execute + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_custom returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -243,40 +108,12 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul /** - * eio_dup2 duplicates file descriptor. - * - * @param mixed $fd Source stream, Socket resource, or numeric file descriptor - * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param mixed $fd2 + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_dup2 returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -292,8 +129,6 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = n /** - * eio_event_loop polls libeio until all requests proceeded. - * * @throws EioException * */ @@ -308,47 +143,14 @@ function eio_event_loop(): void /** - * eio_fallocate allows the caller to directly manipulate the allocated disk space for the - * file specified by fd file descriptor for the byte - * range starting at offset and continuing for - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode Currently only one flag is supported for mode: - * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant - * FALLOC_FL_KEEP_SIZE). - * @param int $offset Specifies start of the byte range. - * @param int $length Specifies length the byte range. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fallocate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -364,41 +166,12 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** - * eio_fchmod changes permissions for the file specified - * by fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fchmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -414,42 +187,13 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callb /** - * eio_fchown changes ownership of the file specified by - * fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -465,39 +209,11 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?c /** - * eio_fdatasync synchronizes a file's in-core state with storage device. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fdatasync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -513,40 +229,11 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = nu /** - * eio_fstat returns file status information in - * result argument of callback - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -566,40 +253,11 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** - * eio_fstatvfs returns file system statistics in - * result of callback. - * - * @param mixed $fd A file descriptor of a file within the mounted file system. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fstatvfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -619,39 +277,11 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** - * Synchronize a file's in-core state with storage device - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fsync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -667,42 +297,12 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_ftruncate causes a regular file referenced by - * fd file descriptor to be truncated to precisely - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $offset Offset from beginning of the file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_ftruncate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -718,42 +318,13 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callab /** - * eio_futime changes file last access and modification - * times. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_futime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -769,35 +340,9 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** - * eio_grp creates a request group. - * * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_grp returns request group resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -813,40 +358,11 @@ function eio_grp(callable $callback, ?string $data = null) /** - * eio_lstat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_lstat returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -862,41 +378,12 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) /** - * eio_mkdir creates directory with specified access - * mode. - * - * @param string $path Path for the new directory. - * @param int $mode Access mode, e.g. 0755 - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mkdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -912,57 +399,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * eio_mknod creates ordinary or special(often) file. - * - * @param string $path Path for the new node(file). - * @param int $mode Specifies both the permissions to use and the type of node to be - * created. It should be a combination (using bitwise OR) of one of the - * file types listed below and the permissions for the new node(e.g. 0640). - * - * Possible file types are: EIO_S_IFREG(regular file), - * EIO_S_IFCHR(character file), - * EIO_S_IFBLK(block special file), - * EIO_S_IFIFO(FIFO - named pipe) and - * EIO_S_IFSOCK(UNIX domain socket). - * - * To specify permissions EIO_S_I* constants could be - * used. - * @param int $dev If the file type is EIO_S_IFCHR or - * EIO_S_IFBLK then dev specifies the major and minor - * numbers of the newly created device special file. Otherwise - * dev ignored. See mknod(2) man page for - * details. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $dev + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mknod returns request resource on success. - * @throws EioException + * @param mixed $data + * @return resource + * @throws EioException * */ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null) @@ -977,39 +421,10 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** - * eio_nop does nothing, except go through the whole - * request cycle. Could be useful in debugging. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_nop returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1025,42 +440,13 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = /** - * eio_readahead populates the page cache with data from a file so that subsequent reads from - * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $length Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_readahead returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1076,295 +462,12 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT /** - * Reads through a whole directory(via the opendir, readdir and - * closedir system calls) and returns either the names or an array in - * result argument of callback - * function, depending on the flags argument. - * - * @param string $path Directory path. - * @param int $flags Combination of EIO_READDIR_* constants. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $flags + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readdir returns request resource on success. - * Sets result argument of - * callback function according to - * flags: - * - * - * - * - * - * - * EIO_READDIR_DENTS - * (int) - * - * - * - * eio_readdir flag. If specified, the result argument of the callback - * becomes an array with the following keys: - * 'names' - array of directory names - * 'dents' - array of struct - * eio_dirent-like arrays having the following keys each: - * 'name' - the directory name; - * 'type' - one of EIO_DT_* - * constants; - * 'inode' - the inode number, if available, otherwise - * unspecified; - * - * - * - * - * - * EIO_READDIR_DIRS_FIRST - * (int) - * - * - * - * When this flag is specified, the names will be returned in an order - * where likely directories come first, in optimal stat order. - * - * - * - * - * - * EIO_READDIR_STAT_ORDER - * (int) - * - * - * - * When this flag is specified, then the names will be returned in an order - * suitable for stat'ing each one. When planning to - * stat all files in the given directory, the - * returned order will likely be - * fastest. - * - * - * - * - * - * EIO_READDIR_FOUND_UNKNOWN - * (int) - * - * - * - * - * - * - * - * - * - * - * - * Node types: - * - * - * - * - * - * EIO_DT_UNKNOWN - * (int) - * - * - * - * Unknown node type(very common). Further stat needed. - * - * - * - * - * - * EIO_DT_FIFO - * (int) - * - * - * - * FIFO node type - * - * - * - * - * - * EIO_DT_CHR - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPC - * (int) - * - * - * - * Multiplexed char device (v7+coherent) node type - * - * - * - * - * - * EIO_DT_DIR - * (int) - * - * - * - * Directory node type - * - * - * - * - * - * EIO_DT_NAM - * (int) - * - * - * - * Xenix special named file node type - * - * - * - * - * - * EIO_DT_BLK - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPB - * (int) - * - * - * - * Multiplexed block device (v7+coherent) - * - * - * - * - * - * EIO_DT_REG - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_NWK - * (int) - * - * - * - * - * - * - * - * - * EIO_DT_CMP - * (int) - * - * - * - * HP-UX network special node type - * - * - * - * - * - * EIO_DT_LNK - * (int) - * - * - * - * Link node type - * - * - * - * - * - * EIO_DT_SOCK - * (int) - * - * - * - * Socket node type - * - * - * - * - * - * EIO_DT_DOOR - * (int) - * - * - * - * Solaris door node type - * - * - * - * - * - * EIO_DT_WHT - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MAX - * (int) - * - * - * - * Highest node type value - * - * - * - * - * - * - * + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1380,39 +483,11 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?st /** - * - * - * @param string $path Source symbolic link path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readlink returns request resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1428,40 +503,12 @@ function eio_readlink(string $path, int $pri, callable $callback, ?string $data /** - * eio_rename renames or moves a file to new location. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rename returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1477,39 +524,11 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_rmdir removes a directory. - * - * @param string $path Directory path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rmdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1525,47 +544,13 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback /** - * eio_seek repositions the offset of the open file associated with - * stream, Socket resource, or file descriptor specified by fd to the argument offset according to the directive whence as follows: - * - * EIO_SEEK_SET - Set position equal to offset bytes. - * EIO_SEEK_CUR - Set position to current location plus offset. - * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $whence Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $whence + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_seek returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1581,43 +566,14 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?ca /** - * eio_sendfile copies data between one file descriptor - * and another. See SENDFILE(2) man page for details. - * - * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. - * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. - * @param int $offset Offset within the source file. - * @param int $length Number of bytes to copy. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $out_fd + * @param mixed $in_fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param string $data is custom data passed to the request. - * @return resource eio_sendfile returns request resource on success. + * @param string $data + * @return resource * @throws EioException * */ @@ -1641,41 +597,11 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = nul /** - * eio_stat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_stat returns request resource on success. On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1691,42 +617,11 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null) /** - * eio_statvfs returns file system statistics information in - * result argument of callback - * - * @param string $path Pathname of any file within the mounted file system - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_statvfs returns request resource on success. - * On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1746,41 +641,12 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** - * eio_symlink creates a symbolic link - * new_path to path. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_symlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1796,50 +662,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file - * descriptor fd with disk. - * - * @param mixed $fd File descriptor - * @param int $offset The starting byte of the file range to be synchronized - * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If - * nbytes is zero, then all bytes from offset through - * to the end of file are synchronized. - * @param int $flags A bit-mask. Can include any of the following values: - * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, - * EIO_SYNC_FILE_RANGE_WRITE, - * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have - * the same meaning as their SYNC_FILE_RANGE_* - * counterparts(see SYNC_FILE_RANGE(2) man page). - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $nbytes + * @param int $flags + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_sync_file_range returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1855,12 +685,10 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * * @param int $pri * @param callable|null $callback * @param mixed $data - * @return resource eio_sync returns request resource on success. + * @return resource * @throws EioException * */ @@ -1876,39 +704,11 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data /** - * - * - * @param mixed $fd File descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_syncfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1924,41 +724,12 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_truncate causes the regular file named by path to be truncated to - * a size of precisely length bytes - * - * @param string $path File path - * @param int $offset Offset from beginning of the file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1974,39 +745,11 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** - * eio_unlink deletes a name from the file system. - * - * @param string $path Path to file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_unlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2022,41 +765,13 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callbac /** - * - * - * @param string $path Path to the file. - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_utime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2072,44 +787,14 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ /** - * eio_write writes up to length - * bytes from str at offset - * offset from the beginning of the file. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param string $str Source string - * @param int $length Maximum number of bytes to write. - * @param int $offset Offset from the beginning of file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param string $str + * @param int $length + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_write returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ diff --git a/generated/8.1/errorfunc.php b/generated/8.1/errorfunc.php index a43b8759..675052a8 100644 --- a/generated/8.1/errorfunc.php +++ b/generated/8.1/errorfunc.php @@ -5,64 +5,10 @@ use Safe\Exceptions\ErrorfuncException; /** - * Sends an error message to the web server's error log or to a file. - * - * @param string $message The error message that should be logged. - * @param 0|1|2|3|4 $message_type Says where the error should go. The possible message types are as - * follows: - * - * - * error_log log types - * - * - * - * 0 - * - * message is sent to PHP's system logger, using - * the Operating System's system logging mechanism or a file, depending - * on what the error_log - * configuration directive is set to. This is the default option. - * - * - * - * 1 - * - * message is sent by email to the address in - * the destination parameter. This is the only - * message type where the fourth parameter, - * extra_headers is used. - * - * - * - * 2 - * - * No longer an option. - * - * - * - * 3 - * - * message is appended to the file - * destination. A newline is not automatically - * added to the end of the message string. - * - * - * - * 4 - * - * message is sent directly to the SAPI logging - * handler. - * - * - * - * - * - * @param string $destination The destination. Its meaning depends on the - * message_type parameter as described above. - * @param string $extra_headers The extra headers. It's used when the message_type - * parameter is set to 1. - * This message type uses the same internal function as - * mail does. + * @param string $message + * @param 0|1|2|3|4 $message_type + * @param string $destination + * @param string $extra_headers * @throws ErrorfuncException * */ diff --git a/generated/8.1/exec.php b/generated/8.1/exec.php index 5685796f..6bf0df46 100644 --- a/generated/8.1/exec.php +++ b/generated/8.1/exec.php @@ -5,30 +5,10 @@ use Safe\Exceptions\ExecException; /** - * exec executes the given - * command. - * - * @param string $command The command that will be executed. - * @param array|null $output If the output argument is present, then the - * specified array will be filled with every line of output from the - * command. Trailing whitespace, such as \n, is not - * included in this array. Note that if the array already contains some - * elements, exec will append to the end of the array. - * If you do not want the function to append elements, call - * unset on the array before passing it to - * exec. - * @param int|null $result_code If the result_code argument is present - * along with the output argument, then the - * return status of the executed command will be written to this - * variable. - * @return string The last line from the result of the command. If you need to execute a - * command and have all the data from the command passed directly back without - * any interference, use the passthru function. - * - * Returns FALSE on failure. - * - * To get the output of the executed command, be sure to set and use the - * output parameter. + * @param string $command + * @param array|null $output + * @param int|null $result_code + * @return string * @throws ExecException * */ @@ -44,18 +24,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null /** - * proc_close is similar to pclose - * except that it only works on processes opened by - * proc_open. - * proc_close waits for the process to terminate, and - * returns its exit code. Open pipes to that process are closed - * when this function is called, in - * order to avoid a deadlock - the child process may not be able to exit - * while the pipes are open. - * - * @param resource $process The proc_open resource that will - * be closed. - * @return int Returns the termination status of the process that was run. + * @param resource $process + * @return int * @throws ExecException * */ @@ -71,22 +41,7 @@ function proc_close($process): int /** - * proc_nice changes the priority of the current - * process by the amount specified in priority. A - * positive priority will lower the priority of the - * current process, whereas a negative priority - * will raise the priority. - * - * proc_nice is not related to - * proc_open and its associated functions in any way. - * - * @param int $priority The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority - * wheras a positive value have a lower priority. - * - * For Windows the priority parameter have the - * following meanings: + * @param int $priority * @throws ExecException * */ @@ -101,80 +56,13 @@ function proc_nice(int $priority): void /** - * proc_open is similar to popen - * but provides a much greater degree of control over the program execution. - * - * @param string $cmd The commandline to execute as string. Special characters have to be properly escaped, - * and proper quoting has to be applied. - * - * As of PHP 7.4.0, cmd may be passed as array of command parameters. - * In this case the process will be opened directly (without going through a shell) - * and PHP will take care of any necessary argument escaping. - * - * On Windows, the argument escaping of the array elements assumes that the - * command line parsing of the executed command is compatible with the parsing - * of command line arguments done by the VC runtime. - * @param array $descriptorspec An indexed array where the key represents the descriptor number and the - * value represents how PHP will pass that descriptor to the child - * process. 0 is stdin, 1 is stdout, while 2 is stderr. - * - * Each element can be: - * - * An array describing the pipe to pass to the process. The first - * element is the descriptor type and the second element is an option for - * the given type. Valid types are pipe (the second - * element is either r to pass the read end of the pipe - * to the process, or w to pass the write end) and - * file (the second element is a filename). - * - * - * A stream resource representing a real file descriptor (e.g. opened file, - * a socket, STDIN). - * - * - * - * The file descriptor numbers are not limited to 0, 1 and 2 - you may - * specify any valid file descriptor number and it will be passed to the - * child process. This allows your script to interoperate with other - * scripts that run as "co-processes". In particular, this is useful for - * passing passphrases to programs like PGP, GPG and openssl in a more - * secure manner. It is also useful for reading status information - * provided by those programs on auxiliary file descriptors. - * @param null|resource[] $pipes Will be set to an indexed array of file pointers that correspond to - * PHP's end of any pipes that are created. - * @param null|string $cwd The initial working dir for the command. This must be an - * absolute directory path, or NULL - * if you want to use the default value (the working dir of the current - * PHP process) - * @param array|null $env An array with the environment variables for the command that will be - * run, or NULL to use the same environment as the current PHP process - * @param array|null $other_options Allows you to specify additional options. Currently supported options - * include: - * - * - * suppress_errors (windows only): suppresses errors - * generated by this function when it's set to TRUE - * - * - * bypass_shell (windows only): bypass - * cmd.exe shell when set to TRUE - * - * - * blocking_pipes (windows only): force - * blocking pipes when set to TRUE - * - * - * create_process_group (windows only): allow the - * child process to handle CTRL events when set to TRUE - * - * - * create_new_console (windows only): the new process - * has a new console, instead of inheriting its parent's console - * - * - * @return resource Returns a resource representing the process, which should be freed using - * proc_close when you are finished with it. On failure - * returns FALSE. + * @param string $cmd + * @param array $descriptorspec + * @param null|resource[] $pipes + * @param null|string $cwd + * @param array|null $env + * @param array|null $other_options + * @return resource * @throws ExecException * */ @@ -198,10 +86,8 @@ function proc_open(string $cmd, array $descriptorspec, ?array &$pipes, ?string $ /** - * This function is identical to the backtick operator. - * - * @param string $command The command that will be executed. - * @return null|string A string containing the output from the executed command or NULL if an error occurs or the command produces no output. + * @param string $command + * @return null|string * @throws ExecException * */ @@ -217,23 +103,9 @@ function shell_exec(string $command): ?string /** - * system is just like the C version of the - * function in that it executes the given - * command and outputs the result. - * - * The system call also tries to automatically - * flush the web server's output buffer after each line of output if - * PHP is running as a server module. - * - * If you need to execute a command and have all the data from the - * command passed directly back without any interference, use the - * passthru function. - * - * @param string $command The command that will be executed. - * @param int|null $result_code If the result_code argument is present, then the - * return status of the executed command will be written to this - * variable. - * @return string Returns the last line of the command output on success. + * @param string $command + * @param int|null $result_code + * @return string * @throws ExecException * */ diff --git a/generated/8.1/fileinfo.php b/generated/8.1/fileinfo.php index e82e617f..2e832a4e 100644 --- a/generated/8.1/fileinfo.php +++ b/generated/8.1/fileinfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\FileinfoException; /** - * This function closes the instance opened by finfo_open. - * - * @param \finfo $finfo An finfo instance, returned by finfo_open. + * @param \finfo $finfo * @throws FileinfoException * */ @@ -22,24 +20,9 @@ function finfo_close(\finfo $finfo): void /** - * Procedural style - * - * Object-oriented style (constructor): - * - * This function opens a magic database and returns its instance. - * - * @param int $flags One or disjunction of more Fileinfo - * constants. - * @param null|string $magic_database Name of a magic database file, usually something like - * /path/to/magic.mime. If not specified, the - * MAGIC environment variable is used. If the - * environment variable isn't set, then PHP's bundled magic database will - * be used. - * - * Passing NULL or an empty string will be equivalent to the default - * value. - * @return \finfo (Procedural style only) - * Returns an finfo instance on success. + * @param int $flags + * @param null|string $magic_database + * @return \finfo * @throws FileinfoException * */ @@ -59,12 +42,8 @@ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): /** - * Returns the MIME content type for a file as determined by using - * information from the magic.mime file. - * - * @param resource|string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like - * text/plain or application/octet-stream. + * @param resource|string $filename + * @return string * @throws FileinfoException * */ diff --git a/generated/8.1/filesystem.php b/generated/8.1/filesystem.php index b7c549b8..74cbee22 100644 --- a/generated/8.1/filesystem.php +++ b/generated/8.1/filesystem.php @@ -5,14 +5,8 @@ use Safe\Exceptions\FilesystemException; /** - * Attempts to change the group of the file filename - * to group. - * - * Only the superuser may change the group of a file arbitrarily; other users - * may change the group of a file to any group of which that user is a member. - * - * @param string $filename Path to the file. - * @param int|string $group A group name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -27,35 +21,9 @@ function chgrp(string $filename, $group): void /** - * Attempts to change the mode of the specified file to that given in - * permissions. - * - * @param string $filename Path to the file. - * @param int $permissions Note that permissions is not automatically - * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix permissions with a zero (0). - * Strings such as "g+w" will not work properly. - * - * - * - * - * ]]> - * - * - * - * The permissions parameter consists of three octal - * number components specifying access restrictions for the owner, - * the user group in which the owner is in, and to everybody else in - * this order. One component can be computed by adding up the needed - * permissions for that target user base. Number 1 means that you - * grant execute rights, number 2 means that you make the file - * writeable, number 4 means that you make the file readable. Add - * up these numbers to specify needed rights. You can also read more - * about modes on Unix systems with 'man 1 chmod' - * and 'man 2 chmod'. - * - * - * + * @param string $filename + * @param int $permissions + * @throws FilesystemException * */ function chmod(string $filename, int $permissions): void @@ -69,12 +37,8 @@ function chmod(string $filename, int $permissions): void /** - * Attempts to change the owner of the file filename - * to user user. Only the superuser may change the - * owner of a file. - * - * @param string $filename Path to the file. - * @param int|string $user A user name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -89,19 +53,9 @@ function chown(string $filename, $user): void /** - * Makes a copy of the file source to - * dest. - * - * If you wish to move a file, use the rename function. - * - * @param string $source Path to the source file. - * @param string $dest The destination path. If dest is a URL, the - * copy operation may fail if the wrapper does not support overwriting of - * existing files. - * - * If the destination file already exists, it will be overwritten. - * @param resource $context A valid context resource created with - * stream_context_create. + * @param string $source + * @param string $dest + * @param resource $context * @throws FilesystemException * */ @@ -120,16 +74,8 @@ function copy(string $source, string $dest, $context = null): void /** - * Given a string containing a directory, this function will return the - * number of bytes available on the corresponding filesystem or disk - * partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * - * Given a file name instead of a directory, the behaviour of the - * function is unspecified and may differ between operating systems and - * PHP versions. - * @return float Returns the number of available bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -145,11 +91,8 @@ function disk_free_space(string $directory): float /** - * Given a string containing a directory, this function will return the total - * number of bytes on the corresponding filesystem or disk partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * @return float Returns the total number of bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -165,10 +108,7 @@ function disk_total_space(string $directory): float /** - * The file pointed to by stream is closed. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or fsockopen. + * @param resource $stream * @throws FilesystemException * */ @@ -183,15 +123,7 @@ function fclose($stream): void /** - * This function synchronizes stream contents to storage media, just like fsync does, - * but it does not synchronize file meta-data. - * Note that this function is only effectively different in POSIX systems. - * In Windows, this function is aliased to fsync. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -206,13 +138,7 @@ function fdatasync($stream): void /** - * This function forces a write of all buffered output to the resource - * pointed to by the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -227,36 +153,12 @@ function fflush($stream): void /** - * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to length bytes. On failure, - * file_get_contents will return FALSE. - * - * file_get_contents is the preferred way to read the - * contents of a file into a string. It will use memory mapping techniques if - * supported by your OS to enhance performance. - * - * @param string $filename Name of the file to read. - * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used - * to trigger include path - * search. - * This is not possible if strict typing - * is enabled, since FILE_USE_INCLUDE_PATH is an - * int. Use TRUE instead. - * @param null|resource $context A valid context resource created with - * stream_context_create. If you don't need to use a - * custom context, you can skip this parameter by NULL. - * @param int $offset The offset where the reading starts on the original stream. - * Negative offsets count from the end of the stream. - * - * Seeking (offset) is not supported with remote files. - * Attempting to seek on non-local files may work with small offsets, but this - * is unpredictable because it works on the buffered stream. - * @param 0|positive-int $length Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the - * stream processed by the filters. - * @return string The function returns the read data. + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @param int $offset + * @param 0|positive-int $length + * @return string * @throws FilesystemException * */ @@ -280,76 +182,11 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * This function is identical to calling fopen, - * fwrite and fclose successively - * to write data to a file. - * - * If filename does not exist, the file is created. - * Otherwise, the existing file is overwritten, unless the - * FILE_APPEND flag is set. - * - * @param string $filename Path to the file where to write the data. - * @param mixed $data The data to write. Can be either a string, an - * array or a stream resource. - * - * If data is a stream resource, the - * remaining buffer of that stream will be copied to the specified file. - * This is similar with using stream_copy_to_stream. - * - * You can also specify the data parameter as a single - * dimension array. This is equivalent to - * file_put_contents($filename, implode('', $array)). - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * - * Available flags - * - * - * - * Flag - * Description - * - * - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * Search for filename in the include directory. - * See include_path for more - * information. - * - * - * - * - * FILE_APPEND - * - * - * If file filename already exists, append - * the data to the file instead of overwriting it. - * - * - * - * - * LOCK_EX - * - * - * Acquire an exclusive lock on the file while proceeding to the - * writing. In other words, a flock call happens - * between the fopen call and the - * fwrite call. This is not identical to an - * fopen call with mode "x". - * - * - * - * - * - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return 0|positive-int This function returns the number of bytes that were written to the file. + * @param string $filename + * @param mixed $data + * @param int $flags + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -369,47 +206,10 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n /** - * Reads an entire file into an array. - * - * @param string $filename Path to the file. - * @param int-mask $flags The optional parameter flags can be one, or - * more, of the following constants: - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * - * Search for the file in the include_path. - * - * - * - * - * - * FILE_IGNORE_NEW_LINES - * - * - * - * Omit newline at the end of each array element - * - * - * - * - * - * FILE_SKIP_EMPTY_LINES - * - * - * - * Skip empty lines - * - * - * - * - * @param resource $context Search for the file in the include_path. - * @return list Returns the file in an array. Each element of the array corresponds to a - * line in the file, with the newline still attached. Upon failure, - * file returns FALSE. + * @param string $filename + * @param int-mask $flags + * @param resource $context + * @return list * @throws FilesystemException * */ @@ -429,11 +229,8 @@ function file(string $filename, int $flags = 0, $context = null): array /** - * Gets the last access time of the given file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last accessed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -449,11 +246,8 @@ function fileatime(string $filename): int /** - * Gets the inode change time of a file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last changed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -469,10 +263,8 @@ function filectime(string $filename): int /** - * Gets the file inode. - * - * @param string $filename Path to the file. - * @return int Returns the inode number of the file. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -488,13 +280,8 @@ function fileinode(string $filename): int /** - * This function returns the time when the data blocks of a file were being - * written to, that is, the time when the content of the file was changed. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last modified. - * The time is returned as a Unix timestamp, which is - * suitable for the date function. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -510,12 +297,8 @@ function filemtime(string $filename): int /** - * Gets the file owner. - * - * @param string $filename Path to the file. - * @return int Returns the user ID of the owner of the file. - * The user ID is returned in numerical format, use - * posix_getpwuid to resolve it to a username. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -531,24 +314,8 @@ function fileowner(string $filename): int /** - * Gets permissions for the given file. - * - * @param string $filename Path to the file. - * @return int Returns the file's permissions as a numeric mode. Lower bits of this mode - * are the same as the permissions expected by chmod, - * however on most platforms the return value will also include information on - * the type of file given as filename. The examples - * below demonstrate how to test the return value for specific permissions and - * file types on POSIX systems, including Linux and macOS. - * - * For local files, the specific return value is that of the - * st_mode member of the structure returned by the C - * library's stat function. Exactly which bits are set - * can vary from platform to platform, and looking up your specific platform's - * documentation is recommended if parsing the non-permission bits of the - * return value is required. - * - * Returns FALSE on failure. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -564,11 +331,8 @@ function fileperms(string $filename): int /** - * Gets the size for the given file. - * - * @param string $filename Path to the file. - * @return 0|positive-int Returns the size of the file in bytes, or FALSE (and generates an error - * of level E_WARNING) in case of an error. + * @param string $filename + * @return 0|positive-int * @throws FilesystemException * */ @@ -584,15 +348,8 @@ function filesize(string $filename): int /** - * Returns the type of the given file. - * - * @param string $filename Path to the file. - * @return string Returns the type of the file. Possible values are fifo, char, - * dir, block, link, file, socket and unknown. - * - * Returns FALSE if an error occurs. filetype will also - * produce an E_NOTICE message if the stat call fails - * or if the file type is unknown. + * @param string $filename + * @return string * @throws FilesystemException * */ @@ -608,44 +365,9 @@ function filetype(string $filename): string /** - * flock allows you to perform a simple reader/writer - * model which can be used on virtually every platform (including most Unix - * derivatives and even Windows). - * - * The lock is released also by fclose, - * or when stream is garbage collected. - * - * PHP supports a portable way of locking complete files in an advisory way - * (which means all accessing programs have to use the same way of locking - * or it will not work). By default, this function will block until the - * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param int-mask $operation operation is one of the following: - * - * - * - * LOCK_SH to acquire a shared lock (reader). - * - * - * - * - * LOCK_EX to acquire an exclusive lock (writer). - * - * - * - * - * LOCK_UN to release a lock (shared or exclusive). - * - * - * - * - * It is also possible to add LOCK_NB as a bitmask to one - * of the above operations, if flock should not - * block during the locking attempt. - * @param 0|1|null $would_block The optional third argument is set to 1 if the lock would block - * (EWOULDBLOCK errno condition). + * @param resource $stream + * @param int-mask $operation + * @param 0|1|null $would_block * @throws FilesystemException * */ @@ -660,201 +382,11 @@ function flock($stream, int $operation, ?int &$would_block = null): void /** - * fopen binds a named resource, specified by - * filename, to a stream. - * - * @param string $filename If filename is of the form "scheme://...", it - * is assumed to be a URL and PHP will search for a protocol handler - * (also known as a wrapper) for that scheme. If no wrappers for that - * protocol are registered, PHP will emit a notice to help you track - * potential problems in your script and then continue as though - * filename specifies a regular file. - * - * If PHP has decided that filename specifies - * a local file, then it will try to open a stream on that file. - * The file must be accessible to PHP, so you need to ensure that - * the file access permissions allow this access. - * If you have enabled - * open_basedir further - * restrictions may apply. - * - * If PHP has decided that filename specifies - * a registered protocol, and that protocol is registered as a - * network URL, PHP will check to make sure that - * allow_url_fopen is - * enabled. If it is switched off, PHP will emit a warning and - * the fopen call will fail. - * - * The list of supported protocols can be found in . Some protocols (also referred to as - * wrappers) support context - * and/or php.ini options. Refer to the specific page for the - * protocol in use for a list of options which can be set. (e.g. - * php.ini value user_agent used by the - * http wrapper). - * - * On the Windows platform, be careful to escape any backslashes - * used in the path to the file, or use forward slashes. - * - * - * - * ]]> - * - * - * @param string $mode The mode parameter specifies the type of access - * you require to the stream. It may be any of the following: - * - * - * A list of possible modes for fopen - * using mode - * - * - * - * - * mode - * Description - * - * - * - * - * 'r' - * - * Open for reading only; place the file pointer at the - * beginning of the file. - * - * - * - * 'r+' - * - * Open for reading and writing; place the file pointer at - * the beginning of the file. - * - * - * - * 'w' - * - * Open for writing only; place the file pointer at the - * beginning of the file and truncate the file to zero length. - * If the file does not exist, attempt to create it. - * - * - * - * 'w+' - * - * Open for reading and writing; otherwise it has the - * same behavior as 'w'. - * - * - * - * 'a' - * - * Open for writing only; place the file pointer at the end of - * the file. If the file does not exist, attempt to create it. - * In this mode, fseek has no effect, writes are always appended. - * - * - * - * 'a+' - * - * Open for reading and writing; place the file pointer at - * the end of the file. If the file does not exist, attempt to - * create it. In this mode, fseek only affects - * the reading position, writes are always appended. - * - * - * - * 'x' - * - * Create and open for writing only; place the file pointer at the - * beginning of the file. If the file already exists, the - * fopen call will fail by returning FALSE and - * generating an error of level E_WARNING. If - * the file does not exist, attempt to create it. This is equivalent - * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * - * 'x+' - * - * Create and open for reading and writing; otherwise it has the - * same behavior as 'x'. - * - * - * - * 'c' - * - * Open the file for writing only. If the file does not exist, it is - * created. If it exists, it is neither truncated (as opposed to - * 'w'), nor the call to this function fails (as is - * the case with 'x'). The file pointer is - * positioned on the beginning of the file. This may be useful if it's - * desired to get an advisory lock (see flock) - * before attempting to modify the file, as using - * 'w' could truncate the file before the lock - * was obtained (if truncation is desired, - * ftruncate can be used after the lock is - * requested). - * - * - * - * 'c+' - * - * Open the file for reading and writing; otherwise it has the same - * behavior as 'c'. - * - * - * - * 'e' - * - * Set close-on-exec flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conform systems. - * - * - * - * - * - * - * Different operating system families have different line-ending - * conventions. When you write a text file and want to insert a line - * break, you need to use the correct line-ending character(s) for your - * operating system. Unix based systems use \n as the - * line ending character, Windows based systems use \r\n - * as the line ending characters and Macintosh based systems (Mac OS Classic) used - * \r as the line ending character. - * - * If you use the wrong line ending characters when writing your files, you - * might find that other applications that open those files will "look - * funny". - * - * Windows offers a text-mode translation flag ('t') - * which will transparently translate \n to - * \r\n when working with the file. In contrast, you - * can also use 'b' to force binary mode, which will not - * translate your data. To use these flags, specify either - * 'b' or 't' as the last character - * of the mode parameter. - * - * The default translation mode is 'b'. - * You can use the 't' - * mode if you are working with plain-text files and you use - * \n to delimit your line endings in your script, but - * expect your files to be readable with applications such as old versions of notepad. You - * should use the 'b' in all other cases. - * - * If you specify the 't' flag when working with binary files, you - * may experience strange problems with your data, including broken image - * files and strange problems with \r\n characters. - * - * For portability, it is also strongly recommended that - * you re-write code that uses or relies upon the 't' - * mode so that it uses the correct line endings and - * 'b' mode instead. - * @param bool $use_include_path The optional third use_include_path parameter - * can be set to '1' or TRUE if you want to search for the file in the - * include_path, too. - * @param null|resource $context A context stream - * resource. - * @return resource Returns a file pointer resource on success + * @param string $filename + * @param string $mode + * @param bool $use_include_path + * @param null|resource $context + * @return resource * @throws FilesystemException * */ @@ -874,41 +406,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ /** - * fread reads up to - * length bytes from the file pointer - * referenced by stream. Reading stops as soon as one - * of the following conditions is met: - * - * - * - * length bytes have been read - * - * - * - * - * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the - * socket timeout occurs (for network streams) - * - * - * - * - * if the stream is read buffered and it does not represent a plain file, at - * most one read of up to a number of bytes equal to the chunk size (usually - * 8192) is made; depending on the previously buffered data, the size of the - * returned data may be larger than the chunk size. - * - * - * - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param positive-int $length Up to length number of bytes read. - * @return string Returns the read string. + * @param resource $stream + * @param positive-int $length + * @return string * @throws FilesystemException * */ @@ -924,16 +424,8 @@ function fread($stream, int $length): string /** - * Gathers the statistics of the file opened by the file - * pointer stream. This function is similar to the - * stat function except that it operates - * on an open file pointer instead of a filename. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @return array Returns an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * Returns FALSE on failure. + * @param resource $stream + * @return array * @throws FilesystemException * */ @@ -949,13 +441,7 @@ function fstat($stream): array /** - * This function synchronizes changes to the file, including its meta-data. This is similar to fflush, - * but it also instructs the operating system to write to the storage media. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -970,16 +456,8 @@ function fsync($stream): void /** - * Returns the position of the file pointer referenced by stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or popen. - * ftell gives undefined results for append-only streams - * (opened with "a" flag). - * @return int Returns the position of the file pointer referenced by - * stream as an integer; i.e., its offset into the file stream. - * - * If an error occurs, returns FALSE. + * @param resource $stream + * @return int * @throws FilesystemException * */ @@ -995,19 +473,8 @@ function ftell($stream): int /** - * Takes the filepointer, stream, and truncates the file to - * length, size. - * - * @param resource $stream The file pointer. - * - * The stream must be open for writing. - * @param 0|positive-int $size The size to truncate to. - * - * If size is larger than the file then the file - * is extended with null bytes. - * - * If size is smaller than the file then the file - * is truncated to that size. + * @param resource $stream + * @param 0|positive-int $size * @throws FilesystemException * */ @@ -1022,19 +489,10 @@ function ftruncate($stream, int $size): void /** - * fwrite writes the contents of - * string to the file stream pointed to by - * handle. - * - * @param resource $handle A file system pointer resource - * that is typically created using fopen. - * @param string $string The string that is to be written. - * @param 0|positive-int $length 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 0|positive-int fwrite returns the number of bytes - * written. + * @param resource $handle + * @param string $string + * @param 0|positive-int $length + * @return 0|positive-int * @throws FilesystemException * */ @@ -1054,92 +512,9 @@ function fwrite($handle, string $string, ?int $length = null): int /** - * The glob function searches for all the pathnames - * matching pattern according to the rules used by - * the libc glob() function, which is similar to the rules used by common - * shells. - * - * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. - * - * Special characters: - * - * - * - * * - Matches zero or more characters. - * - * - * - * - * ? - Matches exactly one character (any character). - * - * - * - * - * [...] - Matches one character from a group of - * characters. If the first character is !, - * matches any character not in the group. - * - * - * - * - * \ - Escapes the following character, - * except when the GLOB_NOESCAPE flag is used. - * - * - * - * @param int $flags Valid flags: - * - * - * - * GLOB_MARK - Adds a slash (a backslash on Windows) to each directory returned - * - * - * - * - * GLOB_NOSORT - Return files as they appear in the - * directory (no sorting). When this flag is not used, the pathnames are - * sorted alphabetically - * - * - * - * - * GLOB_NOCHECK - Return the search pattern if no - * files matching it were found - * - * - * - * - * GLOB_NOESCAPE - Backslashes do not quote - * metacharacters - * - * - * - * - * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', - * or 'c' - * - * - * - * - * GLOB_ONLYDIR - Return only directory entries - * which match the pattern - * - * - * - * - * GLOB_ERR - Stop on read errors (like unreadable - * directories), by default errors are ignored. - * - * - * - * - * - * The GLOB_BRACE flag is not available on some non GNU - * systems, like Solaris or Alpine Linux. - * - * - * @return list Returns an array containing the matched files/directories, an empty array - * if no file matched. + * @param string $pattern + * @param int $flags + * @return list * @throws FilesystemException * */ @@ -1155,15 +530,8 @@ function glob(string $pattern, int $flags = 0): array /** - * Attempts to change the group of the symlink filename - * to group. - * - * Only the superuser may change the group of a symlink arbitrarily; other - * users may change the group of a symlink to any group of which that user is - * a member. - * - * @param string $filename Path to the symlink. - * @param int|string $group The group specified by name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -1178,13 +546,8 @@ function lchgrp(string $filename, $group): void /** - * Attempts to change the owner of the symlink filename - * to user user. - * - * Only the superuser may change the owner of a symlink. - * - * @param string $filename Path to the file. - * @param int|string $user User name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -1199,10 +562,8 @@ function lchown(string $filename, $user): void /** - * link creates a hard link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1217,18 +578,8 @@ function link(string $target, string $link): void /** - * Gathers the statistics of the file or symbolic link named by - * filename. - * - * @param string $filename Path to a file or a symbolic link. - * @return array See the manual page for stat for information on - * the structure of the array that lstat returns. - * This function is identical to the stat function - * except that if the filename parameter is a symbolic - * link, the status of the symbolic link is returned, not the status of the - * file pointed to by the symbolic link. - * - * On failure, FALSE is returned. + * @param string $filename + * @return array * @throws FilesystemException * */ @@ -1244,23 +595,10 @@ function lstat(string $filename): array /** - * Attempts to create the directory specified by directory. - * - * @param string $directory The directory path. - * @param int $permissions The permissions are 0777 by default, which means the widest possible - * access. For more information on permissions, read the details - * on the chmod page. - * - * permissions is ignored on Windows. - * - * Note that you probably want to specify the permissions as an octal number, - * which means it should have a leading zero. The permissions is also modified - * by the current umask, which you can change using - * umask. - * @param bool $recursive Allows the creation of nested directories specified in the - * directory. - * @param resource $context A context stream - * resource. + * @param string $directory + * @param int $permissions + * @param bool $recursive + * @param resource $context * @throws FilesystemException * */ @@ -1279,31 +617,10 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal /** - * parse_ini_file loads in the - * ini file specified in filename, - * and returns the settings in it in an associative array. - * - * The structure of the ini file is the same as the php.ini's. - * - * @param string $filename The filename of the ini file being parsed. If a relative path is used, - * it is evaluated relative to the current working directory, then the - * include_path. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $filename + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1319,28 +636,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s /** - * parse_ini_string returns the settings in string - * ini_string in an associative array. - * - * The structure of the ini string is the same as the php.ini's. - * - * @param string $ini_string The contents of the ini file being parsed. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $ini_string + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1356,11 +655,8 @@ function parse_ini_string(string $ini_string, bool $process_sections = false, in /** - * Closes a file pointer to a pipe opened by popen. - * - * @param resource $handle The file pointer must be valid, and must have been returned by a - * successful call to popen. - * @return int Returns the termination status of the process that was run. + * @param resource $handle + * @return int * @throws FilesystemException * */ @@ -1376,28 +672,9 @@ function pclose($handle): int /** - * Opens a pipe to a process executed by forking the command given - * by command. - * - * @param string $command The command - * @param string $mode The mode. Either 'r' for reading, or 'w' - * for writing. - * - * On Windows, popen defaults to text mode, i.e. any \n - * characters written to or read from the pipe will be translated to \r\n. - * If this is not desired, binary mode can be enforced by setting mode - * to 'rb' and 'wb', respectively. - * @return resource Returns a file pointer identical to that returned by - * fopen, except that it is unidirectional (may - * only be used for reading or writing) and must be closed with - * pclose. This pointer may be used with - * fgets, fgetss, and - * fwrite. When the mode is 'r', the returned - * file pointer equals to the STDOUT of the command, when the mode - * is 'w', the returned file pointer equals to the STDIN of the - * command. - * - * If an error occurs, returns FALSE. + * @param string $command + * @param string $mode + * @return resource * @throws FilesystemException * */ @@ -1413,14 +690,10 @@ function popen(string $command, string $mode) /** - * Reads a file and writes it to the output buffer. - * - * @param string $filename The filename being read. - * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if - * you want to search for the file in the include_path, too. - * @param resource $context A context stream - * resource. - * @return 0|positive-int Returns the number of bytes read from the file on success + * @param string $filename + * @param bool $use_include_path + * @param resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -1440,10 +713,8 @@ function readfile(string $filename, bool $use_include_path = false, $context = n /** - * readlink does the same as the readlink C function. - * - * @param string $path The symbolic link path. - * @return string Returns the contents of the symbolic link path. + * @param string $path + * @return string * @throws FilesystemException * */ @@ -1459,27 +730,8 @@ function readlink(string $path): string /** - * realpath expands all symbolic links and - * resolves references to /./, /../ and extra / characters in - * the input path and returns the canonicalized - * absolute pathname. - * - * @param string $path The path being checked. - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * @return non-empty-string Returns the canonicalized absolute pathname on success. The resulting path - * will have no symbolic link, /./ or /../ components. Trailing delimiters, - * such as \ and /, are also removed. - * - * realpath returns FALSE on failure, e.g. if - * the file does not exist. + * @param string $path + * @return non-empty-string * @throws FilesystemException * */ @@ -1495,27 +747,9 @@ function realpath(string $path): string /** - * Attempts to rename oldname to - * newname, moving it between directories if necessary. - * If renaming a file and newname exists, - * it will be overwritten. If renaming a directory and - * newname exists, - * this function will emit a warning. - * - * @param string $oldname The old name. - * - * The wrapper used in oldname - * must match the wrapper used in - * newname. - * @param string $newname The new name. - * - * - * On Windows, if newname already exists, it must be writable. - * Otherwise rename fails and issues E_WARNING. - * - * - * @param resource $context A context stream - * resource. + * @param string $oldname + * @param string $newname + * @param resource $context * @throws FilesystemException * */ @@ -1534,11 +768,7 @@ function rename(string $oldname, string $newname, $context = null): void /** - * Sets the file position indicator for stream - * to the beginning of the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file - * successfully opened by fopen. + * @param resource $stream * @throws FilesystemException * */ @@ -1553,13 +783,8 @@ function rewind($stream): void /** - * Attempts to remove the directory named by directory. - * The directory must be empty, and the relevant permissions must permit this. - * A E_WARNING level error will be generated on failure. - * - * @param string $directory Path to the directory. - * @param resource $context A context stream - * resource. + * @param string $directory + * @param resource $context * @throws FilesystemException * */ @@ -1578,12 +803,8 @@ function rmdir(string $directory, $context = null): void /** - * symlink creates a symbolic link to the existing - * target with the specified name - * link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1598,14 +819,9 @@ function symlink(string $target, string $link): void /** - * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. - * If the directory does not exist or is not writable, tempnam may - * generate a file in the system's temporary directory, and return - * the full path to that file, including its name. - * - * @param string $directory The directory where the temporary filename will be created. - * @param string $prefix The prefix of the generated temporary filename. - * @return non-falsy-string Returns the new temporary filename (with path). + * @param string $directory + * @param string $prefix + * @return non-falsy-string * @throws FilesystemException * */ @@ -1621,16 +837,7 @@ function tempnam(string $directory, string $prefix): string /** - * Creates a temporary file with a unique name in read-write (w+) mode and - * returns a file handle. - * - * The file is automatically removed when closed (for example, by calling - * fclose, or when there are no remaining references to - * the file handle returned by tmpfile), or when the - * script ends. - * - * @return resource Returns a file handle, similar to the one returned by - * fopen, for the new file. + * @return resource * @throws FilesystemException * */ @@ -1646,21 +853,9 @@ function tmpfile() /** - * Attempts to set the access and modification times of the file named in the - * filename parameter to the value given in - * time. - * Note that the access time is always modified, regardless of the number - * of parameters. - * - * If the file does not exist, it will be created. - * - * @param string $filename The name of the file being touched. - * @param int $time The touch time. If time is not supplied, - * the current system time is used. - * @param int $atime If present, the access time of the given filename is set to - * the value of atime. Otherwise, it is set to - * the value passed to the time parameter. - * If neither are present, the current system time is used. + * @param string $filename + * @param int $time + * @param int $atime * @throws FilesystemException * */ @@ -1681,16 +876,8 @@ function touch(string $filename, ?int $time = null, ?int $atime = null): void /** - * Deletes filename. Similar to the Unix C unlink() - * function. An E_WARNING level error will be generated on - * failure. - * - * @param string $filename Path to the file. - * - * If the file is a symlink, the symlink will be deleted. On Windows, to delete - * a symlink to a directory, rmdir has to be used instead. - * @param resource $context A context stream - * resource. + * @param string $filename + * @param resource $context * @throws FilesystemException * */ diff --git a/generated/8.1/filter.php b/generated/8.1/filter.php index bac10fe8..0f05571c 100644 --- a/generated/8.1/filter.php +++ b/generated/8.1/filter.php @@ -5,34 +5,10 @@ use Safe\Exceptions\FilterException; /** - * This function is useful for retrieving many values without - * repetitively calling filter_input. - * - * @param int $type One of INPUT_GET, INPUT_POST, - * INPUT_COOKIE, INPUT_SERVER, or - * INPUT_ENV. - * @param array|int $options 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 - * array, valid keys are filter which specifies the - * filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. - * If the input array designated by type is not populated, - * the function returns NULL if the FILTER_NULL_ON_FAILURE - * flag is not given, or FALSE otherwise. For other failures, FALSE is returned. - * - * 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. If the add_empty parameter is FALSE, no array - * element will be added for unset variables. + * @param int $type + * @param array|int $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ @@ -48,25 +24,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt /** - * This function is useful for retrieving many values without - * repetitively calling filter_var. - * - * @param array $array An array with string keys containing the data to filter. - * @param mixed $options 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 array, valid keys are filter - * which specifies the filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if - * the variable is not set. + * @param array $array + * @param mixed $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ diff --git a/generated/8.1/fpm.php b/generated/8.1/fpm.php index 7a9a98de..86f5d84c 100644 --- a/generated/8.1/fpm.php +++ b/generated/8.1/fpm.php @@ -5,10 +5,6 @@ use Safe\Exceptions\FpmException; /** - * 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. - * * @throws FpmException * */ diff --git a/generated/8.1/ftp.php b/generated/8.1/ftp.php index ead4b0a7..cadf5a86 100644 --- a/generated/8.1/ftp.php +++ b/generated/8.1/ftp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to - * allocate space for a file to be uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $size The number of bytes to allocate. - * @param null|string $response A textual representation of the servers response will be returned by - * reference in response if a variable is provided. + * @param \FTP\Connection $ftp + * @param int $size + * @param null|string $response * @throws FtpException * */ @@ -26,9 +22,7 @@ function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @param string $remote_filename * @param string $local_filename * @param FTP_ASCII|FTP_BINARY $mode @@ -46,9 +40,7 @@ function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local /** - * Changes to the parent directory. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -63,10 +55,8 @@ function ftp_cdup(\FTP\Connection $ftp): void /** - * Changes the current directory to the specified one. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The target directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -81,13 +71,10 @@ function ftp_chdir(\FTP\Connection $ftp, string $directory): void /** - * Sets the permissions on the specified remote file to - * permissions. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $permissions The new permissions, given as an octal value. - * @param string $filename The remote file. - * @return int Returns the new file permissions on success. + * @param \FTP\Connection $ftp + * @param int $permissions + * @param string $filename + * @return int * @throws FtpException * */ @@ -103,10 +90,7 @@ function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): in /** - * ftp_close closes the given link identifier - * and releases the resource. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -121,18 +105,10 @@ function ftp_close(\FTP\Connection $ftp): void /** - * ftp_connect opens an FTP connection to the - * specified hostname. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -148,11 +124,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\ /** - * ftp_delete deletes the file specified by - * filename from the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The file to delete. + * @param \FTP\Connection $ftp + * @param string $filename * @throws FtpException * */ @@ -167,15 +140,11 @@ function ftp_delete(\FTP\Connection $ftp, string $filename): void /** - * ftp_fget retrieves remote_filename - * from the FTP server, and writes it to the given file pointer. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param resource $stream An open file pointer in which we store the data. - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param resource $stream + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -190,15 +159,11 @@ function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $m /** - * ftp_fput uploads the data from a file pointer - * to a remote file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param resource $stream An open file pointer on the local file. Reading stops at end of file. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param resource $stream + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -213,15 +178,11 @@ function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $m /** - * ftp_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -236,11 +197,9 @@ function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_fi /** - * Logs in to the given FTP connection. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $username The username (USER). - * @param string $password The password (PASS). + * @param \FTP\Connection $ftp + * @param string $username + * @param string $password * @throws FtpException * */ @@ -255,11 +214,9 @@ function ftp_login(\FTP\Connection $ftp, string $username, string $password): vo /** - * Creates the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The name of the directory that will be created. - * @return string Returns the newly created directory name on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return string * @throws FtpException * */ @@ -275,11 +232,9 @@ function ftp_mkdir(\FTP\Connection $ftp, string $directory): string /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. - * @return array Returns an array of arrays with file infos from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -295,20 +250,12 @@ function ftp_mlsd(\FTP\Connection $ftp, string $directory): array /** - * ftp_nb_put stores a local file on the FTP server. - * - * The difference between this function and the ftp_put - * is that this function uploads the file asynchronously, so your program can - * perform other operations while the file is being uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -324,14 +271,9 @@ function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. This parameter can also include arguments, eg. - * ftp_nlist($ftp, "-la /your/dir");. - * Note that this parameter isn't escaped so there may be some issues with - * filenames containing spaces and other characters. - * @return array Returns an array of filenames from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -347,16 +289,8 @@ function ftp_nlist(\FTP\Connection $ftp, string $directory): array /** - * ftp_pasv turns on or off passive mode. In - * passive mode, data connections are initiated by the client, - * rather than by the server. - * It may be needed if the client is behind firewall. - * - * Please note that ftp_pasv can only be called after a - * successful login or otherwise it will fail. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off. + * @param \FTP\Connection $ftp + * @param bool $enable * @throws FtpException * */ @@ -371,14 +305,11 @@ function ftp_pasv(\FTP\Connection $ftp, bool $enable): void /** - * ftp_put stores a local file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -393,10 +324,8 @@ function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_fi /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the current directory name. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ @@ -412,12 +341,9 @@ function ftp_pwd(\FTP\Connection $ftp): string /** - * ftp_rename renames a file or a directory on the FTP - * server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $from The old file/directory name. - * @param string $to The new name. + * @param \FTP\Connection $ftp + * @param string $from + * @param string $to * @throws FtpException * */ @@ -432,11 +358,8 @@ function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void /** - * Removes the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to delete. This must be either an absolute or relative - * path to an empty directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -451,16 +374,8 @@ function ftp_rmdir(\FTP\Connection $ftp, string $directory): void /** - * ftp_site sends the given SITE - * command to the FTP server. - * - * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and - * group membership. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $command The SITE command. Note that this parameter isn't escaped so there may - * be some issues with filenames containing spaces and other characters. + * @param \FTP\Connection $ftp + * @param string $command * @throws FtpException * */ @@ -475,12 +390,9 @@ function ftp_site(\FTP\Connection $ftp, string $command): void /** - * ftp_size returns the size of the given file in - * bytes. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The remote file. - * @return int Returns the file size on success. + * @param \FTP\Connection $ftp + * @param string $filename + * @return int * @throws FtpException * */ @@ -496,23 +408,10 @@ function ftp_size(\FTP\Connection $ftp, string $filename): int /** - * ftp_ssl_connect opens an explicit SSL-FTP connection to the - * specified hostname. That implies that - * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP, or its certificate is invalid. Only when - * ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail in - * the mentioned cases. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -528,10 +427,8 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \ /** - * Returns the system type identifier of the remote FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the remote system type. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ diff --git a/generated/8.1/funchand.php b/generated/8.1/funchand.php index 2c04487a..c691f7ea 100644 --- a/generated/8.1/funchand.php +++ b/generated/8.1/funchand.php @@ -5,10 +5,7 @@ use Safe\Exceptions\FunchandException; /** - * Registers the given callback to be executed when a - * tick is called. - * - * @param callable(): void $callback The function to register. + * @param callable(): void $callback * @param mixed $args * @throws FunchandException * diff --git a/generated/8.1/gettext.php b/generated/8.1/gettext.php index 5abd6cb6..b75b30d4 100644 --- a/generated/8.1/gettext.php +++ b/generated/8.1/gettext.php @@ -5,14 +5,9 @@ use Safe\Exceptions\GettextException; /** - * The bindtextdomain function sets or gets the path - * for a domain. - * - * @param string $domain The domain. - * @param string $directory The directory path. - * An empty string means the current directory. - * If NULL, the currently set directory is returned. - * @return string The full pathname for the domain currently being set. + * @param string $domain + * @param string $directory + * @return string * @throws GettextException * */ diff --git a/generated/8.1/gmp.php b/generated/8.1/gmp.php index a706d190..ecd50fd9 100644 --- a/generated/8.1/gmp.php +++ b/generated/8.1/gmp.php @@ -5,17 +5,7 @@ use Safe\Exceptions\GmpException; /** - * - * - * @param \GMP|int|string $seed The seed to be set for the gmp_random, - * gmp_random_bits, and - * gmp_random_range functions. - * - * - * A GMP object, an integer, - * or a string that can be interpreted as a number following the same logic - * as if the string was used in gmp_init with automatic - * base detection (i.e. when base is equal to 0). + * @param \GMP|int|string $seed * @throws GmpException * */ diff --git a/generated/8.1/gnupg.php b/generated/8.1/gnupg.php index eccd5d0b..5bcba08f 100644 --- a/generated/8.1/gnupg.php +++ b/generated/8.1/gnupg.php @@ -5,12 +5,9 @@ use Safe\Exceptions\GnupgException; /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -25,11 +22,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. + * @param resource $identifier + * @param string $fingerprint * @throws GnupgException * */ @@ -44,12 +38,9 @@ function gnupg_addencryptkey($identifier, string $fingerprint): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -68,10 +59,7 @@ function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -86,10 +74,7 @@ function gnupg_cleardecryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -104,10 +89,7 @@ function gnupg_clearencryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -122,13 +104,8 @@ function gnupg_clearsignkeys($identifier): void /** - * Toggle the armored output. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $armor Pass a non-zero integer-value to this function to enable armored-output - * (default). - * Pass 0 to disable armored output. + * @param resource $identifier + * @param int $armor * @throws GnupgException * */ @@ -143,18 +120,8 @@ function gnupg_setarmor($identifier, int $armor): void /** - * Sets the mode for signing. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $signmode The mode for signing. - * - * signmode takes a constant indicating what type of - * signature should be produced. The possible values are - * GNUPG_SIG_MODE_NORMAL, - * GNUPG_SIG_MODE_DETACH and - * GNUPG_SIG_MODE_CLEAR. - * By default GNUPG_SIG_MODE_CLEAR is used. + * @param resource $identifier + * @param int $signmode * @throws GnupgException * */ diff --git a/generated/8.1/hash.php b/generated/8.1/hash.php index 5a5ce9fa..92cec1f9 100644 --- a/generated/8.1/hash.php +++ b/generated/8.1/hash.php @@ -5,29 +5,12 @@ use Safe\Exceptions\HashException; /** - * - * - * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..) - * See hash_algos for a list of supported algorithms. - * - * - * Non-cryptographic hash functions are not allowed. - * - * - * - * Non-cryptographic hash functions are not allowed. - * @param string $key Input keying material (raw binary). Cannot be empty. - * @param int $length 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. - * @param string $info Application/context-specific info string. - * @param string $salt Salt to use during derivation. - * - * While optional, adding random salt significantly improves the strength of HKDF. - * @return non-falsy-string Returns a string containing a raw binary representation of the derived key - * (also known as output keying material - OKM);. + * @param string $algo + * @param string $key + * @param int $length + * @param string $info + * @param string $salt + * @return non-falsy-string * @throws HashException * */ @@ -43,11 +26,9 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "" /** - * - * - * @param \HashContext $context Hashing context returned by hash_init. - * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. - * @param \HashContext|null $stream_context Stream context as returned by stream_context_create. + * @param \HashContext $context + * @param string $filename + * @param \HashContext|null $stream_context * @throws HashException * */ diff --git a/generated/8.1/ibase.php b/generated/8.1/ibase.php index aca3c032..3eb08b46 100644 --- a/generated/8.1/ibase.php +++ b/generated/8.1/ibase.php @@ -5,10 +5,7 @@ use Safe\Exceptions\IbaseException; /** - * This function will discard a BLOB if it has not yet been closed by - * fbird_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -23,14 +20,12 @@ function fbird_blob_cancel($blob_handle): void /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the new database user. - * @param string $password The password of the new user. - * @param string $first_name The first name of the new database user. - * @param string $middle_name The middle name of the new database user. - * @param string $last_name The last name of the new database user. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -53,29 +48,12 @@ function ibase_add_user($service_handle, string $user_name, string $password, ?s /** - * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. - * @param string $dest_file The path to the backup file on the database server. - * @param int $options Additional options to pass to the database server for backup. - * The options parameter can be a combination - * of the following constants: - * IBASE_BKP_IGNORE_CHECKSUMS, - * IBASE_BKP_IGNORE_LIMBO, - * IBASE_BKP_METADATA_ONLY, - * IBASE_BKP_NO_GARBAGE_COLLECT, - * IBASE_BKP_OLD_DESCRIPTIONS, - * IBASE_BKP_NON_TRANSPORTABLE or - * IBASE_BKP_CONVERT. - * Read the section about for further information. - * @param bool $verbose Since the backup process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the backup process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_db + * @param string $dest_file + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -91,10 +69,7 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int /** - * This function will discard a BLOB if it has not yet been closed by - * ibase_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -109,13 +84,8 @@ function ibase_blob_cancel($blob_handle): void /** - * ibase_blob_create creates a new BLOB for filling with - * data. - * - * @param null|resource $link_identifier An InterBase link identifier. If omitted, the last opened link is - * assumed. - * @return resource Returns a BLOB handle for later use with - * ibase_blob_add. + * @param null|resource $link_identifier + * @return resource * @throws IbaseException * */ @@ -135,12 +105,9 @@ function ibase_blob_create($link_identifier = null) /** - * This function returns at most len bytes from a BLOB - * that has been opened for reading by ibase_blob_open. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. - * @param int $len Size of returned data. - * @return string Returns at most len bytes from the BLOB. + * @param resource $blob_handle + * @param int $len + * @return string * @throws IbaseException * */ @@ -156,14 +123,7 @@ function ibase_blob_get($blob_handle, int $len): string /** - * Closes the link to an InterBase database that's associated with - * a connection id returned from ibase_connect. - * Default transaction on link is committed, other transactions are - * rolled back. - * - * @param null|resource $connection_id An InterBase link identifier returned from - * ibase_connect. If omitted, the last opened link - * is assumed. + * @param null|resource $connection_id * @throws IbaseException * */ @@ -182,15 +142,7 @@ function ibase_close($connection_id = null): void /** - * Commits a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -209,13 +161,7 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** - * Commits a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -234,35 +180,15 @@ function ibase_commit($link_or_trans_identifier = null): void /** - * Establishes a connection to an Firebird/InterBase server. - * - * In case a second call is made to ibase_connect with - * the same arguments, no new link will be established, but instead, the link - * identifier of the already opened link will be returned. The link to the - * server will be closed as soon as the execution of the script ends, unless - * it's closed earlier by explicitly calling ibase_close. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' - * (TCP/IP with interbase server on custom TCP port), '//hostname/' - * (NetBEUI), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an Firebird/InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -296,10 +222,8 @@ function ibase_connect(?string $database = null, ?string $username = null, ?stri /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the user you want to delete from the database. + * @param resource $service_handle + * @param string $user_name * @throws IbaseException * */ @@ -314,11 +238,7 @@ function ibase_delete_user($service_handle, string $user_name): void /** - * This functions drops a database that was opened by either ibase_connect - * or ibase_pconnect. The database is closed and deleted from the server. - * - * @param null|resource $connection An InterBase link identifier. If omitted, the last opened link is - * assumed. + * @param null|resource $connection * @throws IbaseException * */ @@ -337,12 +257,7 @@ function ibase_drop_db($connection = null): void /** - * This function causes the registered event handler specified by - * event to be cancelled. The callback function will - * no longer be called for the events it was registered to handle. - * - * @param resource $event An event resource, created by - * ibase_set_event_handler. + * @param resource $event * @throws IbaseException * */ @@ -357,9 +272,7 @@ function ibase_free_event_handler($event): void /** - * Frees a prepared query. - * - * @param resource $query A query prepared with ibase_prepare. + * @param resource $query * @throws IbaseException * */ @@ -374,10 +287,7 @@ function ibase_free_query($query): void /** - * Frees a result set. - * - * @param resource $result_identifier A result set created by ibase_query or - * ibase_execute. + * @param resource $result_identifier * @throws IbaseException * */ @@ -392,8 +302,6 @@ function ibase_free_result($result_identifier): void /** - * - * * @param resource $service_handle * @param string $db * @param int $action @@ -412,14 +320,12 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the database user to modify. - * @param string $password The user's new password. - * @param string $first_name The user's new first name. - * @param string $middle_name The user's new middle name. - * @param string $last_name The user's new last name. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -442,11 +348,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** - * This function assigns a name to a result set. This name can be used later in - * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * - * @param resource $result An InterBase result set. - * @param string $name The name to be assigned. + * @param resource $result + * @param string $name * @throws IbaseException * */ @@ -461,42 +364,15 @@ function ibase_name_result($result, string $name): void /** - * Opens a persistent connection to an InterBase database. - * - * ibase_pconnect acts very much like - * ibase_connect with two major differences. - * - * First, when connecting, the function will first try to find a (persistent) - * link that's already opened with the same parameters. If one is found, an - * identifier for it will be returned instead of opening a new connection. - * - * Second, the connection to the InterBase server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (ibase_close will not close links - * established by ibase_pconnect). This type of link is - * therefore called 'persistent'. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' - * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. Functional only with InterBase 6 - * and up. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -530,32 +406,12 @@ function ibase_pconnect(?string $database = null, ?string $username = null, ?str /** - * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_file The absolute path on the server where the backup file is located. - * @param string $dest_db The path to create the new database on the server. You can also use database alias. - * @param int $options Additional options to pass to the database server for restore. - * The options parameter can be a combination - * of the following constants: - * IBASE_RES_DEACTIVATE_IDX, - * IBASE_RES_NO_SHADOW, - * IBASE_RES_NO_VALIDITY, - * IBASE_RES_ONE_AT_A_TIME, - * IBASE_RES_REPLACE, - * IBASE_RES_CREATE, - * IBASE_RES_USE_ALL_SPACE, - * IBASE_PRP_PAGE_BUFFERS, - * IBASE_PRP_SWEEP_INTERVAL, - * IBASE_RES_CREATE. - * Read the section about for further information. - * @param bool $verbose Since the restore process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the restore process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_file + * @param string $dest_db + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -571,15 +427,7 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in /** - * Rolls back a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -598,13 +446,7 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** - * Rolls back a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -623,13 +465,10 @@ function ibase_rollback($link_or_trans_identifier = null): void /** - * - * - * @param string $host The name or ip address of the database host. You can define the port by adding - * '/' and port number. If no port is specified, port 3050 will be used. - * @param string $dba_username The name of any valid user. - * @param string $dba_password The user's password. - * @return resource Returns a Interbase / Firebird link identifier on success. + * @param string $host + * @param string $dba_username + * @param string $dba_password + * @return resource * @throws IbaseException * */ @@ -645,9 +484,7 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa /** - * - * - * @param resource $service_handle A previously created connection to the database server. + * @param resource $service_handle * @throws IbaseException * */ diff --git a/generated/8.1/ibmDb2.php b/generated/8.1/ibmDb2.php index 3915371e..a4dcb243 100644 --- a/generated/8.1/ibmDb2.php +++ b/generated/8.1/ibmDb2.php @@ -5,44 +5,9 @@ use Safe\Exceptions\IbmDb2Exception; /** - * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. - * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value One of the following constants: - * - * - * DB2_AUTOCOMMIT_OFF - * - * - * Turns AUTOCOMMIT off. - * - * - * - * - * DB2_AUTOCOMMIT_ON - * - * - * Turns AUTOCOMMIT on. - * - * - * - * - * - * Turns AUTOCOMMIT off. - * - * Turns AUTOCOMMIT on. - * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool When 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 - * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, while a value of DB2_AUTOCOMMIT_ON indicates that - * AUTOCOMMIT is on. - * - * When db2_autocommit receives both the - * connection parameter and - * autocommit parameter, it attempts to set the - * AUTOCOMMIT state of the requested connection to the corresponding state. - * Returns TRUE on success. + * @param resource $connection + * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value + * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool * @throws IbmDb2Exception * */ @@ -62,37 +27,13 @@ function db2_autocommit($connection, $value = null) /** - * Binds a PHP variable to an SQL statement parameter in a statement resource - * returned by db2_prepare. This function gives you more - * control over the parameter type, data type, precision, and scale for the - * parameter than simply passing the variable as part of the optional input - * array to db2_execute. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared - * statement. - * @param string $variable_name A string specifying the name of the PHP variable to bind to the - * parameter specified by parameter_number. - * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the - * SQL parameter as an input parameter (DB2_PARAM_IN), - * an output parameter (DB2_PARAM_OUT), or as a - * parameter that accepts input and returns output - * (DB2_PARAM_INOUT). To avoid memory overhead, you can - * also specify DB2_PARAM_FILE to bind the PHP variable - * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) - * data. - * @param int $data_type A constant specifying the SQL data type that the PHP variable should be - * bound as: one of DB2_BINARY, - * DB2_CHAR, DB2_DOUBLE, or - * DB2_LONG . - * @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 - * output value from the stored procedure. - * @param int $scale Specifies the scale with which the variable should be bound to the - * database. + * @param resource $stmt + * @param int $parameter_number + * @param string $variable_name + * @param int $parameter_type + * @param int $data_type + * @param int $precision + * @param int $scale * @throws IbmDb2Exception * */ @@ -117,111 +58,8 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, ?in /** - * This function returns an object with read-only properties that return - * information about the DB2 database client. The following table lists - * the DB2 client properties: - * - * DB2 client properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * APPL_CODEPAGE - * int - * The application code page. - * - * - * CONN_CODEPAGE - * int - * The code page for the current connection. - * - * - * DATA_SOURCE_NAME - * string - * The data source name (DSN) used to create the current connection - * to the database. - * - * - * DRIVER_NAME - * string - * The name of the library that implements the DB2 Call - * Level Interface (CLI) specification. - * - * - * DRIVER_ODBC_VER - * string - * The version of ODBC that the DB2 client supports. This returns a - * string "MM.mm" where MM is the major version and - * mm is the minor version. The DB2 client always - * returns "03.51". - * - * - * - * DRIVER_VER - * string - * The version of the client, in the form of a string "MM.mm.uuuu" where - * MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * ODBC_SQL_CONFORMANCE - * string - * - * The level of ODBC SQL grammar supported by the client: - * - * - * MINIMUM - * - * - * Supports the minimum ODBC SQL grammar. - * - * - * - * - * CORE - * - * - * Supports the core ODBC SQL grammar. - * - * - * - * - * EXTENDED - * - * - * Supports extended ODBC SQL grammar. - * - * - * - * - * - * - * - * - * ODBC_VER - * string - * The version of ODBC that the ODBC driver manager supports. This - * returns a string "MM.mm.rrrr" where MM is the major - * version, mm is the minor version, and - * rrrr is the release. The DB2 client always returns - * "03.01.0000". - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -237,15 +75,7 @@ function db2_client_info($connection): \stdClass /** - * This function closes a DB2 client connection created with - * db2_connect and returns the corresponding - * resources to the database server. - * - * If you attempt to close a persistent DB2 client connection created with - * db2_pconnect, the close request is ignored and the - * persistent DB2 client connection remains available for the next caller. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -260,13 +90,7 @@ function db2_close($connection): void /** - * Commits an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_commit is not necessary unless AUTOCOMMIT - * has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -281,26 +105,8 @@ function db2_commit($connection): void /** - * db2_execute executes an SQL statement that was - * prepared by db2_prepare. - * - * If the SQL statement returns a result set, for example, a SELECT statement - * or a CALL to a stored procedure that returns one or more result sets, you - * can retrieve a row as an array from the stmt resource - * using db2_fetch_assoc, - * db2_fetch_both, or - * db2_fetch_array. Alternatively, you can use - * db2_fetch_row to move the result set pointer to the - * next row and fetch a column at a time from that row with - * db2_result. - * - * Refer to db2_prepare for a brief discussion of the - * advantages of using db2_prepare and - * db2_execute rather than db2_exec. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param array $parameters An array of input parameters matching any parameter markers contained - * in the prepared statement. + * @param resource $stmt + * @param array $parameters * @throws IbmDb2Exception * */ @@ -319,12 +125,7 @@ function db2_execute($stmt, ?array $parameters = null): void /** - * Frees the system and database resources that are associated with a result - * set. These resources are freed implicitly when a script finishes, but you - * can call db2_free_result to explicitly free the result - * set resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -339,12 +140,7 @@ function db2_free_result($stmt): void /** - * Frees the system and database resources that are associated with a statement - * resource. These resources are freed implicitly when a script finishes, but - * you can call db2_free_stmt to explicitly free the - * statement resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -359,152 +155,9 @@ function db2_free_stmt($stmt): void /** - * Retrieves the value of a specified option value for a statement resource - * or a connection resource. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * 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 - * that can be set during execution with db2_get_option. - * - * - * 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 - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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 - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success. + * @param resource $resource + * @param string $option + * @return string * @throws IbmDb2Exception * */ @@ -520,24 +173,7 @@ function db2_get_option($resource, string $option): string /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system - * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for - * a long period of time. - * - * @param resource $resource Specifies an active DB2 client connection. + * @param resource $resource * @throws IbmDb2Exception * */ @@ -552,13 +188,7 @@ function db2_pclose($resource): void /** - * Rolls back an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_rollback normally has no effect unless - * AUTOCOMMIT has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -573,253 +203,8 @@ function db2_rollback($connection): void /** - * This function returns an object with read-only properties that return - * information about the IBM DB2, Cloudscape, or Apache Derby database server. - * The following table lists the database server properties: - * - * Database server properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * DBMS_NAME - * string - * The name of the database server to which you are - * connected. For DB2 servers this is a combination of - * DB2 followed by the operating system on which - * the database server is running. - * - * - * DBMS_VER - * string - * The version of the database server, in the form of a string - * "MM.mm.uuuu" where MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * DB_CODEPAGE - * int - * The code page of the database to which you are connected. - * - * - * DB_NAME - * string - * The name of the database to which you are connected. - * - * - * DFT_ISOLATION - * string - * - * The default transaction isolation level supported by the - * server: - * - * - * UR - * - * - * Uncommitted read: changes are immediately visible by all - * concurrent transactions. - * - * - * - * - * CS - * - * - * Cursor stability: a row read by one transaction can be altered and - * committed by a second concurrent transaction. - * - * - * - * - * RS - * - * - * Read stability: a transaction can add or remove rows matching a - * search condition or a pending transaction. - * - * - * - * - * RR - * - * - * Repeatable read: data affected by pending transaction is not - * available to other transactions. - * - * - * - * - * NC - * - * - * No commit: any changes are visible at the end of a successful - * operation. Explicit commits and rollbacks are not allowed. - * - * - * - * - * - * - * - * - * IDENTIFIER_QUOTE_CHAR - * string - * The character used to delimit an identifier. - * - * - * INST_NAME - * string - * The instance on the database server that contains the - * database. - * - * - * ISOLATION_OPTION - * array - * An array of the isolation options supported by the - * database server. The isolation options are described in - * the DFT_ISOLATION property. - * - * - * KEYWORDS - * array - * An array of the keywords reserved by the database - * server. - * - * - * LIKE_ESCAPE_CLAUSE - * bool - * TRUE if the database server supports the - * use of % and _ wildcard - * characters. FALSE if the database server does not - * support these wildcard characters. - * - * - * MAX_COL_NAME_LEN - * int - * Maximum length of a column name supported by the database - * server, expressed in bytes. - * - * - * MAX_IDENTIFIER_LEN - * int - * Maximum length of an SQL identifier supported by the database - * server, expressed in characters. - * - * - * MAX_INDEX_SIZE - * int - * Maximum size of columns combined in an index supported by the - * database server, expressed in bytes. - * - * - * MAX_PROC_NAME_LEN - * int - * Maximum length of a procedure name supported by the database - * server, expressed in bytes. - * - * - * MAX_ROW_SIZE - * int - * Maximum length of a row in a base table supported by the - * database server, expressed in bytes. - * - * - * MAX_SCHEMA_NAME_LEN - * int - * Maximum length of a schema name supported by the database - * server, expressed in bytes. - * - * - * MAX_STATEMENT_LEN - * int - * Maximum length of an SQL statement supported by the database - * server, expressed in bytes. - * - * - * MAX_TABLE_NAME_LEN - * int - * Maximum length of a table name supported by the database - * server, expressed in bytes. - * - * - * NON_NULLABLE_COLUMNS - * bool - * TRUE if the database server supports columns that can be - * defined as NOT NULL, FALSE if the database server does not support - * columns defined as NOT NULL. - * - * - * PROCEDURES - * bool - * TRUE if the database server supports the use of the CALL - * statement to call stored procedures, FALSE if the database - * server does not support the CALL statement. - * - * - * SPECIAL_CHARS - * string - * A string containing all of the characters other than - * a-Z, 0-9, and underscore that can be used in an identifier name. - * - * - * SQL_CONFORMANCE - * string - * - * The level of conformance to the ANSI/ISO SQL-92 specification - * offered by the database server: - * - * - * ENTRY - * - * - * Entry-level SQL-92 compliance. - * - * - * - * - * FIPS127 - * - * - * FIPS-127-2 transitional compliance. - * - * - * - * - * FULL - * - * - * Full level SQL-92 compliance. - * - * - * - * - * INTERMEDIATE - * - * - * Intermediate level SQL-92 compliance. - * - * - * - * - * - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -835,379 +220,9 @@ function db2_server_info($connection): \stdClass /** - * Sets options for a statement resource or a connection resource. You - * cannot set options for result set resources. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * db2_pconnect. - * @param array $options An associative array containing valid statement or connection - * options. This parameter can be used to change autocommit values, - * cursor types (scrollable or forward), and to specify the case of - * the column names (lower, upper, or natural) that will appear in a - * result set. - * - * - * autocommit - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * - * - * - * cursor - * - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * - * - * - * binmode - * - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * - * - * - * db2_attr_case - * - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * - * - * - * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * - * - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 - * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * - * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * - * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * - * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * - * - * - * trusted_password - * - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during - * execution with db2_get_option. - * - * - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @param int $type Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. + * @param resource $resource + * @param array $options + * @param int $type * @throws IbmDb2Exception * */ diff --git a/generated/8.1/iconv.php b/generated/8.1/iconv.php index 4ba479c0..0df05789 100644 --- a/generated/8.1/iconv.php +++ b/generated/8.1/iconv.php @@ -5,21 +5,8 @@ use Safe\Exceptions\IconvException; /** - * Retrieve internal configuration variables of iconv extension. - * - * @param string $type The value of the optional type can be: - * - * all - * input_encoding - * output_encoding - * internal_encoding - * - * @return mixed Returns the current value of the internal configuration variable if - * successful. - * - * If type is omitted or set to "all", - * iconv_get_encoding returns an array that - * stores all these variables. + * @param string $type + * @return mixed * @throws IconvException * */ @@ -35,53 +22,10 @@ function iconv_get_encoding(string $type = "all") /** - * Decodes a MIME header field. - * - * @param string $string The encoded header, as a string. - * @param int $mode mode determines the behaviour in the event - * iconv_mime_decode encounters a malformed - * MIME header field. You can specify any combination - * of the following bitmasks. - * - * Bitmasks acceptable to iconv_mime_decode - * - * - * - * Value - * Constant - * Description - * - * - * - * - * 1 - * ICONV_MIME_DECODE_STRICT - * - * If set, the given header is decoded in full conformance with the - * standards defined in RFC2047. - * This option is disabled by default because there are a lot of - * broken mail user agents that don't follow the specification and don't - * produce correct MIME headers. - * - * - * - * 2 - * ICONV_MIME_DECODE_CONTINUE_ON_ERROR - * - * If set, iconv_mime_decode_headers - * attempts to ignore any grammatical errors and continue to process - * a given header. - * - * - * - * - * - * @param null|string $encoding The optional encoding parameter specifies the - * character set to represent the result by. If omitted or NULL, - * iconv.internal_encoding - * will be used. - * @return string Returns a decoded MIME field on success, - * or FALSE if an error occurs during the decoding. + * @param string $string + * @param int $mode + * @param null|string $encoding + * @return string * @throws IconvException * */ @@ -101,108 +45,10 @@ function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = nu /** - * Composes and returns a string that represents a valid MIME - * header field, which looks like the following: - * - * - * - * In the above example, "Subject" is the field name and the portion that - * begins with "=?ISO-8859-1?..." is the field value. - * - * @param string $field_name The field name. - * @param string $field_value The field value. - * @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 options. - * The items supported by iconv_mime_encode are - * listed below. Note that item names are treated case-sensitive. - * - * Configuration items supported by iconv_mime_encode - * - * - * - * Item - * Type - * Description - * Default value - * Example - * - * - * - * - * scheme - * string - * - * Specifies the method to encode a field value by. The value of - * this item may be either "B" or "Q", where "B" stands for - * base64 encoding scheme and "Q" stands for - * quoted-printable encoding scheme. - * - * B - * B - * - * - * input-charset - * string - * - * Specifies the character set in which the first parameter - * field_name and the second parameter - * field_value are presented. If not given, - * iconv_mime_encode assumes those parameters - * are presented to it in the - * iconv.internal_encoding - * ini setting. - * - * - * iconv.internal_encoding - * - * ISO-8859-1 - * - * - * output-charset - * string - * - * Specifies the character set to use to compose the - * MIME header. - * - * - * iconv.internal_encoding - * - * UTF-8 - * - * - * line-length - * int - * - * Specifies the maximum length of the header lines. The resulting - * header is "folded" to a set of multiple lines in case - * the resulting header field would be longer than the value of this - * parameter, according to - * RFC2822 - Internet Message Format. - * If not given, the length will be limited to 76 characters. - * - * 76 - * 996 - * - * - * line-break-chars - * string - * - * Specifies the sequence of characters to append to each line - * as an end-of-line sign when "folding" is performed on a long header - * field. If not given, this defaults to "\r\n" - * (CR LF). Note that - * this parameter is always treated as an ASCII string regardless - * of the value of input-charset. - * - * \r\n - * \n - * - * - * - * - * @return string Returns an encoded MIME field on success, - * or FALSE if an error occurs during the encoding. + * @param string $field_name + * @param string $field_value + * @param array $options + * @return string * @throws IconvException * */ @@ -218,16 +64,8 @@ function iconv_mime_encode(string $field_name, string $field_value, array $optio /** - * Changes the value of the internal configuration variable specified by - * type to encoding. - * - * @param string $type The value of type can be any one of these: - * - * input_encoding - * output_encoding - * internal_encoding - * - * @param string $encoding The character set. + * @param string $type + * @param string $encoding * @throws IconvException * */ @@ -242,18 +80,9 @@ function iconv_set_encoding(string $type, string $encoding): void /** - * In contrast to strlen, - * iconv_strlen counts the occurrences of characters - * in the given byte sequence string on the basis of - * the specified character set, the result of which is not necessarily - * identical to the length of the string in byte. - * - * @param string $string The string. - * @param null|string $encoding If encoding parameter is omitted or NULL, - * string is assumed to be encoded in - * iconv.internal_encoding. - * @return 0|positive-int Returns the character count of string, as an integer, - * or FALSE if an error occurs during the encoding. + * @param string $string + * @param null|string $encoding + * @return 0|positive-int * @throws IconvException * */ @@ -273,29 +102,10 @@ function iconv_strlen(string $string, ?string $encoding = null): int /** - * Performs a character set conversion on the string - * string from from_encoding - * to to_encoding. - * - * @param string $from_encoding The input charset. - * @param string $to_encoding The output charset. - * - * If you append the string //TRANSLIT to - * to_encoding transliteration is activated. This - * means that when a character can't be represented in the target charset, - * it can be approximated through one or several similarly looking - * characters. If you append the string //IGNORE, - * characters that cannot be represented in the target charset are silently - * discarded. Otherwise, E_NOTICE is generated and the function - * will return FALSE. - * - * If and how //TRANSLIT works exactly depends on the - * system's iconv() implementation (cf. ICONV_IMPL). - * Some implementations are known to ignore //TRANSLIT, - * so the conversion is likely to fail for characters which are illegal for - * the to_encoding. - * @param string $string The string to be converted. - * @return string Returns the converted string. + * @param string $from_encoding + * @param string $to_encoding + * @param string $string + * @return string * @throws IconvException * */ diff --git a/generated/8.1/image.php b/generated/8.1/image.php index 222aa46b..2acc2550 100644 --- a/generated/8.1/image.php +++ b/generated/8.1/image.php @@ -5,64 +5,9 @@ use Safe\Exceptions\ImageException; /** - * The getimagesize function will determine the - * size of any supported given image file and return the dimensions along with - * the file type and a height/width text string to be used inside a - * normal HTML IMG tag and the - * correspondent HTTP content type. - * - * getimagesize can also return some more information - * in image_info parameter. - * - * @param string $filename This parameter specifies the file you wish to retrieve information - * about. It can reference a local file or (configuration permitting) a - * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended - * information from the image file. Currently, this will return the - * different JPG APP markers as an associative array. - * Some programs use these APP markers to embed text information in - * images. A very common one is to embed - * IPTC information in the APP13 marker. - * You can use the iptcparse function to parse the - * binary APP13 marker into something readable. - * - * The image_info only supports - * JFIF files. - * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null Returns an array with up to 7 elements. Not all image types will include - * the channels and bits elements. - * - * Index 0 and 1 contains respectively the width and the height of the image. - * - * Index 2 is one of the IMAGETYPE_XXX constants indicating - * the type of the image. - * - * Index 3 is a text string with the correct - * height="yyy" width="xxx" string that can be used - * directly in an IMG tag. - * - * mime is the correspondant MIME type of the image. - * This information can be used to deliver images with the correct HTTP - * Content-type header: - * - * getimagesize and MIME types - * - * - * ]]> - * - * - * - * channels will be 3 for RGB pictures and 4 for CMYK - * pictures. - * - * bits is the number of bits for each color. - * - * For some image types, the presence of channels and - * bits values can be a bit - * confusing. As an example, GIF always uses 3 channels - * per pixel, but the number of bits per pixel cannot be calculated for an - * animated GIF with a global color table. - * - * On failure, FALSE is returned. + * @param string $filename + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null * @throws ImageException * */ @@ -78,12 +23,9 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array /** - * Returns the extension for the given IMAGETYPE_XXX - * constant. - * - * @param int $image_type One of the IMAGETYPE_XXX constant. - * @param bool $include_dot Whether to prepend a dot to the extension or not. Default to TRUE. - * @return string A string with the extension corresponding to the given image type. + * @param int $image_type + * @param bool $include_dot + * @return string * @throws ImageException * */ @@ -99,13 +41,10 @@ function image_type_to_extension(int $image_type, bool $include_dot = true): str /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array|null $clip Array with keys "x", "y", "width" and "height"; or NULL. - * @return \GdImage Return affined image object on success. + * @param \GdImage $image + * @param array $affine + * @param array|null $clip + * @return \GdImage * @throws ImageException * */ @@ -125,16 +64,9 @@ function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdIm /** - * Returns the concatenation of two affine transformation matrices, - * what is useful if multiple transformations should be applied to the same - * image in one go. - * - * @param array $matrix1 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param array $matrix1 + * @param array $matrix2 + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -150,19 +82,9 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array /** - * Returns an affine transformation matrix. - * - * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE - * or IMG_AFFINE_SCALE, - * options has to be an array with keys x - * and y, both having float values. - * - * If type is IMG_AFFINE_ROTATE, - * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, - * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param int $type + * @param array|float $options + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -178,21 +100,8 @@ function imageaffinematrixget(int $type, $options): array /** - * imagealphablending allows for two different - * modes of drawing on truecolor images. In blending mode, the - * alpha channel component of the color supplied to all drawing function, - * such as imagesetpixel determines how much of the - * underlying color should be allowed to shine through. As a result, gd - * automatically blends the existing color at that point with the drawing color, - * and stores the result in the image. The resulting pixel is opaque. In - * non-blending mode, the drawing color is copied literally with its alpha channel - * information, replacing the destination pixel. Blending mode is not available - * when drawing on palette images. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable the blending mode or not. On true color images - * the default value is TRUE otherwise the default value is FALSE + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -207,20 +116,8 @@ function imagealphablending(\GdImage $image, bool $enable): void /** - * Activate the fast drawing antialiased methods for lines and wired polygons. - * It does not support alpha components. It works using a direct blend - * operation. It works only with truecolor images. - * - * Thickness and styled are not supported. - * - * Using antialiased primitives with transparent background color can end with - * some unexpected results. The blend method uses the background color as any - * other colors. The lack of alpha component support does not allow an alpha - * based antialiasing method. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable antialiasing or not. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -235,20 +132,14 @@ function imageantialias(\GdImage $image, bool $enable): void /** - * imagearc draws an arc of circle centered at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color * @throws ImageException * */ @@ -263,17 +154,10 @@ function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int /** - * Outputs or saves a AVIF Raster image from the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) - * to 100 (best quality, larger file). - * If -1 is provided, the default value 30 is used. - * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) - * to 10 (fast, larger file). - * If -1 is provided, the default value 6 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $speed * @throws ImageException * */ @@ -296,15 +180,9 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed /** - * Outputs or saves a BMP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the compressed arguments is - * not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @param \GdImage $image + * @param null|resource|string $file + * @param bool $compressed * @throws ImageException * */ @@ -325,21 +203,12 @@ function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void /** - * imagechar draws the first character of - * char in the image identified by - * image with its upper-left at - * x,y (top left is 0, - * 0) with the color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -354,18 +223,12 @@ function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int /** - * Draws the character char vertically at the specified - * coordinate on the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -380,19 +243,10 @@ function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, i /** - * Returns the index of the color of the pixel at the - * specified location in the image specified by image. - * - * If the image is a - * truecolor image, this function returns the RGB value of that pixel as - * integer. Use bitshifting and masking to access the distinct red, green and blue - * component values: - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of the point. - * @param int $y y-coordinate of the point. - * @return int Returns the index of the color. + * @param \GdImage $image + * @param int $x + * @param int $y + * @return int * @throws ImageException * */ @@ -408,13 +262,8 @@ function imagecolorat(\GdImage $image, int $x, int $y): int /** - * De-allocates a color previously allocated with - * imagecolorallocate or - * imagecolorallocatealpha. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color identifier. + * @param \GdImage $image + * @param int $color * @throws ImageException * */ @@ -429,11 +278,8 @@ function imagecolordeallocate(\GdImage $image, int $color): void /** - * Makes the colors of the palette version of an image more closely match the true color version. - * - * @param \GdImage $image1 A truecolor image object. - * @param \GdImage $image2 A palette image object pointing to an image that has the same - * size as image1. + * @param \GdImage $image1 + * @param \GdImage $image2 * @throws ImageException * */ @@ -448,18 +294,12 @@ function imagecolormatch(\GdImage $image1, \GdImage $image2): void /** - * This sets the specified index in the palette to the specified - * color. This is useful for creating flood-fill-like effects in - * palleted images without the overhead of performing the actual - * flood-fill. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color An index in the palette. - * @param int $red Value of red component. - * @param int $green Value of green component. - * @param int $blue Value of blue component. - * @param int $alpha Value of alpha component. + * @param \GdImage $image + * @param int $color + * @param int $red + * @param int $green + * @param int $blue + * @param int $alpha * @throws ImageException * */ @@ -474,13 +314,9 @@ function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $b /** - * Gets the color for a specified index. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color index. - * @return array{red: int, green: int, blue: int, alpha: int} Returns an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index. + * @param \GdImage $image + * @param int $color + * @return array{red: int, green: int, blue: int, alpha: int} * @throws ImageException * */ @@ -496,14 +332,10 @@ function imagecolorsforindex(\GdImage $image, int $color): array /** - * Applies a convolution matrix on the image, using the given coefficient and - * offset. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. - * @param float $divisor The divisor of the result of the convolution, used for normalization. - * @param float $offset Color offset. + * @param \GdImage $image + * @param array $matrix + * @param float $divisor + * @param float $offset * @throws ImageException * */ @@ -518,22 +350,14 @@ function imageconvolution(\GdImage $image, array $matrix, float $divisor, float /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -548,28 +372,15 @@ function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $ds /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, except for - * ignoring alpha components, while it implements alpha transparency - * for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -584,32 +395,15 @@ function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, in /** - * imagecopymergegray copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * This function is identical to imagecopymerge except - * that when merging it preserves the hue of the source by converting - * the destination pixels to gray scale before the copy operation. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The src_image will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, except for - * ignoring alpha components, while - * it implements alpha transparency for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -624,37 +418,16 @@ function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresampled copies a rectangular - * portion of one image to another image, smoothly interpolating pixel - * values so that, in particular, reducing the size of an image still - * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -669,37 +442,16 @@ function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresized copies a rectangular - * portion of one image to another image. - * dst_image is the destination image, - * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -714,20 +466,9 @@ function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, /** - * imagecreate returns an image identifier - * representing a blank image of specified size. - * - * In general, we recommend the use of - * imagecreatetruecolor instead of - * imagecreate so that image processing occurs on the - * highest quality image possible. If you want to output a palette image, then - * imagetruecolortopalette should be called immediately - * before saving the image with imagepng or - * imagegif. - * - * @param int $width The image width. - * @param int $height The image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -743,11 +484,8 @@ function imagecreate(int $width, int $height): \GdImage /** - * imagecreatefromavif returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the AVIF raster image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -763,11 +501,8 @@ function imagecreatefromavif(string $filename): \GdImage /** - * imagecreatefrombmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the BMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -783,10 +518,8 @@ function imagecreatefrombmp(string $filename): \GdImage /** - * Create a new image from GD file or URL. - * - * @param string $filename Path to the GD file. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -802,10 +535,8 @@ function imagecreatefromgd(string $filename): \GdImage /** - * Create a new image from GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -821,14 +552,12 @@ function imagecreatefromgd2(string $filename): \GdImage /** - * Create a new image from a given part of GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @param int $x x-coordinate of source point. - * @param int $y y-coordinate of source point. - * @param int $width Source width. - * @param int $height Source height. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -844,11 +573,8 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in /** - * imagecreatefromgif returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the GIF image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -864,11 +590,8 @@ function imagecreatefromgif(string $filename): \GdImage /** - * imagecreatefromjpeg returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the JPEG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -884,11 +607,8 @@ function imagecreatefromjpeg(string $filename): \GdImage /** - * imagecreatefrompng returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the PNG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -904,15 +624,8 @@ function imagecreatefrompng(string $filename): \GdImage /** - * imagecreatefromstring returns an image identifier - * representing the image obtained from the given data. - * These types will be automatically detected if your build of PHP supports - * them: JPEG, PNG, GIF, BMP, WBMP, GD2, and WEBP. - * - * @param string $data A string containing the image data. - * @return \GdImage An image object will be returned on success. FALSE is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. + * @param string $data + * @return \GdImage * @throws ImageException * */ @@ -928,11 +641,8 @@ function imagecreatefromstring(string $data): \GdImage /** - * imagecreatefromtga returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the Truevision TGA image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -948,11 +658,8 @@ function imagecreatefromtga(string $filename): \GdImage /** - * imagecreatefromwbmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WBMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -968,11 +675,8 @@ function imagecreatefromwbmp(string $filename): \GdImage /** - * imagecreatefromwebp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WebP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -988,11 +692,8 @@ function imagecreatefromwebp(string $filename): \GdImage /** - * imagecreatefromxbm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XBM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1008,11 +709,8 @@ function imagecreatefromxbm(string $filename): \GdImage /** - * imagecreatefromxpm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XPM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1028,12 +726,9 @@ function imagecreatefromxpm(string $filename): \GdImage /** - * imagecreatetruecolor returns an image object - * representing a black image of the specified size. - * - * @param int $width Image width. - * @param int $height Image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -1049,15 +744,9 @@ function imagecreatetruecolor(int $width, int $height): \GdImage /** - * Crops an image to the given rectangular area and returns the resulting image. - * The given image is not modified. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys - * x, y, width and - * height. - * @return \GdImage Return cropped image object on success. + * @param \GdImage $image + * @param array $rectangle + * @return \GdImage * @throws ImageException * */ @@ -1073,18 +762,11 @@ function imagecrop(\GdImage $image, array $rectangle): \GdImage /** - * Automatically crops an image according to the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode One of the following constants: - * @param float $threshold Same as IMG_CROP_TRANSPARENT. - * Before PHP 7.4.0, the bundled libgd fell back to IMG_CROP_SIDES, - * if the image had no transparent color. - * @param int $color Crops out a transparent background. - * @return \GdImage Returns a cropped image object on success. - * If the complete image was cropped, imagecrop returns FALSE. + * @param \GdImage $image + * @param int $mode + * @param float $threshold + * @param int $color + * @return \GdImage * @throws ImageException * */ @@ -1100,17 +782,12 @@ function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $thr /** - * This function is deprecated. Use combination of - * imagesetstyle and imageline - * instead. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1125,11 +802,7 @@ function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, in /** - * Prior to PHP 8.0.0, imagedestroy freed any memory associated - * with image image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. + * @param \GdImage $image * @throws ImageException * */ @@ -1144,15 +817,12 @@ function imagedestroy(\GdImage $image): void /** - * Draws an ellipse centered at the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1167,15 +837,10 @@ function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, /** - * Performs a flood fill starting at the given coordinate (top left is 0, 0) - * with the given color in the - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start point. - * @param int $y y-coordinate of start point. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -1190,36 +855,15 @@ function imagefill(\GdImage $image, int $x, int $y, int $color): void /** - * Draws a partial arc centered at the specified coordinate in the - * given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. - * @param int $style A bitwise OR of the following possibilities: - * - * IMG_ARC_PIE - * IMG_ARC_CHORD - * IMG_ARC_NOFILL - * IMG_ARC_EDGED - * - * IMG_ARC_PIE and IMG_ARC_CHORD are - * mutually exclusive; IMG_ARC_CHORD just - * connects the starting and ending angles with a straight line, while - * IMG_ARC_PIE produces a rounded edge. - * IMG_ARC_NOFILL indicates that the arc - * or chord should be outlined, not filled. IMG_ARC_EDGED, - * used together with IMG_ARC_NOFILL, indicates that the - * beginning and ending angles should be connected to the center - this is a - * good way to outline (rather than fill) a 'pie slice'. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color + * @param int $style * @throws ImageException * */ @@ -1234,16 +878,12 @@ function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $widt /** - * Draws an ellipse centered at the specified coordinate on the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1258,17 +898,12 @@ function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $ /** - * Creates a rectangle filled with color in the given - * image starting at point 1 and ending at point 2. - * 0, 0 is the top left corner of the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for point 1. - * @param int $y1 y-coordinate for point 1. - * @param int $x2 x-coordinate for point 2. - * @param int $y2 y-coordinate for point 2. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1283,18 +918,11 @@ function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y /** - * imagefilltoborder performs a flood fill - * whose border color is defined by border_color. - * The starting point for the fill is x, - * y (top left is 0, 0) and the region is - * filled with color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start. - * @param int $y y-coordinate of start. - * @param int $border_color The border color. A color identifier created with imagecolorallocate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $border_color + * @param int $color * @throws ImageException * */ @@ -1309,138 +937,9 @@ function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, i /** - * imagefilter applies the given filter - * filter on the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $filter filter can be one of the following: - * - * - * - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * - * - * - * - * IMG_FILTER_GRAYSCALE: Converts the image into - * grayscale by changing the red, green and blue components to their - * weighted sum using the same coefficients as the REC.601 luma (Y') - * calculation. The alpha components are retained. For palette images the - * result may differ due to palette limitations. - * - * - * - * - * IMG_FILTER_BRIGHTNESS: Changes the brightness - * of the image. Use args to set the level of - * brightness. The range for the brightness is -255 to 255. - * - * - * - * - * IMG_FILTER_CONTRAST: Changes the contrast of - * the image. Use args to set the level of - * contrast. - * - * - * - * - * IMG_FILTER_COLORIZE: Like - * IMG_FILTER_GRAYSCALE, except you can specify the - * color. Use args, arg2 and - * arg3 in the form of - * red, green, - * blue and arg4 for the - * alpha channel. The range for each color is 0 to 255. - * - * - * - * - * IMG_FILTER_EDGEDETECT: Uses edge detection to - * highlight the edges in the image. - * - * - * - * - * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * - * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using - * the Gaussian method. - * - * - * - * - * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * - * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to - * achieve a "sketchy" effect. - * - * - * - * - * IMG_FILTER_SMOOTH: Makes the image smoother. - * Use args to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use args to set the block size - * and arg2 to set the pixelation effect mode. - * - * - * - * - * IMG_FILTER_SCATTER: Applies scatter effect - * to the image, use args and - * arg2 to define the effect strength and - * additionally arg3 to only apply the - * on select pixel colors. - * - * - * + * @param \GdImage $image + * @param int $filter * @param int $args - * - * - * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * - * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * - * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * - * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * - * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * - * IMG_FILTER_SCATTER: Effect substraction level. - * This must not be higher or equal to the addition level set with - * arg2. - * - * - * * @throws ImageException * */ @@ -1459,43 +958,8 @@ function imagefilter(\GdImage $image, int $filter, int ...$args): void /** - * Flips the image image using the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * - * Constant - * Meaning - * - * - * - * - * IMG_FLIP_HORIZONTAL - * - * Flips the image horizontally. - * - * - * - * IMG_FLIP_VERTICAL - * - * Flips the image vertically. - * - * - * - * IMG_FLIP_BOTH - * - * Flips the image both horizontally and vertically. - * - * - * - * - * + * @param \GdImage $image + * @param int $mode * @throws ImageException * */ @@ -1510,83 +974,12 @@ function imageflip(\GdImage $image, int $mode): void /** - * This function calculates and returns the bounding box in pixels - * for a FreeType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be - * measured. - * @param string $font_filename The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1602,106 +995,16 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size to use in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The index of the desired color for the text, see - * imagecolorexact. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * font_filename does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * @param string $text Text to be inserted into image. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * - * - * - * - * 0 - * lower left x-coordinate - * - * - * 1 - * lower left y-coordinate - * - * - * 2 - * lower right x-coordinate - * - * - * 3 - * lower right y-coordinate - * - * - * 4 - * upper right x-coordinate - * - * - * 5 - * upper right y-coordinate - * - * - * 6 - * upper left x-coordinate - * - * - * 7 - * upper left y-coordinate - * - * - * - * - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1717,13 +1020,9 @@ function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, /** - * Applies gamma correction to the given gd image - * given an input and an output gamma. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $input_gamma The input gamma. - * @param float $output_gamma The output gamma. + * @param \GdImage $image + * @param float $input_gamma + * @param float $output_gamma * @throws ImageException * */ @@ -1738,11 +1037,8 @@ function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_ga /** - * Outputs a GD image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1761,15 +1057,10 @@ function imagegd(\GdImage $image, $file = null): void /** - * Outputs a GD2 image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $chunk_size Chunk size. - * @param int $mode Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $chunk_size + * @param int $mode * @throws ImageException * */ @@ -1792,20 +1083,8 @@ function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mod /** - * imagegif creates the GIF - * file in file from the image image. The - * image argument is the return from the - * imagecreate or imagecreatefrom* - * function. - * - * The image format will be GIF87a unless the - * image has been made transparent with - * imagecolortransparent, in which case the - * image format will be GIF89a. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1824,9 +1103,7 @@ function imagegif(\GdImage $image, $file = null): void /** - * Grabs a screenshot of the whole screen. - * - * @return \GdImage Returns an image object on success. + * @return \GdImage * @throws ImageException * */ @@ -1842,11 +1119,9 @@ function imagegrabscreen(): \GdImage /** - * Grabs a window or its client area using a windows handle (HWND property in COM instance) - * - * @param int $handle The HWND window ID. - * @param bool $client_area Include the client area of the application window. - * @return \GdImage Returns an image object on success. + * @param int $handle + * @param bool $client_area + * @return \GdImage * @throws ImageException * */ @@ -1862,15 +1137,9 @@ function imagegrabwindow(int $handle, bool $client_area = false): \GdImage /** - * imagejpeg creates a JPEG file from - * the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default (-1) uses the default IJG quality value (about 75). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -1891,57 +1160,8 @@ function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void /** - * Set the alpha blending flag to use layering effects. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $effect One of the following constants: - * - * - * IMG_EFFECT_REPLACE - * - * - * Use pixel replacement (equivalent of passing TRUE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_ALPHABLEND - * - * - * Use normal pixel blending (equivalent of passing FALSE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_NORMAL - * - * - * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * - * IMG_EFFECT_OVERLAY - * - * - * Overlay has the effect that black background pixels will remain - * black, white background pixels will remain white, but grey - * background pixels will take the colour of the foreground pixel. - * - * - * - * - * IMG_EFFECT_MULTIPLY - * - * - * Overlays with a multiply effect. - * - * - * - * + * @param \GdImage $image + * @param int $effect * @throws ImageException * */ @@ -1956,15 +1176,12 @@ function imagelayereffect(\GdImage $image, int $effect): void /** - * Draws a line between the two given points. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for first point. - * @param int $y1 y-coordinate for first point. - * @param int $x2 x-coordinate for second point. - * @param int $y2 y-coordinate for second point. - * @param int $color The line color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1979,58 +1196,8 @@ function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $col /** - * imageloadfont loads a user-defined bitmap and returns - * its identifier. - * - * @param string $filename The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * - * - * Font file format - * - * - * - * byte position - * C data type - * description - * - * - * - * - * byte 0-3 - * int - * number of characters in the font - * - * - * byte 4-7 - * int - * - * value of first character in the font (often 32 for space) - * - * - * - * byte 8-11 - * int - * pixel width of each character - * - * - * byte 12-15 - * int - * pixel height of each character - * - * - * byte 16- - * char - * - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * - * @return int Returns an GdFont instance. + * @param string $filename + * @return int * @throws ImageException * */ @@ -2046,24 +1213,10 @@ function imageloadfont(string $filename): int /** - * Outputs or saves a PNG image from the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the quality and - * filters arguments are not used. - * @param int $quality Compression level: from 0 (no compression) to 9. - * The default (-1) uses the zlib compression default. - * For more information see the zlib manual. - * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_XXX - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * The default value (-1) disables filtering. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $filters * @throws ImageException * */ @@ -2086,17 +1239,12 @@ function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters /** - * imagerectangle creates a rectangle starting at - * the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate - * 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -2111,27 +1259,10 @@ function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int /** - * imageresolution allows to set and get the resolution of - * an image in DPI (dots per inch). If the optional parameters are NULL, - * the current resolution is returned as an indexed array. If only - * resolution_x is not NULL, the horizontal and vertical resolution - * are set to this value. If none of the optional parameters are NULL, the horizontal - * and vertical resolution are set to these values, respectively. - * - * The resolution is only used as meta information when images are read from and - * written to formats supporting this kind of information (curently PNG and - * JPEG). It does not affect any drawing operations. The default resolution - * for new images is 96 DPI. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int|null $resolution_x The horizontal resolution in DPI. - * @param int|null $resolution_y The vertical resolution in DPI. - * @return mixed When used as getter, - * it returns an indexed array of the horizontal and vertical resolution on - * success. - * When used as setter, it returns - * TRUE on success. + * @param \GdImage $image + * @param int|null $resolution_x + * @param int|null $resolution_y + * @return mixed * @throws ImageException * */ @@ -2153,19 +1284,11 @@ function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resol /** - * Rotates the image image using the given - * angle in degrees. - * - * The center of rotation is the center of the image, and the rotated - * image may have different dimensions than the original image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the - * number of degrees to rotate the image anticlockwise. - * @param int $background_color Specifies the color of the uncovered zone after the rotation - * @param bool $ignore_transparent This parameter is unused. - * @return \GdImage Returns an image object for the rotated image. + * @param \GdImage $image + * @param float $angle + * @param int $background_color + * @param bool $ignore_transparent + * @return \GdImage * @throws ImageException * */ @@ -2181,16 +1304,8 @@ function imagerotate(\GdImage $image, float $angle, int $background_color, bool /** - * imagesavealpha sets the flag which determines whether to retain - * full alpha channel information (as opposed to single-color transparency) - * when saving PNG images. - * - * Alphablending has to be disabled (imagealphablending($im, false)) - * to retain the alpha-channel in the first place. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -2205,25 +1320,11 @@ function imagesavealpha(\GdImage $image, bool $enable): void /** - * imagescale scales an image using the given - * interpolation algorithm. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $width The width to scale the image to. - * @param int $height The height to scale the image to. If omitted or negative, the aspect - * ratio will be preserved. - * @param int $mode One of IMG_NEAREST_NEIGHBOUR, - * IMG_BILINEAR_FIXED, - * IMG_BICUBIC, - * IMG_BICUBIC_FIXED or anything else (will use two - * pass). - * - * - * IMG_WEIGHTED4 is not yet supported. - * - * - * @return \GdImage Return the scaled image object on success. + * @param \GdImage $image + * @param int $width + * @param int $height + * @param int $mode + * @return \GdImage * @throws ImageException * */ @@ -2239,15 +1340,8 @@ function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = I /** - * imagesetbrush sets the brush image to be - * used by all line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * colors IMG_COLOR_BRUSHED or - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $brush An image object. + * @param \GdImage $image + * @param \GdImage $brush * @throws ImageException * */ @@ -2262,15 +1356,11 @@ function imagesetbrush(\GdImage $image, \GdImage $brush): void /** - * imagesetclip sets the current clipping rectangle, i.e. - * the area beyond which no pixels will be drawn. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 * @throws ImageException * */ @@ -2285,119 +1375,8 @@ function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void /** - * Sets the interpolation method, setting an interpolation method affects the rendering - * of various functions in GD, such as the imagerotate function. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $method The interpolation method, which can be one of the following: - * - * - * - * IMG_BELL: Bell filter. - * - * - * - * - * IMG_BESSEL: Bessel filter. - * - * - * - * - * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * - * IMG_BLACKMAN: Blackman window function. - * - * - * - * - * IMG_BOX: Box blur filter. - * - * - * - * - * IMG_BSPLINE: Spline interpolation. - * - * - * - * - * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * - * IMG_GAUSSIAN: Gaussian function. - * - * - * - * - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * - * IMG_HERMITE: Hermite interpolation. - * - * - * - * - * IMG_HAMMING: Hamming filter. - * - * - * - * - * IMG_HANNING: Hanning filter. - * - * - * - * - * IMG_MITCHELL: Mitchell filter. - * - * - * - * - * IMG_POWER: Power interpolation. - * - * - * - * - * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * - * IMG_SINC: Sinc function. - * - * - * - * - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * - * IMG_WEIGHTED4: Weighting filter. - * - * - * - * - * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * @param \GdImage $image + * @param int $method * @throws ImageException * */ @@ -2412,14 +1391,10 @@ function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED /** - * imagesetpixel draws a pixel at the specified - * coordinate. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate. - * @param int $y y-coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -2434,18 +1409,8 @@ function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void /** - * imagesetstyle sets the style to be used by all - * line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * color IMG_COLOR_STYLED or lines of images with color - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * Note that style must not be an empty array. + * @param \GdImage $image + * @param array $style * @throws ImageException * */ @@ -2460,13 +1425,8 @@ function imagesetstyle(\GdImage $image, array $style): void /** - * imagesetthickness sets the thickness of the lines - * drawn when drawing rectangles, polygons, arcs etc. to - * thickness pixels. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $thickness Thickness, in pixels. + * @param \GdImage $image + * @param int $thickness * @throws ImageException * */ @@ -2481,19 +1441,8 @@ function imagesetthickness(\GdImage $image, int $thickness): void /** - * imagesettile sets the tile image to be - * used by all region filling functions (such as imagefill - * and imagefilledpolygon) when filling with the special - * color IMG_COLOR_TILED. - * - * A tile is an image used to fill an area with a repeated pattern. Any - * GD image can be used as a tile, and by setting the transparent color index of the tile - * image with imagecolortransparent, a tile allows certain parts - * of the underlying area to shine through can be created. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $tile The image object to be used as a tile. + * @param \GdImage $image + * @param \GdImage $tile * @throws ImageException * */ @@ -2508,17 +1457,12 @@ function imagesettile(\GdImage $image, \GdImage $tile): void /** - * Draws a string at the given coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the upper left corner. - * @param int $y y-coordinate of the upper left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2533,18 +1477,12 @@ function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, /** - * Draws a string vertically at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the bottom left corner. - * @param int $y y-coordinate of the bottom left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2559,11 +1497,8 @@ function imagestringup(\GdImage $image, int $font, int $x, int $y, string $strin /** - * Returns the width of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the width of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2579,11 +1514,8 @@ function imagesx(\GdImage $image): int /** - * Returns the height of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the height of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2599,21 +1531,9 @@ function imagesy(\GdImage $image): int /** - * imagetruecolortopalette converts a truecolor image - * to a palette image. The code for this function was originally drawn from - * the Independent JPEG Group library code, which is excellent. The code - * has been modified to preserve as much alpha channel information as - * possible in the resulting palette, in addition to preserving colors as - * well as possible. This does not work as well as might be hoped. It is - * usually best to simply produce a truecolor output image instead, which - * guarantees the highest output quality. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $dither Indicates if the image should be dithered - if it is TRUE then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * @param int $num_colors Sets the maximum number of colors that should be retained in the palette. + * @param \GdImage $image + * @param bool $dither + * @param int $num_colors * @throws ImageException * */ @@ -2628,87 +1548,12 @@ function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) /** - * This function calculates and returns the bounding box in pixels - * for a TrueType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be measured. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * @return array imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and FALSE on error. - * - * - * - * - * key - * contents - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. + * @return array * @throws ImageException * */ @@ -2724,68 +1569,16 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ /** - * Writes the given text into the image using TrueType - * fonts. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $text The text string in UTF-8 encoding. - * - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings. - * - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * @return array Returns an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. + * @return array * @throws ImageException * */ @@ -2801,15 +1594,9 @@ function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y /** - * imagewbmp outputs or save a WBMP - * version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. + * @param \GdImage $image + * @param null|resource|string $file + * @param int|null $foreground_color * @throws ImageException * */ @@ -2830,13 +1617,9 @@ function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) /** - * Outputs or saves a WebP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -2857,22 +1640,9 @@ function imagewebp(\GdImage $image, $file = null, int $quality = -1): void /** - * Outputs or save an XBM version of the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. - * - * The filename (without the .xbm extension) is also - * used for the C identifiers of the XBM, whereby non - * alphanumeric characters of the current locale are substituted by - * underscores. If filename is set to NULL, - * image is used to build the C identifiers. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. All other colors are treated as - * background. + * @param \GdImage $image + * @param null|resource|string $filename + * @param int|null $foreground_color * @throws ImageException * */ @@ -2891,13 +1661,10 @@ function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): vo /** - * Embeds binary IPTC data into a JPEG image. - * - * @param string $iptc_data The data to be written. - * @param string $filename Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be - * returned as a string. Otherwise the JPEG will be printed to STDOUT. - * @return bool|string If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @param string $iptc_data + * @param string $filename + * @param int $spool + * @return bool|string * @throws ImageException * */ @@ -2913,11 +1680,8 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) /** - * Parses an IPTC block into its single tags. - * - * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the - * value. It returns FALSE on error or if no IPTC data was found. + * @param string $iptc_block + * @return array * @throws ImageException * */ diff --git a/generated/8.1/imap.php b/generated/8.1/imap.php index b1e78115..673d6dd4 100644 --- a/generated/8.1/imap.php +++ b/generated/8.1/imap.php @@ -5,11 +5,8 @@ use Safe\Exceptions\ImapException; /** - * Convert an 8bit string to a quoted-printable string (according to - * RFC2045, section 6.7). - * - * @param string $string The 8bit string to convert - * @return string Returns a quoted-printable string. + * @param string $string + * @return string * @throws ImapException * */ @@ -25,19 +22,11 @@ function imap_8bit(string $string): string /** - * Appends a string message to the specified folder. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $folder The mailbox name, see imap_open for more - * information - * @param string $message The message to be append, as a string - * - * When talking to the Cyrus IMAP server, you must use "\r\n" as - * your end-of-line terminator instead of "\n" or the operation will - * fail - * @param null|string $options If provided, the options will also be written - * to the folder - * @param null|string $internal_date 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. + * @param \IMAP\Connection $imap + * @param string $folder + * @param string $message + * @param null|string $options + * @param null|string $internal_date * @throws ImapException * */ @@ -58,10 +47,8 @@ function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?s /** - * Decodes the given BASE-64 encoded string. - * - * @param string $string The encoded text - * @return string Returns the decoded message as a string. + * @param string $string + * @return string * @throws ImapException * */ @@ -77,10 +64,8 @@ function imap_base64(string $string): string /** - * Convert an 8bit string to a base64 string according to RFC2045, Section 6.8. - * - * @param string $string The 8bit string - * @return string Returns a base64 encoded string. + * @param string $string + * @return string * @throws ImapException * */ @@ -96,39 +81,10 @@ function imap_binary(string $string): string /** - * imap_body returns the body of the message, - * numbered message_num in the current - * mailbox. - * - * imap_body will only return a verbatim copy of the - * message body. To extract single parts of a multipart MIME-encoded - * message you have to use imap_fetchstructure to - * analyze its structure and imap_fetchbody to - * extract a copy of a single body component. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The optional flags are a bit mask - * with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if not already set - * - * - * - * - * FT_INTERNAL - The return string is in internal format, will - * not canonicalize to CRLF. - * - * - * - * @return string Returns the body of the specified message, as a string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -144,15 +100,10 @@ function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): st /** - * Read the structure of a specified body section of a specific message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param string $section The body section to read - * @return \stdClass Returns the information in an object. - * For a detailed description - * of the object structure and properties see - * imap_fetchstructure. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @return \stdClass * @throws ImapException * */ @@ -168,40 +119,8 @@ function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $secti /** - * Checks information about the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns 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 - * - * - * - * - * Mailbox - the mailbox name - * - * - * - * - * Nmsgs - number of messages in the mailbox - * - * - * - * - * Recent - number of recent messages in the mailbox - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -217,26 +136,10 @@ function imap_check(\IMAP\Connection $imap): \stdClass /** - * This function causes a store to delete the specified - * flag to the flags set for the - * messages in the specified sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", - * "\\Deleted", and "\\Draft" (as defined by RFC2060) - * @param int $options options are a bit mask and may contain - * the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -251,13 +154,8 @@ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $f /** - * Closes the imap stream. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags 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 + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -272,12 +170,8 @@ function imap_close(\IMAP\Connection $imap, int $flags = 0): void /** - * Creates a new mailbox specified by mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information. Names containing international characters should be - * encoded by imap_utf7_encode + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -292,11 +186,8 @@ function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void /** - * Deletes the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -311,108 +202,10 @@ function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void /** - * This function fetches mail headers for the given - * sequence and returns an overview of their - * contents. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A message sequence description. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param int $flags sequence will contain a sequence of message - * indices or UIDs, if this parameter is set to - * FT_UID. - * @return array Returns an array of objects describing one message header each. - * The object will only define a property if it exists. The possible - * properties are: - * - * - * - * subject - the messages subject - * - * - * - * - * from - who sent it - * - * - * - * - * to - recipient - * - * - * - * - * date - when was it sent - * - * - * - * - * message_id - Message-ID - * - * - * - * - * references - is a reference to this message id - * - * - * - * - * in_reply_to - is a reply to this message id - * - * - * - * - * size - size in bytes - * - * - * - * - * uid - UID the message has in the mailbox - * - * - * - * - * msgno - message sequence number in the mailbox - * - * - * - * - * recent - this message is flagged as recent - * - * - * - * - * flagged - this message is flagged - * - * - * - * - * answered - this message is flagged as answered - * - * - * - * - * deleted - this message is flagged for deletion - * - * - * - * - * seen - this message is flagged as already read - * - * - * - * - * draft - this message is flagged as being a draft - * - * - * - * - * udate - the UNIX timestamp of the arrival date - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param int $flags + * @return array * @throws ImapException * */ @@ -428,35 +221,11 @@ function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flag /** - * Fetch of a particular section of the body of the specified messages. - * Body parts are not decoded by this function. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -472,36 +241,10 @@ function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $sectio /** - * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified - * message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The possible flags are: - * - * - * - * FT_UID - The message_num - * argument is a UID - * - * - * - * - * FT_INTERNAL - The return string - * is in "internal" format, without any attempt to - * canonicalize to CRLF newlines - * - * - * - * - * FT_PREFETCHTEXT - The RFC822.TEXT - * should be pre-fetched at the same time. This avoids an - * extra RTT on an IMAP connection if a full message text is - * desired (e.g. in a "save to local file" operation) - * - * - * - * @return string Returns the header of the specified message as a text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -517,34 +260,11 @@ function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = /** - * Fetch the MIME headers of a particular section of the body of the specified messages. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns the MIME headers of a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -560,138 +280,10 @@ function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $sectio /** - * Fetches all the structured information for a given message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags This optional parameter only has a single option, - * FT_UID, which tells the function to treat the - * message_num argument as a - * UID. - * @return \stdClass Returns an object with properties listed in the table below. - * - * - * - * Returned Object for imap_fetchstructure - * - * - * - * - * type - * Primary body type - * - * - * encoding - * Body transfer encoding - * - * - * ifsubtype - * TRUE if there is a subtype string - * - * - * subtype - * MIME subtype - * - * - * ifdescription - * TRUE if there is a description string - * - * - * description - * Content description string - * - * - * ifid - * TRUE if there is an identification string - * - * - * id - * Identification string - * - * - * lines - * Number of lines - * - * - * bytes - * Number of bytes - * - * - * ifdisposition - * TRUE if there is a disposition string - * - * - * disposition - * Disposition string - * - * - * ifdparameters - * TRUE if the dparameters array exists - * - * - * dparameters - * An array of objects where each object has an - * "attribute" and a "value" - * property corresponding to the parameters on the - * Content-disposition MIME - * header. - * - * - * ifparameters - * TRUE if the parameters array exists - * - * - * parameters - * An array of objects where each object has an - * "attribute" and a "value" - * property. - * - * - * parts - * An array of objects identical in structure to the top-level - * object, each of which corresponds to a MIME body - * part. - * - * - * - * - * - * - * Primary body type (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 0textTYPETEXT - * 1multipartTYPEMULTIPART - * 2messageTYPEMESSAGE - * 3applicationTYPEAPPLICATION - * 4audioTYPEAUDIO - * 5imageTYPEIMAGE - * 6videoTYPEVIDEO - * 7modelTYPEMODEL - * 8otherTYPEOTHER - * - * - * - * - * - * Transfer encodings (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 07bitENC7BIT - * 18bitENC8BIT - * 2BinaryENCBINARY - * 3Base64ENCBASE64 - * 4Quoted-PrintableENCQUOTEDPRINTABLE - * 5otherENCOTHER - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -707,14 +299,8 @@ function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flag /** - * Purges the cache of entries of a specific type. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), - * IMAP_GC_ENV (envelope and bodies), - * IMAP_GC_TEXTS (texts). + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -729,12 +315,9 @@ function imap_gc(\IMAP\Connection $imap, int $flags): void /** - * Gets the ACL for a given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @return array * @throws ImapException * */ @@ -750,78 +333,11 @@ function imap_getacl(\IMAP\Connection $imap, string $mailbox): array /** - * Gets information on the mailboxes. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox not contains, and may not contain any - * "children" (there are no mailboxes below this one). Calling - * imap_createmailbox will not work on this mailbox. - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. This means that it may - * contain new messages since the last time it was checked. Not provided by all IMAP - * servers. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked, does not contain new - * messages. If either MARKED or UNMARKED is - * provided, you can assume the IMAP server supports this feature for this mailbox. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. - * @throws ImapException + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array + * @throws ImapException * */ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array @@ -836,77 +352,10 @@ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pa /** - * Gets information about the subscribed mailboxes. - * - * Identical to imap_getmailboxes, except that it only - * returns mailboxes that the user is subscribed to. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox has no - * "children" (there are no mailboxes below this one). - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -922,216 +371,11 @@ function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $p /** - * Gets information about the given message number by reading its headers. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $from_length Number of characters for the fetchfrom property. - * Must be greater than or equal to zero. - * @param int $subject_length Number of characters for the fetchsubject property - * Must be greater than or equal to zero. - * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * - * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * - * reply_to - an array of objects from the Reply-To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * - * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and - * host - * - * - * - * - * remail - - * - * - * - * - * date - The message date as found in its headers - * - * - * - * - * Date - Same as date - * - * - * - * - * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * - * Recent - R if recent and seen, N - * if recent and not seen, ' ' if not recent. - * - * - * - * - * Unseen - U if not seen AND not recent, ' ' if seen - * OR not seen and recent - * - * - * - * - * Flagged - F if flagged, ' ' if not flagged - * - * - * - * - * Answered - A if answered, ' ' if unanswered - * - * - * - * - * Deleted - D if deleted, ' ' if not deleted - * - * - * - * - * Draft - X if draft, ' ' if not draft - * - * - * - * - * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * - * Size - The message size - * - * - * - * - * udate - mail message date in Unix time - * - * - * - * - * fetchfrom - from line formatted to fit from_length - * characters - * - * - * - * - * fetchsubject - subject line formatted to fit - * subject_length characters - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $from_length + * @param int $subject_length + * @return \stdClass * @throws ImapException * */ @@ -1147,12 +391,8 @@ function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_len /** - * Returns headers for all messages in a mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One - * element per mail message. - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return array * @throws ImapException * */ @@ -1168,33 +408,11 @@ function imap_headers(\IMAP\Connection $imap): array /** - * Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. - * - * This function is similar to imap_listmailbox, - * but it will additionally check for the presence of the string - * content inside the mailbox data. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @param string $content + * @return array * @throws ImapException * */ @@ -1210,26 +428,10 @@ function imap_listscan(\IMAP\Connection $imap, string $reference, string $patter /** - * Gets an array of all the mailboxes that you have subscribed. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -1245,109 +447,9 @@ function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): /** - * Create a MIME message based on the given envelope - * and bodies sections. - * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", - * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", - * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. - * To set additional headers, the key "custom_headers" is supported, which expects - * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; - * only if it has a type of TYPEMULTIPART, further bodies - * are processed; these bodies constitute the bodies of the parts. - * - * - * Body Array Structure - * - * - * - * Key - * Type - * Description - * - * - * - * - * type - * int - * - * The MIME type. - * One of TYPETEXT (default), TYPEMULTIPART, - * TYPEMESSAGE, TYPEAPPLICATION, - * TYPEAUDIO, TYPEIMAGE, - * TYPEMODEL or TYPEOTHER. - * - * - * - * encoding - * int - * - * The Content-Transfer-Encoding. - * One of ENC7BIT (default), ENC8BIT, - * ENCBINARY, ENCBASE64, - * ENCQUOTEDPRINTABLE or ENCOTHER. - * - * - * - * charset - * string - * The charset parameter of the MIME type. - * - * - * type.parameters - * array - * An associative array of Content-Type parameter names and their values. - * - * - * subtype - * string - * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. - * - * - * id - * string - * The Content-ID. - * - * - * description - * string - * The Content-Description. - * - * - * disposition.type - * string - * The Content-Disposition, e.g. 'attachment'. - * - * - * disposition - * array - * An associative array of Content-Disposition parameter names and values. - * - * - * contents.data - * string - * The payload. - * - * - * lines - * int - * The size of the payload in lines. - * - * - * bytes - * int - * The size of the payload in bytes. - * - * - * md5 - * string - * The MD5 checksum of the payload. - * - * - * - * - * @return string Returns the MIME message as string. + * @param array $envelope + * @param array $bodies + * @return string * @throws ImapException * */ @@ -1363,28 +465,10 @@ function imap_mail_compose(array $envelope, array $bodies): string /** - * Copies mail messages specified by message_nums - * to specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message - * numbers (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask of one or more of - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * - * - * CP_MOVE - Delete the messages from - * the current mailbox after copying - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1399,22 +483,10 @@ function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $ma /** - * Moves mail messages specified by message_nums to the - * specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message numbers - * (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask and may contain the single option: - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1428,23 +500,14 @@ function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $ma } -/** - * This function allows sending of emails with correct handling of - * Cc and Bcc receivers. - * - * The parameters to, cc - * and bcc are all strings and are all parsed - * as RFC822 address lists. - * - * @param string $to The receiver - * @param string $subject The mail subject - * @param string $message The mail body, see imap_mail_compose - * @param null|string $additional_headers As string with additional headers to be set on the mail +/** + * @param string $to + * @param string $subject + * @param string $message + * @param null|string $additional_headers * @param null|string $cc - * @param null|string $bcc The receivers specified in bcc will get the - * mail, but are excluded from the headers. - * @param null|string $return_path Use this parameter to specify return path upon mail delivery failure. - * This is useful when using PHP as a mail client for multiple users. + * @param null|string $bcc + * @param null|string $return_path * @throws ImapException * */ @@ -1469,54 +532,8 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi /** - * Checks the current mailbox status on the server. It is similar to - * imap_status, but will additionally sum up the size of - * all messages in the mailbox, which will take some additional time to - * execute. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns the information in an object with following properties: - * - * Mailbox properties - * - * - * - * Date - * date of last change (current datetime) - * - * - * Driver - * driver - * - * - * Mailbox - * name of the mailbox - * - * - * Nmsgs - * number of messages - * - * - * Recent - * number of recent messages - * - * - * Unread - * number of unread messages - * - * - * Deleted - * number of deleted messages - * - * - * Size - * mailbox size - * - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -1532,18 +549,8 @@ function imap_mailboxmsginfo(\IMAP\Connection $imap): \stdClass /** - * Decodes MIME message header extensions that are non ASCII text (see RFC2047). - * - * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each - * object has two properties, charset and - * text. - * - * If the element hasn't been encoded, and in other words is in - * plain US-ASCII, the charset property of that element is - * set to default. - * - * The function returns FALSE on failure. + * @param string $string + * @return array * @throws ImapException * */ @@ -1559,10 +566,8 @@ function imap_mime_header_decode(string $string): array /** - * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * - * @param string $string A string encoded in modified UTF-7. - * @return string Returns string converted to UTF-8. + * @param string $string + * @return string * @throws ImapException * */ @@ -1578,10 +583,8 @@ function imap_mutf7_to_utf8(string $string): string /** - * Gets the number of messages in the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return int Return the number of messages in the current mailbox, as an integer. + * @param \IMAP\Connection $imap + * @return int * @throws ImapException * */ @@ -1597,206 +600,13 @@ function imap_num_msg(\IMAP\Connection $imap): int /** - * Opens an IMAP stream to a mailbox. - * - * This function can also be used to open streams to POP3 and - * NNTP servers, but some functions and features are only - * available on IMAP servers. - * - * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. - * The special name INBOX stands for the current users - * personal mailbox. Mailbox names that contain international characters - * besides those in the printable ASCII space have to be encoded with - * imap_utf7_encode. - * - * The server part, which is enclosed in '{' and '}', consists of the servers - * name or ip address, an optional port (prefixed by ':'), and an optional - * protocol specification (prefixed by '/'). - * - * The server part is mandatory in all mailbox - * 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. - * - * - * - * - * port - optional TCP port number, default is the - * default port for that service - * - * - * - * - * flags - optional flags, see following table. - * - * - * - * - * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * - * Optional flags for names - * - * - * - * Flag - * Description - * - * - * - * - * /service=service - * mailbox access service, default is "imap" - * - * - * /user=user - * remote user name for login on the server - * - * - * /authuser=user - * remote authentication user; if specified this is the user name - * whose password is used (e.g. administrator) - * - * - * /anonymous - * remote access as anonymous user - * - * - * /debug - * record protocol telemetry in application's debug log - * - * - * /secure - * do not transmit a plaintext password over the network - * - * - * /imap, /imap2, - * /imap2bis, /imap4, - * /imap4rev1 - * equivalent to /service=imap - * - * - * /pop3 - * equivalent to /service=pop3 - * - * - * /nntp - * equivalent to /service=nntp - * - * - * /norsh - * do not use rsh or ssh to establish a preauthenticated IMAP - * session - * - * - * /ssl - * use the Secure Socket Layer to encrypt the session - * - * - * /validate-cert - * validate certificates from TLS/SSL server (this is the default - * behavior) - * - * - * /novalidate-cert - * do not validate certificates from TLS/SSL server, needed if - * server uses self-signed certificates - * - * - * /tls - * force use of start-TLS to encrypt the session, and reject - * connection to servers that do not support it - * - * - * /notls - * do not do start-TLS to encrypt the session, even with servers - * that support it - * - * - * /readonly - * request read-only mailbox open (IMAP only; ignored on NNTP, and - * an error with SMTP and POP3) - * - * - * - * - * @param string $user The user name - * @param string $password The password associated with the user - * @param int $flags The flags are a bit mask with one or more of - * the following: - * - * - * - * OP_READONLY - Open mailbox read-only - * - * - * - * - * OP_ANONYMOUS - Don't use or update a - * .newsrc for news (NNTP only) - * - * - * - * - * OP_HALFOPEN - For IMAP - * and NNTP names, open a connection but - * don't open a mailbox. - * - * - * - * - * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close - * (see also imap_delete and - * imap_expunge) - * - * - * - * - * OP_DEBUG - Debug protocol negotiations - * - * - * - * - * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * - * OP_SILENT - Don't pass up events (internal use) - * - * - * - * - * OP_PROTOTYPE - Return driver prototype - * - * - * - * - * OP_SECURE - Don't do non-secure authentication - * - * - * - * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used - * to set one or more connection parameters: - * - * - * - * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * - * @return \IMAP\Connection Returns an IMAP\Connection instance on success. + * @param string $mailbox + * @param string $user + * @param string $password + * @param int $flags + * @param int $retries + * @param array $options + * @return \IMAP\Connection * @throws ImapException * */ @@ -1812,10 +622,8 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = /** - * Convert a quoted-printable string to an 8 bit string according to RFC2045, section 6.7. - * - * @param string $string A quoted-printable string - * @return string Returns an 8 bits string. + * @param string $string + * @return string * @throws ImapException * */ @@ -1831,15 +639,9 @@ function imap_qprint(string $string): string /** - * This function renames on old mailbox to new mailbox (see - * imap_open for the format of - * mbox names). - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $from The old mailbox name, see imap_open for more - * information - * @param string $to The new mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $from + * @param string $to * @throws ImapException * */ @@ -1854,13 +656,10 @@ function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): v /** - * Returns a properly formatted email address as defined in RFC2822 given the needed information. - * - * @param null|string $mailbox The mailbox name, see imap_open for more - * information - * @param null|string $hostname The email host part - * @param null|string $personal The name of the account owner - * @return string Returns a string properly formatted email address as defined in RFC2822. + * @param null|string $mailbox + * @param null|string $hostname + * @param null|string $personal + * @return string * @throws ImapException * */ @@ -1876,34 +675,11 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string /** - * Saves a part or the whole body of the specified message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int|resource|string $file The path to the saved file as a string, or a valid file descriptor - * returned by fopen. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * + * @param \IMAP\Connection $imap + * @param int|resource|string $file + * @param int $message_num + * @param string $section + * @param int $flags * @throws ImapException * */ @@ -1918,12 +694,9 @@ function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $ /** - * Sets an upper limit quota on a per mailbox basis. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard - * format for a mailbox: user.name. - * @param int $mailbox_size The maximum size (in KB) for the quota_root + * @param \IMAP\Connection $imap + * @param string $quota_root + * @param int $mailbox_size * @throws ImapException * */ @@ -1938,14 +711,10 @@ function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox /** - * Sets the ACL for a giving mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param string $user_id The user to give the rights to. - * @param string $rights The rights to give to the user. Passing an empty string will delete - * acl. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param string $user_id + * @param string $rights * @throws ImapException * */ @@ -1960,27 +729,10 @@ function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, s /** - * Causes a store to add the specified flag to the - * flags set for the messages in the specified - * sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, - * \Answered, \Flagged, - * \Deleted, and \Draft as - * defined by RFC2060. - * @param int $options A bit mask that may contain the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -1995,67 +747,13 @@ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $fla /** - * Gets and sorts message numbers by the given parameters. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $criteria Criteria can be one (and only one) of the following: - * - * - * - * SORTDATE - message Date - * - * - * - * - * SORTARRIVAL - arrival date - * - * - * - * - * SORTFROM - mailbox in first From address - * - * - * - * - * SORTSUBJECT - message subject - * - * - * - * - * SORTTO - mailbox in first To address - * - * - * - * - * SORTCC - mailbox in first cc address - * - * - * - * - * SORTSIZE - size of message in octets - * - * - * - * @param int $reverse Whether to sort in reverse order. - * @param int $flags The flags are a bitmask of one or more of the - * following: - * - * - * - * SE_UID - Return UIDs instead of sequence numbers - * - * - * - * - * SE_NOPREFETCH - Don't prefetch searched messages - * - * - * - * @param null|string $search_criteria IMAP2-format search criteria string. For details see - * imap_search. - * @param null|string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given - * parameters. + * @param \IMAP\Connection $imap + * @param int $criteria + * @param int $reverse + * @param int $flags + * @param null|string $search_criteria + * @param null|string $charset + * @return array * @throws ImapException * */ @@ -2077,57 +775,10 @@ function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $fla /** - * Gets status information about the given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags Valid flags are: - * - * - * - * SA_MESSAGES - set $status->messages to the - * number of messages in the mailbox - * - * - * - * - * SA_RECENT - set $status->recent to the number - * of recent messages in the mailbox - * - * - * - * - * SA_UNSEEN - set $status->unseen to the number - * of unseen (new) messages in the mailbox - * - * - * - * - * SA_UIDNEXT - set $status->uidnext to the next - * uid to be used in the mailbox - * - * - * - * - * SA_UIDVALIDITY - set $status->uidvalidity to a - * constant that changes when uids for the mailbox may no longer be - * valid - * - * - * - * - * SA_ALL - set all of the above - * - * - * - * @return \stdClass This function returns an object containing status information. - * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. - * - * flags is also set, which contains a bitmask which can - * be checked against any of the above constants. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -2143,11 +794,8 @@ function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdC /** - * Subscribe to a new mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2162,26 +810,9 @@ function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Gets a tree of a threaded message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. + * @param \IMAP\Connection $imap * @param int $flags - * @return array imap_thread returns an associative array containing - * a tree of messages threaded by REFERENCES. - * - * Every message in the current mailbox will be represented by three entries - * in the resulting array: - * - * - * $thread["XX.num"] - current message number - * - * - * $thread["XX.next"] - * - * - * $thread["XX.branch"] - * - * + * @return array * @throws ImapException * */ @@ -2197,20 +828,9 @@ function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array /** - * Sets or fetches the imap timeout. - * - * @param int $timeout_type One of the following: - * IMAP_OPENTIMEOUT, - * IMAP_READTIMEOUT, - * IMAP_WRITETIMEOUT, or - * IMAP_CLOSETIMEOUT. - * @param int $timeout The timeout, in seconds. - * @return mixed If the timeout parameter is set, this function - * returns TRUE on success. - * - * If timeout is not provided or evaluates to -1, - * the current timeout value of timeout_type is - * returned as an integer. + * @param int $timeout_type + * @param int $timeout + * @return mixed * @throws ImapException * */ @@ -2226,11 +846,8 @@ function imap_timeout(int $timeout_type, int $timeout = -1) /** - * Removes the deletion flag for a specified message, which is set by - * imap_delete or imap_mail_move. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_num The message number + * @param \IMAP\Connection $imap + * @param string $message_num * @param int $flags * @throws ImapException * @@ -2246,11 +863,8 @@ function imap_undelete(\IMAP\Connection $imap, string $message_num, int $flags = /** - * Unsubscribe from the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2265,10 +879,8 @@ function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * - * @param string $string A UTF-8 encoded string. - * @return string Returns string converted to modified UTF-7. + * @param string $string + * @return string * @throws ImapException * */ diff --git a/generated/8.1/info.php b/generated/8.1/info.php index 59578bb0..e318b57f 100644 --- a/generated/8.1/info.php +++ b/generated/8.1/info.php @@ -5,104 +5,9 @@ use Safe\Exceptions\InfoException; /** - * Set the various assert control options or just query - * their current settings. - * * @param int $what - * Assert Options - * - * - * - * Option - * INI Setting - * Default value - * Description - * - * - * - * - * ASSERT_ACTIVE - * assert.active - * 1 - * enable assert evaluation - * - * - * ASSERT_WARNING - * assert.warning - * 1 - * issue a PHP warning for each failed assertion - * - * - * ASSERT_BAIL - * assert.bail - * 0 - * terminate execution on failed assertions - * - * - * ASSERT_QUIET_EVAL - * assert.quiet_eval - * 0 - * - * disable error_reporting during assertion expression - * evaluation - * - * - * - * ASSERT_CALLBACK - * assert.callback - * (NULL) - * Callback to call on failed assertions - * - * - * - * - * @param mixed $value An optional new value for the option. - * - * The callback function set via ASSERT_CALLBACK or assert.callback should - * have the following signature: - * - * voidassert_callback - * stringfile - * intline - * stringassertion - * stringdescription - * - * - * - * file - * - * - * The file where assert has been called. - * - * - * - * - * line - * - * - * The line where assert has been called. - * - * - * - * - * assertion - * - * - * The assertion that has been passed to assert, - * converted to a string. - * - * - * - * - * description - * - * - * The description that has been passed to assert. - * - * - * - * - * @return mixed Returns the original setting of any options. + * @param mixed $value + * @return mixed * @throws InfoException * */ @@ -122,11 +27,7 @@ function assert_options(int $what, $value = null) /** - * Sets the process title visible in tools such as top and - * ps. This function is available only in - * CLI mode. - * - * @param string $title The new title. + * @param string $title * @throws InfoException * */ @@ -141,56 +42,7 @@ function cli_set_process_title(string $title): void /** - * Loads the PHP extension given by the parameter - * extension_filename. - * - * Use extension_loaded to test whether a given - * extension is already available or not. This works on both built-in - * extensions and dynamically loaded ones (either through php.ini or - * dl). - * - * @param string $extension_filename This parameter is only the filename of the - * extension to load which also depends on your platform. For example, - * the sockets extension (if compiled - * as a shared module, not the default!) would be called - * sockets.so on Unix platforms whereas it is called - * php_sockets.dll on the Windows platform. - * - * The directory where the extension is loaded from depends on your - * platform: - * - * Windows - If not explicitly set in the php.ini, the extension is - * loaded from C:\php5\ by default. - * - * Unix - If not explicitly set in the php.ini, the default extension - * directory depends on - * - * - * - * whether PHP has been built with --enable-debug - * or not - * - * - * - * - * whether PHP has been built with (experimental) ZTS (Zend Thread Safety) - * support or not - * - * - * - * - * the current internal ZEND_MODULE_API_NO (Zend - * internal module API number, which is basically the date on which a - * major module API change happened, e.g. 20010901) - * - * - * - * Taking into account the above, the directory then defaults to - * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, - * e.g. - * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 - * or - * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @param string $extension_filename * @throws InfoException * */ @@ -205,18 +57,8 @@ function dl(string $extension_filename): void /** - * Gets the value of a PHP configuration option. - * - * This function will not return configuration information set when the PHP - * was compiled, or read from an Apache configuration file. - * - * To check whether the system is using a configuration file, try retrieving the - * value of the cfg_file_path configuration setting. If this is available, a - * configuration file is being used. - * - * @param string $option The configuration option name. - * @return mixed Returns the current value of the PHP configuration variable specified by - * option, or FALSE if an error occurs. + * @param string $option + * @return mixed * @throws InfoException * */ @@ -232,10 +74,7 @@ function get_cfg_var(string $option) /** - * Gets the current include_path - * configuration option value. - * - * @return string Returns the path, as a string. + * @return string * @throws InfoException * */ @@ -251,14 +90,7 @@ function get_include_path(): string /** - * Gets the time of the last modification of the main script of execution. - * - * If you're interested in getting the last modification time - * of a different file, consider using filemtime. - * - * @return int Returns the time of the last modification of the current - * page. The value returned is a Unix timestamp, suitable for - * feeding to date. + * @return int * @throws InfoException * */ @@ -274,9 +106,7 @@ function getlastmod(): int /** - * Gets the group ID of the current script. - * - * @return int Returns the group ID of the current script. + * @return int * @throws InfoException * */ @@ -292,9 +122,7 @@ function getmygid(): int /** - * Gets the inode of the current script. - * - * @return int Returns the current script's inode as an integer. + * @return int * @throws InfoException * */ @@ -310,9 +138,7 @@ function getmyinode(): int /** - * Gets the current PHP process ID. - * - * @return int Returns the current PHP process ID. + * @return int * @throws InfoException * */ @@ -328,9 +154,7 @@ function getmypid(): int /** - * Gets the user ID of the current script. - * - * @return int Returns the user ID of the current script. + * @return int * @throws InfoException * */ @@ -346,25 +170,10 @@ function getmyuid(): int /** - * Parses options passed to the script. - * - * @param string $short_options Each character in this string will be used as option characters and - * matched against options passed to the script starting with a single - * hyphen (-). - * - * For example, an option string "x" recognizes an - * option -x. - * - * Only a-z, A-Z and 0-9 are allowed. - * @param array $long_options An array of options. Each element in this array will be used as option - * strings and matched against options passed to the script starting with - * two hyphens (--). - * - * For example, an longopts element "opt" recognizes an - * option --opt. - * @param int|null $rest_index If the rest_index parameter is present, then the - * index where argument parsing stopped will be written to this variable. - * @return array|array|array This function will return an array of option / argument pairs. + * @param string $short_options + * @param array $long_options + * @param int|null $rest_index + * @return array|array|array * @throws InfoException * */ @@ -380,14 +189,8 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind /** - * This is an interface to getrusage(2). It gets data returned - * from the system call. - * - * @param int $mode If mode is 1, getrusage will be called with - * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system - * call. All entries are accessible by using their documented field names. - * Returns FALSE on failure. + * @param int $mode + * @return array * @throws InfoException * */ @@ -403,12 +206,8 @@ function getrusage(int $mode = 0): array /** - * Returns the value of the configuration option on success. - * - * @param string $option The configuration option name. - * @return string Returns the value of the configuration option as a string on success, or an - * empty string for null values. Returns FALSE if the - * configuration option doesn't exist. + * @param string $option + * @return string * @throws InfoException * */ @@ -424,15 +223,9 @@ function ini_get(string $option): string /** - * Sets the value of the given configuration option. The configuration option - * will keep this new value during the script's execution, and will be restored - * at the script's ending. - * - * @param string $option Not all the available options can be changed using - * ini_set. There is a list of all available options - * in the appendix. - * @param bool|float|int|null|string $value The new value for the option. - * @return string Returns the old value on success. + * @param string $option + * @param bool|float|int|null|string $value + * @return string * @throws InfoException * */ @@ -448,22 +241,7 @@ function ini_set(string $option, $value): string /** - * Returns a lowercase string that describes the type of interface - * (the Server API, SAPI) that PHP is using. For example, in CLI PHP this - * string will be "cli" whereas with Apache it may have several different - * values depending on the exact SAPI used. Possible values are listed - * below. - * - * @return non-empty-string Returns the interface type, as a lowercase string. - * - * Although not exhaustive, the possible return values include - * apache, - * apache2handler, - * cgi (until PHP 5.3), - * cgi-fcgi, cli, cli-server, - * embed, fpm-fcgi, - * litespeed, - * phpdbg. + * @return non-empty-string * @throws InfoException * */ @@ -479,71 +257,7 @@ function php_sapi_name(): string /** - * This function prints out the credits listing the PHP developers, - * modules, etc. It generates the appropriate HTML codes to insert - * the information in a page. - * - * @param int $flags To generate a custom credits page, you may want to use the - * flags parameter. - * - * - * Pre-defined phpcredits flags - * - * - * - * name - * description - * - * - * - * - * CREDITS_ALL - * - * All the credits, equivalent to using: CREDITS_DOCS + - * CREDITS_GENERAL + CREDITS_GROUP + - * CREDITS_MODULES + CREDITS_FULLPAGE. - * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * - * CREDITS_DOCS - * The credits for the documentation team - * - * - * CREDITS_FULLPAGE - * - * Usually used in combination with the other flags. Indicates - * that a complete stand-alone HTML page needs to be - * printed including the information indicated by the other - * flags. - * - * - * - * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors - * and SAPI module. - * - * - * - * CREDITS_GROUP - * A list of the core developers - * - * - * CREDITS_MODULES - * - * A list of the extension modules for PHP, and their authors - * - * - * - * CREDITS_SAPI - * - * A list of the server API modules for PHP, and their authors - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -558,102 +272,7 @@ function phpcredits(int $flags = CREDITS_ALL): void /** - * Outputs a large amount of information about the current state of PHP. - * This includes information about PHP compilation options and extensions, - * the PHP version, server information and environment (if compiled as a - * module), the PHP environment, OS version information, paths, master and - * local values of configuration options, HTTP headers, and the PHP License. - * - * Because every system is setup differently, phpinfo is - * commonly used to check configuration settings and for available - * predefined variables - * on a given system. - * - * phpinfo is also a valuable debugging tool as it - * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * - * @param int $flags The output may be customized by passing one or more of the - * following constants bitwise values summed - * together in the optional flags parameter. - * One can also combine the respective constants or bitwise values - * together with the bitwise or operator. - * - * - * phpinfo options - * - * - * - * Name (constant) - * Value - * Description - * - * - * - * - * INFO_GENERAL - * 1 - * - * The configuration line, php.ini location, build date, Web - * Server, System and more. - * - * - * - * INFO_CREDITS - * 2 - * - * PHP Credits. See also phpcredits. - * - * - * - * INFO_CONFIGURATION - * 4 - * - * Current Local and Master values for PHP directives. See - * also ini_get. - * - * - * - * INFO_MODULES - * 8 - * - * Loaded modules and their respective settings. See also - * get_loaded_extensions. - * - * - * - * INFO_ENVIRONMENT - * 16 - * - * Environment Variable information that's also available in - * $_ENV. - * - * - * - * INFO_VARIABLES - * 32 - * - * Shows all - * predefined variables from EGPCS (Environment, GET, - * POST, Cookie, Server). - * - * - * - * INFO_LICENSE - * 64 - * - * PHP License information. See also the license FAQ. - * - * - * - * INFO_ALL - * -1 - * - * Shows all of the above. - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -668,12 +287,7 @@ function phpinfo(int $flags = INFO_ALL): void /** - * Adds assignment to the server environment. The - * environment variable will only exist for the duration of the current - * request. At the end of the request the environment is restored to its - * original state. - * - * @param string $assignment The setting, like "FOO=BAR" + * @param string $assignment * @throws InfoException * */ @@ -688,12 +302,8 @@ function putenv(string $assignment): void /** - * Sets the include_path - * configuration option for the duration of the script. - * - * @param string $include_path The new value for the include_path - * @return string Returns the old include_path on - * success. + * @param string $include_path + * @return string * @throws InfoException * */ @@ -709,19 +319,7 @@ function set_include_path(string $include_path): string /** - * Set the number of seconds a script is allowed to run. If this is reached, - * the script returns a fatal error. The default limit is 30 seconds or, if - * it exists, the max_execution_time value defined in the - * php.ini. - * - * When called, set_time_limit restarts the timeout - * counter from zero. In other words, if the timeout is the default 30 - * seconds, and 25 seconds into script execution a call such as - * set_time_limit(20) is made, the script will run for a - * total of 45 seconds before timing out. - * - * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit - * is imposed. + * @param int $seconds * @throws InfoException * */ diff --git a/generated/8.1/inotify.php b/generated/8.1/inotify.php index e5e632b1..8820dde6 100644 --- a/generated/8.1/inotify.php +++ b/generated/8.1/inotify.php @@ -5,10 +5,7 @@ use Safe\Exceptions\InotifyException; /** - * Initialize an inotify instance for use with - * inotify_add_watch - * - * @return resource A stream resource. + * @return resource * @throws InotifyException * */ @@ -24,13 +21,8 @@ function inotify_init() /** - * inotify_rm_watch removes the watch - * watch_descriptor from the inotify instance - * inotify_instance. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param int $watch_descriptor Watch to remove from the instance + * @param resource $inotify_instance + * @param int $watch_descriptor * @throws InotifyException * */ diff --git a/generated/8.1/json.php b/generated/8.1/json.php index 37c30d02..cafc2923 100644 --- a/generated/8.1/json.php +++ b/generated/8.1/json.php @@ -5,40 +5,10 @@ use Safe\Exceptions\JsonException; /** - * Returns a string containing the JSON representation of the supplied - * value. - * - * The encoding is affected by the supplied flags - * and additionally the encoding of float values depends on the value of - * serialize_precision. - * - * @param mixed $value The value being encoded. Can be any type except - * a resource. - * - * All string data must be UTF-8 encoded. - * - * PHP implements a superset of JSON as specified in the original - * RFC 7159. - * @param int $flags Bitmask consisting of - * JSON_FORCE_OBJECT, - * JSON_HEX_QUOT, - * JSON_HEX_TAG, - * JSON_HEX_AMP, - * JSON_HEX_APOS, - * JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, - * JSON_NUMERIC_CHECK, - * JSON_PARTIAL_OUTPUT_ON_ERROR, - * JSON_PRESERVE_ZERO_FRACTION, - * JSON_PRETTY_PRINT, - * JSON_UNESCAPED_LINE_TERMINATORS, - * JSON_UNESCAPED_SLASHES, - * JSON_UNESCAPED_UNICODE, - * JSON_THROW_ON_ERROR. - * The behaviour of these constants is described on the - * JSON constants page. - * @param positive-int $depth Set the maximum depth. Must be greater than zero. - * @return non-empty-string Returns a JSON encoded string on success. + * @param mixed $value + * @param int $flags + * @param positive-int $depth + * @return non-empty-string * @throws JsonException * */ diff --git a/generated/8.1/ldap.php b/generated/8.1/ldap.php index 6e22b9aa..b3363214 100644 --- a/generated/8.1/ldap.php +++ b/generated/8.1/ldap.php @@ -5,15 +5,8 @@ use Safe\Exceptions\LdapException; /** - * Translate ISO-8859 characters to t61 - * characters. - * - * This function is useful if you have to talk to a legacy - * LDAPv2 server. - * - * @param string $value The text to be translated. - * @return string Return the t61 translation of - * value. + * @param string $value + * @return string * @throws LdapException * */ @@ -29,21 +22,10 @@ function ldap_8859_to_t61(string $value): string /** - * Add entries in the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * - * - * ]]> - * - * - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -62,9 +44,7 @@ function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $cont /** - * Binds to the LDAP directory with specified RDN and password. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password * @throws LdapException @@ -87,16 +67,12 @@ function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password /** - * Compare value of attribute - * with value of same attribute in an LDAP directory entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $attribute The attribute name. - * @param string $value The compared value. - * @param array|null $controls Array of LDAP Controls to send with the request. - * @return bool Returns TRUE if value matches otherwise returns - * FALSE. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $attribute + * @param string $value + * @param array|null $controls + * @return bool * @throws LdapException * */ @@ -116,12 +92,10 @@ function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, str /** - * Retrieve the pagination information send by the server. - * - * @param resource $link An LDAP resource, returned by ldap_connect. + * @param resource $link * @param resource $result - * @param null|string $cookie An opaque structure sent by the server. - * @param int|null $estimated The estimated number of entries to retrieve. + * @param null|string $cookie + * @param int|null $estimated * @throws LdapException * */ @@ -136,15 +110,10 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n /** - * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * - * @param resource $link An LDAP resource, returned by ldap_connect. - * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. - * If true and if the server doesn't support pagination, the search - * will return no result. - * @param string $cookie An opaque structure sent by the server - * (ldap_control_paged_result_response). + * @param resource $link + * @param int $pagesize + * @param bool $iscritical + * @param string $cookie * @throws LdapException * */ @@ -159,12 +128,9 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** - * Returns the number of entries stored in the result of previous search - * operations. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return int Returns number of entries in the result. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return int * @throws LdapException * */ @@ -180,11 +146,9 @@ function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int /** - * Deletes a particular entry in LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array|null $controls * @throws LdapException * */ @@ -203,11 +167,8 @@ function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null /** - * Turns the specified dn, into a more user-friendly - * form, stripping off type names. - * - * @param string $dn The distinguished name of an LDAP entity. - * @return string Returns the user friendly name. + * @param string $dn + * @return string * @throws LdapException * */ @@ -223,17 +184,12 @@ function ldap_dn2ufn(string $dn): string /** - * Performs a PASSWD extended operation. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $user dn of the user to change the password of. - * @param string $old_password The old password of this user. May be ommited depending of server configuration. - * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @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. - * @return bool|string Returns the generated password if new_password is empty or omitted. - * Otherwise returns TRUE on success. + * @param \LDAP\Connection $ldap + * @param string $user + * @param string $old_password + * @param string $new_password + * @param array|null $controls + * @return bool|string * @throws LdapException * */ @@ -249,10 +205,8 @@ function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old /** - * Performs a WHOAMI extended operation and returns the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @return bool|string The data returned by the server. + * @param \LDAP\Connection $ldap + * @return bool|string * @throws LdapException * */ @@ -268,20 +222,13 @@ function ldap_exop_whoami(\LDAP\Connection $ldap) /** - * Performs an extended operation on the specified link with - * reqoid the OID of the operation and - * reqdata the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, 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 null|string $reqdata 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 $serverctrls Array of LDAP Controls to send with the request. - * @param null|string $retdata 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 null|string $retoid Will be filled with the response OID if provided, usually equal to the request OID. - * @return bool|resource When used with retdata, returns TRUE on success. - * When used without retdata, returns a result identifier. + * @param \LDAP\Connection $ldap + * @param string $reqoid + * @param null|string $reqdata + * @param array|null $serverctrls + * @param null|string $retdata + * @param null|string $retoid + * @return bool|resource * @throws LdapException * */ @@ -307,19 +254,9 @@ function ldap_exop(\LDAP\Connection $ldap, string $reqoid, ?string $reqdata = nu /** - * Splits the DN returned by ldap_get_dn and breaks it - * up into its component parts. Each part is known as Relative Distinguished - * Name, or RDN. - * - * @param string $dn The distinguished name of an LDAP entity. - * @param int $with_attrib Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - * @return array Returns an array of all DN components. - * The first element in the array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. + * @param string $dn + * @param int $with_attrib + * @return array * @throws LdapException * */ @@ -335,16 +272,9 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** - * Gets the first attribute in the given entry. Remaining attributes are - * retrieved by calling ldap_next_attribute successively. - * - * Similar to reading entries, attributes are also read one by one from a - * particular entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the first attribute in the entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -360,17 +290,9 @@ function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Returns the entry identifier for first entry in the result. This entry - * identifier is then supplied to ldap_next_entry - * routine to get successive entries from the result. - * - * Entries in the LDAP result are read sequentially using the - * ldap_first_entry and - * ldap_next_entry functions. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return \LDAP\ResultEntry Returns an LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return \LDAP\ResultEntry * @throws LdapException * */ @@ -386,15 +308,7 @@ function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\R /** - * Frees up the memory allocated internally to store the result. All result - * memory will be automatically freed when the script terminates. - * - * Typically all the memory allocated for the LDAP result gets freed at the - * end of the script. In case the script is making successive searches which - * return large result sets, ldap_free_result could be - * called to keep the runtime memory usage by the script low. - * - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. + * @param \LDAP\Result $result * @throws LdapException * */ @@ -409,24 +323,9 @@ function ldap_free_result(\LDAP\Result $result): void /** - * Reads attributes and values from an entry in the search result. - * - * Having located a specific entry in the directory, you can find out what - * information is held for that entry by using this call. You would use this - * call for an application which "browses" directory entries and/or where you - * do not know the structure of the directory entries. In many applications - * you will be searching for a specific attribute such as an email address or - * a surname, and won't care what other data is held. - * - * - * - * - * - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array - * on success and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return array * @throws LdapException * */ @@ -442,11 +341,9 @@ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Finds out the DN of an entry in the result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the DN of the result entry and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -462,23 +359,9 @@ function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string /** - * Reads multiple entries from the given result, and then reading the - * attributes and multiple values. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on - * success. - * - * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - * - * - * - * - * + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return array * @throws LdapException * */ @@ -494,184 +377,9 @@ function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array /** - * Sets value to the value of the specified option. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * int - * - * - * - * LDAP_OPT_REFERRALS - * int - * - * - * - * LDAP_OPT_RESTART - * int - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_NONE - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_PEER - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_ALL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PACKAGE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * - * - * - * - * - * @param mixed $value This will be set to the option value. + * @param \LDAP\Connection $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -686,18 +394,10 @@ function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): v /** - * Reads all the values of the attribute in the entry in the result. - * - * This function is used exactly like ldap_get_values - * except that it handles binary data and not string data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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. + * @return array * @throws LdapException * */ @@ -713,35 +413,10 @@ function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, s /** - * Reads all the values of the attribute in the entry in the result. - * - * This call needs a entry, - * so needs to be preceded by one of the ldap search calls and one - * of the calls to get an individual entry. - * - * You application will either be hard coded to look for certain - * attributes (such as "surname" or "mail") or you will have to use - * the ldap_get_attributes call to work out - * what attributes exist for a given entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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 - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - * - * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * - * - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - * - * + * @return array * @throws LdapException * */ @@ -757,13 +432,10 @@ function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, strin /** - * Adds one or more attribute values to the specified dn. - * To add a whole new object see ldap_add function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -782,14 +454,10 @@ function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Removes one or more attribute values from the specified dn. - * Object deletions are done by the - * ldap_delete function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. + * @param \LDAP\Connection $ldap + * @param string $dn * @param array $entry - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param array|null $controls * @throws LdapException * */ @@ -808,13 +476,10 @@ function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Replaces one or more attributes from the specified dn. - * It may also add or remove attributes. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -833,87 +498,10 @@ function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?arr /** - * Modifies an existing entry in the LDAP directory. Allows detailed - * specification of the modifications to perform. - * - * @param \LDAP\Connection $ldap An LDAP resource, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An 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, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - * - * Possible values for modtype include: - * - * - * LDAP_MODIFY_BATCH_ADD - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE - * - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * - * - * - * LDAP_MODIFY_BATCH_REPLACE - * - * - * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - * - * - * - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * 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|null $controls Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $modifications_info + * @param array|null $controls * @throws LdapException * */ @@ -932,15 +520,9 @@ function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modificati /** - * Retrieves the attributes in an entry. The first call to - * ldap_next_attribute is made with the - * entry returned from - * ldap_first_attribute. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the next attribute in an entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -956,12 +538,10 @@ function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Parse LDAP extended operation data from result object result - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param null|string $response_data Will be filled by the response data. - * @param null|string $response_oid Will be filled by the response OID. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param null|string $response_data + * @param null|string $response_oid * @throws LdapException * */ @@ -976,20 +556,13 @@ function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string & /** - * Parses an LDAP search result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param int|null $error_code A reference to a variable that will be set to the LDAP error code in - * the result, or 0 if no error occurred. - * @param null|string $matched_dn A reference to a variable that will be set to a matched DN if one was - * recognised within the request, otherwise it will be set to NULL. - * @param null|string $error_message A reference to a variable that will be set to the LDAP error message in - * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set - * to all of the referral strings in the result, or an empty array if no - * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param int|null $error_code + * @param null|string $matched_dn + * @param null|string $error_message + * @param array|null $referrals + * @param array|null $controls * @throws LdapException * */ @@ -1004,15 +577,12 @@ function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$ /** - * The entry specified by dn is renamed/moved. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $new_rdn The new RDN. - * @param string $new_parent The new parent/superior entry. - * @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|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $new_rdn + * @param string $new_parent + * @param bool $delete_old_rdn + * @param array|null $controls * @throws LdapException * */ @@ -1031,8 +601,6 @@ function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string /** - * - * * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password @@ -1071,178 +639,9 @@ function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $pas /** - * Sets the value of the specified option to be value. - * - * @param null|resource $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * Available since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - * @param mixed $value The new value for the specified option. + * @param null|resource $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -1257,9 +656,7 @@ function ldap_set_option($ldap, int $option, $value): void /** - * Unbinds from the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @throws LdapException * */ diff --git a/generated/8.1/libxml.php b/generated/8.1/libxml.php index 481d5776..aa6180a3 100644 --- a/generated/8.1/libxml.php +++ b/generated/8.1/libxml.php @@ -5,47 +5,7 @@ use Safe\Exceptions\LibxmlException; /** - * Changes the default external entity loader. - * This can be used to suppress the expansion of arbitrary external entities to avoid XXE attacks, - * even when LIBXML_NOENT has been set for the respective operation, - * and is usually preferable over calling libxml_disable_entity_loader. - * - * @param callable $resolver_function A callable with the following signature: - * - * resourcestringnullresolver - * stringpublic_id - * stringsystem_id - * arraycontext - * - * - * - * public_id - * - * - * The public ID. - * - * - * - * - * system_id - * - * - * The system ID. - * - * - * - * - * context - * - * - * An array with the four elements "directory", "intSubName", - * "extSubURI" and "extSubSystem". - * - * - * - * - * This callable should return a resource, a string from which a resource can be - * opened. If NULL is returned, the entity reference resolution will fail. + * @param callable $resolver_function * @throws LibxmlException * */ diff --git a/generated/8.1/lzf.php b/generated/8.1/lzf.php index 7ea98c4d..0e90111e 100644 --- a/generated/8.1/lzf.php +++ b/generated/8.1/lzf.php @@ -5,11 +5,8 @@ use Safe\Exceptions\LzfException; /** - * lzf_compress compresses the given - * data string using LZF encoding. - * - * @param string $data The string to compress. - * @return string Returns the compressed data. + * @param string $data + * @return string * @throws LzfException * */ @@ -25,11 +22,8 @@ function lzf_compress(string $data): string /** - * lzf_compress decompresses the given - * data string containing lzf encoded data. - * - * @param string $data The compressed string. - * @return string Returns the decompressed data. + * @param string $data + * @return string * @throws LzfException * */ diff --git a/generated/8.1/mailparse.php b/generated/8.1/mailparse.php index 82c75d63..66b6d383 100644 --- a/generated/8.1/mailparse.php +++ b/generated/8.1/mailparse.php @@ -5,24 +5,10 @@ use Safe\Exceptions\MailparseException; /** - * 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. - * - * @param resource $mimemail A valid MIME resource, created with - * mailparse_msg_create. - * @param mixed $filename Can be a file name or a valid stream resource. - * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the - * extracted section, or NULL to make this function return the - * extracted section. - * - * If not specified, the contents will be sent to "stdout". - * @return string If callbackfunc is not NULL returns TRUE on - * success. - * - * If callbackfunc is set to NULL, returns the - * extracted section as a string. + * @param resource $mimemail + * @param mixed $filename + * @param callable $callbackfunc + * @return string * @throws MailparseException * */ @@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba /** - * Frees a MIME resource. - * - * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or - * mailparse_msg_parse_file. + * @param resource $mimemail * @throws MailparseException * */ @@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void /** - * Parses a file. - * This is the optimal way of parsing a mail file that you have on disk. - * - * @param string $filename Path to the file holding the message. - * The file is opened and streamed through the parser. - * - * The message contained in filename is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. - * @return resource Returns a MIME resource representing the structure. + * @param string $filename + * @return resource * @throws MailparseException * */ @@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename) /** - * Incrementally parse data into the supplied mime mail resource. - * - * This function allow you to stream portions of a file at a time, rather - * than read and parse the whole thing. - * - * @param resource $mimemail A valid MIME resource. - * @param string $data The final chunk of data is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. + * @param resource $mimemail + * @param string $data * @throws MailparseException * */ @@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void /** - * Streams data from the source file pointer, apply - * encoding and write to the destination file pointer. - * - * @param resource $sourcefp A valid file handle. The file is streamed through the parser. - * @param resource $destfp The destination file handle in which the encoded data will be written. - * @param string $encoding One of the character encodings supported by the - * mbstring module. + * @param resource $sourcefp + * @param resource $destfp + * @param string $encoding * @throws MailparseException * */ diff --git a/generated/8.1/mbstring.php b/generated/8.1/mbstring.php index 70e7ff37..1861c94c 100644 --- a/generated/8.1/mbstring.php +++ b/generated/8.1/mbstring.php @@ -5,17 +5,9 @@ use Safe\Exceptions\MbstringException; /** - * Returns a string containing the character specified by the Unicode code point value, - * encoded in the specified encoding. - * - * This function complements mb_ord. - * - * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return string A string containing the requested character, if it can be represented in the specified - * encoding. + * @param int $codepoint + * @param null|string $encoding + * @return string * @throws MbstringException * */ @@ -35,23 +27,10 @@ function mb_chr(int $codepoint, ?string $encoding = null): string /** - * Converts the character encoding of string - * to to_encoding - * from optionally from_encoding. - * If string is an array, all its string values will be - * converted recursively. - * - * @param array|string $string The string or array being encoded. - * @param string $to_encoding The type of encoding that string is being converted to. - * @param mixed $from_encoding 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 - * encoding will be used. - * - * - * See supported - * encodings. - * @return array|string The encoded string or array on success. + * @param array|string $string + * @param string $to_encoding + * @param mixed $from_encoding + * @return array|string * @throws MbstringException * */ @@ -71,27 +50,11 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null /** - * Converts - * character encoding of variables var and vars in - * encoding from_encoding to encoding - * to_encoding. - * - * mb_convert_variables join strings in Array - * or Object to detect encoding, since encoding detection tends to - * fail for short strings. Therefore, it is impossible to mix - * encoding in single array or object. - * - * @param string $to_encoding The encoding that the string is being converted to. - * @param array|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 - * is omitted, detect_order is used. - * @param array|object|string $var var is the reference to the - * variable being converted. String, Array and Object are accepted. - * mb_convert_variables assumes all parameters - * have the same encoding. - * @param array|object|string $vars Additional vars. - * @return string The character encoding before conversion for success. + * @param string $to_encoding + * @param array|string $from_encoding + * @param array|object|string $var + * @param array|object|string $vars + * @return string * @throws MbstringException * */ @@ -107,31 +70,8 @@ function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$va /** - * Sets the automatic character - * encoding detection order to encoding. - * - * @param non-empty-list|non-falsy-string|null $encoding encoding is an array or - * comma separated list of character encoding. See supported encodings. - * - * If encoding is omitted or NULL, it returns - * the current character encoding detection order as array. - * - * This setting affects mb_detect_encoding and - * mb_send_mail. - * - * mbstring currently implements the following - * encoding detection filters. If there is an invalid byte sequence - * for the following encodings, encoding detection will fail. - * - * For ISO-8859-*, mbstring - * always detects as ISO-8859-*. - * - * For UTF-16, UTF-32, - * UCS2 and UCS4, encoding - * detection will fail always. - * @return bool|list When setting the encoding detection order, TRUE is returned on success. - * - * When getting the encoding detection order, an ordered array of the encodings is returned. + * @param non-empty-list|non-falsy-string|null $encoding + * @return bool|list * @throws MbstringException * */ @@ -151,10 +91,8 @@ function mb_detect_order($encoding = null) /** - * Returns an array of aliases for a known encoding type. - * - * @param string $encoding The encoding type being checked, for aliases. - * @return list Returns a numerically indexed array of encoding aliases on success + * @param string $encoding + * @return list * @throws MbstringException * */ @@ -170,36 +108,11 @@ function mb_encoding_aliases(string $encoding): array /** - * Scans string for matches to - * pattern, then replaces the matched text - * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, - * except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. - * - * You'll often need the callback function - * for a mb_ereg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * mb_ereg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param callable(array):string $callback + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -219,19 +132,11 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param string $replacement The replacement text. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -251,17 +156,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, ? /** - * Retrieve the result from the last multibyte regular expression match - * - * @return array An array - * including the sub-string of matched part by last - * mb_ereg_search, - * mb_ereg_search_pos, - * mb_ereg_search_regs. If there are some - * matches, the first element will have the matched 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. + * @return array * @throws MbstringException * */ @@ -277,16 +172,9 @@ function mb_ereg_search_getregs(): array /** - * mb_ereg_search_init sets - * string and pattern - * for a multibyte regular expression. These values are used for - * mb_ereg_search, - * mb_ereg_search_pos, and - * mb_ereg_search_regs. - * - * @param string $string The search string. - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. + * @param string $string + * @param null|string $pattern + * @param null|string $options * @throws MbstringException * */ @@ -307,16 +195,9 @@ function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $o /** - * Returns the matched part of a multibyte regular expression. - * - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return array mb_ereg_search_regs executes the multibyte - * regular expression match, and if there are some matched part, it - * 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. + * @param null|string $pattern + * @param null|string $options + * @return array * @throws MbstringException * */ @@ -338,10 +219,7 @@ function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): /** - * mb_ereg_search_setpos sets the starting - * point of a match for mb_ereg_search. - * - * @param int $offset The position to set. If it is negative, it counts from the end of the string. + * @param int $offset * @throws MbstringException * */ @@ -356,17 +234,11 @@ function mb_ereg_search_setpos(int $offset): void /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement. - * - * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. - * @param string $replacement The replacement text. - * @param string $string The searched string. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return string The resultant string. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return string * @throws MbstringException * */ @@ -386,29 +258,8 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, /** - * mb_get_info returns the internal setting parameters of mbstring. - * - * @param string $type If type is not specified or is specified as "all", - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * and "strict_detection" - * will be returned. - * - * If type is specified as - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * or "strict_detection" - * the specified setting parameter will be returned. - * @return mixed An array of type information if type - * is not specified, otherwise a specific type. + * @param string $type + * @return mixed * @throws MbstringException * */ @@ -424,20 +275,8 @@ function mb_get_info(string $type = "all") /** - * Set/Get the HTTP output character encoding. - * Output after this function is called will be converted from the set internal encoding to encoding. - * - * @param null|string $encoding If encoding is set, - * mb_http_output sets the HTTP output character - * encoding to encoding. - * - * If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. - * @return bool|string If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. Otherwise, - * Returns TRUE on success. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -457,18 +296,8 @@ function mb_http_output(?string $encoding = null) /** - * Set/Get the internal character encoding - * - * @param null|string $encoding 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. - * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then - * the current character encoding name is returned. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -488,15 +317,9 @@ function mb_internal_encoding(?string $encoding = null) /** - * Returns the Unicode code point value of the given character. - * - * This function complements mb_chr. - * - * @param string $string A string - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return int The Unicode code point for the first character of string. + * @param string $string + * @param null|string $encoding + * @return int * @throws MbstringException * */ @@ -516,15 +339,8 @@ function mb_ord(string $string, ?string $encoding = null): int /** - * Parses GET/POST/COOKIE data and - * sets global variables. Since PHP does not provide raw POST/COOKIE - * data, it can only be used for GET data for now. It parses URL - * encoded data, detects encoding, converts coding to internal - * encoding and set values to the result array or - * global variables. - * - * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param string $string + * @param array|null $result * @throws MbstringException * */ @@ -539,16 +355,8 @@ function mb_parse_str(string $string, ?array &$result): void /** - * Set/Get character encoding for a multibyte regex. - * - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * 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. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -568,59 +376,11 @@ function mb_regex_encoding(?string $encoding = null) /** - * Sends email. Headers and messages are converted and encoded according - * to the mb_language setting. It's a wrapper function - * for mail, so see also mail for details. - * - * @param string $to The mail addresses being sent to. Multiple - * recipients may be specified by putting a comma between each - * address in to. - * This parameter is not automatically encoded. - * @param string $subject The subject of the mail. - * @param string $message The message of the mail. - * @param array|null|string $additional_headers String or array to be inserted at the end of the email header. - * - * This is typically used to add extra headers (From, Cc, and Bcc). - * Multiple extra headers should be separated with a CRLF (\r\n). - * Validate parameter not to be injected unwanted headers by attackers. - * - * If an array is passed, its keys are the header names and its - * values are the respective header values. - * - * When sending mail, the mail must contain - * a From header. This can be set with the - * additional_headers parameter, or a default - * can be set in php.ini. - * - * Failing to do this will result in an error - * message similar to Warning: mail(): "sendmail_from" not - * set in php.ini or custom "From:" header missing. - * The From header sets also - * Return-Path under Windows. - * - * If messages are not received, try using a LF (\n) only. - * Some Unix mail transfer agents (most notably - * qmail) replace LF by CRLF - * automatically (which leads to doubling CR if CRLF is used). - * This should be a last resort, as it does not comply with - * RFC 2822. - * @param null|string $additional_params additional_params is a MTA command line - * parameter. It is useful when setting the correct Return-Path - * header when using sendmail. - * - * This parameter is escaped by escapeshellcmd internally - * to prevent command execution. escapeshellcmd prevents - * command execution, but allows to add additional parameters. For security reason, - * this parameter should be validated. - * - * Since escapeshellcmd is applied automatically, some characters - * that are allowed as email addresses by internet RFCs cannot be used. Programs - * that are required to use these characters mail cannot be used. - * - * The user that the webserver runs as should be added as a trusted user to the - * sendmail configuration to prevent a 'X-Warning' header from being added - * to the message when the envelope sender (-f) is set using this method. - * For sendmail users, this file is /etc/mail/trusted-users. + * @param string $to + * @param string $subject + * @param string $message + * @param array|null|string $additional_headers + * @param null|string $additional_params * @throws MbstringException * */ @@ -639,17 +399,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ /** - * Split a multibyte - * string using regular expression - * pattern and returns the result as an - * array. - * - * @param string $pattern The regular expression pattern. - * @param string $string The string being split. - * @param int $limit If optional parameter limit is specified, - * it will be split in limit elements as - * maximum. - * @return list The result as an array. + * @param string $pattern + * @param string $string + * @param int $limit + * @return list * @throws MbstringException * */ diff --git a/generated/8.1/misc.php b/generated/8.1/misc.php index da9c2ace..f4e8d223 100644 --- a/generated/8.1/misc.php +++ b/generated/8.1/misc.php @@ -5,26 +5,9 @@ use Safe\Exceptions\MiscException; /** - * Defines a named constant at runtime. - * - * @param string $constant_name The name of the constant. - * - * It is possible to define constants with reserved or - * even invalid names, whose value can (only) be retrieved with - * constant. However, doing so is not recommended. - * @param mixed $value The value of the constant. In PHP 5, value must - * be a scalar value (int, - * float, string, bool, or - * NULL). In PHP 7, array values are also accepted. - * - * While it is possible to define resource constants, it is - * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive 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. - * - * Case-insensitive constants are stored as lower-case. + * @param string $constant_name + * @param mixed $value + * @param bool $case_insensitive * @throws MiscException * */ @@ -39,22 +22,9 @@ function define(string $constant_name, $value, bool $case_insensitive = false): /** - * Prints out or returns a syntax highlighted version of the code contained - * in filename using the colors defined in the - * built-in syntax highlighter for PHP. - * - * Many servers are configured to automatically highlight files - * with a phps extension. For example, - * example.phps when viewed will show the - * syntax highlighted source of the file. To enable this, add this - * line to the httpd.conf: - * - * @param string $filename Path to the PHP file to be highlighted. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $filename + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -70,15 +40,9 @@ function highlight_file(string $filename, bool $return = false) /** - * Outputs or returns html markup for a syntax highlighted version of the given PHP code - * using the colors defined in the built-in syntax highlighter for PHP. - * - * @param string $string The PHP code to be highlighted. This should include the opening tag. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $string + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -94,16 +58,8 @@ function highlight_string(string $string, bool $return = false) /** - * Returns the system's high resolution time, counted from an arbitrary point in time. - * The delivered timestamp is monotonic and can not be adjusted. - * - * @param bool $as_number Whether the high resolution time should be returned as array - * or number. - * @return array{0:int,1:int}|float|int Returns an array of integers in the form [seconds, nanoseconds], if the - * parameter as_number is false. Otherwise the nanoseconds - * are returned as int (64bit platforms) or float - * (32bit platforms). - * Returns FALSE on failure. + * @param bool $as_number + * @return array{0:int,1:int}|float|int * @throws MiscException * */ @@ -119,156 +75,9 @@ function hrtime(bool $as_number = false) /** - * Pack given arguments into a binary string according to - * format. - * - * The idea for this function was taken from Perl and all formatting codes - * work the same as in Perl. However, there are some formatting codes that are - * missing such as Perl's "u" format code. - * - * Note that the distinction between signed and unsigned values only - * affects the function unpack, where as - * function pack gives the same result for - * signed and unsigned format codes. - * - * @param string $format The format string consists of format codes - * followed by an optional repeater argument. The repeater argument can - * be either an integer value or * for repeating to - * the end of the input data. For a, A, h, H the repeat count specifies - * how many characters of one data argument are taken, for @ it is the - * absolute position where to put the next data, for everything else the - * repeat count specifies how many data arguments are consumed and packed - * into the resulting binary string. - * - * Currently implemented formats are: - * - * pack format characters - * - * - * - * Code - * Description - * - * - * - * - * a - * NUL-padded string - * - * - * A - * SPACE-padded string - * - * h - * Hex string, low nibble first - * - * H - * Hex string, high nibble first - * csigned char - * - * C - * unsigned char - * - * s - * signed short (always 16 bit, machine byte order) - * - * - * S - * unsigned short (always 16 bit, machine byte order) - * - * - * n - * unsigned short (always 16 bit, big endian byte order) - * - * - * v - * unsigned short (always 16 bit, little endian byte order) - * - * - * i - * signed integer (machine dependent size and byte order) - * - * - * I - * unsigned integer (machine dependent size and byte order) - * - * - * l - * signed long (always 32 bit, machine byte order) - * - * - * L - * unsigned long (always 32 bit, machine byte order) - * - * - * N - * unsigned long (always 32 bit, big endian byte order) - * - * - * V - * unsigned long (always 32 bit, little endian byte order) - * - * - * q - * signed long long (always 64 bit, machine byte order) - * - * - * Q - * unsigned long long (always 64 bit, machine byte order) - * - * - * J - * unsigned long long (always 64 bit, big endian byte order) - * - * - * P - * unsigned long long (always 64 bit, little endian byte order) - * - * - * f - * float (machine dependent size and representation) - * - * - * g - * float (machine dependent size, little endian byte order) - * - * - * G - * float (machine dependent size, big endian byte order) - * - * - * d - * double (machine dependent size and representation) - * - * - * e - * double (machine dependent size, little endian byte order) - * - * - * E - * double (machine dependent size, big endian byte order) - * - * - * x - * NUL byte - * - * - * X - * Back up one byte - * - * - * Z - * NUL-padded string - * - * - * @ - * NUL-fill to absolute position - * - * - * - * + * @param string $format * @param mixed $values - * @return string Returns a binary string containing data. + * @return string * @throws MiscException * */ @@ -288,15 +97,10 @@ function pack(string $format, ...$values): string /** - * Convert string from one codepage to another. - * - * @param int|string $in_codepage The codepage of the subject string. - * Either the codepage name or identifier. - * @param int|string $out_codepage The codepage to convert the subject string to. - * Either the codepage name or identifier. - * @param string $subject The string to convert. - * @return string The subject string converted to - * out_codepage. + * @param int|string $in_codepage + * @param int|string $out_codepage + * @param string $subject + * @return string * @throws MiscException * */ @@ -312,9 +116,7 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str /** - * Set the codepage of the current process. - * - * @param int $codepage A codepage identifier. + * @param int $codepage * @throws MiscException * */ @@ -329,13 +131,8 @@ function sapi_windows_cp_set(int $codepage): void /** - * Sends a CTRL event to another process in the same process group. - * - * @param int $event The CTRL even to send; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * @param int $pid The ID of the process to which to send the event to. If 0 - * is given, the event is sent to all processes of the process group. + * @param int $event + * @param int $pid * @throws MiscException * */ @@ -350,35 +147,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void /** - * Sets or removes a CTRL event handler, which allows Windows - * CLI processes to intercept or ignore CTRL+C and - * CTRL+BREAK events. Note that in multithreaded environments, - * this is only possible when called from the main thread. - * - * @param callable|null $handler A callback function to set or remove. If set, this function will be called - * whenever a CTRL+C or CTRL+BREAK event - * occurs. The function is supposed to have the following signature: - * - * voidhandler - * intevent - * - * - * - * event - * - * - * The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * - * - * - * - * Setting a NULL handler causes the process to ignore - * CTRL+C events, but not CTRL+BREAK events. - * @param bool $add The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param callable|null $handler + * @param bool $add * @throws MiscException * */ @@ -393,18 +163,8 @@ function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): vo /** - * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled. - * - * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. - * If the feature has been successfully enabled (or disabled). - * - * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * - * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. - * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. - * - * @param resource $stream The stream on which the function will operate. - * @param bool|null $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @param resource $stream + * @param bool|null $enable * @throws MiscException * */ @@ -423,18 +183,8 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): void /** - * Delays the program execution for the given number of - * seconds. - * - * @param int $seconds Halt time in seconds. - * @return int Returns zero on success. - * - * If the call was interrupted by a signal, sleep returns - * a non-zero value. On Windows, this value will always be - * 192 (the value of the - * WAIT_IO_COMPLETION constant within the Windows API). - * On other platforms, the return value will be the number of seconds left to - * sleep. + * @param int $seconds + * @return int * @throws MiscException * */ @@ -450,29 +200,9 @@ function sleep(int $seconds): int /** - * Delays program execution for the given number of - * seconds and nanoseconds. - * - * @param int $seconds Must be a non-negative integer. - * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool Returns TRUE on success. - * - * If the delay was interrupted by a signal, an associative array will be - * returned with the components: - * - * - * - * seconds - number of seconds remaining in - * the delay - * - * - * - * - * nanoseconds - number of nanoseconds - * remaining in the delay - * - * - * + * @param int $seconds + * @param int $nanoseconds + * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool * @throws MiscException * */ @@ -488,10 +218,7 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** - * Makes the script sleep until the specified - * timestamp. - * - * @param float $timestamp The timestamp when the script should wake. + * @param float $timestamp * @throws MiscException * */ @@ -506,35 +233,10 @@ function time_sleep_until(float $timestamp): void /** - * Unpacks from a binary string into an array according to the given - * format. - * - * The unpacked data is stored in an associative array. To - * accomplish this you have to name the different format codes and - * separate them by a slash /. If a repeater argument is present, - * then each of the array keys will have a sequence number behind - * the given name. - * - * Changes were made to bring this function into line with Perl: - * - * - * The "a" code now retains trailing NULL bytes. - * - * - * The "A" code now strips all trailing ASCII whitespace (spaces, tabs, - * newlines, carriage returns, and NULL bytes). - * - * - * The "Z" code was added for NULL-padded strings, and removes trailing - * NULL bytes. - * - * - * - * @param string $format See pack for an explanation of the format codes. - * @param string $string The packed data. - * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary - * string. + * @param string $format + * @param string $string + * @param int $offset + * @return array * @throws MiscException * */ diff --git a/generated/8.1/mysql.php b/generated/8.1/mysql.php index 559a8190..f96eb641 100644 --- a/generated/8.1/mysql.php +++ b/generated/8.1/mysql.php @@ -5,24 +5,7 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened - * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see - * freeing resources - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no connection is found or - * established, an E_WARNING level error is - * generated. + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -37,39 +20,12 @@ function mysql_close($link_identifier = null): void /** - * Opens or reuses a connection to a MySQL server. - * - * @param string $server 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 SQL safe mode, this parameter is ignored - * and value 'localhost:3306' is always used. - * @param string $username The username. Default value is defined by mysql.default_user. In - * SQL safe mode, this parameter is ignored and the name of the user that - * owns the server process is used. - * @param string $password The password. Default value is defined by mysql.default_password. In - * SQL safe mode, this parameter is ignored and empty password is used. - * @param bool $new_link If a second call is made to mysql_connect - * with the same arguments, no new link will be established, but - * instead, the link identifier of the already opened link will be - * returned. The new_link parameter modifies this - * behavior and makes mysql_connect always open - * a new link, even if mysql_connect was called - * before with the same parameters. - * In SQL safe mode, this parameter is ignored. - * @param int $client_flags The client_flags parameter can be a combination - * of the following constants: - * 128 (enable LOAD DATA LOCAL handling), - * MYSQL_CLIENT_SSL, - * MYSQL_CLIENT_COMPRESS, - * MYSQL_CLIENT_IGNORE_SPACE or - * MYSQL_CLIENT_INTERACTIVE. - * Read the section about for further information. - * In SQL safe mode, this parameter is ignored. - * @return resource Returns a MySQL link identifier on success. + * @param string $server + * @param string $username + * @param string $password + * @param bool $new_link + * @param int $client_flags + * @return resource * @throws MysqlException * */ @@ -97,17 +53,8 @@ function mysql_connect(?string $server = null, ?string $username = null, ?string /** - * mysql_create_db attempts to create a new - * database on the server associated with the specified link - * identifier. - * - * @param string $database_name The name of the database being created. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -122,23 +69,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void /** - * mysql_data_seek moves the internal row - * pointer of the MySQL result associated with the specified result - * identifier to point to the specified row number. The next call - * to a MySQL fetch function, such as mysql_fetch_assoc, - * would return that row. - * - * row_number starts at 0. The - * row_number should be a value in the range from 0 to - * mysql_num_rows - 1. However if the result set - * is empty (mysql_num_rows == 0), a seek to 0 will - * fail with an E_WARNING and - * mysql_data_seek will return FALSE. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row_number The desired row number of the new result pointer. + * @param resource $result + * @param int $row_number * @throws MysqlException * */ @@ -153,15 +85,10 @@ function mysql_data_seek($result, int $row_number): void /** - * Retrieve the database name from a call to - * mysql_list_dbs. - * - * @param resource $result The result pointer from a call to mysql_list_dbs. - * @param int $row The index into the result set. - * @param mixed $field The field name. - * @return string Returns the database name on success. If FALSE - * is returned, use mysql_error to determine the nature - * of the error. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -177,22 +104,10 @@ function mysql_db_name($result, int $row, $field = null): string /** - * mysql_db_query selects a database, and executes a - * query on it. - * - * @param string $database The name of the database that will be selected. - * @param string $query The MySQL query. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for - * INSERT/UPDATE/DELETE - * queries to indicate success/failure. + * @param string $database + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -208,19 +123,8 @@ function mysql_db_query(string $database, string $query, $link_identifier = null /** - * mysql_drop_db attempts to drop (remove) an - * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql - * DROP DATABASE statement instead. - * - * @param string $database_name The name of the database that will be deleted. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -235,21 +139,8 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void /** - * Returns an array that corresponds to the lengths of each field - * in the last row fetched by MySQL. - * - * mysql_fetch_lengths stores the lengths of - * each result column in the last row returned by - * mysql_fetch_row, - * mysql_fetch_assoc, - * mysql_fetch_array, and - * mysql_fetch_object in an array, starting at - * offset 0. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return array An array of lengths on success. + * @param resource $result + * @return array * @throws MysqlException * */ @@ -265,27 +156,9 @@ function mysql_fetch_lengths($result): array /** - * mysql_field_flags returns the field flags of - * the specified field. The flags are reported as a single word - * per flag separated by a single space, so that you can split the - * returned value using explode. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string Returns a string of flags associated with the result. - * - * 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", - * "unsigned", "zerofill", - * "binary", "enum", - * "auto_increment" and "timestamp". + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -301,17 +174,9 @@ function mysql_field_flags($result, int $field_offset): string /** - * mysql_field_len returns the length of the - * specified field. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return int The length of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return int * @throws MysqlException * */ @@ -327,17 +192,9 @@ function mysql_field_len($result, int $field_offset): int /** - * mysql_field_name returns the name of the - * specified field index. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string The name of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -353,18 +210,8 @@ function mysql_field_name($result, int $field_offset): string /** - * Seeks to the specified field offset. If the next call to - * mysql_fetch_field doesn't include a field - * offset, the field offset specified in - * mysql_field_seek will be returned. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. + * @param resource $result + * @param int $field_offset * @throws MysqlException * */ @@ -379,17 +226,7 @@ function mysql_field_seek($result, int $field_offset): void /** - * mysql_free_result will free all memory - * associated with the result identifier result. - * - * mysql_free_result only needs to be called if - * you are concerned about how much memory is being used for queries - * that return large result sets. All associated result memory is - * automatically freed at the end of the script's execution. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. + * @param resource $result * @throws MysqlException * */ @@ -404,17 +241,8 @@ function mysql_free_result($result): void /** - * Describes the type of connection in use for the connection, including the - * server host name. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns a string describing the type of MySQL connection in use for the - * connection. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -430,15 +258,8 @@ function mysql_get_host_info($link_identifier = null): string /** - * Retrieves the MySQL protocol. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int Returns the MySQL protocol on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -454,15 +275,8 @@ function mysql_get_proto_info($link_identifier = null): int /** - * Retrieves the MySQL server version. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the MySQL server version on success. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -478,17 +292,8 @@ function mysql_get_server_info($link_identifier = null): string /** - * Returns detailed information about the last query. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns information about the statement on success. See the example below for which statements provide information, - * and what the returned value may look like. Statements that are not listed - * will return FALSE. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -504,18 +309,8 @@ function mysql_info($link_identifier = null): string /** - * Returns a result pointer containing the databases available from the - * current mysql daemon. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse - * this result pointer, or any function for result tables, such as - * mysql_fetch_array. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -531,26 +326,10 @@ function mysql_list_dbs($link_identifier = null) /** - * Retrieves information about the given table name. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW COLUMNS FROM - * table [LIKE 'name'] statement instead. - * - * @param string $database_name The name of the database that's being queried. - * @param string $table_name The name of the table that's being queried. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * The returned result can be used with mysql_field_flags, - * mysql_field_len, - * mysql_field_name and - * mysql_field_type. + * @param string $database_name + * @param string $table_name + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -566,15 +345,8 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden /** - * Retrieves the current MySQL server threads. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -590,24 +362,9 @@ function mysql_list_processes($link_identifier = null) /** - * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param string $database The name of the database - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param string $database + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -623,13 +380,8 @@ function mysql_list_tables(string $database, $link_identifier = null) /** - * Retrieves the number of fields from a query. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int Returns the number of fields in the result set resource on - * success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -645,15 +397,8 @@ function mysql_num_fields($result): int /** - * Retrieves the number of rows from a result set. This command is only valid - * for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or - * DELETE query, use mysql_affected_rows. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int The number of rows in a result set on success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -669,41 +414,9 @@ function mysql_num_rows($result): int /** - * mysql_query sends a unique query (multiple queries - * are not supported) to the currently - * active database on the server that's associated with the - * specified link_identifier. - * - * @param string $query An SQL query - * - * The query string should not end with a semicolon. - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, - * mysql_query - * returns a resource on success. - * - * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, - * mysql_query returns TRUE on success. - * - * The returned result resource should be passed to - * mysql_fetch_array, and other - * functions for dealing with result tables, to access the returned data. - * - * Use mysql_num_rows to find out how many rows - * were returned for a SELECT statement or - * mysql_affected_rows to find out how many - * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - * statement. - * - * mysql_query will also fail and return FALSE - * if the user does not have permission to access the table(s) referenced by - * the query. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -719,28 +432,9 @@ function mysql_query(string $query, $link_identifier = null) /** - * Escapes special characters in the unescaped_string, - * taking into account the current character set of the connection so that it - * is safe to place it in a mysql_query. If binary data - * is to be inserted, this function must be used. - * - * mysql_real_escape_string calls MySQL's library function - * mysql_real_escape_string, which prepends backslashes to the following characters: - * \x00, \n, - * \r, \, ', - * " and \x1a. - * - * This function must always (with few exceptions) be used to make data - * safe before sending a query to MySQL. - * - * @param string $unescaped_string The string that is to be escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the escaped string. + * @param string $unescaped_string + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -756,28 +450,10 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n /** - * Retrieves the contents of one cell from a MySQL result set. - * - * When working on large result sets, you should consider using one - * of the functions that fetch an entire row (specified below). As - * these functions return the contents of multiple cells in one - * function call, they're MUCH quicker than - * mysql_result. Also, note that specifying a - * numeric offset for the field argument is much quicker than - * specifying a fieldname or tablename.fieldname argument. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row The row number from the result that's being retrieved. Row numbers - * start at 0. - * @param mixed $field 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 - * dot field name (tablename.fieldname). If the column name has been - * 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. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -793,17 +469,8 @@ function mysql_result($result, int $row, $field = 0): string /** - * Sets the current active database on the server that's associated with the - * specified link identifier. Every subsequent call to - * mysql_query will be made on the active database. - * - * @param string $database_name The name of the database that is to be selected. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -818,15 +485,8 @@ function mysql_select_db(string $database_name, $link_identifier = null): void /** - * Sets the default character set for the current connection. - * - * @param string $charset A valid character set name. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $charset + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -841,20 +501,9 @@ function mysql_set_charset(string $charset, $link_identifier = null): void /** - * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from - * mysql_list_tables. - * @param int $i The integer index (row/table number) - * @return string The name of the table on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param resource $result + * @param int $i + * @return string * @throws MysqlException * */ @@ -870,17 +519,8 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will - * change. This means only retrieve the thread ID when needed. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int The thread ID on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -896,34 +536,9 @@ function mysql_thread_id($link_identifier = null): int /** - * mysql_unbuffered_query sends the SQL query - * query to MySQL without automatically - * fetching and buffering the result rows as - * mysql_query does. This saves a considerable - * amount of memory with SQL queries that produce large result sets, - * and you can start working on the result set immediately after the - * first row has been retrieved as you don't have to wait until the - * complete SQL query has been performed. To use - * mysql_unbuffered_query while multiple database - * connections are open, you must specify the optional parameter - * link_identifier to identify which connection - * you want to use. - * - * @param string $query The SQL query to execute. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query - * returns a resource on success. - * - * For other type of SQL statements, UPDATE, DELETE, DROP, etc, - * mysql_unbuffered_query returns TRUE on success. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ diff --git a/generated/8.1/mysqli.php b/generated/8.1/mysqli.php index 9c9fbcbe..6a980303 100644 --- a/generated/8.1/mysqli.php +++ b/generated/8.1/mysqli.php @@ -5,9 +5,7 @@ use Safe\Exceptions\MysqliException; /** - * Returns client per-process statistics. - * - * @return array Returns an array with client stats if success. + * @return array * @throws MysqliException * */ diff --git a/generated/8.1/network.php b/generated/8.1/network.php index f6ddd6cd..f9b768a5 100644 --- a/generated/8.1/network.php +++ b/generated/8.1/network.php @@ -5,9 +5,6 @@ use Safe\Exceptions\NetworkException; /** - * closelog closes the descriptor being used to write to - * the system logger. The use of closelog is optional. - * * @throws NetworkException * */ @@ -22,227 +19,12 @@ function closelog(): void /** - * Fetch DNS Resource Records associated with the given - * hostname. - * - * @param string $hostname hostname should be a valid DNS hostname such - * as "www.example.com". Reverse lookups can be generated - * using in-addr.arpa notation, but - * gethostbyaddr is more suitable for - * the majority of reverse lookups. - * - * Per DNS standards, email addresses are given in user.host format (for - * example: hostmaster.example.com as opposed to hostmaster@example.com), - * be sure to check this value and modify if necessary before using it - * with a functions such as mail. - * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. - * To limit the query, specify the optional type - * parameter. May be any one of the following: - * DNS_A, DNS_CNAME, - * DNS_HINFO, DNS_CAA, - * DNS_MX, DNS_NS, - * DNS_PTR, DNS_SOA, - * DNS_TXT, DNS_AAAA, - * DNS_SRV, DNS_NAPTR, - * DNS_A6, DNS_ALL - * or DNS_ANY. - * - * Because of eccentricities in the performance of libresolv - * between platforms, DNS_ANY will not - * always return every record, the slower DNS_ALL - * will collect all records more reliably. - * - * Windows: DNS_CAA is not supported. - * Support for DNS_A6 is not implemented. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource - * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any - * Additional Records. - * @param bool $raw The type will be interpreted as a raw DNS type ID - * (the DNS_* constants cannot be used). - * The return value will contain a data key, which needs - * to be manually parsed. - * @return list This function returns an array of associative arrays. Each associative array contains - * at minimum the following keys: - * - * Basic DNS attributes - * - * - * - * Attribute - * Meaning - * - * - * - * - * host - * - * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * - * class - * - * dns_get_record only returns Internet class records and as - * such this parameter will always return IN. - * - * - * - * type - * - * String containing the record type. Additional attributes will also be contained - * in the resulting array dependant on the value of type. See table below. - * - * - * - * ttl - * - * "Time To Live" remaining for this record. This will not equal - * the record's original ttl, but will rather equal the original ttl minus whatever - * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * - * Other keys in associative arrays dependant on 'type' - * - * - * - * Type - * Extra Columns - * - * - * - * - * A - * - * ip: An IPv4 addresses in dotted decimal notation. - * - * - * - * MX - * - * pri: Priority of mail exchanger. - * Lower numbers indicate greater priority. - * target: FQDN of the mail exchanger. - * See also dns_get_mx. - * - * - * - * CNAME - * - * target: FQDN of location in DNS namespace to which - * the record is aliased. - * - * - * - * NS - * - * target: FQDN of the name server which is authoritative - * for this hostname. - * - * - * - * PTR - * - * target: Location within the DNS namespace to which - * this record points. - * - * - * - * TXT - * - * txt: Arbitrary string data associated with this record. - * - * - * - * HINFO - * - * cpu: IANA number designating the CPU of the machine - * referenced by this record. - * os: IANA number designating the Operating System on - * the machine referenced by this record. - * See IANA's Operating System - * Names for the meaning of these values. - * - * - * - * CAA - * - * flags: A one-byte bitfield; currently only bit 0 is defined, - * meaning 'critical'; other bits are reserved and should be ignored. - * tag: The CAA tag name (alphanumeric ASCII string). - * value: The CAA tag value (binary string, may use subformats). - * For additional information see: RFC 6844 - * - * - * - * SOA - * - * mname: FQDN of the machine from which the resource - * records originated. - * rname: Email address of the administrative contact - * for this domain. - * serial: Serial # of this revision of the requested - * domain. - * refresh: Refresh interval (seconds) secondary name - * servers should use when updating remote copies of this domain. - * retry: Length of time (seconds) to wait after a - * failed refresh before making a second attempt. - * expire: Maximum length of time (seconds) a secondary - * DNS server should retain remote copies of the zone data without a - * successful refresh before discarding. - * minimum-ttl: Minimum length of time (seconds) a - * client can continue to use a DNS resolution before it should request - * a new resolution from the server. Can be overridden by individual - * resource records. - * - * - * - * AAAA - * - * ipv6: IPv6 address - * - * - * - * A6 - * - * masklen: Length (in bits) to inherit from the target - * specified by chain. - * ipv6: Address for this specific record to merge with - * chain. - * chain: Parent record to merge with - * ipv6 data. - * - * - * - * SRV - * - * pri: (Priority) lowest priorities should be used first. - * weight: Ranking to weight which of commonly prioritized - * targets should be chosen at random. - * target and port: hostname and port - * where the requested service can be found. - * For additional information see: RFC 2782 - * - * - * - * NAPTR - * - * order and pref: Equivalent to - * pri and weight above. - * flags, services, regex, - * and replacement: Parameters as defined by - * RFC 2915. - * - * - * - * - * + * @param string $hostname + * @param int $type + * @param array|null $authoritative_name_servers + * @param array|null $additional_records + * @param bool $raw + * @return list * @throws NetworkException * */ @@ -258,51 +40,12 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authorit /** - * Initiates a socket connection to the resource specified by - * hostname. - * - * PHP supports targets in the Internet and Unix domains as described in - * . A list of supported transports can also be - * retrieved using stream_get_transports. - * - * The socket will by default be opened in blocking mode. You can - * switch it to non-blocking mode by using - * stream_set_blocking. - * - * The function stream_socket_client is similar but - * provides a richer set of options, including non-blocking connection and the - * ability to provide a stream context. - * - * @param string $hostname If OpenSSL support is - * installed, you may prefix the hostname - * with either ssl:// or tls:// to - * use an SSL or TLS client connection over TCP/IP to connect to the - * remote host. - * @param int $port The port number. This can be omitted and skipped with - * -1 for transports that do not use ports, such as - * unix://. - * @param int|null $error_code If provided, holds the system level error number that occurred in the - * system-level connect() call. - * - * If the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the - * connect() call. This is most likely due to a - * problem initializing the socket. - * @param null|string $error_message The error message as a string. - * @param float|null $timeout The connection timeout, in seconds. When NULL, the - * default_socket_timeout php.ini setting is used. - * - * If you need to set a timeout for reading/writing data over the - * socket, use stream_set_timeout, as the - * timeout parameter to - * fsockopen only applies while connecting the - * socket. - * @return resource fsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). If the call fails, it will return FALSE + * @param string $hostname + * @param int $port + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @return resource * @throws NetworkException * */ @@ -322,11 +65,7 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? /** - * gethostname gets the standard host name for - * the local machine. - * - * @return string Returns a string with the hostname on success, otherwise FALSE is - * returned. + * @return string * @throws NetworkException * */ @@ -342,12 +81,8 @@ function gethostname(): string /** - * getprotobyname returns the protocol number - * associated with the protocol protocol as per - * /etc/protocols. - * - * @param string $protocol The protocol name. - * @return int Returns the protocol number. + * @param string $protocol + * @return int * @throws NetworkException * */ @@ -363,12 +98,8 @@ function getprotobyname(string $protocol): int /** - * getprotobynumber returns the protocol name - * associated with protocol protocol as per - * /etc/protocols. - * - * @param int $protocol The protocol number. - * @return string Returns the protocol name as a string. + * @param int $protocol + * @return string * @throws NetworkException * */ @@ -384,14 +115,9 @@ function getprotobynumber(int $protocol): string /** - * getservbyport returns the Internet service - * associated with port for the specified - * protocol as per /etc/services. - * - * @param int $port The port number. - * @param string $protocol protocol is either "tcp" - * or "udp" (in lowercase). - * @return string Returns the Internet service name as a string. + * @param int $port + * @param string $protocol + * @return string * @throws NetworkException * */ @@ -407,14 +133,7 @@ function getservbyport(int $port, string $protocol): string /** - * Registers a function that will be called when PHP starts sending output. - * - * The callback is executed just after PHP prepares all - * headers to be sent, and before any other output is sent, creating a window - * to manipulate the outgoing headers before being sent. - * - * @param callable $callback Function called just before the headers are sent. It gets no parameters - * and the return value is ignored. + * @param callable $callback * @throws NetworkException * */ @@ -429,12 +148,8 @@ function header_register_callback(callable $callback): void /** - * This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * string representation. - * - * @param string $ip A 32bit IPv4, or 128bit IPv6 address. - * @return string Returns a string representation of the address. + * @param string $ip + * @return string * @throws NetworkException * */ @@ -450,15 +165,8 @@ function inet_ntop(string $ip): string /** - * This function converts a human readable IPv4 or IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * 32bit or 128bit binary structure. - * - * @param string $ip A human readable IPv4 or IPv6 address. - * @return string Returns the in_addr representation of the given - * ip, or FALSE if a syntactically invalid - * ip is given (for example, an IPv4 address - * without dots or an IPv6 address without colons). + * @param string $ip + * @return string * @throws NetworkException * */ @@ -474,12 +182,8 @@ function inet_pton(string $ip): string /** - * The function long2ip generates an Internet address - * in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer - * representation. - * - * @param int $ip A proper address representation in long integer. - * @return string Returns the Internet IP address as a string. + * @param int $ip + * @return string * @throws NetworkException * */ @@ -495,134 +199,9 @@ function long2ip(int $ip): string /** - * openlog opens a connection to the system - * logger for a program. - * - * The use of openlog is optional. It - * will automatically be called by syslog if - * necessary, in which case prefix will default - * to FALSE. - * - * @param string $prefix The string prefix is added to each message. - * @param int $flags The flags argument is used to indicate - * what logging options will be used when generating a log message. - * - * openlog Options - * - * - * - * Constant - * Description - * - * - * - * - * LOG_CONS - * - * if there is an error while sending data to the system logger, - * write directly to the system console - * - * - * - * LOG_NDELAY - * - * open the connection to the logger immediately - * - * - * - * LOG_ODELAY - * - * (default) delay opening the connection until the first - * message is logged - * - * - * - * LOG_PERROR - * print log message also to standard error - * - * - * LOG_PID - * include PID with each message - * - * - * - * - * You can use one or more of these options. When using multiple options - * you need to OR them, i.e. to open the connection - * immediately, write to the console and include the PID in each message, - * you will use: LOG_CONS | LOG_NDELAY | LOG_PID - * @param int $facility The facility argument is used to specify what - * type of program is logging the message. This allows you to specify - * (in your machine's syslog configuration) how messages coming from - * different facilities will be handled. - * - * openlog Facilities - * - * - * - * Constant - * Description - * - * - * - * - * LOG_AUTH - * - * security/authorization messages (use - * LOG_AUTHPRIV instead - * in systems where that constant is defined) - * - * - * - * LOG_AUTHPRIV - * security/authorization messages (private) - * - * - * LOG_CRON - * clock daemon (cron and at) - * - * - * LOG_DAEMON - * other system daemons - * - * - * LOG_KERN - * kernel messages - * - * - * LOG_LOCAL0 ... LOG_LOCAL7 - * reserved for local use, these are not available in Windows - * - * - * LOG_LPR - * line printer subsystem - * - * - * LOG_MAIL - * mail subsystem - * - * - * LOG_NEWS - * USENET news subsystem - * - * - * LOG_SYSLOG - * messages generated internally by syslogd - * - * - * LOG_USER - * generic user-level messages - * - * - * LOG_UUCP - * UUCP subsystem - * - * - * - * - * - * LOG_USER is the only valid log type under Windows - * operating systems + * @param string $prefix + * @param int $flags + * @param int $facility * @throws NetworkException * */ @@ -637,20 +216,12 @@ function openlog(string $prefix, int $flags, int $facility): void /** - * This function behaves exactly as fsockopen with the - * difference that the connection is not closed after the script finishes. - * It is the persistent version of fsockopen. - * * @param string $hostname * @param int $port * @param int|null $error_code * @param null|string $error_message * @param float|null $timeout - * @return resource pfsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @return resource * @throws NetworkException * */ @@ -670,64 +241,8 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, /** - * syslog generates a log message that will be - * distributed by the system logger. - * - * For information on setting up a user defined log handler, see the - * syslog.conf - * 5 Unix manual page. More - * information on the syslog facilities and option can be found in the man - * pages for syslog - * 3 on Unix machines. - * - * @param int $priority priority is a combination of the facility and - * the level. Possible values are: - * - * syslog Priorities (in descending order) - * - * - * - * Constant - * Description - * - * - * - * - * LOG_EMERG - * system is unusable - * - * - * LOG_ALERT - * action must be taken immediately - * - * - * LOG_CRIT - * critical conditions - * - * - * LOG_ERR - * error conditions - * - * - * LOG_WARNING - * warning conditions - * - * - * LOG_NOTICE - * normal, but significant, condition - * - * - * LOG_INFO - * informational message - * - * - * LOG_DEBUG - * debug-level message - * - * - * - * - * @param string $message The message to send. + * @param int $priority + * @param string $message * @throws NetworkException * */ diff --git a/generated/8.1/oci8.php b/generated/8.1/oci8.php index e46435ff..154d7d2d 100644 --- a/generated/8.1/oci8.php +++ b/generated/8.1/oci8.php @@ -5,99 +5,12 @@ use Safe\Exceptions\Oci8Exception; /** - * Binds the PHP array var to the Oracle - * placeholder param, which points to an Oracle PL/SQL - * array. Whether it will be used for input or output will be determined at - * run-time. - * - * @param resource $statement A valid OCI statement identifier. - * @param string $param The Oracle placeholder. - * @param array $var An array. - * @param int $max_array_length Sets the maximum length both for incoming and result arrays. - * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, - * oci_bind_array_by_name will find the longest - * element in the incoming array and will use it as the maximum length. - * @param int $type Should be used to set the type of PL/SQL array items. See list of - * available types below: - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * - * - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * - * - * - * SQLT_FLT - for arrays of FLOAT. - * - * - * - * - * SQLT_AFC - for arrays of CHAR. - * - * - * - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * - * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * - * SQLT_AVC - for arrays of CHARZ. - * - * - * - * - * SQLT_STR - for arrays of STRING. - * - * - * - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * - * SQLT_ODT - for arrays of DATE. - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * SQLT_FLT - for arrays of FLOAT. - * - * SQLT_AFC - for arrays of CHAR. - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * SQLT_VCS - for arrays of VARCHAR. - * - * SQLT_AVC - for arrays of CHARZ. - * - * SQLT_STR - for arrays of STRING. - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * SQLT_ODT - for arrays of DATE. + * @param resource $statement + * @param string $param + * @param array $var + * @param int $max_array_length + * @param int $max_item_length + * @param int $type * @throws Oci8Exception * */ @@ -112,198 +25,11 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max /** - * Binds a PHP variable var to the Oracle - * bind variable placeholder param. Binding - * is important for Oracle database performance and also as a way to - * avoid SQL Injection security issues. - * - * Binding allows the database to reuse the statement context and - * caches from previous executions of the statement, even if another - * user or process originally executed it. Binding reduces SQL - * Injection concerns because the data associated with a bind - * variable is never treated as part of the SQL statement. It does - * not need quoting or escaping. - * - * PHP variables that have been bound can be changed and the - * statement re-executed without needing to re-parse the statement or - * re-bind. - * - * In Oracle, bind variables are commonly divided - * into IN binds for values that are passed into - * the database, and OUT binds for values that are - * returned to PHP. A bind variable may be - * both IN and OUT. Whether a - * bind variable will be used for input or output is determined at - * run-time. - * - * You must specify max_length when using - * an OUT bind so that PHP allocates enough memory - * to hold the returned value. - * - * For IN binds it is recommended to set - * the max_length length if the statement is - * re-executed multiple times with different values for the PHP - * variable. Otherwise Oracle may truncate data to the length of the - * initial PHP variable value. If you don't know what the maximum - * length will be, then re-call oci_bind_by_name - * with the current data size prior to - * each oci_execute call. Binding an - * unnecessarily large length will have an impact on process memory - * in the database. - * - * A bind call tells Oracle which memory address to read data from. - * For IN binds that address needs to contain - * valid data when oci_execute is called. This - * means that the variable bound must remain in scope until - * execution. If it doesn't, unexpected results or errors such as - * "ORA-01460: unimplemented or unreasonable conversion requested" - * may occur. For OUT binds one symptom is no - * value being set in the PHP variable. - * - * For a statement that is repeatedly executed, binding values that - * never change may reduce the ability of the Oracle optimizer to - * choose the best statement execution plan. Long running statements - * that are rarely re-executed may not benefit from binding. However - * in both cases, binding might be safer than joining strings into a - * SQL statement, as this can be a security risk if unfiltered user - * text is concatenated. - * - * @param resource $statement A valid OCI8 statement identifier. - * @param string $param The colon-prefixed bind variable placeholder used in the - * statement. The colon is optional - * in param. Oracle does not use question - * marks for placeholders. - * @param mixed $var The PHP variable to be associated with param - * @param int $max_length Sets the maximum length for the data. If you set it to -1, this - * function will use the current length - * of var to set the maximum - * length. In this case the var must - * exist and contain data - * when oci_bind_by_name is called. - * @param int $type The datatype that Oracle will treat the data as. The - * default type used - * is SQLT_CHR. Oracle will convert the data - * between this type and the database column (or PL/SQL variable - * type), when possible. - * - * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - * need to allocate it first using the - * oci_new_descriptor function. The - * length is not used for abstract datatypes - * and should be set to -1. - * - * Possible values for type are: - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * - * - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * - * - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * - * - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * - * - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * - * - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * - * - * - * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * - * SQLT_CHR - for VARCHARs; - * - * - * - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * - * - * - * SQLT_LNG - for LONG columns; - * - * - * - * - * SQLT_LBI - for LONG RAW columns; - * - * - * - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * - * - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) - * - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * SQLT_INT or OCI_B_INT - for integers; - * - * SQLT_CHR - for VARCHARs; - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * SQLT_LNG - for LONG columns; - * - * SQLT_LBI - for LONG RAW columns; - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) + * @param resource $statement + * @param string $param + * @param mixed $var + * @param int $max_length + * @param int $type * @throws Oci8Exception * */ @@ -318,10 +44,7 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 /** - * Invalidates a cursor, freeing all associated resources and cancels the - * ability to read from it. - * - * @param resource $statement An OCI statement. + * @param resource $statement * @throws Oci8Exception * */ @@ -336,24 +59,7 @@ function oci_cancel($statement): void /** - * Commits the outstanding transaction for the - * Oracle connection. A commit ends the - * current transaction and makes permanent all changes. It releases - * all locks held. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -368,101 +74,12 @@ function oci_commit($connection): void /** - * Returns a connection identifier needed for most other OCI8 operations. - * - * For performance, most applications should use persistent connections - * with oci_pconnect instead - * of oci_connect. - * See Connection Handling for general - * information on connection management and connection pooling. - * - * From PHP 5.1.2 (PECL OCI8 1.1) oci_close can - * be used to close the connection. - * - * The second and subsequent calls to oci_connect - * with the same parameters will return the connection handle returned - * from the first call. This means that transactions in one handle are - * also in the other handles, because they use the - * same underlying database connection. If two - * handles need to be transactionally isolated from each other, use - * oci_new_connect instead. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -486,28 +103,10 @@ function oci_connect(string $username, string $password, ?string $connection_str /** - * Associates a PHP variable with a column for query fetches using oci_fetch. - * - * The oci_define_by_name call must occur before - * executing oci_execute. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param string $column The column name used in the query. - * - * Use uppercase for Oracle's default, non-case sensitive column - * names. Use the exact column name case for case-sensitive - * column names. - * @param mixed $var The PHP variable that will contain the returned column value. - * @param int $type The data type to be returned. Generally not needed. Note that - * Oracle-style data conversions are not performed. For example, - * SQLT_INT will be ignored and the returned - * data type will still be SQLT_CHR. - * - * You can optionally use oci_new_descriptor - * to allocate LOB/ROWID/BFILE descriptors. + * @param resource $statement + * @param string $column + * @param mixed $var + * @param int $type * @throws Oci8Exception * */ @@ -522,79 +121,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v /** - * Executes a statement previously returned - * from oci_parse. - * - * After execution, statements like INSERT will - * have data committed to the database by default. For statements - * like SELECT, execution performs the logic of the - * query. Query results can subsequently be fetched in PHP with - * functions like oci_fetch_array. - * - * Each parsed statement may be executed multiple times, saving the - * cost of re-parsing. This is commonly used - * for INSERT statements when data is bound - * with oci_bind_by_name. - * - * @param resource $statement A valid OCI statement identifier. - * @param int $mode An optional second parameter can be one of the following constants: - * - * Execution Modes - * - * - * - * Constant - * Description - * - * - * - * - * OCI_COMMIT_ON_SUCCESS - * Automatically commit all outstanding changes for - * this connection when the statement has succeeded. This - * is the default. - * - * - * OCI_DESCRIBE_ONLY - * Make query meta data available to functions - * like oci_field_name but do not - * create a result set. Any subsequent fetch call such - * as oci_fetch_array will - * fail. - * - * - * OCI_NO_AUTO_COMMIT - * Do not automatically commit changes. Prior to PHP - * 5.3.2 (PECL OCI8 1.4) - * use OCI_DEFAULT which is equivalent - * to OCI_NO_AUTO_COMMIT. - * - * - * - * - * - * Using OCI_NO_AUTO_COMMIT mode starts or continues a - * transaction. Transactions are automatically rolled back when - * the connection is closed, or when the script ends. Explicitly - * call oci_commit to commit a transaction, - * or oci_rollback to abort it. - * - * When inserting or updating data, using transactions is - * recommended for relational data consistency and for performance - * reasons. - * - * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and - * oci_commit - * or oci_rollback is not subsequently - * called, then OCI8 will perform a rollback at the end of the - * script even if no data was changed. To avoid an unnecessary - * rollback, many scripts do not - * use OCI_NO_AUTO_COMMIT mode for queries or - * PL/SQL. Be careful to ensure the appropriate transactional - * consistency for the application when - * using oci_execute with different modes in - * the same script. + * @param resource $statement + * @param int $mode * @throws Oci8Exception * */ @@ -609,11 +137,9 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** - * Returns the name of the column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return string Returns the name as a string + * @param resource $statement + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -629,15 +155,9 @@ function oci_field_name($statement, $column): string /** - * Returns precision of the column. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the precision as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -653,15 +173,9 @@ function oci_field_precision($statement, $column): int /** - * Returns the scale of the column with column index. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the scale as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -677,11 +191,9 @@ function oci_field_scale($statement, $column): int /** - * Returns the size of a column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the size of a column in bytes + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -697,13 +209,9 @@ function oci_field_size($statement, $column): int /** - * Returns Oracle's raw "SQLT" data type of the column. - * - * If you want a field's type name, then use oci_field_type instead. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns Oracle's raw data type as a number + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -719,11 +227,9 @@ function oci_field_type_raw($statement, $column): int /** - * Returns a field's data type name. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return mixed Returns the field data type as a string or an integer + * @param resource $statement + * @param mixed $column + * @return mixed * @throws Oci8Exception * */ @@ -739,9 +245,7 @@ function oci_field_type($statement, $column) /** - * Frees a descriptor allocated by oci_new_descriptor. - * - * @param \OCILob $lob Descriptor allocated by oci_new_descriptor. + * @param \OCILob $lob * @throws Oci8Exception * */ @@ -756,11 +260,7 @@ function oci_free_descriptor(\OCILob $lob): void /** - * Frees resources associated with Oracle's cursor or statement, which was - * received from as a result of oci_parse or obtained - * from Oracle. - * - * @param resource $statement A valid OCI statement identifier. + * @param resource $statement * @throws Oci8Exception * */ @@ -775,14 +275,10 @@ function oci_free_statement($statement): void /** - * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param string $type_name Should be a valid named type (uppercase). - * @param null|string $schema Should point to the scheme, where the named type was created. The name - * of the current user is used when NULL is passed. - * @return \OCI-Collection Returns a new OCICollection object. + * @param resource $connection + * @param string $type_name + * @param null|string $schema + * @return \OCI-Collection * @throws Oci8Exception * */ @@ -802,90 +298,12 @@ function oci_new_collection($connection, string $type_name, ?string $schema = nu /** - * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and - * oci_pconnect, oci_new_connect - * does not cache connections and will always return a brand-new freshly - * opened connection handle. This is useful if your application needs - * transactional isolation between two sets of queries. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -909,11 +327,8 @@ function oci_new_connect(string $username, string $password, ?string $connection /** - * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @return resource Returns a new statement handle. + * @param resource $connection + * @return resource * @throws Oci8Exception * */ @@ -929,14 +344,9 @@ function oci_new_cursor($connection) /** - * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: - * OCI_DTYPE_FILE, OCI_DTYPE_LOB and - * OCI_DTYPE_ROWID. - * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success. + * @param resource $connection + * @param int $type + * @return \OCI-Lob|false * @throws Oci8Exception * */ @@ -952,10 +362,8 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** - * Gets the number of rows affected during statement execution. - * - * @param resource $statement A valid OCI statement identifier. - * @return 0|positive-int Returns the number of rows affected as an integer + * @param resource $statement + * @return 0|positive-int * @throws Oci8Exception * */ @@ -971,24 +379,9 @@ function oci_num_rows($statement): int /** - * Prepares sql using - * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, - * oci_execute and other functions. - * - * Statement identifiers can be freed - * with oci_free_statement or by setting the - * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. - * @param string $sql The SQL or PL/SQL statement. - * - * SQL statements should not end with a - * semi-colon (";"). PL/SQL - * statements should end with a semi-colon - * (";"). - * @return resource Returns a statement handle on success. + * @param resource $connection + * @param string $sql + * @return resource * @throws Oci8Exception * */ @@ -1004,91 +397,12 @@ function oci_parse($connection, string $sql) /** - * Creates a persistent connection to an Oracle server and logs on. - * - * Persistent connections are cached and re-used between requests, resulting in - * reduced overhead on each page load; a typical PHP application will have a - * single persistent connection open against an Oracle server per Apache child - * process (or PHP FPM process). See the OCI8 - * Connection Handling and Connection Pooling section for more - * information. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -1112,30 +426,8 @@ function oci_pconnect(string $username, string $password, ?string $connection_st /** - * Registers a user-defined callback function to connection. - * If connection fails due to instance or network failure, - * the registered callback function will be invoked for several times during - * failover. See OCI8 Transparent Application Failover - * (TAF) Support for information. - * - * When oci_register_taf_callback is called multiple times, - * each registration overwrites the previous one. - * - * Use oci_unregister_taf_callback to explicitly unregister a - * user-defined callback. - * - * TAF callback registration will NOT be saved across - * persistent connections, therefore the callback needs to be re-registered for - * a new persistent connection. - * - * @param resource $connection An Oracle connection identifier. - * @param callable $callback A user-defined callback to register for Oracle TAF. It can be a - * string of the function name or a Closure (anonymous function). - * - * The interface of a TAF user-defined callback function is as follows: - * - * See the parameter description and an example on - * OCI8 Transparent Application Failover (TAF) Support page. + * @param resource $connection + * @param callable $callback * @throws Oci8Exception * */ @@ -1150,20 +442,9 @@ function oci_register_taf_callback($connection, callable $callback): void /** - * Returns the data from column in the current row, - * fetched by oci_fetch. - * - * For details on the data type mapping performed by - * the OCI8 extension, see the datatypes - * supported by the driver - * * @param resource $statement - * @param mixed $column Can be either use the column number (1-based) or the column name. - * The case of the column name must be the case that Oracle meta data - * describes the column as, which is uppercase for columns created - * case insensitively. - * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and - * FILEs). + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -1179,25 +460,7 @@ function oci_result($statement, $column): string /** - * Reverts all uncommitted changes for the Oracle - * connection and ends the transaction. It - * releases all locks held. All Oracle SAVEPOINTS - * are erased. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect - * or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -1212,10 +475,8 @@ function oci_rollback($connection): void /** - * Returns a string with the Oracle Database version and available options - * * @param resource $connection - * @return string Returns the version information as a string. + * @return string * @throws Oci8Exception * */ @@ -1231,23 +492,8 @@ function oci_server_version($connection): string /** - * Sets the action name for Oracle tracing. - * - * The action name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The action name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string up to 32 bytes long. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1262,34 +508,8 @@ function oci_set_action($connection, string $action): void /** - * Sets a timeout limiting the maxium time a database round-trip using this connection may take. - * - * Each OCI8 operation may make zero or more calls to Oracle's client - * library. These internal calls may then may make zero or more - * round-trips to Oracle Database. If any one of those round-trips - * takes more than time_out milliseconds, then the - * operation is cancelled and an error is returned to the application. - * - * The time_out value applies to each round-trip - * individually, not to the sum of all round-trips. Time spent - * processing in PHP OCI8 before or after the completion of each - * round-trip is not counted. - * - * When a call is interrupted, Oracle will attempt to clean up the - * connection for reuse. This operation is allowed to run for - * another time_out period. Depending on the - * outcome of the cleanup, the connection may or may not be reusable. - * - * When persistent connections are used, the timeout value will be - * retained across PHP requests. - * - * The oci_set_call_timeout function is available - * when OCI8 uses Oracle 18 (or later) Client libraries. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @param resource $connection + * @param int $timeout * @throws Oci8Exception * */ @@ -1304,27 +524,8 @@ function oci_set_call_timeout($connection, int $timeout): void /** - * Sets the client identifier used by various database components to - * identify lightweight application users who authenticate as the same - * database user. - * - * The client identifier is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The identifier can subsequently be queried, for example - * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') - * FROM DUAL. Database administration views such - * as V$SESSION will also contain the value. It - * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE - * for tracing and can also be used for auditing. - * - * The value may be retained across page requests that use the same persistent connection. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_id User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_id * @throws Oci8Exception * */ @@ -1339,21 +540,8 @@ function oci_set_client_identifier($connection, string $client_id): void /** - * Sets the client information for Oracle tracing. - * - * The client information is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The client information can subsequently be queried from database - * administration views such as V$SESSION. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_info User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_info * @throws Oci8Exception * */ @@ -1368,22 +556,8 @@ function oci_set_client_info($connection, string $client_info): void /** - * Sets the DBOP for Oracle tracing. - * - * The database operation name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when a SQL - * statement is executed. - * - * The database operation can subsequently be queried from database administration - * views such as V$SQL_MONITOR. - * - * The oci_set_db_operation function is available - * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1398,26 +572,7 @@ function oci_set_db_operation($connection, string $action): void /** - * Sets the database "edition" of objects to be used by a subsequent - * connections. - * - * Oracle Editions allow concurrent versions of applications to run - * using the same schema and object names. This is useful for - * upgrading live systems. - * - * Call oci_set_edition before calling - * oci_connect, oci_pconnect - * or oci_new_connect. - * - * If an edition is set that is not valid in the database, connection - * will fail even if oci_set_edition returns success. - * - * When using persistent connections, if a connection with the - * requested edition setting already exists, it is reused. Otherwise, - * a different persistent connection is created - * - * @param string $edition Oracle Database edition name previously created with the SQL - * "CREATE EDITION" command. + * @param string $edition * @throws Oci8Exception * */ @@ -1432,23 +587,8 @@ function oci_set_edition(string $edition): void /** - * Sets the module name for Oracle tracing. - * - * The module name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $name User chosen string up to 48 bytes long. + * @param resource $connection + * @param string $name * @throws Oci8Exception * */ @@ -1463,56 +603,8 @@ function oci_set_module_name($connection, string $name): void /** - * Sets the number of rows to be buffered by the Oracle Client - * libraries after a successful query call - * to oci_execute and for each subsequent - * internal fetch request to the database. For queries returning a - * large number of rows, performance can be significantly improved by - * increasing the prefetch count above the - * default oci8.default_prefetch - * value. - * - * Prefetching is Oracle's efficient way of returning more than one - * data row from the database in each network request. This can - * result in better network and CPU utilization. The buffering of - * rows is internal to OCI8 and the behavior of OCI8 fetching - * functions is unchanged regardless of the prefetch count. For - * example, oci_fetch_row will always return one - * row. The prefetch buffer is per-statement and is not used by - * re-executed statements or by other connections. - * - * Call oci_set_prefetch before - * calling oci_execute. - * - * A tuning goal is to set the prefetch value to a reasonable size for - * the network and database to handle. For queries returning a very - * large number of rows, overall system efficiency might be better if - * rows are retrieved from the database in several chunks (i.e set the - * prefetch value smaller than the number of rows). This allows the - * database to handle other users' statements while the PHP script is - * processing the current set of rows. - * - * Query prefetching was introduced in Oracle 8i. REF CURSOR - * prefetching was introduced in Oracle 11gR2 and occurs when PHP is - * linked with Oracle 11gR2 (or later) Client libraries. - * Nested cursor prefetching was - * introduced in Oracle 11gR2 and requires both the Oracle Client - * libraries and the database to be version 11gR2 or greater. - * - * Prefetching is not supported when queries contain LONG or LOB - * columns. The prefetch value is ignored and single-row fetches will - * be used in all the situations when prefetching is not supported. - * - * When using Oracle Database 12c, the prefetch - * value set by PHP can be overridden by Oracle's - * client oraaccess.xml configuration file. Refer - * to Oracle documentation for more detail. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $rows The number of rows to be prefetched, >= 0 + * @param resource $statement + * @param int $rows * @throws Oci8Exception * */ @@ -1527,64 +619,8 @@ function oci_set_prefetch($statement, int $rows): void /** - * Returns a keyword identifying the type of the - * OCI8 statement. - * - * @param resource $statement A valid OCI8 statement identifier from oci_parse. - * @return string Returns the type of statement as one of the - * following strings. - * - * Statement type - * - * - * - * Return String - * Notes - * - * - * - * - * ALTER - * - * - * - * BEGIN - * - * - * - * CALL - * Introduced in PHP 5.2.1 (PECL OCI8 1.2.3) - * - * - * CREATE - * - * - * - * DECLARE - * - * - * - * DELETE - * - * - * - * DROP - * - * - * - * INSERT - * - * - * - * SELECT - * - * - * - * UPDATE - * - * - * - * UNKNOW. + * @param resource $statement + * @return string * @throws Oci8Exception * */ @@ -1600,12 +636,7 @@ function oci_statement_type($statement): string /** - * Unregister the user-defined callback function registered to connection - * by oci_register_taf_callback. See - * OCI8 Transparent Application Failover (TAF) Support - * for information. - * - * @param resource $connection An Oracle connection identifier. + * @param resource $connection * @throws Oci8Exception * */ diff --git a/generated/8.1/opcache.php b/generated/8.1/opcache.php index 88d1c435..df3d1999 100644 --- a/generated/8.1/opcache.php +++ b/generated/8.1/opcache.php @@ -5,11 +5,7 @@ use Safe\Exceptions\OpcacheException; /** - * This function compiles a PHP script and adds it to the opcode cache without - * executing it. This can be used to prime the cache after a Web server - * restart by pre-caching files that will be included in later requests. - * - * @param string $filename The path to the PHP script to be compiled. + * @param string $filename * @throws OpcacheException * */ @@ -24,11 +20,8 @@ function opcache_compile_file(string $filename): void /** - * This function returns state information about the in-memory cache instance. It will not return any - * information about the file cache. - * - * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @param bool $include_scripts + * @return array * @throws OpcacheException * */ diff --git a/generated/8.1/openssl.php b/generated/8.1/openssl.php index ff29aa80..32693c68 100644 --- a/generated/8.1/openssl.php +++ b/generated/8.1/openssl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\OpensslException; /** - * Gets the cipher initialization vector (iv) length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -24,14 +22,11 @@ function openssl_cipher_iv_length(string $cipher_algo): int /** - * Decrypts a CMS message. - * - * @param string $input_filename The name of a file containing encrypted content. - * @param string $output_filename The name of the file to deposit the decrypted content. - * @param \OpenSSLCertificate|string $certificate The name of the file containing a certificate of the recipient. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key The name of the file containing a PKCS#8 key. - * @param int $encoding The encoding of the input file. One of OPENSSL_CMS_SMIME, - * OPENSLL_CMS_DER or OPENSSL_CMS_PEM. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key + * @param int $encoding * @throws OpensslException * */ @@ -52,17 +47,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c /** - * This function encrypts content to one or more recipients, - * based on the certificates that are passed to it. - * - * @param string $input_filename The file to be encrypted. - * @param string $output_filename The output file. - * @param \OpenSSLCertificate|array|string $certificate Recipients to encrypt to. - * @param array|null $headers Headers to include when S/MIME is used. - * @param int $flags Flags to be passed to CMS_sign. - * @param int $encoding An encoding to output. One of OPENSSL_CMS_SMIME, - * OPENSLL_CMS_DER or OPENSSL_CMS_PEM. - * @param int $cipher_algo A cypher to use. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|array|string $certificate + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param int $cipher_algo * @throws OpensslException * */ @@ -77,8 +68,6 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c /** - * Performs the exact analog to openssl_pkcs7_read. - * * @param string $input_filename * @param array $certificates * @throws OpensslException @@ -95,19 +84,14 @@ function openssl_cms_read(string $input_filename, array &$certificates): void /** - * This function signs a file with an X.509 certificate and key. - * - * @param string $input_filename The name of the file to be signed. - * @param string $output_filename The name of the file to deposit the results. - * @param \OpenSSLCertificate|string $certificate The signing certificate. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The key associated with certificate. - * See Key/Certificate parameters for a list of valid values. - * @param array|null $headers An array of headers to be included in S/MIME output. - * @param int $flags Flags to be passed to cms_sign. - * @param int $encoding The encoding of the output file. One of OPENSSL_CMS_SMIME, - * OPENSLL_CMS_DER or OPENSSL_CMS_PEM. - * @param null|string $untrusted_certificates_filename Intermediate certificates to be included in the signature. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -126,18 +110,15 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert /** - * This function verifies a CMS signature, either attached or detached, with the specified encoding. - * - * @param string $input_filename The input file. - * @param int $flags Flags to pass to cms_verify. - * @param null|string $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. - * @param null|string $untrusted_certificates_filename A file containing additional intermediate certificates. - * @param null|string $content A file pointing to the content when signatures are detached. + * @param string $input_filename + * @param int $flags + * @param null|string $certificates + * @param array $ca_info + * @param null|string $untrusted_certificates_filename + * @param null|string $content * @param null|string $pk7 - * @param null|string $sigfile A file to save the signature to. - * @param int $encoding The encoding of the input file. One of OPENSSL_CMS_SMIME, - * OPENSLL_CMS_DER or OPENSSL_CMS_PEM. + * @param null|string $sigfile + * @param int $encoding * @throws OpensslException * */ @@ -168,17 +149,9 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $cer /** - * openssl_csr_export_to_file takes the Certificate - * Signing Request represented by csr and saves it - * in PEM format into the file named by output_filename. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -193,18 +166,9 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text /** - * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in - * PEM format in output, which is passed by - * reference. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param null|string $output on success, this string will contain the PEM encoded CSR + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -219,12 +183,9 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void /** - * openssl_csr_get_public_key extracts the public key - * from csr and prepares it for use by other functions. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names This parameter is ignored - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -240,16 +201,9 @@ function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsy /** - * openssl_csr_get_subject returns subject - * distinguished name information encoded in the csr - * including fields commonName (CN), organizationName (O), countryName (C) etc. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names shortnames controls how the data is indexed in the - * array - if shortnames is TRUE (the default) then - * fields will be indexed with the short name form, otherwise, the long name - * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return array * @throws OpensslException * */ @@ -265,112 +219,11 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array /** - * openssl_csr_new generates a new CSR (Certificate Signing Request) - * based on the information provided by distinguished_names. - * - * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param array|null $options By default, the information in your system openssl.conf - * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key of - * options. You can also specify an alternative - * openssl configuration file by setting the value of the - * config key to the path of the file you want to use. - * The following keys, if present in options - * behave as their equivalents in the openssl.conf, as - * listed in the table below. - * - * Configuration overrides - * - * - * - * options key - * type - * openssl.conf equivalent - * description - * - * - * - * - * digest_alg - * string - * default_md - * Digest method or signature hash, usually one of openssl_get_md_methods - * - * - * x509_extensions - * string - * x509_extensions - * Selects which extensions should be used when creating an x509 - * certificate - * - * - * req_extensions - * string - * req_extensions - * Selects which extensions should be used when creating a CSR - * - * - * private_key_bits - * int - * default_bits - * Specifies how many bits should be used to generate a private - * key - * - * - * private_key_type - * int - * none - * Specifies the type of private key to create. This can be one - * of OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_RSA or - * OPENSSL_KEYTYPE_EC. - * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * - * encrypt_key - * bool - * encrypt_key - * Should an exported key (with passphrase) be encrypted? - * - * - * encrypt_key_cipher - * int - * none - * - * One of cipher constants. - * - * - * - * curve_name - * string - * none - * - * One of openssl_get_curve_names. - * - * - * - * config - * string - * N/A - * - * Path to your own alternative openssl.conf file. - * - * - * - * - * - * @param array|null $extra_attributes extra_attributes is used to specify additional - * configuration options for the CSR. Both distinguished_names and - * extra_attributes are associative arrays whose keys are - * converted to OIDs and applied to the relevant part of the request. - * @return \OpenSSLCertificateSigningRequest Returns the CSR. + * @param array $distinguished_names + * @param \OpenSSLAsymmetricKey $private_key + * @param array|null $options + * @param array|null $extra_attributes + * @return \OpenSSLCertificateSigningRequest * @throws OpensslException * */ @@ -392,25 +245,13 @@ function openssl_csr_new(array $distinguished_names, \OpenSSLAsymmetricKey &$pri /** - * openssl_csr_sign generates an x509 certificate from the given CSR. - * - * @param \OpenSSLCertificateSigningRequest|string $csr A CSR previously generated by openssl_csr_new. - * It can also be the path to a PEM encoded CSR when specified as - * file://path/to/csr or an exported string generated - * by openssl_csr_export. - * @param \OpenSSLCertificate|null|string $ca_certificate The generated certificate will be signed by ca_certificate. - * If ca_certificate is NULL, the generated certificate - * will be a self-signed certificate. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key that corresponds to - * ca_certificate. - * @param int $days days specifies the length of time for which the - * generated certificate will be valid, in days. - * @param array|null $options You can finetune the CSR signing by options. - * See openssl_csr_new for more information about - * options. - * @param int $serial An optional the serial number of issued certificate. If not specified - * it will default to 0. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param \OpenSSLCertificate|null|string $ca_certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $days + * @param array|null $options + * @param int $serial + * @return \OpenSSLCertificate * @throws OpensslException * */ @@ -432,19 +273,14 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array /** - * Takes a raw or base64 encoded string and decrypts it using a given method and key. - * - * @param string $data The encrypted message to be decrypted. - * @param string $cipher_algo The cipher method. For a list of available cipher methods, use - * openssl_get_cipher_methods. - * @param string $passphrase The key. - * @param int $options options can be one of - * OPENSSL_RAW_DATA, - * OPENSSL_ZERO_PADDING. - * @param string $iv A non-NULL Initialization Vector. - * @param string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. - * @param string $aad Additional authentication data. - * @return string The decrypted string on success. + * @param string $data + * @param string $cipher_algo + * @param string $passphrase + * @param int $options + * @param string $iv + * @param string $tag + * @param string $aad + * @return string * @throws OpensslException * */ @@ -460,13 +296,9 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, /** - * The shared secret returned by openssl_dh_compute_key is - * often used as an encryption key to secretly communicate with a remote party. - * This is known as the Diffie-Hellman key exchange. - * - * @param string $public_key DH Public key of the remote party. - * @param \OpenSSLAsymmetricKey $private_key A local DH private key, corresponding to the public key to be shared with the remote party. - * @return string Returns shared secret on success. + * @param string $public_key + * @param \OpenSSLAsymmetricKey $private_key + * @return string * @throws OpensslException * */ @@ -482,14 +314,10 @@ function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $priva /** - * Computes a digest hash value for the given data using a given method, - * and returns a raw or binhex encoded string. - * - * @param string $data The data. - * @param string $digest_algo The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. - * @param bool $binary Setting to TRUE will return as raw output data, otherwise the return - * value is binhex encoded. - * @return string Returns the digested hash value on success. + * @param string $data + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -505,53 +333,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) /** - * Gets the list of available curve names for use in Elliptic curve - * cryptography (ECC) for public/private key operations. The two most widely - * standardized/supported curves are prime256v1 - * (NIST P-256) and secp384r1 (NIST P-384). - * - * Approximate Equivalancies of AES, RSA, DSA and ECC Keysizes - * - * - * - * AES Symmetric Keysize (Bits) - * RSA and DSA Keysize (Bits) - * ECC Keysize (Bits) - * - * - * - * - * 80 - * 1024 - * 160 - * - * - * 112 - * 2048 - * 224 - * - * - * 128 - * 3072 - * 256 - * - * - * 192 - * 7680 - * 384 - * - * - * 256 - * 15360 - * 512 - * - * - * - * - * NIST - * recommends using ECC curves with at least 256 bits. - * - * @return list An array of available curve names. + * @return list * @throws OpensslException * */ @@ -567,28 +349,12 @@ function openssl_get_curve_names(): array /** - * openssl_open opens (decrypts) - * data using the private key associated with - * the key identifier private_key and the envelope key - * encrypted_key, and fills - * output with the decrypted data. - * The envelope key is generated when the - * data are sealed and can only be used by one specific private key. See - * openssl_seal for more information. - * * @param string $data - * @param null|string $output If the call is successful the opened data is returned in this - * parameter. + * @param null|string $output * @param string $encrypted_key * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. + * @param string $cipher_algo + * @param null|string $iv * @throws OpensslException * */ @@ -607,16 +373,12 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr /** - * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), - * a key derivation function defined in PKCS5 v2. - * - * @param string $password Password from which the derived key is generated. - * @param string $salt PBKDF2 recommends a crytographic salt of at least 64 bits (8 bytes). - * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. NIST - * recommends at least 10,000. - * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1. - * @return string Returns raw binary string. + * @param string $password + * @param string $salt + * @param int $key_length + * @param int $iterations + * @param string $digest_algo + * @return string * @throws OpensslException * */ @@ -632,36 +394,11 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it /** - * openssl_pkcs12_export_to_file stores - * certificate into a file named by - * output_filename in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -676,36 +413,11 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p /** - * openssl_pkcs12_export stores - * certificate into a string named by - * output in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PKCS#12. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -720,13 +432,9 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str /** - * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by - * pkcs12 into a array named - * certificates. - * - * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. + * @param string $pkcs12 + * @param array|null $certificates + * @param string $passphrase * @throws OpensslException * */ @@ -741,14 +449,8 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass /** - * Decrypts the S/MIME encrypted message contained in the file specified by - * input_filename using the certificate and its - * associated private key specified by certificate and - * private_key. - * * @param string $input_filename - * @param string $output_filename The decrypted message is written to the file specified by - * output_filename. + * @param string $output_filename * @param \OpenSSLCertificate|string $certificate * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key * @throws OpensslException @@ -769,24 +471,12 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, /** - * openssl_pkcs7_encrypt takes the contents of the - * file named input_filename and encrypts them using an RC2 - * 40-bit cipher so that they can only be read by the intended recipients - * specified by certificate. - * * @param string $input_filename * @param string $output_filename - * @param \OpenSSLCertificate|array|string $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been encrypted. - * - * headers can be either an associative array - * keyed by header name, or an indexed array, where each element contains - * a single header line. - * @param int $flags flags can be used to specify options that affect - * the encoding process - see PKCS7 - * constants. - * @param int $cipher_algo One of cipher constants. + * @param \OpenSSLCertificate|array|string $certificate + * @param array $headers + * @param int $flags + * @param int $cipher_algo * @throws OpensslException * */ @@ -801,10 +491,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, /** - * - * - * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param string $data + * @param array|null $certificates * @throws OpensslException * */ @@ -819,26 +507,13 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void /** - * openssl_pkcs7_sign takes the contents of the file - * named input_filename and signs them using the - * certificate and its matching private key specified by - * certificate and private_key - * parameters. - * - * @param string $input_filename The input file you are intending to digitally sign. - * @param string $output_filename The file which the digital signature will be written to. - * @param \OpenSSLCertificate|string $certificate The X.509 certificate used to digitally sign input_filename. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key corresponding to certificate. - * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been signed (see - * openssl_pkcs7_encrypt for more information about - * the format of this parameter). - * @param int $flags flags can be used to alter the output - see PKCS7 constants. - * @param null|string $untrusted_certificates_filename untrusted_certificates_filename specifies the name of a file containing - * a bunch of extra certificates to include in the signature which can for - * example be used to help the recipient to verify the certificate that you used. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array $headers + * @param int $flags + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -857,15 +532,10 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce /** - * openssl_pkey_derive takes a set of a public_key - * and private_key and derives a shared secret, for either DH or EC keys. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key is the public key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param int $key_length If not zero, will set the desired length of the derived secret. - * @return string The derived secret on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $key_length + * @return string * @throws OpensslException * */ @@ -881,18 +551,10 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** - * openssl_pkey_export_to_file saves an ascii-armoured - * (PEM encoded) rendition of key into the file named - * by output_filename. - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key - * @param string $output_filename Path to the output file. - * @param null|string $passphrase The key can be optionally protected by a - * passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param string $output_filename + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -913,17 +575,10 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas /** - * openssl_pkey_export exports - * key as a PEM encoded string and stores it into - * output (which is passed by reference). - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key * @param null|string $output - * @param null|string $passphrase The key is optionally protected by passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -944,20 +599,8 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, /** - * This function returns the key details (bits, key, type). - * - * @param \OpenSSLAsymmetricKey $key Resource holding the key. - * @return array Returns an array with the key details in success or FALSE in failure. - * Returned array has indexes bits (number of bits), - * key (string representation of the public key) and - * type (type of the key which is one of - * OPENSSL_KEYTYPE_RSA, - * OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_EC or -1 meaning unknown). - * - * Depending on the key type used, additional details may be returned. Note that - * some elements may not always be available. + * @param \OpenSSLAsymmetricKey $key + * @return array * @throws OpensslException * */ @@ -973,21 +616,9 @@ function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array /** - * openssl_pkey_get_private parses - * private_key and prepares it for use by other functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key can be one of the following: - * - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/private key (it may contain both). - * - * - * A PEM formatted private key. - * - * @param null|string $passphrase The optional parameter passphrase must be used - * if the specified key is encrypted (protected by a passphrase). - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param null|string $passphrase + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1007,21 +638,8 @@ function openssl_pkey_get_private($private_key, ?string $passphrase = null): \Op /** - * openssl_pkey_get_public extracts the public key from - * public_key and prepares it for use by other - * functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key can be one of the following: - * - * an OpenSSLAsymmetricKey instance - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/public key (it may contain both). - * - * - * A PEM formatted public key. - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1037,15 +655,8 @@ function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey /** - * openssl_pkey_new generates a new private - * key. - * How to obtain the public component of the key is shown in an example below. - * - * @param array|null $options You can finetune the key generation (such as specifying the number of - * bits) using options. See - * openssl_csr_new for more information about - * options. - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance for the pkey on success. + * @param array|null $options + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1065,22 +676,10 @@ function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey /** - * openssl_private_decrypt decrypts - * data that was previously encrypted via - * openssl_public_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1095,20 +694,10 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat /** - * openssl_private_encrypt encrypts data - * with private private_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_public_decrypt. - * - * This function can be used e.g. to sign data (or its hash) to prove that it - * is not written by someone else. - * * @param string $data * @param null|string $encrypted_data * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param int $padding * @throws OpensslException * */ @@ -1123,21 +712,10 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat /** - * openssl_public_decrypt decrypts - * data that was previous encrypted via - * openssl_private_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to check if the message was written by the - * owner of the private key. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1152,23 +730,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ /** - * openssl_public_encrypt encrypts data - * with public public_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_private_decrypt. - * - * This function can be used e.g. to encrypt message which can be then read - * only by owner of the private key. It can be also used to store secure data - * in database. - * * @param string $data - * @param null|string $encrypted_data This will hold the result of the encryption. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key The public key. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param null|string $encrypted_data + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1183,19 +748,9 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ /** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes on success. + * @param int $length + * @param bool|null $strong_result + * @return string * @throws OpensslException * */ @@ -1211,32 +766,13 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): /** - * openssl_seal seals (encrypts) - * data by using the given cipher_algo with a randomly generated - * secret key. The key is encrypted with each of the public keys - * associated with the identifiers in public_key - * and each encrypted key is returned - * in encrypted_keys. This means that one can send - * sealed data to multiple recipients (provided one has obtained their - * public keys). Each recipient must receive both the sealed data and - * the envelope key that was encrypted with the recipient's public key. - * - * @param string $data The data to seal. - * @param null|string $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. - * @return int Returns the length of the sealed data on success. - * If successful the sealed data is returned in - * sealed_data, and the envelope keys in - * encrypted_keys. + * @param string $data + * @param null|string $sealed_data + * @param array|null $encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param null|string $iv + * @return int * @throws OpensslException * */ @@ -1252,21 +788,10 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke /** - * openssl_sign computes a signature for the - * specified data by generating a cryptographic - * digital signature using the private key associated with - * private_key. Note that the data itself is - * not encrypted. - * - * @param string $data The string of data you wish to sign - * @param null|string $signature If the call was successful the signature is returned in - * signature. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey - * - * string - a PEM formatted key - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @param string $data + * @param null|string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int|string $algorithm * @throws OpensslException * */ @@ -1281,10 +806,8 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith /** - * Exports challenge from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated challenge string. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1300,10 +823,8 @@ function openssl_spki_export_challenge(string $spki): ?string /** - * Exports PEM formatted public key from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated PEM formatted public key. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1319,16 +840,10 @@ function openssl_spki_export(string $spki): ?string /** - * Generates a signed public key and challenge using specified hashing algorithm - * - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param string $challenge The challenge associated to associate with the SPKAC - * @param int $digest_algo The digest algorithm. See openssl_get_md_method(). - * @return null|string Returns a signed public key and challenge string. + * @param \OpenSSLAsymmetricKey $private_key + * @param string $challenge + * @param int $digest_algo + * @return null|string * @throws OpensslException * */ @@ -1344,9 +859,7 @@ function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, /** - * Validates the supplied signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge + * @param string $spki * @throws OpensslException * */ @@ -1361,23 +874,11 @@ function openssl_spki_verify(string $spki): void /** - * openssl_verify verifies that the - * signature is correct for the specified - * data using the public key associated with - * public_key. This must be the public key - * corresponding to the private key used for signing. - * - * @param string $data The string of data used to generate the signature previously - * @param string $signature A raw binary string, generated by openssl_sign or similar means - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key OpenSSLAsymmetricKey - a key, returned by openssl_get_publickey - * - * string - a PEM formatted key, example, "-----BEGIN PUBLIC KEY----- - * MIIBCgK..." - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". - * @return -1|0|1 Returns 1 if the signature is correct, 0 if it is incorrect, and - * -1. + * @param string $data + * @param string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int|string $algorithm + * @return -1|0|1 * @throws OpensslException * */ @@ -1393,63 +894,11 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm /** - * openssl_x509_checkpurpose examines a certificate to - * see if it can be used for the specified purpose. - * - * @param \OpenSSLCertificate|string $certificate The examined certificate. + * @param \OpenSSLCertificate|string $certificate * @param int $purpose - * openssl_x509_checkpurpose purposes - * - * - * - * Constant - * Description - * - * - * - * - * X509_PURPOSE_SSL_CLIENT - * Can the certificate be used for the client side of an SSL - * connection? - * - * - * X509_PURPOSE_SSL_SERVER - * Can the certificate be used for the server side of an SSL - * connection? - * - * - * X509_PURPOSE_NS_SSL_SERVER - * Can the cert be used for Netscape SSL server? - * - * - * X509_PURPOSE_SMIME_SIGN - * Can the cert be used to sign S/MIME email? - * - * - * X509_PURPOSE_SMIME_ENCRYPT - * Can the cert be used to encrypt S/MIME email? - * - * - * X509_PURPOSE_CRL_SIGN - * Can the cert be used to sign a certificate revocation list - * (CRL)? - * - * - * X509_PURPOSE_ANY - * Can the cert be used for Any/All purposes? - * - * - * - * - * These options are not bitfields - you may specify one only! - * @param array $ca_info ca_info should be an array of trusted CA files/dirs - * as described in Certificate - * Verification. - * @param null|string $untrusted_certificates_file If specified, this should be the name of a PEM encoded file holding - * certificates that can be used to help verify the certificate, although - * no trust is placed in the certificates that come from that file. - * @return bool|int Returns TRUE if the certificate can be used for the intended purpose, - * FALSE if it cannot. + * @param array $ca_info + * @param null|string $untrusted_certificates_file + * @return bool|int * @throws OpensslException * */ @@ -1469,17 +918,9 @@ function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = /** - * openssl_x509_export_to_file stores - * certificate into a file named by - * output_filename in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1494,17 +935,9 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool /** - * openssl_x509_export stores - * certificate into a string named by - * output in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PEM. + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1519,15 +952,10 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru /** - * openssl_x509_fingerprint returns the digest of - * certificate as a string. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $digest_algo The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. - * @param bool $binary When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless binary is set to TRUE in which case the raw binary representation of the message digest is returned. - * - * Returns FALSE on failure. + * @param \OpenSSLCertificate|string $certificate + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -1543,12 +971,8 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo /** - * openssl_x509_read parses the certificate supplied by - * certificate and returns an OpenSSLCertificate object for - * it. - * - * @param \OpenSSLCertificate|string $certificate X509 certificate. See Key/Certificate parameters for a list of valid values. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificate|string $certificate + * @return \OpenSSLCertificate * @throws OpensslException * */ diff --git a/generated/8.1/outcontrol.php b/generated/8.1/outcontrol.php index 2e094bc8..85c33892 100644 --- a/generated/8.1/outcontrol.php +++ b/generated/8.1/outcontrol.php @@ -5,15 +5,6 @@ use Safe\Exceptions\OutcontrolException; /** - * This function discards the contents of the output buffer. - * - * This function does not destroy the output buffer like - * ob_end_clean does. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * flag. Otherwise ob_clean will not work. - * * @throws OutcontrolException * */ @@ -28,17 +19,6 @@ function ob_clean(): void /** - * This function discards the contents of the topmost output buffer and turns - * off this output buffering. If you want to further process the buffer's - * contents you have to call ob_get_contents before - * ob_end_clean as the buffer contents are discarded - * when ob_end_clean is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_clean will not work. - * * @throws OutcontrolException * */ @@ -53,18 +33,6 @@ function ob_end_clean(): void /** - * This function will send the contents of the topmost output buffer (if - * any) and turn this output buffer off. If you want to further - * process the buffer's contents you have to call - * ob_get_contents before - * ob_end_flush as the buffer contents are - * discarded after ob_end_flush is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_flush will not work. - * * @throws OutcontrolException * */ @@ -79,15 +47,6 @@ function ob_end_flush(): void /** - * This function will send the contents of the output buffer (if any). If you - * want to further process the buffer's contents you have to call - * ob_get_contents before ob_flush - * as the buffer contents are discarded after ob_flush - * is called. - * - * This function does not destroy the output buffer like - * ob_end_flush does. - * * @throws OutcontrolException * */ @@ -102,19 +61,7 @@ function ob_flush(): void /** - * Gets the current buffer contents and delete current output buffer. - * - * ob_get_clean essentially executes both - * ob_get_contents and - * ob_end_clean. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_get_clean will not work. - * - * @return string Returns the contents of the output buffer and end output buffering. - * If output buffering isn't active then FALSE is returned. + * @return string * @throws OutcontrolException * */ @@ -130,89 +77,9 @@ function ob_get_clean(): string /** - * This function will turn output buffering on. While output buffering is - * active no output is sent from the script (other than headers), instead the - * output is stored in an internal buffer. - * - * The contents of this internal buffer may be copied into a string variable - * using ob_get_contents. To output what is stored in - * the internal buffer, use ob_end_flush. Alternatively, - * ob_end_clean will silently discard the buffer - * contents. - * - * Output buffers are stackable, that is, you may call - * ob_start while another - * ob_start is active. Just make - * sure that you call ob_end_flush - * the appropriate number of times. If multiple output callback - * functions are active, output is being filtered sequentially - * through each of them in nesting order. - * - * If output buffering is still active when the script ends, PHP outputs the - * contents automatically. - * - * @param array|callable|null|string $callback An optional callback function may be - * specified. This function takes a string as a parameter and should - * return a string. The function will be called when - * the output buffer is flushed (sent) or cleaned (with - * ob_flush, ob_clean or similar - * function) or when the output buffer - * is flushed to the browser at the end of the request. When - * callback is called, it will receive the - * contents of the output buffer as its parameter and is expected to - * return a new output buffer as a result, which will be sent to the - * browser. If the callback is not a - * callable function, this function will return FALSE. - * This is the callback signature: - * - * - * stringhandler - * stringbuffer - * intphase - * - * - * - * buffer - * - * - * Contents of the output buffer. - * - * - * - * - * phase - * - * - * Bitmask of PHP_OUTPUT_HANDLER_* constants. - * - * - * - * - * - * If callback returns FALSE original - * input is sent to the browser. - * - * The callback parameter may be bypassed - * by passing a NULL value. - * - * ob_end_clean, ob_end_flush, - * ob_clean, ob_flush and - * ob_start may not be called from a callback - * function. If you call them from callback function, the behavior is - * undefined. If you would like to delete the contents of a buffer, - * return "" (a null string) from callback function. - * You can't even call functions using the output buffering functions like - * print_r($expression, true) or - * highlight_file($filename, true) from a callback - * function. - * - * ob_gzhandler function exists to - * facilitate sending gz-encoded data to web browsers that support - * compressed web pages. ob_gzhandler determines - * what type of content encoding the browser will accept and will return - * its output accordingly. - * @param int $chunk_size Contents of the output buffer. - * @param int $flags Bitmask of PHP_OUTPUT_HANDLER_* constants. + * @param array|callable|null|string $callback + * @param int $chunk_size + * @param int $flags * @throws OutcontrolException * */ @@ -235,19 +102,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT /** - * This function adds another name/value pair to the URL rewrite mechanism. - * The name and value will be added to URLs (as GET parameter) and forms - * (as hidden input fields) the same way as the session ID when transparent - * URL rewriting is enabled with session.use_trans_sid. - * - * This function's behaviour is controlled by the url_rewriter.tags and - * url_rewriter.hosts php.ini - * parameters. - * - * Note that this function can be successfully called at most once per request. - * - * @param string $name The variable name. - * @param string $value The variable value. + * @param string $name + * @param string $value * @throws OutcontrolException * */ @@ -262,10 +118,6 @@ function output_add_rewrite_var(string $name, string $value): void /** - * This function resets the URL rewriter and removes all rewrite - * variables previously set by the output_add_rewrite_var - * function. - * * @throws OutcontrolException * */ diff --git a/generated/8.1/pcntl.php b/generated/8.1/pcntl.php index 0493ec61..85bf4966 100644 --- a/generated/8.1/pcntl.php +++ b/generated/8.1/pcntl.php @@ -5,16 +5,9 @@ use Safe\Exceptions\PcntlException; /** - * pcntl_getpriority gets the priority of - * process_id. Because priority levels can differ between - * system types and kernel versions, please see your system's getpriority(2) - * man page for specific details. - * - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER - * or PRIO_PROCESS. - * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable - * scheduling. + * @param int|null $process_id + * @param int $mode + * @return int * @throws PcntlException * */ @@ -36,18 +29,9 @@ function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): i /** - * pcntl_setpriority sets the priority of - * process_id. - * - * @param int $priority priority is generally a value in the range - * -20 to 20. The default priority - * is 0 while a lower numerical value causes more - * favorable scheduling. Because priority levels can differ between - * system types and kernel versions, please see your system's setpriority(2) - * man page for specific details. - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER - * or PRIO_PROCESS. + * @param int $priority + * @param int|null $process_id + * @param int $mode * @throws PcntlException * */ @@ -68,10 +52,6 @@ function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = P /** - * The pcntl_signal_dispatch function calls the signal - * handlers installed by pcntl_signal for each pending - * signal. - * * @throws PcntlException * */ @@ -86,47 +66,9 @@ function pcntl_signal_dispatch(): void /** - * The pcntl_signal function installs a new - * signal handler or replaces the current signal handler for the signal indicated by signal. - * - * @param int $signal The signal number. - * @param callable|int $handler The signal handler. This may be either a callable, which - * will be invoked to handle the signal, or either of the two global - * constants SIG_IGN or SIG_DFL, - * which will ignore the signal or restore the default signal handler - * respectively. - * - * If a callable is given, it must implement the following - * signature: - * - * - * voidhandler - * intsigno - * mixedsiginfo - * - * - * - * signal - * - * - * The signal being handled. - * - * - * - * - * siginfo - * - * - * If operating systems supports siginfo_t structures, this will be an array of signal information dependent on the signal. - * - * - * - * - * - * Note that when you set a handler to an object method, that object's - * reference count is increased which makes it persist until you either - * change the handler to something else, or your script ends. - * @param bool $restart_syscalls The signal being handled. + * @param int $signal + * @param callable|int $handler + * @param bool $restart_syscalls * @throws PcntlException * */ @@ -141,22 +83,9 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi /** - * The pcntl_sigprocmask function adds, removes or sets blocked - * signals, depending on the mode parameter. - * - * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible - * values: - * - * SIG_BLOCK: Add the signals to the - * currently blocked signals. - * SIG_UNBLOCK: Remove the signals from the - * currently blocked signals. - * SIG_SETMASK: Replace the currently - * blocked signals by the given list of signals. - * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array - * containing the list of the previously blocked signals. + * @param int $mode + * @param array $signals + * @param array|null $old_signals * @throws PcntlException * */ @@ -171,19 +100,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul /** - * The pcntl_sigtimedwait function operates in exactly - * the same way as pcntl_sigwaitinfo except that it takes - * two additional parameters, seconds and - * nanoseconds, which enable an upper bound to be placed - * on the time for which the script is suspended. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing - * information about the signal. See - * pcntl_sigwaitinfo. - * @param int $seconds Timeout in seconds. - * @param int $nanoseconds Timeout in nanoseconds. - * @return int pcntl_sigtimedwait returns a signal number on success. + * @param array $signals + * @param array|null $info + * @param int $seconds + * @param int $nanoseconds + * @return int * @throws PcntlException * */ @@ -199,46 +120,9 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 /** - * The pcntl_sigwaitinfo function suspends execution of the - * calling script until one of the signals given in signals - * are delivered. If one of the signal is already pending (e.g. blocked by - * pcntl_sigprocmask), - * pcntl_sigwaitinfo will return immediately. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing - * information about the signal. - * - * The following elements are set for all signals: - * - * signo: Signal number - * errno: An error number - * code: Signal code - * - * - * The following elements may be set for the SIGCHLD signal: - * - * status: Exit value or signal - * utime: User time consumed - * stime: System time consumed - * pid: Sending process ID - * uid: Real user ID of sending process - * - * - * The following elements may be set for the SIGILL, - * SIGFPE, SIGSEGV and - * SIGBUS signals: - * - * addr: Memory location which caused fault - * - * - * The following element may be set for the SIGPOLL - * signal: - * - * band: Band event - * fd: File descriptor number - * - * @return int Returns a signal number on success. + * @param array $signals + * @param array|null $info + * @return int * @throws PcntlException * */ diff --git a/generated/8.1/pcre.php b/generated/8.1/pcre.php index a6b3175c..1e15de35 100644 --- a/generated/8.1/pcre.php +++ b/generated/8.1/pcre.php @@ -5,17 +5,10 @@ use Safe\Exceptions\PcreException; /** - * Returns the array consisting of the elements of the - * array array that match the given - * pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. - * @param int $flags If set to PREG_GREP_INVERT, this function returns - * the elements of the input array that do not match - * the given pattern. - * @return array Returns an array indexed using the keys from the - * array array. + * @param string $pattern + * @param array $array + * @param int $flags + * @return array * @throws PcreException * */ @@ -31,345 +24,12 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array /** - * Searches subject for all matches to the regular - * expression given in pattern and puts them in - * matches in the order specified by - * flags. - * - * After the first match is found, the subsequent searches are continued - * on from end of the last match. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to - * flags. - * @param int $flags Can be a combination of the following flags (note that it doesn't make - * sense to use PREG_PATTERN_ORDER together with - * PREG_SET_ORDER): - * - * - * PREG_PATTERN_ORDER - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * - * - * - * PREG_SET_ORDER - * - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * If no order flag is given, PREG_PATTERN_ORDER is - * assumed. - * @param int $offset Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|positive-int Returns the number of full pattern matches (which might be zero). + * @param string $pattern + * @param string $subject + * @param array|null $matches + * @param int $flags + * @param int $offset + * @return 0|positive-int * @throws PcreException * */ @@ -385,228 +45,12 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul /** - * Searches subject for a match to the regular - * expression given in pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param null|string[] $matches If matches is provided, then it is filled with - * the results of search. $matches[0] will contain the - * text that matched the full pattern, $matches[1] - * will have the text that matched the first captured parenthesized - * subpattern, and so on. - * @param int $flags flags can be a combination of the following flags: - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * - * - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * The above example will output: - * @param int $offset If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|1 preg_match returns 1 if the pattern - * matches given subject, 0 if it does not. + * @param string $pattern + * @param string $subject + * @param null|string[] $matches + * @param int $flags + * @param int $offset + * @return 0|1 * @throws PcreException * */ @@ -622,28 +66,12 @@ function preg_match(string $pattern, string $subject, ?array &$matches = null, i /** - * The behavior of this function is similar to - * preg_replace_callback, except that callbacks are - * executed on a per-pattern basis. - * - * @param array $pattern An associative array mapping patterns (keys) to callables (values). - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback_array returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array $pattern + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -659,57 +87,13 @@ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, /** - * The behavior of this function is almost identical to - * preg_replace, except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param array|string $pattern The pattern to search for. It can be either a string or an array with - * strings. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. This is the callback signature: - * - * - * stringhandler - * arraymatches - * - * - * You'll often need the callback function - * for a preg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * preg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * - * - * preg_replace_callback and - * anonymous function - * - * - * ]]> - * - * - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array|string $pattern + * @param callable(array):string $callback + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -725,55 +109,11 @@ function preg_replace_callback($pattern, callable $callback, $subject, int $limi /** - * Split the given string by a regular expression. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param int|null $limit If specified, then only substrings up to limit - * are returned with the rest of the string being placed in the last - * substring. A limit of -1 or 0 means "no limit". - * @param int $flags flags can be any combination of the following - * flags (combined with the | bitwise operator): - * - * - * PREG_SPLIT_NO_EMPTY - * - * - * If this flag is set, only non-empty pieces will be returned by - * preg_split. - * - * - * - * - * PREG_SPLIT_DELIM_CAPTURE - * - * - * If this flag is set, parenthesized expression in the delimiter pattern - * will be captured and returned as well. - * - * - * - * - * PREG_SPLIT_OFFSET_CAPTURE - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * - * - * - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * @return list Returns an array containing substrings of subject - * split along boundaries matched by pattern. + * @param string $pattern + * @param string $subject + * @param int|null $limit + * @param int $flags + * @return list * @throws PcreException * */ diff --git a/generated/8.1/pgsql.php b/generated/8.1/pgsql.php index c56de172..32c7896f 100644 --- a/generated/8.1/pgsql.php +++ b/generated/8.1/pgsql.php @@ -5,12 +5,7 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with - * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using - * pg_query. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -25,49 +20,9 @@ function pg_cancel_query(\PgSql\Connection $connection): void /** - * pg_connect opens a connection to a - * PostgreSQL database specified by the - * connection_string. - * - * If a second call is made to pg_connect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * The old syntax with multiple parameters - * $conn = pg_connect("host", "port", "options", "tty", "dbname") - * has been deprecated. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname (defaults to value of user), - * user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * - * The options parameter can be used to set command line parameters - * to be invoked by the server. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * - * If PGSQL_CONNECT_ASYNC is given, then the - * connection is established asynchronously. The state of the connection - * can then be checked via pg_connect_poll or - * pg_connection_status. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -83,10 +38,7 @@ function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connectio /** - * pg_connection_reset resets the connection. - * It is useful for error recovery. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -101,22 +53,11 @@ function pg_connection_reset(\PgSql\Connection $connection): void /** - * pg_convert checks and converts the values in - * values into suitable values for use in an SQL - * statement. Precondition for pg_convert is the - * existence of a table table_name which has at least - * as many columns as values has elements. The - * fieldnames in table_name must match the indices in - * values and the corresponding datatypes must be - * compatible. Returns an array with the converted values on success. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. - * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, - * PGSQL_CONV_FORCE_NULL or - * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return array * @throws PgsqlException * */ @@ -132,20 +73,11 @@ function pg_convert(\PgSql\Connection $connection, string $table_name, array $va /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command - * internally to insert records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. - * Each value in rows becomes a row in table_name. - * Each value in rows should be a delimited string of the values - * to insert into each field. Values should be linefeed terminated. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $rows + * @param string $separator + * @param string $null_as * @throws PgsqlException * */ @@ -160,17 +92,11 @@ function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $ /** - * pg_copy_to copies a table to an array. It - * issues COPY TO SQL command internally to - * retrieve records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to copy the data into rows. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param string $separator + * @param string $null_as + * @return array * @throws PgsqlException * */ @@ -186,37 +112,11 @@ function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $s /** - * pg_delete deletes records from a table - * specified by the keys and values in conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_delete passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be deleted. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -232,18 +132,7 @@ function pg_delete(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_end_copy syncs the PostgreSQL frontend - * (usually a web server process) with the PostgreSQL server after - * doing a copy operation performed by - * pg_put_line. pg_end_copy - * must be issued, otherwise the PostgreSQL server may get out of - * sync with the frontend and will report an error. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -262,37 +151,10 @@ function pg_end_copy(?\PgSql\Connection $connection = null): void /** - * Sends a request to execute a prepared statement with given parameters, and - * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. - * pg_execute is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a - * prepared statement is given instead of a query string. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name of the prepared statement to execute. if - * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, - * pg_send_prepare or a PREPARE SQL - * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Elements are converted to strings by calling this function. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -316,14 +178,9 @@ function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_field_num will return the number of the - * field number that corresponds to the - * field in the given result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param string $field The name of the field. - * @return int The field number (numbered from 0). + * @param \PgSql\Result $result + * @param string $field + * @return int * @throws PgsqlException * */ @@ -339,16 +196,10 @@ function pg_field_num(\PgSql\Result $result, string $field): int /** - * pg_field_table returns the name of the table that field - * belongs to, or the table's oid if oid_only is TRUE. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field Field number, starting from 0. - * @param bool $oid_only By default the tables name that field belongs to is returned but - * if oid_only is set to TRUE, then the - * oid will instead be returned. - * @return mixed On success either the fields table name or oid. + * @param \PgSql\Result $result + * @param int $field + * @param bool $oid_only + * @return mixed * @throws PgsqlException * */ @@ -364,13 +215,8 @@ function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = fals /** - * pg_flush flushes any outbound query data waiting to be - * sent on the connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return mixed Returns TRUE if the flush was successful or no data was waiting to be - * flushed, 0 if part of the pending data was flushed but - * more remains. + * @param \PgSql\Connection $connection + * @return mixed * @throws PgsqlException * */ @@ -386,15 +232,7 @@ function pg_flush(\PgSql\Connection $connection) /** - * pg_free_result frees the memory and data associated with the - * specified PgSql\Result instance. - * - * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will - * be automatically freed when the script ends. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). + * @param \PgSql\Result $result * @throws PgsqlException * */ @@ -409,17 +247,8 @@ function pg_free_result(\PgSql\Result $result): void /** - * pg_host returns the host name of the given - * PostgreSQL connection instance is - * connected to. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @return string A string containing the name of the host the - * connection is to. + * @param \PgSql\Connection|null $connection + * @return string * @throws PgsqlException * */ @@ -439,39 +268,11 @@ function pg_host(?\PgSql\Connection $connection = null): string /** - * pg_insert inserts the values - * of values into the table specified - * by table_name. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_insert passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to insert rows. The table table_name must at least - * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be inserted. - * @param int $flags Any number of PGSQL_CONV_OPTS, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -487,30 +288,8 @@ function pg_insert(\PgSql\Connection $connection, string $table_name, array $val /** - * pg_last_oid is used to retrieve the - * OID assigned to an inserted row. - * - * OID field became an optional field from PostgreSQL 7.2 and will - * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use - * pg_result_status to check for successful - * insertion. - * - * To get the value of a SERIAL field in an inserted - * row, it is necessary to use the PostgreSQL CURRVAL - * function, naming the sequence whose last value is required. If the - * name of the sequence is unknown, the pg_get_serial_sequence - * PostgreSQL 8.0 function is necessary. - * - * PostgreSQL 8.1 has a function LASTVAL that returns - * the value of the most recently used sequence in the session. This avoids - * the need for naming the sequence, table or column altogether. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @return string An int or string containing the OID assigned to the most recently inserted - * row in the specified connection or - * no available OID. + * @param \PgSql\Result $result + * @return string * @throws PgsqlException * */ @@ -526,12 +305,7 @@ function pg_last_oid(\PgSql\Result $result): string /** - * pg_lo_close closes a large object. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. + * @param \PgSql\Lob $lob * @throws PgsqlException * */ @@ -546,21 +320,9 @@ function pg_lo_close(\PgSql\Lob $lob): void /** - * pg_lo_export takes a large object in a - * PostgreSQL database and saves its contents to a file on the local - * filesystem. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $pathname The full path and file name of the file in which to write the - * large object on the client filesystem. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $pathname * @throws PgsqlException * */ @@ -583,26 +345,10 @@ function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ? /** - * pg_lo_import creates a new large object - * in the database using a file on the filesystem as its data - * source. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $pathname The full path and file name of the file on the client - * filesystem from which to read the large object data. - * @param $object_id If an object_id is given the function - * will try to create a large object with this id, else a free - * object id is assigned by the server. The parameter - * relies on functionality that first - * appeared in PostgreSQL 8.1. - * @return int The OID of the newly created large object. + * @param \PgSql\Connection $connection + * @param string $pathname + * @param $object_id + * @return int * @throws PgsqlException * */ @@ -626,21 +372,10 @@ function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = /** - * pg_lo_open opens a large object in the database - * and returns an PgSql\Lob instance so that it can be manipulated. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and - * write. - * @return \PgSql\Lob An PgSql\Lob instance. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $mode + * @return \PgSql\Lob * @throws PgsqlException * */ @@ -656,17 +391,9 @@ function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgS /** - * pg_lo_read reads at most - * length bytes from a large object and - * returns it as a string. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $length An optional maximum number of bytes to return. - * @return string A string containing length bytes from the - * large object. + * @param \PgSql\Lob $lob + * @param int $length + * @return string * @throws PgsqlException * */ @@ -682,16 +409,9 @@ function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string /** - * pg_lo_seek seeks a position within an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), - * PGSQL_SEEK_CUR (seek from current position) - * or PGSQL_SEEK_END (seek from object end) . + * @param \PgSql\Lob $lob + * @param int $offset + * @param int $whence * @throws PgsqlException * */ @@ -706,13 +426,8 @@ function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void /** - * pg_lo_truncate truncates an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $size The number of bytes to truncate. + * @param \PgSql\Lob $lob + * @param int $size * @throws PgsqlException * */ @@ -727,18 +442,8 @@ function pg_lo_truncate(\PgSql\Lob $lob, int $size): void /** - * pg_lo_unlink deletes a large object with the - * oid. Returns TRUE on success. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. + * @param \PgSql\Connection $connection + * @param int $oid * @throws PgsqlException * */ @@ -753,20 +458,10 @@ function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void /** - * pg_lo_write writes data into a large object - * at the current seek position. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param string $data The data to be written to the large object. If length is - * an int and is less than the length of data, only - * length bytes will be written. - * @param int|null $length An optional maximum number of bytes to write. Must be greater than zero - * and no greater than the length of data. Defaults to - * the length of data. - * @return int The number of bytes written to the large object. + * @param \PgSql\Lob $lob + * @param string $data + * @param int|null $length + * @return int * @throws PgsqlException * */ @@ -786,13 +481,10 @@ function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int /** - * pg_meta_data returns table definition for - * table_name as an array. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name The name of the table. - * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param bool $extended + * @return array * @throws PgsqlException * */ @@ -808,41 +500,9 @@ function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $e /** - * Looks up a current parameter setting of the server. - * - * Certain parameter values are reported by the server automatically at - * connection startup or whenever their values change. pg_parameter_status can be - * used to interrogate these settings. It returns the current value of a - * parameter if known, or FALSE if the parameter is not known. - * - * Parameters reported as of PostgreSQL 8.0 include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and integer_datetimes. - * (server_encoding, TimeZone, and - * integer_datetimes were not reported by releases before 8.0.) Note that - * server_version, server_encoding and integer_datetimes - * cannot change after PostgreSQL startup. - * - * PostgreSQL 7.3 or lower servers do not report parameter settings, - * pg_parameter_status - * includes logic to obtain values for server_version and - * client_encoding - * anyway. Applications are encouraged to use pg_parameter_status rather than ad - * hoc code to determine these values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $param_name Possible param_name values include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and - * integer_datetimes. Note that this value is case-sensitive. - * @return string A string containing the value of the parameter or invalid - * param_name. + * @param \PgSql\Connection $connection + * @param string $param_name + * @return string * @throws PgsqlException * */ @@ -864,46 +524,9 @@ function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $par /** - * pg_pconnect opens a connection to a - * PostgreSQL database. It returns an PgSql\Connection instance that is - * needed by other PostgreSQL functions. - * - * If a second call is made to pg_pconnect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * To enable persistent connection, the pgsql.allow_persistent - * php.ini directive must be set to "On" (which is the default). - * The maximum number of persistent connection can be defined with the pgsql.max_persistent - * php.ini directive (defaults to -1 for no limit). The total number - * of connections can be set with the pgsql.max_links - * php.ini directive. - * - * pg_close will not close persistent links - * generated by pg_pconnect. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname, user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -919,14 +542,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connecti /** - * pg_ping pings a database connection and tries to - * reconnect it if it is broken. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -945,38 +561,10 @@ function pg_ping(?\PgSql\Connection $connection = null): void /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * pg_prepare is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters - * are used, they are referred to in the query as $1, $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is more flexible since it - * does not require parameter types to be pre-specified.) Also, although there - * is no PHP function for deleting a prepared statement, the SQL DEALLOCATE - * statement can be used for that purpose. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If - * "" is specified, then an unnamed statement is created, overwriting any - * previously defined unnamed statement. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1000,25 +588,8 @@ function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_put_line sends a NULL-terminated string - * to the PostgreSQL backend server. This is needed in conjunction - * with PostgreSQL's COPY FROM command. - * - * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, - * and in a single transaction. - * - * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler - * interface. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL - * terminator is added automatically. + * @param \PgSql\Connection $connection + * @param string $data * @throws PgsqlException * */ @@ -1039,53 +610,10 @@ function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null /** - * Submits a command to the server and waits for the result, with the ability - * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. - * pg_query_params is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * If parameters are used, they are referred to in the - * query string as $1, $2, etc. The same parameter may - * appear more than once in the query; the same value - * will be used in that case. params specifies the - * actual values of the parameters. A NULL value in this array means the - * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, - * but not more than one nonempty command.) - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * - * User-supplied values should always be passed as parameters, not - * interpolated into the query string, where they form possible - * SQL injection - * attack vectors and introduce bugs when handling data containing quotes. - * If for some reason you cannot use a parameter, ensure that interpolated - * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Values intended for bytea fields are not supported as - * parameters. Use pg_escape_bytea instead, or use the - * large object functions. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1109,42 +637,9 @@ function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = /** - * pg_query executes the query - * on the specified database connection. - * pg_query_params should be preferred - * in most cases. - * - * If an error occurs, and FALSE is returned, details of the error can - * be retrieved using the pg_last_error - * function if the connection is valid. - * - * - * - * Although connection can be omitted, it - * is not recommended, since it can be the cause of hard to find - * bugs in scripts. - * - * - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, - * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands - * included in the query string. However, using multiple transactions in one function call is not recommended. - * - * String interpolation of user-supplied data is extremely dangerous and is - * likely to lead to SQL - * injection vulnerabilities. In most cases - * pg_query_params should be preferred, passing - * user-supplied values as parameters rather than substituting them into - * the query string. - * - * Any user-supplied data substituted directly into a query string should - * be properly escaped. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1166,31 +661,9 @@ function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): /** - * pg_result_error_field returns one of the detailed error message - * fields associated with result instance. It is only available - * against a PostgreSQL 7.4 or above server. The error field is specified by - * the field_code. - * - * Because pg_query and pg_query_params return FALSE if the query fails, - * you must use pg_send_query and - * pg_get_result to get the result handle. - * - * If you need to get additional error information from failed pg_query queries, - * use pg_set_error_verbosity and pg_last_error - * and then parse the result. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field_code Possible field_code values are: PGSQL_DIAG_SEVERITY, - * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, - * PGSQL_DIAG_MESSAGE_DETAIL, - * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, - * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), - * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), - * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, - * PGSQL_DIAG_SOURCE_LINE or - * PGSQL_DIAG_SOURCE_FUNCTION. - * @return null|string A string containing the contents of the error field, NULL if the field does not exist. + * @param \PgSql\Result $result + * @param int $field_code + * @return null|string * @throws PgsqlException * */ @@ -1206,13 +679,8 @@ function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string /** - * pg_result_seek sets the internal row offset in - * the result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $row Row to move the internal offset to in the PgSql\Result instance. - * Rows are numbered starting from zero. + * @param \PgSql\Result $result + * @param int $row * @throws PgsqlException * */ @@ -1227,41 +695,12 @@ function pg_result_seek(\PgSql\Result $result, int $row): void /** - * pg_select selects records specified by - * conditions which has - * field=>value. For a successful query, it returns an - * array containing all records and fields that match the condition - * specified by conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_select passes raw values. Values - * must be escaped or PGSQL_DML_ESCAPE option must be - * specified. PGSQL_DML_ESCAPE quotes and escapes - * parameters/identifiers. Therefore, table/column names became case - * sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be retrieved. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags * @param int $mode - * @return mixed Returns string if PGSQL_DML_STRING is passed - * via flags, otherwise it returns an array on success. + * @return mixed * @throws PgsqlException * */ @@ -1277,11 +716,8 @@ function pg_select(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_socket returns a read only resource - * corresponding to the socket underlying the given PostgreSQL connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return resource A socket resource on success. + * @param \PgSql\Connection $connection + * @return resource * @throws PgsqlException * */ @@ -1297,26 +733,9 @@ function pg_socket(\PgSql\Connection $connection) /** - * pg_trace enables tracing of the PostgreSQL - * frontend/backend communication to a file. To fully understand the results, - * one needs to be familiar with the internals of PostgreSQL - * communication protocol. - * - * For those who are not, it can still be - * useful for tracing errors in queries sent to the server, you - * could do for example grep '^To backend' - * trace.log and see what queries actually were sent to the - * PostgreSQL server. For more information, refer to the - * PostgreSQL Documentation. - * - * @param string $filename The full path and file name of the file in which to write the - * trace log. Same as in fopen. - * @param string $mode An optional file access mode, same as for fopen. - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param string $filename + * @param string $mode + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -1335,39 +754,12 @@ function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $conn /** - * pg_update updates records that matches - * conditions with values. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_update passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be updated. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ diff --git a/generated/8.1/posix.php b/generated/8.1/posix.php index f79a82fe..609089ec 100644 --- a/generated/8.1/posix.php +++ b/generated/8.1/posix.php @@ -5,18 +5,8 @@ use Safe\Exceptions\PosixException; /** - * posix_access checks the user's permission of a file. - * - * @param string $filename The name of the file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -31,55 +21,8 @@ function posix_access(string $filename, int $flags = 0): void /** - * Gets information about a group provided its id. - * - * @param int $group_id The group id. - * @return array{name: string, passwd: string, gid: int, members: list} The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID, should be the same as the - * group_id parameter used when calling the - * function, and hence redundant. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $group_id + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -95,55 +38,8 @@ function posix_getgrgid(int $group_id): array /** - * Gets information about a group provided its name. - * - * @param string $name The name of the group - * @return array{name: string, passwd: string, gid: int, members: list} Returns an array on success. - * The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. This should be the same as - * the name parameter used when - * calling the function, and hence redundant. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID of the group in numeric form. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * + * @param string $name + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -159,10 +55,7 @@ function posix_getgrnam(string $name): array /** - * Gets the group set of the current process. - * - * @return list Returns an array of integers containing the numeric group ids of the group - * set of the current process. + * @return list * @throws PosixException * */ @@ -178,9 +71,7 @@ function posix_getgroups(): array /** - * Returns the login name of the user owning the current process. - * - * @return string Returns the login name of the user, as a string. + * @return string * @throws PosixException * */ @@ -196,83 +87,8 @@ function posix_getlogin(): string /** - * Returns an array of information about the user - * referenced by the given user ID. - * - * @param int $user_id The user identifier. - * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} Returns an associative array with the following elements: - * - * The user information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the username of the user. This is - * a short, usually less than 16 character "handle" of the - * user, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the user's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * uid - * - * User ID, should be the same as the - * user_id parameter used when calling the - * function, and hence redundant. - * - * - * - * gid - * - * The group ID of the user. Use the function - * posix_getgrgid to resolve the group - * name and a list of its members. - * - * - * - * gecos - * - * GECOS is an obsolete term that refers to the finger - * information field on a Honeywell batch processing system. - * The field, however, lives on, and its contents have been - * formalized by POSIX. The field contains a comma separated - * list containing the user's full name, office phone, office - * number, and home phone number. On most systems, only the - * user's full name is available. - * - * - * - * dir - * - * This element contains the absolute path to the - * home directory of the user. - * - * - * - * shell - * - * The shell element contains the absolute path to the - * executable of the user's default shell. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $user_id + * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} * @throws PosixException * */ @@ -288,101 +104,7 @@ function posix_getpwuid(int $user_id): array /** - * posix_getrlimit returns an array - * of information about the current resource's soft and hard limits. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @return array Returns an associative array of elements for each - * limit that is defined. Each limit has a soft and a hard limit. - * - * List of possible limits returned - * - * - * - * Limit name - * Limit description - * - * - * - * - * core - * - * The maximum size of the core file. When 0, not core files are - * created. When core files are larger than this size, they will - * be truncated at this size. - * - * - * - * totalmem - * - * The maximum size of the memory of the process, in bytes. - * - * - * - * virtualmem - * - * The maximum size of the virtual memory for the process, in bytes. - * - * - * - * data - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * stack - * - * The maximum size of the process stack, in bytes. - * - * - * - * rss - * - * The maximum number of virtual pages resident in RAM - * - * - * - * maxproc - * - * The maximum number of processes that can be created for the - * real user ID of the calling process. - * - * - * - * memlock - * - * The maximum number of bytes of memory that may be locked into RAM. - * - * - * - * cpu - * - * The amount of time the process is allowed to use the CPU. - * - * - * - * filesize - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * openfiles - * - * One more than the maximum number of open file descriptors. - * - * - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -398,14 +120,8 @@ function posix_getrlimit(): array /** - * Return the session id of the process process_id. - * The session id of a process is the process group id of the session leader. - * - * @param int $process_id The process identifier. If set to 0, the current process is - * assumed. If an invalid process_id is - * specified, then FALSE is returned and an error is set which - * can be checked with posix_get_last_error. - * @return int Returns the identifier, as an int. + * @param int $process_id + * @return int * @throws PosixException * */ @@ -421,10 +137,8 @@ function posix_getsid(int $process_id): int /** - * Calculates the group access list for the user specified in name. - * - * @param string $username The user to calculate the list for. - * @param int $group_id Typically the group number from the password file. + * @param string $username + * @param int $group_id * @throws PosixException * */ @@ -439,11 +153,8 @@ function posix_initgroups(string $username, int $group_id): void /** - * Send the signal signal to the process with - * the process identifier process_id. - * - * @param int $process_id The process identifier. - * @param int $signal One of the PCNTL signals constants. + * @param int $process_id + * @param int $signal * @throws PosixException * */ @@ -458,16 +169,8 @@ function posix_kill(int $process_id, int $signal): void /** - * posix_mkfifo creates a special - * FIFO file which exists in the file system and acts as - * a bidirectional communication endpoint for processes. - * - * @param string $filename Path to the FIFO file. - * @param int $permissions The second parameter permissions has to be given in - * octal notation (e.g. 0644). The permission of the newly created - * FIFO also depends on the setting of the current - * umask. The permissions of the created file are - * (mode & ~umask). + * @param string $filename + * @param int $permissions * @throws PosixException * */ @@ -482,17 +185,10 @@ function posix_mkfifo(string $filename, int $permissions): void /** - * Creates a special or ordinary file. - * - * @param string $filename The file to create - * @param int $flags This parameter is constructed by a bitwise OR between file type (one of - * the following constants: POSIX_S_IFREG, - * POSIX_S_IFCHR, POSIX_S_IFBLK, - * POSIX_S_IFIFO or - * POSIX_S_IFSOCK) and permissions. - * @param int $major The major device kernel identifier (required to pass when using - * S_IFCHR or S_IFBLK). - * @param int $minor The minor device kernel identifier. + * @param string $filename + * @param int $flags + * @param int $major + * @param int $minor * @throws PosixException * */ @@ -507,11 +203,7 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = /** - * Set the effective group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -526,11 +218,7 @@ function posix_setegid(int $group_id): void /** - * Set the effective user ID of the current process. This is a privileged - * function and needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -545,14 +233,7 @@ function posix_seteuid(int $user_id): void /** - * Set the real group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. The - * appropriate order of function calls is - * posix_setgid first, - * posix_setuid last. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -567,11 +248,8 @@ function posix_setgid(int $group_id): void /** - * Let the process process_id join the process group - * process_group_id. - * - * @param int $process_id The process id. - * @param int $process_group_id The process group id. + * @param int $process_id + * @param int $process_group_id * @throws PosixException * */ @@ -586,23 +264,9 @@ function posix_setpgid(int $process_id, int $process_group_id): void /** - * posix_setrlimit sets the soft and hard limits for a - * given system resource. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int $resource The - * resource limit constant - * corresponding to the limit that is being set. - * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. - * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. + * @param int $resource + * @param int $soft_limit + * @param int $hard_limit * @throws PosixException * */ @@ -617,9 +281,7 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void /** - * Make the current process a session leader. - * - * @return int Returns the session ids. + * @return int * @throws PosixException * */ @@ -635,11 +297,7 @@ function posix_setsid(): int /** - * Set the real user ID of the current process. This is a privileged - * function that needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -654,39 +312,7 @@ function posix_setuid(int $user_id): void /** - * Gets information about the current CPU usage. - * - * @return array Returns a hash of strings with information about the current - * process CPU usage. The indices of the hash are: - * - * - * - * ticks - the number of clock ticks that have elapsed since - * reboot. - * - * - * - * - * utime - user time used by the current process. - * - * - * - * - * stime - system time used by the current process. - * - * - * - * - * cutime - user time used by current process and children. - * - * - * - * - * cstime - system time used by current process and children. - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -702,41 +328,7 @@ function posix_times(): array /** - * Gets information about the system. - * - * Posix requires that assumptions must not be made about the - * format of the values, e.g. the assumption that a release may contain - * three digits or anything else returned by this function. - * - * @return array Returns a hash of strings with information about the - * system. The indices of the hash are - * - * - * sysname - operating system name (e.g. Linux) - * - * - * nodename - system name (e.g. valiant) - * - * - * release - operating system release (e.g. 2.2.10) - * - * - * version - operating system version (e.g. #4 Tue Jul 20 - * 17:01:36 MEST 1999) - * - * - * machine - system architecture (e.g. i586) - * - * - * domainname - DNS domainname (e.g. example.com) - * - * - * - * domainname is a GNU extension and not part of POSIX.1, so this - * field is only available on GNU systems or when using the GNU - * libc. - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ diff --git a/generated/8.1/ps.php b/generated/8.1/ps.php index 1eaa9774..912fbb4e 100644 --- a/generated/8.1/ps.php +++ b/generated/8.1/ps.php @@ -5,23 +5,12 @@ use Safe\Exceptions\PsException; /** - * Places a hyperlink at the given position pointing to a file program - * which is being started when clicked on. The hyperlink's source position - * is a rectangle - * with its lower left corner at (llx, lly) and its upper right corner at - * (urx, ury). The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The path of the program to be started, when the link is clicked on. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename * @throws PsException * */ @@ -36,30 +25,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur /** - * Places a hyperlink at the given position pointing to a page in the same - * document. Clicking on the link will jump to the given page. The first page - * in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param int $page The number of the page displayed when clicking on the link. - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param int $page + * @param string $dest * @throws PsException * */ @@ -74,31 +46,15 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury /** - * Adds a note at a certain position on the page. Notes are like little - * rectangular sheets with text on it, which can be placed anywhere on - * a page. They - * are shown either folded or unfolded. If folded, the specified icon - * is used as a placeholder. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $contents The text of the note. - * @param string $title The title of the note as displayed in the header of the note. - * @param string $icon The icon shown if the note is folded. This parameter can be set - * to comment, insert, - * note, paragraph, - * newparagraph, key, or - * help. - * @param int $open If open is unequal to zero the note will - * be shown unfolded after opening the document with a pdf viewer. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open * @throws PsException * */ @@ -113,32 +69,14 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str /** - * Places a hyperlink at the given position pointing to a second pdf document. - * Clicking on the link will branch to the document at the given page. The - * first page in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The name of the pdf document to be opened when clicking on - * this link. - * @param int $page The page number of the destination pdf document - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param int $page + * @param string $dest * @throws PsException * */ @@ -153,25 +91,12 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Places a hyperlink at the given position pointing to a web page. The - * hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and - * its upper right corner at (urx, - * ury). The rectangle has by default a thin - * blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $url The url of the hyperlink to be opened when clicking on - * this link, e.g. http://www.php.net. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $url * @throws PsException * */ @@ -186,21 +111,12 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn counterclockwise (use - * ps_arcn to draw clockwise). The subpath added - * to the current path starts on the arc at angle alpha - * and ends on the arc at angle beta. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The start angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -215,21 +131,12 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn clockwise (use - * ps_arc to draw counterclockwise). The subpath added to - * the current path starts on the arc at angle beta and - * ends on the arc at angle alpha. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The starting angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -244,43 +151,9 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float /** - * Starts a new page. Although the parameters width - * and height imply a different page size for each - * page, this is not possible in PostScript. The first call of - * ps_begin_page will set the page size for the whole - * document. Consecutive calls will have no effect, except for creating a new - * page. The situation is different if you intent to convert the PostScript - * document into PDF. This function places pdfmarks into the document which - * can set the size for each page indiviually. The resulting PDF document will - * have different page sizes. - * - * Though PostScript does not know different page sizes, pslib places - * a bounding box for each page into the document. This size is evaluated - * by some PostScript viewers and will have precedence over the BoundingBox - * in the Header of the document. This can lead to unexpected results when - * you set a BoundingBox whose lower left corner is not (0, 0), because the - * bounding box of the page will always have a lower left corner (0, 0) - * and overwrites the global setting. - * - * Each page is encapsulated into save/restore. This means, that most of the - * settings made on one page will not be retained on the next page. - * - * If there is up to the first call of ps_begin_page no - * call of ps_findfont, then the header of the PostScript - * document will be output and the bounding box will be set to the size of - * the first page. The lower left corner of the bounding box is set to (0, 0). - * If ps_findfont was called before, then the - * header has been output already, and the document will not have a valid - * bounding box. In order to prevent this, one should call - * ps_set_info to set the info field - * BoundingBox and possibly Orientation - * before any ps_findfont or - * ps_begin_page calls. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the page in pixel, e.g. 596 for A4 format. - * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @param resource $psdoc + * @param float $width + * @param float $height * @throws PsException * */ @@ -295,21 +168,13 @@ function ps_begin_page($psdoc, float $width, float $height): void /** - * Starts a new pattern. A pattern is like a page containing e.g. a drawing - * which can be used for filling areas. It is used like a color by calling - * ps_setcolor and setting the color space to - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the pattern in pixel. - * @param float $height The height of the pattern in pixel. - * @param float $xstep The distance in pixel of placements of the pattern in - * horizontal direction. - * @param float $ystep The distance in pixel of placements of the pattern in - * vertical direction. - * @param int $painttype Must be 1 or 2. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param float $width + * @param float $height + * @param float $xstep + * @param float $ystep + * @param int $painttype + * @return int * @throws PsException * */ @@ -325,18 +190,10 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo /** - * Starts a new template. A template is called a form in the postscript - * language. It is created similar to a pattern but used like an image. - * Templates are often used for drawings which are placed several times - * through out the document, e.g. like a company logo. All drawing functions - * may be used within a template. The template will not be drawn until - * it is placed by ps_place_image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the template in pixel. - * @param float $height The height of the template in pixel. - * @return int Returns TRUE on success. + * @param resource $psdoc + * @param float $width + * @param float $height + * @return int * @throws PsException * */ @@ -352,20 +209,10 @@ function ps_begin_template($psdoc, float $width, float $height): int /** - * Draws a circle with its middle point at (x, - * y). The circle starts and ends at position - * (x+radius, - * y). If this function is called outside a path it - * will start a new path. If it is called within a path it will add the circle - * as a subpath. If the last drawing operation does not end in point - * (x+radius, - * y) then there will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius * @throws PsException * */ @@ -380,11 +227,7 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** - * Takes the current path and uses it to define the border of a clipping area. - * Everything drawn outside of that area will not be visible. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -399,14 +242,8 @@ function ps_clip($psdoc): void /** - * Closes an image and frees its resources. Once an image is closed - * it cannot be used anymore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid Resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. + * @param resource $psdoc + * @param int $imageid * @throws PsException * */ @@ -421,17 +258,7 @@ function ps_close_image($psdoc, int $imageid): void /** - * Closes the PostScript document. - * - * This function writes the trailer of the PostScript document. - * It also writes the bookmark tree. ps_close does - * not free any resources, which is done by ps_delete. - * - * This function is also called by ps_delete if it - * has not been called before. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -446,11 +273,7 @@ function ps_close($psdoc): void /** - * Connects the last point with first point of a path and draws the resulting - * closed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -465,11 +288,7 @@ function ps_closepath_stroke($psdoc): void /** - * Connects the last point with the first point of a path. The resulting - * path can be used for stroking, filling, clipping, etc.. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -484,15 +303,8 @@ function ps_closepath($psdoc): void /** - * Output a text one line below the last line. The line spacing is - * taken from the value "leading" which must be set with - * ps_set_value. The actual position of the - * text is determined by the values "textx" and "texty" which can be requested - * with ps_get_value - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -507,17 +319,13 @@ function ps_continue_text($psdoc, string $text): void /** - * Add a section of a cubic Bézier curve described by the three given control - * points to the current path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x1 x-coordinate of first control point. - * @param float $y1 y-coordinate of first control point. - * @param float $x2 x-coordinate of second control point. - * @param float $y2 y-coordinate of second control point. - * @param float $x3 x-coordinate of third control point. - * @param float $y3 y-coordinate of third control point. + * @param resource $psdoc + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PsException * */ @@ -532,15 +340,7 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x /** - * Mainly frees memory used by the document. Also closes a file, if it was not - * closed before with ps_close. You should in any case - * close the file with ps_close before, because - * ps_close not just closes the file but also outputs a - * trailor containing PostScript comments like the number of pages in the - * document and adding the bookmark hierarchy. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -555,13 +355,7 @@ function ps_delete($psdoc): void /** - * Ends a page which was started with ps_begin_page. - * Ending a page will leave the current drawing context, which e.g. requires - * to reload fonts if they were loading within the page, and to set many - * other drawing parameters like the line width, or color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -576,12 +370,7 @@ function ps_end_page($psdoc): void /** - * Ends a pattern which was started with ps_begin_pattern. - * Once a pattern has been ended, it can be used like a color to fill - * areas. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -596,11 +385,7 @@ function ps_end_pattern($psdoc): void /** - * Ends a template which was started with ps_begin_template. - * Once a template has been ended, it can be used like an image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -615,11 +400,7 @@ function ps_end_template($psdoc): void /** - * Fills and draws the path constructed with previously called drawing - * functions like ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -634,11 +415,7 @@ function ps_fill_stroke($psdoc): void /** - * Fills the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -653,128 +430,10 @@ function ps_fill($psdoc): void /** - * Gets several parameters which were directly set by - * ps_set_parameter or indirectly by one of the other - * functions. Parameters are by definition string - * values. This function cannot be used to retrieve resources which were also - * set by ps_set_parameter. - * - * The parameter name can have the following values. - * - * - * - * fontname - * - * - * The name of the currently active font or the font whose - * identifier is passed in parameter modifier. - * - * - * - * - * fontencoding - * - * - * The encoding of the currently active font. - * - * - * - * - * dottedversion - * - * - * The version of the underlying pslib library in the format - * <major>.<minor>.<subminor> - * - * - * - * - * scope - * - * - * The current drawing scope. Can be object, document, null, page, - * pattern, path, template, prolog, font, glyph. - * - * - * - * - * ligaturedisolvechar - * - * - * The character which dissolves a ligature. If your are using a font - * which contains the ligature `ff' and `|' is the char to dissolve the - * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * - * imageencoding - * - * - * The encoding used for encoding images. Can be either - * hex or 85. hex encoding - * uses two bytes in the postscript file each byte in the image. - * 85 stand for Ascii85 encoding. - * - * - * - * - * linenumbermode - * - * - * Set to paragraph if lines are numbered - * within a paragraph or box if they are - * numbered within the surrounding box. - * - * - * - * - * linebreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will add a line - * break. - * - * - * - * - * parbreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will start - * a new paragraph. - * - * - * - * - * hyphenation - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE the paragraph will be hyphenated - * if a hypen dictionary is set and exists. - * - * - * - * - * hyphendict - * - * - * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name Name of the parameter. - * @param float $modifier An identifier needed if a parameter of a resource is requested, - * e.g. the size of an image. In such a case the resource id is - * passed. - * @return string Returns the value of the parameter. + * @param resource $psdoc + * @param string $name + * @param float $modifier + * @return string * @throws PsException * */ @@ -794,23 +453,9 @@ function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string /** - * Hyphenates the passed word. ps_hyphenate evaluates the - * value hyphenminchars (set by ps_set_value) and - * the parameter hyphendict (set by ps_set_parameter). - * hyphendict must be set before calling this function. - * - * This function requires the locale category LC_CTYPE to be set properly. - * This is done when the extension is initialized by using the environment - * variables. On Unix systems read the man page of locale for more information. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text text should not contain any non alpha - * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in - * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in - * the text. + * @param resource $psdoc + * @param string $text + * @return array * @throws PsException * */ @@ -826,12 +471,7 @@ function ps_hyphenate($psdoc, string $text): array /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param string $file * @throws PsException * @@ -847,14 +487,9 @@ function ps_include_file($psdoc, string $file): void /** - * Adds a straight line from the current point to the given coordinates to the - * current path. Use ps_moveto to set the starting point - * of the line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the end point of the line. - * @param float $y y-coordinate of the end point of the line. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -869,15 +504,9 @@ function ps_lineto($psdoc, float $x, float $y): void /** - * Sets the current point to new coordinates. If this is the first call of - * ps_moveto after a previous path has been ended then it - * will start a new path. If this function is called in the middle of a path - * it will just set the current point and start a subpath. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the point to move to. - * @param float $y y-coordinate of the point to move to. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -892,13 +521,7 @@ function ps_moveto($psdoc, float $x, float $y): void /** - * Creates a new document instance. It does not create the file on disk or in - * memory, it just sets up everything. ps_new is usually - * followed by a call of ps_open_file to actually create - * the postscript document. - * - * @return resource Resource of PostScript document. The return value - * is passed to all other functions as the first argument. + * @return resource * @throws PsException * */ @@ -914,14 +537,8 @@ function ps_new() /** - * Creates a new file on disk and writes the PostScript document into it. The - * file will be closed when ps_close is called. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $filename The name of the postscript file. - * If filename is not passed the document will be - * created in memory and all output will go straight to the browser. + * @param resource $psdoc + * @param string $filename * @throws PsException * */ @@ -940,20 +557,11 @@ function ps_open_file($psdoc, ?string $filename = null): void /** - * Places a formerly loaded image on the page. The image can be scaled. - * If the image shall be rotated as well, you will have to rotate the - * coordinate system before with ps_rotate. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. - * @param float $x x-coordinate of the lower left corner of the image. - * @param float $y y-coordinate of the lower left corner of the image. - * @param float $scale The scaling factor for the image. A scale of 1.0 will result - * in a resolution of 72 dpi, because each pixel is equivalent to - * 1 point. + * @param resource $psdoc + * @param int $imageid + * @param float $x + * @param float $y + * @param float $scale * @throws PsException * */ @@ -968,19 +576,11 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): /** - * Draws a rectangle with its lower left corner at (x, - * y). The rectangle starts and ends in its lower left - * corner. If this function is called outside a path it will start a new path. - * If it is called within a path it will add the rectangle as a subpath. If - * the last drawing operation does not end in the lower left corner then there - * will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the lower left corner of the rectangle. - * @param float $y y-coordinate of the lower left corner of the rectangle. - * @param float $width The width of the image. - * @param float $height The height of the image. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PsException * */ @@ -995,14 +595,7 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void /** - * Restores a previously saved graphics context. Any call of - * ps_save must be accompanied by a call to - * ps_restore. All coordinate transformations, line - * style settings, color settings, etc. are being restored to the state - * before the call of ps_save. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1017,11 +610,8 @@ function ps_restore($psdoc): void /** - * Sets the rotation of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $rot Angle of rotation in degree. + * @param resource $psdoc + * @param float $rot * @throws PsException * */ @@ -1036,12 +626,7 @@ function ps_rotate($psdoc, float $rot): void /** - * Saves the current graphics context, containing colors, translation and - * rotation settings and some more. A saved context can be restored with - * ps_restore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1056,12 +641,9 @@ function ps_save($psdoc): void /** - * Sets horizontal and vertical scaling of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x Scaling factor in horizontal direction. - * @param float $y Scaling factor in vertical direction. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1076,18 +658,10 @@ function ps_scale($psdoc, float $x, float $y): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the color of the rectangle's border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $red The red component of the border color. - * @param float $green The green component of the border color. - * @param float $blue The blue component of the border color. + * @param resource $psdoc + * @param float $red + * @param float $green + * @param float $blue * @throws PsException * */ @@ -1102,18 +676,9 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the length of the black and white portion of a - * dashed border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $black The length of the dash. - * @param float $white The length of the gap between dashes. + * @param resource $psdoc + * @param float $black + * @param float $white * @throws PsException * */ @@ -1128,18 +693,9 @@ function ps_set_border_dash($psdoc, float $black, float $white): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the appearance and width of the border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $style style can be solid or - * dashed. - * @param float $width The line width of the border. + * @param resource $psdoc + * @param string $style + * @param float $width * @throws PsException * */ @@ -1154,39 +710,9 @@ function ps_set_border_style($psdoc, string $style, float $width): void /** - * Sets certain information fields of the document. This fields will be shown - * as a comment in the header of the PostScript file. If the document is - * converted to pdf this fields will also be used for the document - * information. - * - * The BoundingBox is usually set to the value given to the - * first page. This only works if ps_findfont has not - * been called before. In such cases the BoundingBox would be left unset - * unless you set it explicitly with this function. - * - * This function will have no effect anymore when the header of the postscript - * file has been already written. It must be called before the first page - * or the first call of ps_findfont. - * - * @param resource $p Resource identifier of the postscript file - * as returned by ps_new. - * @param string $key The name of the information field to set. The values which can be - * set are Keywords, Subject, - * Title, Creator, - * Author, BoundingBox, and - * Orientation. Be aware that some of them has a - * meaning to PostScript viewers. - * @param string $val The value of the information field. The field - * Orientation can be set to either - * Portrait or Landscape. The - * BoundingBox is a string consisting of four numbers. - * The first two numbers are the coordinates of the lower left corner of - * the page. The last two numbers are the coordinates of the upper - * right corner. - * - * Up to version 0.2.6 of pslib, the BoundingBox and Orientation - * will be overwritten by ps_begin_page, - * unless ps_findfont has been called before. + * @param resource $p + * @param string $key + * @param string $val * @throws PsException * */ @@ -1201,13 +727,9 @@ function ps_set_info($p, string $key, string $val): void /** - * Sets several parameters which are used by many functions. Parameters are by - * definition string values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name For a list of possible names see ps_get_parameter. - * @param string $value The value of the parameter. + * @param resource $psdoc + * @param string $name + * @param string $value * @throws PsException * */ @@ -1222,19 +744,9 @@ function ps_set_parameter($psdoc, string $name, string $value): void /** - * Set the position for the next text output. You may alternatively set the x - * and y value separately by calling ps_set_value and - * choosing textx respectively texty as - * the value name. - * - * If you want to output text at a certain position it is more convenient - * to use ps_show_xy instead of setting the text position - * and calling ps_show. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the new text position. - * @param float $y y-coordinate of the new text position. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1249,65 +761,9 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** - * Sets several values which are used by many functions. Parameters are by - * definition float values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name The name can be one of the following: - * - * - * textrendering - * - * - * The way how text is shown. - * - * - * - * - * textx - * - * - * The x coordinate for text output. - * - * - * - * - * texty - * - * - * The y coordinate for text output. - * - * - * - * - * wordspacing - * - * - * The distance between words relative to the width of a space. - * - * - * - * - * leading - * - * - * The distance between lines in pixels. - * - * - * - * - * - * The way how text is shown. - * - * The x coordinate for text output. - * - * The y coordinate for text output. - * - * The distance between words relative to the width of a space. - * - * The distance between lines in pixels. - * @param float $value The way how text is shown. + * @param resource $psdoc + * @param string $name + * @param float $value * @throws PsException * */ @@ -1322,27 +778,13 @@ function ps_set_value($psdoc, string $name, float $value): void /** - * Sets the color for drawing, filling, or both. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The parameter type can be - * both, fill, or - * fillstroke. - * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, - * spot, pattern. Depending on the - * colorspace either only the first, the first three or all parameters - * will be used. - * @param float $c1 Depending on the colorspace this is either the red component (rgb), - * the cyan component (cmyk), the gray value (gray), the identifier of - * the spot color or the identifier of the pattern. - * @param float $c2 Depending on the colorspace this is either the green component (rgb), - * the magenta component (cmyk). - * @param float $c3 Depending on the colorspace this is either the blue component (rgb), - * the yellow component (cmyk). - * @param float $c4 This must only be set in cmyk colorspace and specifies the black - * component. + * @param resource $psdoc + * @param string $type + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PsException * */ @@ -1357,12 +799,9 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** - * Sets the length of the black and white portions of a dashed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $on The length of the dash. - * @param float $off The length of the gap between dashes. + * @param resource $psdoc + * @param float $on + * @param float $off * @throws PsException * */ @@ -1377,13 +816,8 @@ function ps_setdash($psdoc, float $on, float $off): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The value must be between 0.2 and 1. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1398,14 +832,9 @@ function ps_setflat($psdoc, float $value): void /** - * Sets a font, which has to be loaded before with - * ps_findfont. Outputting text without setting a font - * results in an error. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $fontid The font identifier as returned by ps_findfont. - * @param float $size The size of the font. + * @param resource $psdoc + * @param int $fontid + * @param float $size * @throws PsException * */ @@ -1420,11 +849,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** - * Sets the gray value for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $gray The value must be between 0 (white) and 1 (black). + * @param resource $psdoc + * @param float $gray * @throws PsException * */ @@ -1439,14 +865,8 @@ function ps_setgray($psdoc, float $gray): void /** - * Sets how line ends look like. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The type of line ends. Possible values are - * PS_LINECAP_BUTT, - * PS_LINECAP_ROUND, or - * PS_LINECAP_SQUARED. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1461,14 +881,8 @@ function ps_setlinecap($psdoc, int $type): void /** - * Sets how lines are joined. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The way lines are joined. Possible values are - * PS_LINEJOIN_MITER, - * PS_LINEJOIN_ROUND, or - * PS_LINEJOIN_BEVEL. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1483,11 +897,8 @@ function ps_setlinejoin($psdoc, int $type): void /** - * Sets the line width for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of lines in points. + * @param resource $psdoc + * @param float $width * @throws PsException * */ @@ -1502,16 +913,8 @@ function ps_setlinewidth($psdoc, float $width): void /** - * If two lines join in a small angle and the line join is set to - * PS_LINEJOIN_MITER, then - * the resulting spike will be very long. The miter limit is the maximum - * ratio of the miter length (the length of the spike) and the line width. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The maximum ratio between the miter length and the line width. Larger - * values (> 10) will result in very long spikes when two lines meet - * in a small angle. Keep the default unless you know what you are doing. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1526,12 +929,7 @@ function ps_setmiterlimit($psdoc, float $value): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param int $mode * @throws PsException * @@ -1547,14 +945,8 @@ function ps_setoverprintmode($psdoc, int $mode): void /** - * Sets the length of the black and white portions of a dashed line. - * ps_setpolydash is used to set more complicated dash - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $arr arr is a list of length elements alternately for - * the black and white portion. + * @param resource $psdoc + * @param float $arr * @throws PsException * */ @@ -1569,16 +961,10 @@ function ps_setpolydash($psdoc, float $arr): void /** - * Creates a pattern based on a shading, which has to be created before with - * ps_shading. Shading patterns can be used like regular - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. - * @param string $optlist This argument is not currently used. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param int $shadingid + * @param string $optlist + * @return int * @throws PsException * */ @@ -1594,36 +980,18 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** - * Creates a shading, which can be used by ps_shfill or - * ps_shading_pattern. - * - * The color of the shading can be in any color space except for - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The type of shading can be either radial or - * axial. Each shading starts with the current fill - * color and ends with the given color values passed in the parameters - * c1 to c4 - * (see ps_setcolor for their meaning). - * @param float $x0 The coordinates x0, y0, - * x1, y1 are the start and - * end point of the shading. If the type of shading is - * radial the two points are the middle points of - * a starting and ending circle. - * @param float $y0 See ps_setcolor for their meaning. - * @param float $x1 If the shading is of type radial the - * optlist must also contain the parameters - * r0 and r1 with the radius of the - * start and end circle. + * @param resource $psdoc + * @param string $type + * @param float $x0 + * @param float $y0 + * @param float $x1 * @param float $y1 * @param float $c1 * @param float $c2 * @param float $c3 * @param float $c4 * @param string $optlist - * @return int Returns the identifier of the pattern. + * @return int * @throws PsException * */ @@ -1639,15 +1007,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float /** - * Fills an area with a shading, which has to be created before with - * ps_shading. This is an alternative way to creating - * a pattern from a shading ps_shading_pattern and using - * the pattern as the filling color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. + * @param resource $psdoc + * @param int $shadingid * @throws PsException * */ @@ -1662,13 +1023,10 @@ function ps_shfill($psdoc, int $shadingid): void /** - * Output a text at the given text position. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param float $x x-coordinate of the lower left corner of the box surrounding the text. - * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @param resource $psdoc + * @param string $text + * @param float $x + * @param float $y * @throws PsException * */ @@ -1683,10 +1041,6 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param resource $psdoc * @param string $text * @param int $len @@ -1706,19 +1060,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) /** - * Output a text at the current text position. The text position can be set - * by storing the x and y coordinates into the values textx - * and texty with the function - * ps_set_value. The function will issue an - * error if a font was not set before with ps_setfont. - * - * ps_show evaluates the following parameters and values - * as set by ps_set_parameter and - * ps_set_value. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -1733,12 +1076,9 @@ function ps_show($psdoc, string $text): void /** - * Output text at the current position. Do not print more than len characters. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param int $len The maximum number of characters to print. + * @param resource $psdoc + * @param string $text + * @param int $len * @throws PsException * */ @@ -1753,11 +1093,7 @@ function ps_show2($psdoc, string $text, int $len): void /** - * Draws the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1772,13 +1108,8 @@ function ps_stroke($psdoc): void /** - * Output the glyph at position ord in the font - * encoding vector of the current font. The font encoding for a font can be - * set when loading the font with ps_findfont. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $ord The position of the glyph in the font encoding vector. + * @param resource $psdoc + * @param int $ord * @throws PsException * */ @@ -1793,12 +1124,9 @@ function ps_symbol($psdoc, int $ord): void /** - * Sets a new initial point of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the origin of the translated coordinate system. - * @param float $y y-coordinate of the origin of the translated coordinate system. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ diff --git a/generated/8.1/pspell.php b/generated/8.1/pspell.php index 826a9ce3..e94a271e 100644 --- a/generated/8.1/pspell.php +++ b/generated/8.1/pspell.php @@ -5,14 +5,8 @@ use Safe\Exceptions\PspellException; /** - * pspell_add_to_personal adds a word to the personal - * wordlist. If you used pspell_new_config with - * pspell_config_personal to open the dictionary, - * you can save the wordlist later with - * pspell_save_wordlist. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -27,12 +21,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void /** - * pspell_add_to_session adds a word to the wordlist - * associated with the current session. It is very similar to - * pspell_add_to_personal - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -47,11 +37,7 @@ function pspell_add_to_session(int $dictionary, string $word): void /** - * pspell_clear_session clears the current session. - * The current wordlist becomes blank, and, for example, if you try to save - * it with pspell_save_wordlist, nothing happens. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -66,35 +52,11 @@ function pspell_clear_session(int $dictionary): void /** - * Create a config used to open a dictionary. - * - * pspell_config_create has a very similar syntax to - * pspell_new. In fact, using - * pspell_config_create immediately followed by - * pspell_new_config will produce the exact same result. - * However, after creating a new config, you can also use - * pspell_config_* functions before calling - * pspell_new_config to take advantage of some - * advanced functionality. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @return int Returns an PSpell\Config instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @return int * @throws PspellException * */ @@ -110,10 +72,6 @@ function pspell_config_create(string $language, string $spelling = "", string $j /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -130,10 +88,6 @@ function pspell_config_data_dir(int $config, string $directory): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -150,12 +104,8 @@ function pspell_config_dict_dir(int $config, string $directory): void /** - * pspell_config_ignore should be used on a config - * before calling pspell_new_config. This function - * allows short words to be skipped by the spell checker. - * - * @param int $config An PSpell\Config instance. - * @param int $min_length Words less than min_length characters will be skipped. + * @param int $config + * @param int $min_length * @throws PspellException * */ @@ -170,33 +120,8 @@ function pspell_config_ignore(int $config, int $min_length): void /** - * pspell_config_mode should be used on a config - * before calling pspell_new_config. This function - * determines how many suggestions will be returned by - * pspell_suggest. - * - * @param int $config An PSpell\Config instance. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * + * @param int $config + * @param int $mode * @throws PspellException * */ @@ -211,17 +136,8 @@ function pspell_config_mode(int $config, int $mode): void /** - * Set a file that contains personal wordlist. The personal wordlist will be - * loaded and used in addition to the standard one after you call - * pspell_new_config. The file is also the file where - * pspell_save_wordlist will save personal wordlist to. - * - * pspell_config_personal should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The personal wordlist. If the file does not exist, it will be created. - * The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -236,19 +152,8 @@ function pspell_config_personal(int $config, string $filename): void /** - * Set a file that contains replacement pairs. - * - * The replacement pairs improve the quality of the spellchecker. When a word - * is misspelled, and a proper suggestion was not found in the list, - * pspell_store_replacement can be used to store a - * replacement pair and then pspell_save_wordlist to - * save the wordlist along with the replacement pairs. - * - * pspell_config_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -263,18 +168,8 @@ function pspell_config_repl(int $config, string $filename): void /** - * This function determines whether run-together words will be treated as - * legal compounds. That is, "thecat" will be a legal compound, although - * there should be a space between the two words. Changing this setting only - * affects the results returned by pspell_check; - * pspell_suggest will still return suggestions. - * - * pspell_config_runtogether should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $allow TRUE if run-together words should be treated as legal compounds, - * FALSE otherwise. + * @param int $config + * @param bool $allow * @throws PspellException * */ @@ -289,19 +184,8 @@ function pspell_config_runtogether(int $config, bool $allow): void /** - * pspell_config_save_repl determines whether - * pspell_save_wordlist will save the replacement pairs - * along with the wordlist. Usually there is no need to use this function - * because if pspell_config_repl is used, the - * replacement pairs will be saved by - * pspell_save_wordlist anyway, and if it is not, - * the replacement pairs will not be saved. - * - * pspell_config_save_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise. + * @param int $config + * @param bool $save * @throws PspellException * */ @@ -316,17 +200,8 @@ function pspell_config_save_repl(int $config, bool $save): void /** - * pspell_new_config opens up a new dictionary with - * settings specified in a config, created with - * pspell_config_create and modified with - * pspell_config_* functions. This method provides you - * with the most flexibility and has all the functionality provided by - * pspell_new and - * pspell_new_personal. - * - * @param int $config The config parameter is the one returned by - * pspell_config_create when the config was created. - * @return int Returns an PSpell\Dictionary instance on success + * @param int $config + * @return int * @throws PspellException * */ @@ -342,61 +217,13 @@ function pspell_new_config(int $config): int /** - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $filename The file where words added to the personal list will be stored. - * It should be an absolute filename beginning with '/' because otherwise - * it will be relative to $HOME, which is "/root" for most systems, and - * is probably not what you want. - * @param string $language The language code which consists of the two letter ISO 639 language - * code and an optional two letter ISO 3166 country code after a dash - * or underscore. - * @param string $spelling The requested spelling for languages with more than one spelling such - * as English. Known values are 'american', 'british', and 'canadian'. - * @param string $jargon Extra information to distinguish two different words lists that have - * the same language and spelling parameters. - * @param string $encoding The encoding that words are expected to be in. Valid values are - * utf-8, iso8859-*, - * koi8-r, viscii, - * cp1252, machine unsigned 16, - * machine unsigned 32. - * @param int $mode The mode in which spellchecker will work. There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $filename + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -412,64 +239,12 @@ function pspell_new_personal(string $filename, string $language, string $spellin /** - * pspell_new opens up a new dictionary and - * returns an PSpell\Dictionary instance for use in other pspell - * functions. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -485,12 +260,7 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" /** - * pspell_save_wordlist saves the personal wordlist from - * the current session. The location of files to be saved specified with - * pspell_config_personal and (optionally) - * pspell_config_repl. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -505,20 +275,9 @@ function pspell_save_wordlist(int $dictionary): void /** - * pspell_store_replacement stores a replacement pair for - * a word, so that replacement can be returned by - * pspell_suggest later. In order to be able to take - * advantage of this function, you have to use - * pspell_new_personal to open the dictionary. In order - * to permanently save the replacement pair, you have to - * use pspell_config_personal and - * pspell_config_repl to set the path where to save your - * custom wordlists, and then use pspell_save_wordlist - * for the changes to be written to disk. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $misspelled The misspelled word. - * @param string $correct The fixed spelling for the misspelled word. + * @param int $dictionary + * @param string $misspelled + * @param string $correct * @throws PspellException * */ diff --git a/generated/8.1/readline.php b/generated/8.1/readline.php index e5afc24d..82bb7a1f 100644 --- a/generated/8.1/readline.php +++ b/generated/8.1/readline.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ReadlineException; /** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. + * @param string $prompt * @throws ReadlineException * */ @@ -22,19 +20,8 @@ function readline_add_history(string $prompt): void /** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. + * @param string $prompt + * @param callable $callback * @throws ReadlineException * */ @@ -49,8 +36,6 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** - * This function clears the entire command line history. - * * @throws ReadlineException * */ @@ -65,11 +50,7 @@ function readline_clear_history(): void /** - * This function registers a completion function. This is the same kind of - * functionality you'd get if you hit your tab key while using Bash. - * - * @param callable $callback You must supply the name of an existing function which accepts a - * partial command line and returns an array of possible matches. + * @param callable $callback * @throws ReadlineException * */ @@ -84,9 +65,7 @@ function readline_completion_function(callable $callback): void /** - * This function reads a command history from a file. - * - * @param null|string $filename Path to the filename containing the command history. + * @param null|string $filename * @throws ReadlineException * */ @@ -105,9 +84,7 @@ function readline_read_history(?string $filename = null): void /** - * This function writes the command history to a file. - * - * @param null|string $filename Path to the saved file. + * @param null|string $filename * @throws ReadlineException * */ diff --git a/generated/8.1/rpminfo.php b/generated/8.1/rpminfo.php index 2cd42fa6..4e620f8a 100644 --- a/generated/8.1/rpminfo.php +++ b/generated/8.1/rpminfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\RpminfoException; /** - * Add an additional retrieved tag in subsequent queries. - * - * @param int $tag One of RPMTAG_* constant, see the rpminfo constants page. + * @param int $tag * @throws RpminfoException * */ diff --git a/generated/8.1/rrd.php b/generated/8.1/rrd.php index a68379af..d8dc2b4c 100644 --- a/generated/8.1/rrd.php +++ b/generated/8.1/rrd.php @@ -5,11 +5,8 @@ use Safe\Exceptions\RrdException; /** - * Creates the rdd database file. - * - * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -24,11 +21,9 @@ function rrd_create(string $filename, array $options): void /** - * Returns the first data sample from the specified RRA of the RRD file. - * - * @param string $file RRD database file name. - * @param int $raaindex The index number of the RRA that is to be examined. Default value is 0. - * @return int Integer number of unix timestamp. + * @param string $file + * @param int $raaindex + * @return int * @throws RrdException * */ @@ -44,15 +39,9 @@ function rrd_first(string $file, int $raaindex = 0): int /** - * Creates image for a particular data from RRD file. - * - * @param string $filename The filename to output the graph to. This will generally end in either - * .png, .svg or - * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all - * possible options. All options (data definitions, variable definitions, etc.) - * are allowed. - * @return array Array with information about generated image is returned. + * @param string $filename + * @param array $options + * @return array * @throws RrdException * */ @@ -68,10 +57,8 @@ function rrd_graph(string $filename, array $options): array /** - * Returns information about particular RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @param string $filename + * @return array * @throws RrdException * */ @@ -87,11 +74,8 @@ function rrd_info(string $filename): array /** - * Gets array of the UNIX timestamp and the values stored for each date in the - * most recent update of the RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @param string $filename + * @return array * @throws RrdException * */ @@ -107,11 +91,9 @@ function rrd_lastupdate(string $filename): array /** - * Restores the RRD file from the XML dump. - * - * @param string $xml_file XML filename with the dump of the original RRD database file. - * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param string $xml_file + * @param string $rrd_file + * @param array $options * @throws RrdException * */ @@ -130,12 +112,8 @@ function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null) /** - * Change some options in the RRD dabase header file. E.g. renames the source for - * the data etc. - * - * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See - * rrd tune man page for details. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -150,12 +128,8 @@ function rrd_tune(string $filename, array $options): void /** - * Updates the RRD database file. The input data is time interpolated according to the - * properties of the RRD database file. - * - * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -170,12 +144,8 @@ function rrd_update(string $filename, array $options): void /** - * Exports the information about RRD database file. This data can be converted - * to XML file via user space PHP script and then restored back as RRD database - * file. - * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param array $options + * @return array * @throws RrdException * */ diff --git a/generated/8.1/sem.php b/generated/8.1/sem.php index 4e09b6f9..949771db 100644 --- a/generated/8.1/sem.php +++ b/generated/8.1/sem.php @@ -5,19 +5,9 @@ use Safe\Exceptions\SemException; /** - * msg_get_queue returns an id that can be used to - * access the System V message queue with the given - * key. The first call creates the message queue with - * the optional permissions. - * A second call to msg_get_queue for the same - * key will return a different message queue - * identifier, but both identifiers access the same underlying message - * queue. - * - * @param int $key Message queue numeric ID - * @param int $permissions Queue permissions. Default to 0666. If the message queue already - * exists, the permissions will be ignored. - * @return \SysvMessageQueue Returns SysvMessageQueue instance that can be used to access the System V message queue. + * @param int $key + * @param int $permissions + * @return \SysvMessageQueue * @throws SemException * */ @@ -33,9 +23,7 @@ function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue /** - * Checks whether the message queue key exists. - * - * @param int $key Queue key. + * @param int $key * @throws SemException * */ @@ -50,73 +38,14 @@ function msg_queue_exists(int $key): void /** - * msg_receive will receive the first message from the - * specified queue of the type specified by - * desired_message_type. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $desired_message_type If desired_message_type is 0, the message from the front - * of the queue is returned. If desired_message_type is - * greater than 0, then the first message of that type is returned. - * If desired_message_type is less than 0, the first - * message on the queue with a type less than or equal to the - * absolute value of desired_message_type will be read. - * If no messages match the criteria, your script will wait until a suitable - * message arrives on the queue. You can prevent the script from blocking - * by specifying MSG_IPC_NOWAIT in the - * flags parameter. - * @param int|null $received_message_type The type of the message that was received will be stored in this - * parameter. - * @param int $max_message_size The maximum size of message to be accepted is specified by the - * max_message_size; if the message in the queue is larger - * than this size the function will fail (unless you set - * flags as described below). - * @param mixed $message The received message will be stored in message, - * unless there were errors receiving the message. - * @param bool $unserialize If set to - * TRUE, the message is treated as though it was serialized using the - * same mechanism as the session module. The message will be unserialized - * and then returned to your script. This allows you to easily receive - * arrays or complex object structures from other PHP scripts, or if you - * are using the WDDX serializer, from any WDDX compatible source. - * - * If unserialize is FALSE, the message will be - * returned as a binary-safe string. - * @param int $flags The optional flags allows you to pass flags to the - * low-level msgrcv system call. It defaults to 0, but you may specify one - * or more of the following values (by adding or ORing them together). - * - * Flag values for msg_receive - * - * - * - * MSG_IPC_NOWAIT - * If there are no messages of the - * desired_message_type, return immediately and do not - * wait. The function will fail and return an integer value - * corresponding to MSG_ENOMSG. - * - * - * - * MSG_EXCEPT - * Using this flag in combination with a - * desired_message_type greater than 0 will cause the - * function to receive the first message that is not equal to - * desired_message_type. - * - * - * MSG_NOERROR - * - * If the message is longer than max_message_size, - * setting this flag will truncate the message to - * max_message_size and will not signal an error. - * - * - * - * - * - * @param int|null $error_code If the function fails, the optional error_code - * will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $desired_message_type + * @param int|null $received_message_type + * @param int $max_message_size + * @param mixed $message + * @param bool $unserialize + * @param int $flags + * @param int|null $error_code * @throws SemException * */ @@ -131,12 +60,7 @@ function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int & /** - * msg_remove_queue destroys the message queue specified - * by the queue. Only use this function when all - * processes have finished working with the message queue and you need to - * release the system resources held by it. - * - * @param \SysvMessageQueue $queue The message queue. + * @param \SysvMessageQueue $queue * @throws SemException * */ @@ -151,35 +75,12 @@ function msg_remove_queue(\SysvMessageQueue $queue): void /** - * msg_send sends a message of type - * message_type (which MUST be greater than 0) to - * the message queue specified by queue. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $message_type The type of the message (MUST be greater than 0) - * @param mixed $message The body of the message. - * - * If serialize set to FALSE is supplied, - * MUST be of type: string, int, float - * or bool. In other case a warning will be issued. - * @param bool $serialize The optional serialize controls how the - * message is sent. serialize - * defaults to TRUE which means that the message is - * serialized using the same mechanism as the session module before being - * sent to the queue. This allows complex arrays and objects to be sent to - * other PHP scripts, or if you are using the WDDX serializer, to any WDDX - * compatible client. - * @param bool $blocking If the message is too large to fit in the queue, your script will wait - * until another process reads messages from the queue and frees enough - * space for your message to be sent. - * This is called blocking; you can prevent blocking by setting the - * optional blocking parameter to FALSE, in which - * case msg_send will immediately return FALSE if the - * message is too big for the queue, and set the optional - * error_code to MSG_EAGAIN, - * indicating that you should try to send your message again a little - * later on. - * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $message_type + * @param mixed $message + * @param bool $serialize + * @param bool $blocking + * @param int|null $error_code * @throws SemException * */ @@ -194,19 +95,8 @@ function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $s /** - * msg_set_queue allows you to change the values of the - * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - * underlying message queue data structure. - * - * Changing the data structure will require that PHP be running as the same - * user that created the queue, owns the queue (as determined by the - * existing msg_perm.xxx fields), or be running with root privileges. - * root privileges are required to raise the msg_qbytes values above the - * system defined limit. - * - * @param \SysvMessageQueue $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys - * that you require in the data array. + * @param \SysvMessageQueue $queue + * @param array $data * @throws SemException * */ @@ -221,85 +111,8 @@ function msg_set_queue(\SysvMessageQueue $queue, array $data): void /** - * msg_stat_queue returns the message queue meta data - * for the message queue specified by the queue. - * This is useful, for example, to determine which process sent the message - * that was just received. - * - * @param \SysvMessageQueue $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following - * meanings: - * - * Array structure for msg_stat_queue - * - * - * - * msg_perm.uid - * - * The uid of the owner of the queue. - * - * - * - * msg_perm.gid - * - * The gid of the owner of the queue. - * - * - * - * msg_perm.mode - * - * The file access mode of the queue. - * - * - * - * msg_stime - * - * The time that the last message was sent to the queue. - * - * - * - * msg_rtime - * - * The time that the last message was received from the queue. - * - * - * - * msg_ctime - * - * The time that the queue was last changed. - * - * - * - * msg_qnum - * - * The number of messages waiting to be read from the queue. - * - * - * - * msg_qbytes - * - * The maximum number of bytes allowed in one message queue. On - * Linux, this value may be read and modified via - * /proc/sys/kernel/msgmnb. - * - * - * - * msg_lspid - * - * The pid of the process that sent the last message to the queue. - * - * - * - * msg_lrpid - * - * The pid of the process that received the last message from the queue. - * - * - * - * - * - * - * Returns FALSE on failure. + * @param \SysvMessageQueue $queue + * @return array * @throws SemException * */ @@ -315,21 +128,8 @@ function msg_stat_queue(\SysvMessageQueue $queue): array /** - * sem_acquire by default blocks (if necessary) until the - * semaphore can be acquired. A process attempting to acquire a semaphore which - * it has already acquired will block forever if acquiring the semaphore would - * cause its maximum number of semaphore to be exceeded. - * - * After processing a request, any semaphores acquired by the process but not - * explicitly released will be released automatically and a warning will be - * generated. - * - * @param \SysvSemaphore $semaphore semaphore is a semaphore - * obtained from sem_get. - * @param bool $non_blocking Specifies if the process shouldn't wait for the semaphore to be acquired. - * If set to true, the call will return - * false immediately if a semaphore cannot be immediately - * acquired. + * @param \SysvSemaphore $semaphore + * @param bool $non_blocking * @throws SemException * */ @@ -344,25 +144,11 @@ function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): voi /** - * sem_get returns an id that can be used to - * access the System V semaphore with the given key. - * - * A second call to sem_get for the same key - * will return a different semaphore identifier, but both - * identifiers access the same underlying semaphore. - * - * If key is 0, a new private semaphore - * is created for each call to sem_get. - * * @param int $key - * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously - * is set to max_acquire. - * @param int $permissions The semaphore permissions. Actually this value is - * set only if the process finds it is the only process currently - * attached to the semaphore. - * @param bool $auto_release Specifies if the semaphore should be automatically released on request - * shutdown. - * @return \SysvSemaphore Returns a positive semaphore identifier on success. + * @param int $max_acquire + * @param int $permissions + * @param bool $auto_release + * @return \SysvSemaphore * @throws SemException * */ @@ -378,15 +164,7 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ /** - * sem_release releases the semaphore if it - * is currently acquired by the calling process, otherwise - * a warning is generated. - * - * After releasing the semaphore, sem_acquire - * may be called to re-acquire it. - * - * @param \SysvSemaphore $semaphore A Semaphore as returned by - * sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -401,12 +179,7 @@ function sem_release(\SysvSemaphore $semaphore): void /** - * sem_remove removes the given semaphore. - * - * After removing the semaphore, it is no longer accessible. - * - * @param \SysvSemaphore $semaphore A semaphore as returned - * by sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -421,24 +194,10 @@ function sem_remove(\SysvSemaphore $semaphore): void /** - * shm_attach returns an id that can be used to access - * the System V shared memory with the given key, the - * first call creates the shared memory segment with - * size and the optional perm-bits - * permissions. - * - * A second call to shm_attach for the same - * key will return a different SysvSharedMemory - * instance, but both instances access the same underlying - * shared memory. size and - * permissions will be ignored. - * - * @param int $key A numeric shared memory segment ID - * @param int|null $size The memory size. If not provided, default to the - * sysvshm.init_mem in the php.ini, otherwise 10000 - * bytes. - * @param int $permissions The optional permission bits. Default to 0666. - * @return \SysvSharedMemory Returns a SysvSharedMemory instance on success. + * @param int $key + * @param int|null $size + * @param int $permissions + * @return \SysvSharedMemory * @throws SemException * */ @@ -460,12 +219,7 @@ function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \Sysv /** - * shm_detach disconnects from the shared memory given - * by the shm created by - * shm_attach. Remember, that shared memory still exist - * in the Unix system and the data is still present. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ @@ -480,21 +234,9 @@ function shm_detach(\SysvSharedMemory $shm): void /** - * shm_put_var inserts or updates the - * value with the given - * key. - * - * Warnings (E_WARNING level) will be issued if - * shm is not a valid SysV shared memory - * index or if there was not enough shared memory remaining to complete your - * request. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. - * @param mixed $value The variable. All variable types - * that serialize supports may be used: generally - * this means all types except for resources and some internal objects - * that cannot be serialized. + * @param \SysvSharedMemory $shm + * @param int $key + * @param mixed $value * @throws SemException * */ @@ -509,11 +251,8 @@ function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void /** - * Removes a variable with a given key - * and frees the occupied memory. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. + * @param \SysvSharedMemory $shm + * @param int $key * @throws SemException * */ @@ -528,10 +267,7 @@ function shm_remove_var(\SysvSharedMemory $shm, int $key): void /** - * shm_remove removes the shared memory - * shm. All data will be destroyed. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ diff --git a/generated/8.1/session.php b/generated/8.1/session.php index 8af9b82e..2628b174 100644 --- a/generated/8.1/session.php +++ b/generated/8.1/session.php @@ -5,9 +5,6 @@ use Safe\Exceptions\SessionException; /** - * session_abort finishes session without saving - * data. Thus the original values in session data are kept. - * * @throws SessionException * */ @@ -22,27 +19,8 @@ function session_abort(): void /** - * session_cache_expire returns the current setting of - * session.cache_expire. - * - * The cache expire is reset to the default value of 180 stored in - * session.cache_expire - * at request startup time. Thus, - * you need to call session_cache_expire for every - * request (and before session_start is called). - * - * @param int|null $value If value is given and not NULL, the current cache - * expire is replaced with value. - * - * - * - * Setting value is of value only, if - * session.cache_limiter is set to a value - * different from nocache. - * - * - * @return int Returns the current setting of session.cache_expire. - * The value returned should be read in minutes, defaults to 180. + * @param int|null $value + * @return int * @throws SessionException * */ @@ -62,34 +40,8 @@ function session_cache_expire(?int $value = null): int /** - * session_cache_limiter returns the name of the - * current cache limiter. - * - * The cache limiter defines which cache control HTTP headers are sent to - * the client. These headers determine the rules by which the page content - * may be cached by the client and intermediate proxies. Setting the cache - * limiter to nocache disallows any client/proxy caching. - * A value of public permits caching by proxies and the - * client, whereas private disallows caching by proxies - * and permits the client to cache the contents. - * - * In private mode, the Expire header sent to the client - * may cause confusion for some browsers, including Mozilla. - * You can avoid this problem by using private_no_expire mode. The - * Expire header is never sent to the client in this mode. - * - * Setting the cache limiter to '' will turn off automatic sending - * of cache headers entirely. - * - * The cache limiter is reset to the default value stored in - * session.cache_limiter - * at request startup time. Thus, you need to call - * session_cache_limiter for every - * request (and before session_start is called). - * - * @param null|string $value If value is specified and not NULL, the name of the - * current cache limiter is changed to the new value. - * @return string Returns the name of the current cache limiter. + * @param null|string $value + * @return string * @throws SessionException * */ @@ -109,27 +61,8 @@ function session_cache_limiter(?string $value = null): string /** - * session_create_id is used to create new - * session id for the current session. It returns collision free - * session id. - * - * If session is not active, collision check is omitted. - * - * Session ID is created according to php.ini settings. - * - * It is important to use the same user ID of your web server for GC - * task script. Otherwise, you may have permission problems especially - * with files save handler. - * - * @param string $prefix If prefix is specified, new session id - * is prefixed by prefix. Not all - * characters are allowed within the session id. Characters in - * the range a-z A-Z 0-9 , (comma) and - - * (minus) are allowed. - * @return string session_create_id returns new collision free - * session id for the current session. If it is used without active - * session, it omits collision check. - * On failure, FALSE is returned. + * @param string $prefix + * @return string * @throws SessionException * */ @@ -145,14 +78,7 @@ function session_create_id(string $prefix = ""): string /** - * session_decode decodes the serialized session data provided in - * $data, and populates the $_SESSION superglobal - * with the result. - * - * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. - * The serialization method can be set using session.serialize_handler. - * - * @param string $data The encoded data to be stored. + * @param string $data * @throws SessionException * */ @@ -167,18 +93,6 @@ function session_decode(string $data): void /** - * In order to kill the session altogether, the - * session ID must also be unset. If a cookie is used to propagate the - * session ID (default behavior), then the session cookie must be deleted. - * setcookie may be used for that. - * - * When session.use_strict_mode - * is enabled. You do not have to remove obsolete session ID cookie because - * session module will not accept session ID cookie when there is no - * data associated to the session ID and set new session ID cookie. - * Enabling session.use_strict_mode - * is recommended for all sites. - * * @throws SessionException * */ @@ -193,13 +107,7 @@ function session_destroy(): void /** - * session_encode returns a serialized string of the - * contents of the current session data stored in the $_SESSION superglobal. - * - * By default, the serialization method used is internal to PHP, and is not the same as serialize. - * The serialization method can be set using session.serialize_handler. - * - * @return string Returns the contents of the current session encoded. + * @return string * @throws SessionException * */ @@ -215,28 +123,7 @@ function session_encode(): string /** - * session_gc is used to perform session data - * GC(garbage collection). PHP does probability based session GC by - * default. - * - * Probability based GC works somewhat but it has few problems. 1) Low - * traffic sites' session data may not be deleted within the preferred - * duration. 2) High traffic sites' GC may be too frequent GC. 3) GC is - * performed on the user's request and the user will experience a GC - * delay. - * - * Therefore, it is recommended to execute GC periodically for - * production systems using, e.g., "cron" for UNIX-like systems. - * Make sure to disable probability based GC by setting - * session.gc_probability - * to 0. - * - * @return int session_gc returns number of deleted session - * data for success. - * - * Old save handlers do not return number of deleted session data, but - * only success/failure flag. If this is the case, number of deleted - * session data became 1 regardless of actually deleted data. + * @return int * @throws SessionException * */ @@ -252,24 +139,8 @@ function session_gc(): int /** - * session_id is used to get or set the session id for - * the current session. - * - * The constant SID can also be used to - * retrieve the current name and session id as a string suitable for - * adding to URLs. See also Session - * handling. - * - * @param null|string $id If id is specified and not NULL, it will replace the current - * session id. session_id needs to be called before - * session_start for that purpose. Depending on the - * session handler, not all characters are allowed within the session id. - * For example, the file session handler only allows characters in the - * range a-z A-Z 0-9 , (comma) and - (minus)! - * @return string session_id returns the session id for the current - * session or the empty string ("") if there is no current - * session (no current session id exists). - * On failure, FALSE is returned. + * @param null|string $id + * @return string * @throws SessionException * */ @@ -289,16 +160,8 @@ function session_id(?string $id = null): string /** - * session_module_name gets the name of the current - * session module, which is also known as - * session.save_handler. - * - * @param null|string $module If module is specified and not NULL, that module will be - * used instead. - * Passing "user" to this parameter is forbidden. Instead - * session_set_save_handler has to be called to set a user - * defined session handler. - * @return string Returns the name of the current session module. + * @param null|string $module + * @return string * @throws SessionException * */ @@ -318,44 +181,8 @@ function session_module_name(?string $module = null): string /** - * session_name returns the name of the current - * session. If name is given, - * session_name will update the session name and return - * the old session name. - * - * If a new session name is - * supplied, session_name modifies the HTTP cookie - * (and output content when session.transid is - * enabled). Once the HTTP cookie is - * sent, session_name raises error. - * session_name must be called - * before session_start for the session to work - * properly. - * - * The session name is reset to the default value stored in - * session.name at request startup time. Thus, you need to - * call session_name for every request (and before - * session_start is called). - * - * @param null|string $name The session name references the name of the session, which is - * used in cookies and URLs (e.g. PHPSESSID). It - * should contain only alphanumeric characters; it should be short and - * descriptive (i.e. for users with enabled cookie warnings). - * If name is specified and not NULL, the name of the current - * session is changed to its value. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * @return non-falsy-string Returns the name of the current session. If name is given - * and function updates the session name, name of the old session - * is returned. + * @param null|string $name + * @return non-falsy-string * @throws SessionException * */ @@ -375,17 +202,7 @@ function session_name(?string $name = null): string /** - * session_regenerate_id will replace the current - * session id with a new one, and keep the current session information. - * - * When session.use_trans_sid - * is enabled, output must be started after session_regenerate_id - * call. Otherwise, old session ID is used. - * - * @param bool $delete_old_session Whether to delete the old associated session file or not. - * You should not delete old session if you need to avoid - * races caused by deletion or detect/avoid session hijack - * attacks. + * @param bool $delete_old_session * @throws SessionException * */ @@ -400,10 +217,6 @@ function session_regenerate_id(bool $delete_old_session = false): void /** - * session_reset reinitializes a session with - * original values stored in session storage. This function requires an active session and - * discards changes in $_SESSION. - * * @throws SessionException * */ @@ -418,25 +231,8 @@ function session_reset(): void /** - * session_save_path returns the path of the current - * directory used to save session data. - * - * @param null|string $path Session data path. If specified and not NULL, the path to which data is saved will - * be changed. session_save_path needs to be called - * before session_start for that purpose. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * @return string Returns the path of the current directory used for data storage. + * @param null|string $path + * @return string * @throws SessionException * */ @@ -456,41 +252,7 @@ function session_save_path(?string $path = null): string /** - * session_start creates a session or resumes the - * current one based on a session identifier passed via a GET or POST - * request, or passed via a cookie. - * - * When session_start is called or when a session auto starts, - * PHP will call the open and read session save handlers. These will either be a built-in - * save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be - * custom handler as defined by session_set_save_handler. - * The read callback will retrieve any existing session data (stored in a special serialized format) - * and will be unserialized and used to automatically populate the $_SESSION superglobal when the - * read callback returns the saved session data back to PHP session handling. - * - * To use a named session, call - * session_name before calling - * session_start. - * - * When session.use_trans_sid - * is enabled, the session_start function will - * register an internal output handler for URL rewriting. - * - * If a user uses ob_gzhandler or similar with - * ob_start, the function order is important for - * proper output. For example, - * ob_gzhandler must be registered before starting the session. - * - * @param array $options If provided, this is an associative array of options that will override - * the currently set - * session configuration directives. - * The keys should not include the session. prefix. - * - * In addition to the normal set of configuration directives, a - * read_and_close option may also be provided. If set to - * TRUE, this will result in the session being closed immediately after - * being read, thereby avoiding unnecessary locking if the session data - * won't be changed. + * @param array $options * @throws SessionException * */ @@ -505,9 +267,6 @@ function session_start(array $options = []): void /** - * The session_unset function frees all session variables - * currently registered. - * * @throws SessionException * */ @@ -522,16 +281,6 @@ function session_unset(): void /** - * End the current session and store session data. - * - * Session data is usually stored after your script terminated without the - * need to call session_write_close, but as session data - * is locked to prevent concurrent writes only one script may operate on a - * session at any time. When using framesets together with sessions you will - * experience the frames loading one by one due to this locking. You can - * reduce the time needed to load all the frames by ending the session as - * soon as all changes to session variables are done. - * * @throws SessionException * */ diff --git a/generated/8.1/shmop.php b/generated/8.1/shmop.php index ef9f9d46..51d385bd 100644 --- a/generated/8.1/shmop.php +++ b/generated/8.1/shmop.php @@ -5,10 +5,7 @@ use Safe\Exceptions\ShmopException; /** - * shmop_delete is used to delete a shared memory block. - * - * @param \Shmop $shmop The shared memory block resource created by - * shmop_open + * @param \Shmop $shmop * @throws ShmopException * */ @@ -23,14 +20,10 @@ function shmop_delete(\Shmop $shmop): void /** - * shmop_read will read a string from shared memory block. - * - * @param \Shmop $shmop The shared memory block identifier created by - * shmop_open - * @param int $offset Offset from which to start reading - * @param int $size The number of bytes to read. - * 0 reads shmop_size($shmid) - $start bytes. - * @return string Returns the data. + * @param \Shmop $shmop + * @param int $offset + * @param int $size + * @return string * @throws ShmopException * */ diff --git a/generated/8.1/sockets.php b/generated/8.1/sockets.php index f7fee92b..10e015c8 100644 --- a/generated/8.1/sockets.php +++ b/generated/8.1/sockets.php @@ -5,32 +5,8 @@ use Safe\Exceptions\SocketsException; /** - * After the socket socket has been created - * using socket_create, bound to a name with - * socket_bind, and told to listen for connections - * with socket_listen, this function will accept - * incoming connections on that socket. Once a successful connection - * is made, a new Socket instance is returned, - * which may be used for communication. If there are multiple connections - * queued on the socket, the first will be used. If there are no pending - * connections, socket_accept will block until - * a connection becomes present. If socket - * has been made non-blocking using - * socket_set_blocking or - * socket_set_nonblock, FALSE will be returned. - * - * The Socket instance returned by - * socket_accept may not be used to accept new - * connections. The original listening socket - * socket, however, remains open and may be - * reused. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @return \Socket Returns a new Socket instance on success. The actual - * error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param \Socket $socket + * @return \Socket * @throws SocketsException * */ @@ -46,11 +22,8 @@ function socket_accept(\Socket $socket): \Socket /** - * Create a Socket instance, and bind it to the provided AddressInfo. The return - * value of this function may be used with socket_listen. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -66,11 +39,8 @@ function socket_addrinfo_bind(\AddressInfo $address): \Socket /** - * Create a Socket instance, and connect it to the provided AddressInfo instance. The return - * value of this function may be used with the rest of the socket functions. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -86,16 +56,10 @@ function socket_addrinfo_connect(\AddressInfo $address): \Socket /** - * Lookup different ways we can connect to host. The returned array contains - * a set of AddressInfo instances that we can bind to using socket_addrinfo_bind. - * - * @param string $host Hostname to search. - * @param mixed $service The service to connect to. If service is a name, it is translated to the corresponding - * port number. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the - * hints as defined by getadrinfo. - * @return \AddressInfo[] Returns an array of AddressInfo instances that can be used with the other socket_addrinfo functions. - * On failure, FALSE is returned. + * @param string $host + * @param mixed $service + * @param array $hints + * @return \AddressInfo[] * @throws SocketsException * */ @@ -117,22 +81,9 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] /** - * Binds the name given in address to the socket - * described by socket. This has to be done before - * a connection is be established using socket_connect - * or socket_listen. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param string $address If the socket is of the AF_INET family, the - * address is an IP in dotted-quad notation - * (e.g. 127.0.0.1). - * - * If the socket is of the AF_UNIX family, the - * address is the path of a - * Unix-domain socket (e.g. /tmp/my.sock). - * @param int $port The port parameter is only used when - * binding an AF_INET socket, and designates - * the port on which to listen for connections. + * @param \Socket $socket + * @param string $address + * @param int $port * @throws SocketsException * */ @@ -147,23 +98,9 @@ function socket_bind(\Socket $socket, string $address, int $port = 0): void /** - * Initiate a connection to address using the Socket instance - * socket, which must be Socket - * instance created with socket_create. - * - * @param \Socket $socket A Socket instance created with - * socket_create. - * @param string $address The address parameter is either an IPv4 address - * in dotted-quad notation (e.g. 127.0.0.1) if - * socket is AF_INET, a valid - * IPv6 address (e.g. ::1) if IPv6 support is enabled and - * socket is AF_INET6 - * or the pathname of a Unix domain socket, if the socket family is - * AF_UNIX. - * @param int|null $port The port parameter is only used and is mandatory - * when connecting to an AF_INET or an - * AF_INET6 socket, and designates - * the port on the remote host to which a connection should be made. + * @param \Socket $socket + * @param string $address + * @param int|null $port * @throws SocketsException * */ @@ -182,24 +119,9 @@ function socket_connect(\Socket $socket, string $address, ?int $port = null): vo /** - * socket_create_listen creates a new Socket instance of - * type AF_INET listening on all - * local interfaces on the given port waiting for new connections. - * - * This function is meant to ease the task of creating a new socket which - * only listens to accept new connections. - * - * @param int $port The port on which to listen on all interfaces. - * @param int $backlog The backlog parameter defines the maximum length - * the queue of pending connections may grow to. - * SOMAXCONN may be passed as - * backlog parameter, see - * socket_listen for more information. - * @return \Socket socket_create_listen returns a new Socket instance - * on success. The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $port + * @param int $backlog + * @return \Socket * @throws SocketsException * */ @@ -215,27 +137,10 @@ function socket_create_listen(int $port, int $backlog = 128): \Socket /** - * socket_create_pair creates two connected and - * indistinguishable sockets, and stores them in pair. - * This function is commonly used in IPC (InterProcess Communication). - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. See socket_create - * for the full list. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the - * full list. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be retrieved by - * name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * - * See socket_create for the full list of supported - * protocols. - * @param \Socket[]|null $pair Reference to an array in which the two Socket instances will be inserted. + * @param int $domain + * @param int $type + * @param int $protocol + * @param \Socket[]|null $pair * @throws SocketsException * */ @@ -250,25 +155,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair /** - * Creates and returns a Socket instance, also referred to as an endpoint - * of communication. A typical network connection is made up of 2 sockets, one - * performing the role of the client, and another performing the role of the server. - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be - * retrieved by name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * @return \Socket socket_create returns a Socket instance on success. The actual error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $domain + * @param int $type + * @param int $protocol + * @return \Socket * @throws SocketsException * */ @@ -284,10 +174,8 @@ function socket_create(int $domain, int $type, int $protocol): \Socket /** - * - * * @param \Socket $socket - * @return resource Return resource. + * @return resource * @throws SocketsException * */ @@ -303,38 +191,10 @@ function socket_export_stream(\Socket $socket) /** - * The socket_get_option function retrieves the value for - * the option specified by the option parameter for the - * specified socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by - * specifying the protocol number of that level. Protocol numbers can be - * found by using the getprotobyname function. - * @param int $option Reports whether the socket lingers on - * socket_close if data is present. By default, - * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, - * socket_close will wait for its peer to - * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the - * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is - * non-zero and l_linger is non-zero, - * socket_close will block until all the data - * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, - * socket_close will fail and return an error. - * @return mixed Returns the value of the given option. + * @param \Socket $socket + * @param int $level + * @param int $option + * @return mixed * @throws SocketsException * */ @@ -350,25 +210,9 @@ function socket_get_option(\Socket $socket, int $level, int $option) /** - * Queries the remote side of the given socket which may either result in - * host/port or in a Unix filesystem path, dependent on its type. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET or - * AF_INET6, socket_getpeername - * will return the peers (remote) IP address in - * appropriate notation (e.g. 127.0.0.1 or - * fe80::1) in the address - * parameter and, if the optional port parameter is - * present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getpeername will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If given, this will hold the port associated to - * address. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -383,22 +227,9 @@ function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = nu /** - * - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET - * or AF_INET6, socket_getsockname - * will return the local IP address in appropriate notation (e.g. - * 127.0.0.1 or fe80::1) in the - * address parameter and, if the optional - * port parameter is present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getsockname will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If provided, this will hold the associated port. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -413,10 +244,8 @@ function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = nu /** - * Imports a stream that encapsulates a socket into a socket extension resource. - * - * @param resource $stream The stream resource to import. - * @return \Socket Returns FALSE on failure. + * @param resource $stream + * @return \Socket * @throws SocketsException * */ @@ -432,30 +261,8 @@ function socket_import_stream($stream): \Socket /** - * After the socket socket has been created - * using socket_create and bound to a name with - * socket_bind, it may be told to listen for incoming - * connections on socket. - * - * socket_listen is applicable only to sockets of - * type SOCK_STREAM or - * SOCK_SEQPACKET. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_addrinfo_bind - * @param int $backlog A maximum of backlog incoming connections will be - * queued for processing. If a connection request arrives with the queue - * full the client may receive an error with an indication of - * ECONNREFUSED, or, if the underlying protocol supports - * retransmission, the request may be ignored so that retries may succeed. - * - * The maximum number passed to the backlog - * parameter highly depends on the underlying platform. On Linux, it is - * silently truncated to SOMAXCONN. On win32, if - * passed SOMAXCONN, the underlying service provider - * responsible for the socket will set the backlog to a maximum - * reasonable value. There is no standard provision to - * find out the actual backlog value on this platform. + * @param \Socket $socket + * @param int $backlog * @throws SocketsException * */ @@ -470,38 +277,10 @@ function socket_listen(\Socket $socket, int $backlog = 0): void /** - * The function socket_read reads from the Socket instance - * socket created by the - * socket_create or - * socket_accept functions. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $length The maximum number of bytes read is specified by the - * length parameter. Otherwise you can use - * \r, \n, - * or \0 to end reading (depending on the mode - * parameter, see below). - * @param int $mode Optional mode parameter is a named constant: - * - * - * - * PHP_BINARY_READ (Default) - use the system - * recv() function. Safe for reading binary data. - * - * - * - * - * PHP_NORMAL_READ - reading stops at - * \n or \r. - * - * - * - * @return string socket_read returns the data as a string on success (including if the remote host has closed the - * connection). The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual representation of - * the error. + * @param \Socket $socket + * @param int $length + * @param int $mode + * @return string * @throws SocketsException * */ @@ -517,52 +296,11 @@ function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): /** - * The function socket_send sends - * length bytes to the socket - * socket from data. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param string $data A buffer containing the data that will be sent to the remote host. - * @param int $length The number of bytes that will be sent to the remote host from - * data. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @return int socket_send returns the number of bytes sent. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @return int * @throws SocketsException * */ @@ -578,12 +316,10 @@ function socket_send(\Socket $socket, string $data, int $length, int $flags): in /** - * - * * @param \Socket $socket * @param array $message * @param int $flags - * @return int Returns the number of bytes sent. + * @return int * @throws SocketsException * */ @@ -599,56 +335,13 @@ function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int /** - * The function socket_sendto sends - * length bytes from data - * through the socket socket to the - * port at the address address. - * - * @param \Socket $socket A Socket instance created using socket_create. - * @param string $data The sent data will be taken from buffer data. - * @param int $length length bytes from data will be - * sent. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @param string $address IP address of the remote host. - * @param int|null $port port is the remote port number at which the data - * will be sent. - * @return int socket_sendto returns the number of bytes sent to the - * remote host. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @param string $address + * @param int|null $port + * @return int * @throws SocketsException * */ @@ -668,16 +361,7 @@ function socket_sendto(\Socket $socket, string $data, int $length, int $flags, s /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the - * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a blocking socket, the script will pause its execution until it receives - * a signal or it can perform the operation. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -692,17 +376,7 @@ function socket_set_block(\Socket $socket): void /** - * The socket_set_nonblock function sets the - * O_NONBLOCK flag on the socket specified by - * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a - * signal or it can perform the operation. Rather, if the operation would result - * in a block, the called function will fail. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -717,24 +391,10 @@ function socket_set_nonblock(\Socket $socket): void /** - * The socket_set_option function sets the option - * specified by the option parameter, at the - * specified protocol level, to the value pointed to - * by the value parameter for the - * socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the - * getprotobyname function. - * @param int $option The available socket options are the same as those for the - * socket_get_option function. - * @param array|int|string $value The option value. + * @param \Socket $socket + * @param int $level + * @param int $option + * @param array|int|string $value * @throws SocketsException * */ @@ -749,37 +409,8 @@ function socket_set_option(\Socket $socket, int $level, int $option, $value): vo /** - * The socket_shutdown function allows you to stop - * incoming, outgoing or all data (the default) from being sent through the - * socket - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param int $mode The value of mode can be one of the following: - * - * possible values for mode - * - * - * - * 0 - * - * Shutdown socket reading - * - * - * - * 1 - * - * Shutdown socket writing - * - * - * - * 2 - * - * Shutdown socket reading and writing - * - * - * - * - * + * @param \Socket $socket + * @param int $mode * @throws SocketsException * */ @@ -794,13 +425,9 @@ function socket_shutdown(\Socket $socket, int $mode = 2): void /** - * Exports the WSAPROTOCOL_INFO structure into shared memory and returns - * an identifier to be used with socket_wsaprotocol_info_import. The - * exported ID is only valid for the given process_id. - * - * @param \Socket $socket A Socket instance. - * @param int $process_id The ID of the process which will import the socket. - * @return string Returns an identifier to be used for the import + * @param \Socket $socket + * @param int $process_id + * @return string * @throws SocketsException * */ @@ -816,11 +443,8 @@ function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): strin /** - * Imports a socket which has formerly been exported from another process. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. - * @return \Socket Returns a Socket instance on success + * @param string $info_id + * @return \Socket * @throws SocketsException * */ @@ -836,10 +460,7 @@ function socket_wsaprotocol_info_import(string $info_id): \Socket /** - * Releases the shared memory corresponding to the given info_id. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. + * @param string $info_id * @throws SocketsException * */ diff --git a/generated/8.1/sodium.php b/generated/8.1/sodium.php index 58547f6d..12ea3196 100644 --- a/generated/8.1/sodium.php +++ b/generated/8.1/sodium.php @@ -5,16 +5,11 @@ use Safe\Exceptions\SodiumException; /** - * Verify then decrypt with AES-256-GCM. - * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aes256gcm_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -30,15 +25,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt with ChaCha20-Poly1305. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -54,14 +45,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string /** - * Encrypt then authenticate with ChaCha20-Poly1305. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -77,17 +65,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad /** - * Verify then decrypt with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -103,16 +85,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st /** - * Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -128,18 +105,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin /** - * Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -155,17 +125,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s /** - * Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -181,15 +145,9 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri /** - * Verify the authentication tag is valid for a given message and key. - * - * Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached), - * any party capable of verifying a message is also capable of authenticating - * their own messages. (Hence, symmetric authentication.) - * - * @param string $mac Authentication tag produced by sodium_crypto_auth - * @param string $message Message - * @param string $key Authentication key + * @param string $mac + * @param string $message + * @param string $key * @throws SodiumException * */ @@ -204,14 +162,10 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v /** - * Decrypt a message using asymmetric (public key) cryptography. - * - * @param string $ciphertext The encrypted message to attempt to decrypt. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key_pair See sodium_crypto_box_keypair_from_secretkey_and_publickey. - * This should include the sender's public key and the recipient's secret key. - * @return string Returns the plaintext message on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -227,11 +181,9 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p /** - * Decrypt a message that was encrypted with sodium_crypto_box_seal - * - * @param string $ciphertext The encrypted message - * @param string $key_pair The keypair of the recipient. Must include the secret key. - * @return string The plaintext on success. + * @param string $ciphertext + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -247,10 +199,8 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri /** - * Appends a message to the internal hash state. - * - * @param non-empty-string $state The return value of sodium_crypto_generichash_init. - * @param string $message Data to append to the hashing state. + * @param non-empty-string $state + * @param string $message * @throws SodiumException * */ @@ -265,14 +215,10 @@ function sodium_crypto_generichash_update(string &$state, string $message): void /** - * Decrypt an encrypted message with a symmetric (shared) key. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_secretbox - * (ciphertext and tag, concatenated). - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string The decrypted string on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -288,11 +234,9 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string /** - * Verify the signature attached to a message and return the message - * - * @param string $signed_message A message signed with sodium_crypto_sign - * @param non-empty-string $public_key An Ed25519 public key - * @return string Returns the original signed message on success. + * @param string $signed_message + * @param non-empty-string $public_key + * @return string * @throws SodiumException * */ @@ -308,11 +252,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st /** - * Verify signature for the message - * - * @param non-empty-string $signature The cryptographic signature obtained from sodium_crypto_sign_detached - * @param string $message The message being verified - * @param non-empty-string $public_key Ed25519 public key + * @param non-empty-string $signature + * @param string $message + * @param non-empty-string $public_key * @throws SodiumException * */ diff --git a/generated/8.1/solr.php b/generated/8.1/solr.php index 0c4260a0..e5e269d0 100644 --- a/generated/8.1/solr.php +++ b/generated/8.1/solr.php @@ -5,9 +5,7 @@ use Safe\Exceptions\SolrException; /** - * This function returns the current version of the extension as a string. - * - * @return string It returns a string on success. + * @return string * @throws SolrException * */ diff --git a/generated/8.1/spl.php b/generated/8.1/spl.php index 704e4319..7c012526 100644 --- a/generated/8.1/spl.php +++ b/generated/8.1/spl.php @@ -5,12 +5,9 @@ use Safe\Exceptions\SplException; /** - * This function returns an array with the names of the interfaces that the - * given object_or_class and its parents implement. - * - * @param object|string $object_or_class An object (class instance) or a string (class or interface name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -26,12 +23,9 @@ function class_implements($object_or_class, bool $autoload = true): array /** - * This function returns an array with the name of the parent classes of - * the given object_or_class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -47,13 +41,9 @@ function class_parents($object_or_class, bool $autoload = true): array /** - * This function returns an array with the names of the traits that the - * given object_or_class uses. This does however not include - * any traits used by a parent class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -69,30 +59,9 @@ function class_uses($object_or_class, bool $autoload = true): array /** - * Register a function with the spl provided __autoload queue. If the queue - * is not yet activated it will be activated. - * - * If your code has an existing __autoload function then - * this function must be explicitly registered on the __autoload queue. This - * is because spl_autoload_register will effectively - * replace the engine cache for the __autoload function - * by either spl_autoload or - * spl_autoload_call. - * - * If there must be multiple autoload functions, spl_autoload_register - * allows for this. It effectively creates a queue of autoload functions, and - * runs through each of them in the order they are defined. By contrast, - * __autoload may only be defined once. - * - * @param callable(string):void|null $callback The autoload function being registered. - * If NULL, 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 callback - * cannot be registered. - * @param bool $prepend If true, spl_autoload_register will prepend - * the autoloader on the autoload queue instead of appending it. + * @param callable(string):void|null $callback + * @param bool $throw + * @param bool $prepend * @throws SplException * */ @@ -115,14 +84,7 @@ function spl_autoload_register(?callable $callback = null, bool $throw = true, b /** - * Removes a function from the autoload queue. If the queue - * is activated and empty after removing the given function then it will - * be deactivated. - * - * When this function results in the queue being deactivated, any - * __autoload function that previously existed will not be reactivated. - * - * @param mixed $callback The autoload function being unregistered. + * @param mixed $callback * @throws SplException * */ diff --git a/generated/8.1/sqlsrv.php b/generated/8.1/sqlsrv.php index fd85b774..2fc4fbfa 100644 --- a/generated/8.1/sqlsrv.php +++ b/generated/8.1/sqlsrv.php @@ -5,16 +5,7 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and commit/roll - * back transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ @@ -29,14 +20,7 @@ function sqlsrv_begin_transaction($conn): void /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been - * consumed. - * - * @param resource $stmt The statement resource to be cancelled. + * @param resource $stmt * @throws SqlsrvException * */ @@ -51,39 +35,8 @@ function sqlsrv_cancel($stmt): void /** - * Returns information about the client and specified connection - * - * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. - * - * Array returned by sqlsrv_client_info - * - * - * - * Key - * Description - * - * - * - * - * DriverDllName - * SQLNCLI10.DLL - * - * - * DriverODBCVer - * ODBC version (xx.yy) - * - * - * DriverVer - * SQL Server Native Client DLL version (10.5.xxx) - * - * - * ExtensionVer - * php_sqlsrv.dll version (2.0.xxx.x) - * - * - * - * + * @param resource $conn + * @return array * @throws SqlsrvException * */ @@ -99,9 +52,7 @@ function sqlsrv_client_info($conn): array /** - * Closes an open connection and releases resourses associated with the connection. - * - * @param resource $conn The connection to be closed. + * @param resource $conn * @throws SqlsrvException * */ @@ -116,16 +67,7 @@ function sqlsrv_close($conn): void /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and commit/roll back - * transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection on which the transaction is to be committed. + * @param resource $conn * @throws SqlsrvException * */ @@ -140,44 +82,8 @@ function sqlsrv_commit($conn): void /** - * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are - * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". - * @param mixed $value The value of the specified setting. The following table shows possible values: - * - * Error and Logging Setting Options - * - * - * - * Setting - * Options - * - * - * - * - * WarningsReturnAsErrors - * 1 (TRUE) or 0 (FALSE) - * - * - * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) - * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * - * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) - * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * @param string $setting + * @param mixed $value * @throws SqlsrvException * */ @@ -192,11 +98,7 @@ function sqlsrv_configure(string $setting, $value): void /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with - * different parameter values. - * - * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @param resource $stmt * @throws SqlsrvException * */ @@ -211,29 +113,11 @@ function sqlsrv_execute($stmt): void /** - * Returns the next available row of data as an associative array, a numeric - * array, or both (the default). - * - * @param resource $stmt A statement resource returned by sqlsrv_query or sqlsrv_prepare. - * @param int $fetchType A predefined constant specifying the type of array to return. Possible - * values are SQLSRV_FETCH_ASSOC, - * SQLSRV_FETCH_NUMERIC, and - * SQLSRV_FETCH_BOTH (the default). - * - * A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a - * result set with multiple columns of the same name. - * @param int $row Specifies the row to access in a result set that uses a scrollable cursor. - * Possible values are SQLSRV_SCROLL_NEXT, - * SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, - * SQLSRV_SCROLL_LAST, SQLSRV_SCROLL_ABSOLUTE and, - * SQLSRV_SCROLL_RELATIVE (the default). When this parameter - * is specified, the fetchType must be explicitly defined. - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return array|null Returns an array on success, NULL if there are no more rows to return, and - * FALSE if an error occurs. + * @param resource $stmt + * @param int $fetchType + * @param int $row + * @param int $offset + * @return array|null * @throws SqlsrvException * */ @@ -257,34 +141,12 @@ function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?in /** - * Retrieves the next row of data in a result set as an instance of the specified - * class with properties that match the row field names and values that correspond - * to the row field values. - * - * @param resource $stmt A statement resource created by sqlsrv_query or - * sqlsrv_execute. - * @param string $className The name of the class to instantiate. If no class name is specified, - * stdClass is instantiated. - * @param array $ctorParams Values passed to the constructor of the specified class. If the constructor - * of the specified class takes parameters, the ctorParams array must be - * supplied. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return null|object Returns an object on success, NULL if there are no more rows to return, - * and FALSE if an error occurs or if the specified class does not exist. + * @param resource $stmt + * @param string $className + * @param array $ctorParams + * @param int $row + * @param int $offset + * @return null|object * @throws SqlsrvException * */ @@ -310,28 +172,10 @@ function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParam /** - * Makes the next row in a result set available for reading. Use - * sqlsrv_get_field to read the fields of the row. - * - * @param resource $stmt A statement resource created by executing sqlsrv_query - * or sqlsrv_execute. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return bool|null Returns TRUE if the next row of a result set was successfully retrieved, - * FALSE if an error occurs, and NULL if there are no more rows in the result set. + * @param resource $stmt + * @param int $row + * @param int $offset + * @return bool|null * @throws SqlsrvException * */ @@ -353,15 +197,7 @@ function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement - * is rolled back. - * - * @param resource $stmt The statement for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be - * called multiple times in a script. + * @param resource $stmt * @throws SqlsrvException * */ @@ -376,20 +212,10 @@ function sqlsrv_free_stmt($stmt): void /** - * Gets field data from the currently selected row. Fields must be accessed in - * order. Field indices start at 0. - * - * @param resource $stmt A statement resource returned by sqlsrv_query or - * sqlsrv_execute. - * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields - * must be accessed in order. i.e. If you access field index 1, then field - * index 0 will not be available. - * @param int $getAsType The PHP data type for the returned field data. If this parameter is not - * set, the field data will be returned as its default PHP data type. - * For information about default PHP data types, see - * Default PHP Data Types - * in the Microsoft SQLSRV documentation. - * @return mixed Returns data from the specified field on success. + * @param resource $stmt + * @param int $fieldIndex + * @param int $getAsType + * @return mixed * @throws SqlsrvException * */ @@ -409,12 +235,8 @@ function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null) /** - * Makes the next result of the specified statement active. Results include result - * sets, row counts, and output parameters. - * - * @param resource $stmt The statement on which the next result is being called. - * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error - * occurred, and NULL if there are no more results to retrieve. + * @param resource $stmt + * @return bool|null * @throws SqlsrvException * */ @@ -430,12 +252,8 @@ function sqlsrv_next_result($stmt): ?bool /** - * Retrieves the number of fields (columns) on a statement. - * - * @param resource $stmt The statement for which the number of fields is returned. - * sqlsrv_num_fields can be called on a statement before - * or after statement execution. - * @return int Returns the number of fields on success. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -451,19 +269,8 @@ function sqlsrv_num_fields($stmt): int /** - * Retrieves the number of rows in a result set. This function requires that the - * statement resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statement resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * @return int Returns the number of rows retrieved on success. - * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -479,23 +286,11 @@ function sqlsrv_num_rows($stmt): int /** - * Prepares a query for execution. This function is ideal for preparing a query - * that will be executed multiple times with different parameter values. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized - * query. Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -517,22 +312,11 @@ function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $optio /** - * Prepares and executes a query. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. - * Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -554,10 +338,7 @@ function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction - * and returns the connection to auto-commit mode. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ diff --git a/generated/8.1/ssdeep.php b/generated/8.1/ssdeep.php index 2c09aea9..8d93d77a 100644 --- a/generated/8.1/ssdeep.php +++ b/generated/8.1/ssdeep.php @@ -5,14 +5,9 @@ use Safe\Exceptions\SsdeepException; /** - * Calculates the match score between signature1 - * and signature2 using - * context-triggered piecewise hashing, and returns the match - * score. - * - * @param string $signature1 The first fuzzy hash signature string. - * @param string $signature2 The second fuzzy hash signature string. - * @return int Returns an integer from 0 to 100 on success. + * @param string $signature1 + * @param string $signature2 + * @return int * @throws SsdeepException * */ @@ -28,13 +23,8 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int /** - * ssdeep_fuzzy_hash_filename calculates the hash - * of the file specified by file_name using - * context-triggered piecewise - * hashing, and returns that hash. - * - * @param string $file_name The filename of the file to hash. - * @return string Returns a string on success. + * @param string $file_name + * @return string * @throws SsdeepException * */ @@ -50,12 +40,8 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string /** - * ssdeep_fuzzy_hash calculates the hash of - * to_hash using - * context-triggered piecewise hashing, and returns that hash. - * - * @param string $to_hash The input string. - * @return string Returns a string on success. + * @param string $to_hash + * @return string * @throws SsdeepException * */ diff --git a/generated/8.1/ssh2.php b/generated/8.1/ssh2.php index dcc8ca04..41a02aa6 100644 --- a/generated/8.1/ssh2.php +++ b/generated/8.1/ssh2.php @@ -5,11 +5,8 @@ use Safe\Exceptions\Ssh2Exception; /** - * Authenticate over SSH using the ssh agent - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. + * @param resource $session + * @param string $username * @throws Ssh2Exception * */ @@ -24,18 +21,13 @@ function ssh2_auth_agent($session, string $username): void /** - * Authenticate using a public hostkey read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username * @param string $hostname * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. - * @param string $local_username If local_username is omitted, then the value - * for username will be used for it. + * @param string $passphrase + * @param string $local_username * @throws Ssh2Exception * */ @@ -56,13 +48,9 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** - * Authenticate over SSH using a plain password. Since version 0.12 this function - * also supports keyboard_interactive method. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. - * @param string $password Password for username + * @param resource $session + * @param string $username + * @param string $password * @throws Ssh2Exception * */ @@ -77,17 +65,11 @@ function ssh2_auth_password($session, string $username, string $password): void /** - * Authenticate using a public key read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username - * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * - * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. + * @param string $passphrase * @throws Ssh2Exception * */ @@ -106,201 +88,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** - * Establish a connection to a remote SSH server. - * - * Once connected, the client should verify the server's hostkey using - * ssh2_fingerprint, then authenticate using either - * password or public key. - * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters - * as described below. - * - * - * methods may be an associative array - * with any or all of the following parameters. - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * kex - * - * List of key exchange methods to advertise, comma separated - * in order of preference. - * - * - * diffie-hellman-group1-sha1, - * diffie-hellman-group14-sha1, and - * diffie-hellman-group-exchange-sha1 - * - * - * - * hostkey - * - * List of hostkey methods to advertise, comma separated - * in order of preference. - * - * - * ssh-rsa and - * ssh-dss - * - * - * - * client_to_server - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from client to server. - * - * - * - * - * server_to_client - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from server to client. - * - * - * - * - * - * - * - * * - Supported Values are dependent on methods supported by underlying library. - * See libssh2 documentation for additional - * information. - * - * - * - * client_to_server and - * server_to_client may be an associative array - * with any or all of the following parameters. - * - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * crypt - * List of crypto methods to advertise, comma separated - * in order of preference. - * - * rijndael-cbc@lysator.liu.se, - * aes256-cbc, - * aes192-cbc, - * aes128-cbc, - * 3des-cbc, - * blowfish-cbc, - * cast128-cbc, - * arcfour, and - * none** - * - * - * - * comp - * List of compression methods to advertise, comma separated - * in order of preference. - * - * zlib and - * none - * - * - * - * mac - * List of MAC methods to advertise, comma separated - * in order of preference. - * - * hmac-sha1, - * hmac-sha1-96, - * hmac-ripemd160, - * hmac-ripemd160@openssh.com, and - * none** - * - * - * - * - * - * - * - * Crypt and MAC method "none" - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * - * - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any - * or all of the following parameters. - * - * - * Callbacks parameters - * - * - * - * - * Index - * Meaning - * Prototype - * - * - * - * - * ignore - * - * Name of function to call when an - * SSH2_MSG_IGNORE packet is received - * - * void ignore_cb($message) - * - * - * debug - * - * Name of function to call when an - * SSH2_MSG_DEBUG packet is received - * - * void debug_cb($message, $language, $always_display) - * - * - * macerror - * - * Name of function to call when a packet is received but the - * message authentication code failed. If the callback returns - * TRUE, the mismatch will be ignored, otherwise the connection - * will be terminated. - * - * bool macerror_cb($packet) - * - * - * disconnect - * - * Name of function to call when an - * SSH2_MSG_DISCONNECT packet is received - * - * void disconnect_cb($reason, $message, $language) - * - * - * - * - * @return resource Returns a resource on success. + * @param array $methods + * @param array $callbacks + * @return resource * @throws Ssh2Exception * */ @@ -322,10 +114,7 @@ function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?arr /** - * Close a connection to a remote SSH server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @throws Ssh2Exception * */ @@ -340,20 +129,14 @@ function ssh2_disconnect($session): void /** - * Execute a command at the remote end and allocate a channel for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream on success. + * @param array $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ @@ -381,10 +164,8 @@ function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = /** - * Accepts a connection created by a listener. - * - * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen. - * @return resource Returns a stream resource. + * @param resource $listener + * @return resource * @throws Ssh2Exception * */ @@ -400,13 +181,11 @@ function ssh2_forward_accept($listener) /** - * Binds a port on the remote server and listen for connections. - * - * @param resource $session An SSH Session resource, obtained from a call to ssh2_connect. - * @param int $port The port of the remote server. + * @param resource $session + * @param int $port * @param string $host * @param int $max_connections - * @return resource Returns an SSH2 Listener. + * @return resource * @throws Ssh2Exception * */ @@ -428,17 +207,11 @@ function ssh2_forward_listen($session, int $port, ?string $host = null, int $max /** - * - * - * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data - * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. - * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. - * To mark an attribute as mandatory, precede its name with an asterisk. - * If the server is unable to support an attribute marked mandatory, - * it will abort the add process. + * @param resource $pkey + * @param string $algoname + * @param string $blob + * @param bool $overwrite + * @param array $attributes * @throws Ssh2Exception * */ @@ -457,17 +230,8 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** - * Request the Publickey subsystem from an already connected SSH2 server. - * - * The publickey subsystem allows an already connected and authenticated - * client to manage the list of authorized public keys stored on the - * target server in an implementation agnostic manner. - * If the remote server does not support the publickey subsystem, - * the ssh2_publickey_init function will return FALSE. - * * @param resource $session - * @return resource Returns an SSH2 Publickey Subsystem resource for use - * with all other ssh2_publickey_*() methods. + * @return resource * @throws Ssh2Exception * */ @@ -483,11 +247,9 @@ function ssh2_publickey_init($session) /** - * Removes an authorized publickey. - * - * @param resource $pkey Publickey Subsystem Resource - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data + * @param resource $pkey + * @param string $algoname + * @param string $blob * @throws Ssh2Exception * */ @@ -502,12 +264,9 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** - * Copy a file from the remote server to the local filesystem using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $remote_file Path to the remote file. - * @param string $local_file Path to the local file. + * @param resource $session + * @param string $remote_file + * @param string $local_file * @throws Ssh2Exception * */ @@ -522,14 +281,10 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** - * Copy a file from the local filesystem to the remote server using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $local_file Path to the local file. - * @param string $remote_file Path to the remote file. - * @param int $create_mode The file will be created with the mode specified by - * create_mode. + * @param resource $session + * @param string $local_file + * @param string $remote_file + * @param int $create_mode * @throws Ssh2Exception * */ @@ -544,13 +299,7 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** - * Sends an EOF to the stream; this is typically used to close standard input, - * while keeping output and error alive. For example, one can send a remote - * process some data over standard input, close it to start processing, and - * still be able to read out the results without creating additional files. - * - * @param resource $channel An SSH stream; can be acquired through functions like ssh2_fetch_stream - * or ssh2_connect. + * @param resource $channel * @throws Ssh2Exception * */ @@ -565,12 +314,9 @@ function ssh2_send_eof($channel): void /** - * Attempts to change the mode of the specified file to that given in - * mode. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename Path to the file. - * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @param resource $sftp + * @param string $filename + * @param int $mode * @throws Ssh2Exception * */ @@ -585,18 +331,10 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** - * Creates a directory on the remote file server with permissions set to - * mode. - * - * This function is similar to using mkdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname Path of the new directory. - * @param int $mode Permissions on the new directory. - * The actual mode is affected by the current umask. - * @param bool $recursive If recursive is TRUE any parent directories - * required for dirname will be automatically created as well. + * @param resource $sftp + * @param string $dirname + * @param int $mode + * @param bool $recursive * @throws Ssh2Exception * */ @@ -611,11 +349,9 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** - * Renames a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $from The current file that is being renamed. - * @param string $to The new file name that replaces from. + * @param resource $sftp + * @param string $from + * @param string $to * @throws Ssh2Exception * */ @@ -630,12 +366,7 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** - * Removes a directory from the remote file server. - * - * This function is similar to using rmdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $dirname * @throws Ssh2Exception * @@ -651,11 +382,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** - * Creates a symbolic link named link on the remote - * filesystem pointing to target. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $target Target of the symbolic link. + * @param resource $sftp + * @param string $target * @param string $link * @throws Ssh2Exception * @@ -671,9 +399,7 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** - * Deletes a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $filename * @throws Ssh2Exception * @@ -689,13 +415,8 @@ function ssh2_sftp_unlink($sftp, string $filename): void /** - * Request the SFTP subsystem from an already connected SSH2 server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @return resource This method returns an SSH2 SFTP resource for use with - * all other ssh2_sftp_*() methods and the - * ssh2.sftp:// fopen wrapper. + * @param resource $session + * @return resource * @throws Ssh2Exception * */ @@ -711,20 +432,13 @@ function ssh2_sftp($session) /** - * Open a shell at the remote end and allocate a stream for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $term_type term_type should correspond to one of the - * entries in the target system's /etc/termcap file. - * @param array|null $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream resource on success. + * @param resource $session + * @param string $term_type + * @param array|null $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ diff --git a/generated/8.1/stream.php b/generated/8.1/stream.php index 0dfed719..39abd25a 100644 --- a/generated/8.1/stream.php +++ b/generated/8.1/stream.php @@ -5,11 +5,8 @@ use Safe\Exceptions\StreamException; /** - * Sets parameters on the specified context. - * - * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: - * $params['paramname'] = "paramvalue";. + * @param resource $context + * @param array $params * @throws StreamException * */ @@ -24,18 +21,11 @@ function stream_context_set_params($context, array $params): void /** - * Makes a copy of up to length bytes - * of data from the current position (or from the - * offset position, if specified) in - * from to to. If - * length is NULL, all remaining content in - * from will be copied. - * - * @param resource $from The source stream - * @param resource $to The destination stream - * @param int|null $length Maximum bytes to copy. By default all bytes left are copied. - * @param int $offset The offset where to start to copy data - * @return int Returns the total count of bytes copied. + * @param resource $from + * @param resource $to + * @param int|null $length + * @param int $offset + * @return int * @throws StreamException * */ @@ -57,33 +47,11 @@ function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_append will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified - * params to the end of - * the list and will therefore be called last during stream operations. - * To add a filter to the beginning of the list, use - * stream_filter_prepend. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -105,34 +73,11 @@ function stream_filter_append($stream, string $filtername, ?int $read_write = nu /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_prepend will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * See stream_filter_append for an example of - * using this parameter. - * @param mixed $params This filter will be added with the specified params - * to the beginning of the list and will therefore be - * called first during stream operations. To add a filter to the end of the - * list, use stream_filter_append. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -154,20 +99,8 @@ function stream_filter_prepend($stream, string $filtername, ?int $read_write = n /** - * stream_filter_register allows you to implement - * your own filter on any registered stream used with all the other - * filesystem functions (such as fopen, - * fread etc.). - * - * @param string $filter_name The filter name to be registered. - * @param string $class To implement a filter, you need to define a class as an extension of - * php_user_filter with a number of member - * functions. When performing read/write operations on the stream - * to which your filter is attached, PHP will pass the data through your - * filter (and any other filters attached to that stream) so that the - * data may be modified as desired. You must implement the methods - * exactly as described in php_user_filter - doing - * otherwise will lead to undefined behaviour. + * @param string $filter_name + * @param string $class * @throws StreamException * */ @@ -182,13 +115,7 @@ function stream_filter_register(string $filter_name, string $class): void /** - * Removes a stream filter previously added to a stream with - * stream_filter_prepend or - * stream_filter_append. Any data remaining in the - * filter's internal buffer will be flushed through to the next filter before - * removing it. - * - * @param resource $stream_filter The stream filter to be removed. + * @param resource $stream_filter * @throws StreamException * */ @@ -203,18 +130,10 @@ function stream_filter_remove($stream_filter): void /** - * Identical to file_get_contents, except that - * stream_get_contents operates on an already open - * stream resource and returns the remaining contents in a string, up to - * maxlength bytes and starting at the specified - * offset. - * - * @param resource $handle A stream resource (e.g. returned from fopen) - * @param int $maxlength The maximum bytes to read. Defaults to -1 (read all the remaining - * buffer). - * @param int $offset Seek to the specified offset before reading. If this number is negative, - * no seeking will occur and reading will start from the current position. - * @return string Returns a string. + * @param resource $handle + * @param int $maxlength + * @param int $offset + * @return string * @throws StreamException * */ @@ -230,27 +149,10 @@ function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): st /** - * Gets a line from the given handle. - * - * Reading ends when length bytes have been read, when - * the non-empty string specified by ending is found (which is - * not included in the return value), or on EOF - * (whichever comes first). - * - * This function is nearly identical to fgets except in - * that it allows end of line delimiters other than the standard \n, \r, and - * \r\n, and does not return the delimiter itself. - * - * @param resource $handle A valid file handle. - * @param int $length The maximum number of bytes to read from the handle. - * Negative values are not supported. - * Zero (0) means the default socket chunk size, - * i.e. 8192 bytes. - * @param string $ending An optional string delimiter. - * @return string Returns a string of up to length bytes read from the file - * pointed to by handle. - * - * If an error occurs, returns FALSE. + * @param resource $handle + * @param int $length + * @param string $ending + * @return string * @throws StreamException * */ @@ -266,9 +168,6 @@ function stream_get_line($handle, int $length, string $ending = ""): string /** - * Determines if stream stream refers to a valid terminal type device. - * This is a more portable version of posix_isatty, since it works on Windows systems too. - * * @param resource $stream * @throws StreamException * @@ -284,10 +183,8 @@ function stream_isatty($stream): void /** - * Resolve filename against the include path according to the same rules as fopen/include. - * - * @param string $filename The filename to resolve. - * @return string Returns a string containing the resolved absolute filename. + * @param string $filename + * @return string * @throws StreamException * */ @@ -303,20 +200,8 @@ function stream_resolve_include_path(string $filename): string /** - * Sets blocking or non-blocking mode on a stream. - * - * This function works for any stream that supports non-blocking mode - * (currently, regular files and socket streams). - * - * @param resource $stream The stream. - * @param bool $enable If enable is FALSE, the given stream - * will be switched to non-blocking mode, and if TRUE, it - * will be switched to blocking mode. This affects calls like - * fgets and fread - * that read from the stream. In non-blocking mode an - * fgets call will always return right away - * while in blocking mode it will wait for data to become available - * on the stream. + * @param resource $stream + * @param bool $enable * @throws StreamException * */ @@ -331,17 +216,9 @@ function stream_set_blocking($stream, bool $enable): void /** - * Sets the timeout value on stream, - * expressed in the sum of seconds and - * microseconds. - * - * When the stream times out, the 'timed_out' key of the array returned by - * stream_get_meta_data is set to TRUE, although no - * error/warning is generated. - * - * @param resource $stream The target stream. - * @param int $seconds The seconds part of the timeout to be set. - * @param int $microseconds The microseconds part of the timeout to be set. + * @param resource $stream + * @param int $seconds + * @param int $microseconds * @throws StreamException * */ @@ -356,18 +233,10 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** - * Accept a connection on a socket previously created by - * stream_socket_server. - * - * @param resource $server_socket The server socket to accept a connection from. - * @param float $timeout Override the default socket accept timeout. Time should be given in - * seconds. - * @param null|string $peername Will be set to the name (address) of the client which connected, if - * included and available from the selected transport. - * - * Can also be determined later using - * stream_socket_get_name. - * @return resource Returns a stream to the accepted socket connection. + * @param resource $server_socket + * @param float $timeout + * @param null|string $peername + * @return resource * @throws StreamException * */ @@ -389,51 +258,13 @@ function stream_socket_accept($server_socket, ?float $timeout = null, ?string &$ /** - * Initiates a stream or datagram connection to the destination specified - * by remote_socket. The type of socket created - * is determined by the transport specified using standard URL formatting: - * transport://target. For Internet Domain sockets - * (AF_INET) such as TCP and UDP, the target portion - * of the remote_socket parameter should consist of - * a hostname or IP address followed by a colon and a port number. For Unix - * domain sockets, the target portion should point - * to the socket file on the filesystem. - * - * @param string $remote_socket Address to the socket to connect to. - * @param int|null $errno Will be set to the system level error number if connection fails. - * @param null|string $errstr Will be set to the system level error message if the connection fails. - * @param float $timeout Number of seconds until the connect() system call - * should timeout. - * - * - * This parameter only applies when not making asynchronous - * connection attempts. - * - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * @param int-mask $flags Bitmask field which may be set to any combination of connection flags. - * Currently the select of connection flags is limited to - * STREAM_CLIENT_CONNECT (default), - * STREAM_CLIENT_ASYNC_CONNECT and - * STREAM_CLIENT_PERSISTENT. - * @param resource $context A valid context resource created with stream_context_create. - * @return resource On success a stream resource is returned which may - * be used together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @param string $remote_socket + * @param int|null $errno + * @param null|string $errstr + * @param float $timeout + * @param int-mask $flags + * @param resource $context + * @return resource * @throws StreamException * */ @@ -457,12 +288,9 @@ function stream_socket_client(string $remote_socket, ?int &$errno = null, ?strin /** - * Returns the local or remote name of a given socket connection. - * - * @param resource $handle The socket to get the name of. - * @param bool $want_peer If set to TRUE the remote socket name will be returned, if set - * to FALSE the local socket name will be returned. - * @return string The name of the socket. + * @param resource $handle + * @param bool $want_peer + * @return string * @throws StreamException * */ @@ -478,25 +306,10 @@ function stream_socket_get_name($handle, bool $want_peer): string /** - * stream_socket_pair creates a pair of connected, - * indistinguishable socket streams. This function is commonly used in IPC - * (Inter-Process Communication). - * - * @param int $domain The protocol family to be used: STREAM_PF_INET, - * STREAM_PF_INET6 or - * STREAM_PF_UNIX - * @param int $type The type of communication to be used: - * STREAM_SOCK_DGRAM, - * STREAM_SOCK_RAW, - * STREAM_SOCK_RDM, - * STREAM_SOCK_SEQPACKET or - * STREAM_SOCK_STREAM - * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, - * STREAM_IPPROTO_IP, - * STREAM_IPPROTO_RAW, - * STREAM_IPPROTO_TCP or - * STREAM_IPPROTO_UDP - * @return resource[] Returns an array with the two socket resources on success. + * @param int $domain + * @param int $type + * @param int $protocol + * @return resource[] * @throws StreamException * */ @@ -512,44 +325,12 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array /** - * Creates a stream or datagram socket on the specified - * local_socket. - * - * This function only creates a socket, to begin accepting connections - * use stream_socket_accept. - * - * @param string $local_socket The type of socket created is determined by the transport specified - * using standard URL formatting: transport://target. - * - * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the - * remote_socket parameter should consist of a - * hostname or IP address followed by a colon and a port number. For - * Unix domain sockets, the target portion should - * point to the socket file on the filesystem. - * - * Depending on the environment, Unix domain sockets may not be available. - * A list of available transports can be retrieved using - * stream_get_transports. See - * for a list of bulitin transports. - * @param int|null $errno If the optional errno and errstr - * arguments are present they will be set to indicate the actual system - * level error that occurred in the system-level socket(), - * bind(), and listen() calls. If - * the value returned in errno is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. - * Note that the errno and - * errstr arguments will always be passed by reference. - * @param null|string $errstr See errno description. - * @param int $flags A bitmask field which may be set to any combination of socket creation - * flags. - * - * For UDP sockets, you must use STREAM_SERVER_BIND as - * the flags parameter. + * @param string $local_socket + * @param int|null $errno + * @param null|string $errstr + * @param int $flags * @param resource $context - * @return resource Returns the created stream. + * @return resource * @throws StreamException * */ @@ -569,15 +350,8 @@ function stream_socket_server(string $local_socket, ?int &$errno = null, ?string /** - * Shutdowns (partially or not) a full-duplex connection. - * - * @param resource $stream An open stream (opened with stream_socket_client, - * for example) - * @param int $mode One of the following constants: STREAM_SHUT_RD - * (disable further receptions), STREAM_SHUT_WR - * (disable further transmissions) or - * STREAM_SHUT_RDWR (disable further receptions and - * transmissions). + * @param resource $stream + * @param int $mode * @throws StreamException * */ @@ -592,10 +366,7 @@ function stream_socket_shutdown($stream, int $mode): void /** - * Tells whether the stream supports locking through - * flock. - * - * @param resource $stream The stream to check. + * @param resource $stream * @throws StreamException * */ @@ -610,16 +381,9 @@ function stream_supports_lock($stream): void /** - * Allows you to implement your own protocol handlers and streams for use - * with all the other filesystem functions (such as fopen, - * fread etc.). - * - * @param string $protocol The wrapper name to be registered. - * Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. - * @param string $class The classname which implements the protocol. - * @param int $flags Should be set to STREAM_IS_URL if - * protocol is a URL protocol. Default is 0, local - * stream. + * @param string $protocol + * @param string $class + * @param int $flags * @throws StreamException * */ @@ -634,9 +398,6 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 /** - * Restores a built-in wrapper previously unregistered with - * stream_wrapper_unregister. - * * @param string $protocol * @throws StreamException * @@ -652,11 +413,6 @@ function stream_wrapper_restore(string $protocol): void /** - * Allows you to disable an already defined stream wrapper. Once the wrapper - * has been disabled you may override it with a user-defined wrapper using - * stream_wrapper_register or reenable it later on with - * stream_wrapper_restore. - * * @param string $protocol * @throws StreamException * diff --git a/generated/8.1/strings.php b/generated/8.1/strings.php index 4b673a75..a9f7e651 100644 --- a/generated/8.1/strings.php +++ b/generated/8.1/strings.php @@ -5,10 +5,8 @@ use Safe\Exceptions\StringsException; /** - * convert_uudecode decodes a uuencoded string. - * - * @param string $string The uuencoded data. - * @return string Returns the decoded data as a string. + * @param string $string + * @return string * @throws StringsException * */ @@ -24,10 +22,8 @@ function convert_uudecode(string $string): string /** - * Decodes a hexadecimally encoded binary string. - * - * @param string $string Hexadecimal representation of data. - * @return string Returns the binary representation of the given data. + * @param string $string + * @return string * @throws StringsException * */ @@ -43,16 +39,9 @@ function hex2bin(string $string): string /** - * Calculates the MD5 hash of the file specified by the - * filename parameter using the - * RSA Data Security, Inc. - * MD5 Message-Digest Algorithm, and returns that hash. - * The hash is a 32-character hexadecimal number. - * - * @param string $filename The filename - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 16. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ @@ -68,15 +57,9 @@ function md5_file(string $filename, bool $binary = false): string /** - * Calculates the sha1 hash of the file specified by - * filename using the - * US Secure Hash Algorithm 1, - * and returns that hash. The hash is a 40-character hexadecimal number. - * - * @param string $filename The filename of the file to hash. - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 20. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ diff --git a/generated/8.1/swoole.php b/generated/8.1/swoole.php index 3e9d4dc5..f9500d37 100644 --- a/generated/8.1/swoole.php +++ b/generated/8.1/swoole.php @@ -5,12 +5,8 @@ use Safe\Exceptions\SwooleException; /** - * - * - * @param string $hostname The host name. - * @param callable $callback The host name. - * - * The IP address. + * @param string $hostname + * @param callable $callback * @throws SwooleException * */ @@ -25,12 +21,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void /** - * - * - * @param string $filename The filename of the file being read. - * @param string $callback The name of the file. - * - * The content read from the file. + * @param string $filename + * @param string $callback * @throws SwooleException * */ @@ -45,11 +37,9 @@ function swoole_async_readfile(string $filename, string $callback): void /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. - * @param int $offset The offset. + * @param string $filename + * @param string $content + * @param int $offset * @param callable $callback * @throws SwooleException * @@ -71,10 +61,8 @@ function swoole_async_write(string $filename, string $content, ?int $offset = nu /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. + * @param string $filename + * @param string $content * @param callable $callback * @param int $flags * @throws SwooleException @@ -97,8 +85,6 @@ function swoole_async_writefile(string $filename, string $content, ?callable $ca /** - * - * * @param callable $callback * @throws SwooleException * @@ -114,8 +100,6 @@ function swoole_event_defer(callable $callback): void /** - * - * * @param int $fd * @throws SwooleException * @@ -131,8 +115,6 @@ function swoole_event_del(int $fd): void /** - * - * * @param int $fd * @param string $data * @throws SwooleException diff --git a/generated/8.1/uodbc.php b/generated/8.1/uodbc.php index 3afbd818..23dd7049 100644 --- a/generated/8.1/uodbc.php +++ b/generated/8.1/uodbc.php @@ -5,22 +5,9 @@ use Safe\Exceptions\UodbcException; /** - * Toggles autocommit behaviour. - * - * By default, auto-commit is on for a connection. Disabling - * auto-commit is equivalent with starting a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param bool $enable If enable is TRUE, auto-commit is enabled, if - * it is FALSE auto-commit is disabled. - * @return mixed Without the enable parameter, this function returns - * auto-commit status for odbc. Non-zero is - * returned if auto-commit is on, 0 if it is off, or FALSE if an error - * occurs. - * - * If enable is set, this function returns TRUE on - * success. + * @param resource $odbc + * @param bool $enable + * @return mixed * @throws UodbcException * */ @@ -36,101 +23,8 @@ function odbc_autocommit($odbc, bool $enable = false) /** - * Controls handling of binary column data. ODBC SQL types affected are - * BINARY, VARBINARY, and - * LONGVARBINARY. - * The default mode can be set using the - * uodbc.defaultbinmode php.ini directive. - * - * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte - * (8 bits) of source data is represented as two ASCII characters. - * These characters are the ASCII character representation of the - * number in its hexadecimal form. For example, a binary - * 00000001 is converted to - * "01" and a binary 11111111 - * is converted to "FF". - * - * While the handling of BINARY and VARBINARY - * columns only depend on the binmode, the handling of LONGVARBINARY - * columns also depends on the longreadlen as well: - * - * LONGVARBINARY handling - * - * - * - * binmode - * longreadlen - * result - * - * - * - * - * ODBC_BINMODE_PASSTHRU - * 0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * 0 - * passthru - * - * - * ODBC_BINMODE_CONVERT - * 0 - * passthru - * - * - * ODBC_BINMODE_PASSTHRU - * >0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * >0 - * return as is - * - * - * ODBC_BINMODE_CONVERT - * >0 - * return as char - * - * - * - * - * - * If odbc_fetch_into is used, passthru means that an - * empty string is returned for these columns. - * If odbc_result is used, passthru means that the data are - * sent directly to the client (i.e. printed). - * - * @param int $statement The result identifier. - * - * If statement is 0, the - * settings apply as default for new results. - * @param int $mode Possible values for mode are: - * - * - * - * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * - * ODBC_BINMODE_RETURN: Return as is - * - * - * - * - * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * - * - * - * Handling of binary long - * columns is also affected by odbc_longreadlen. - * - * + * @param int $statement + * @param int $mode * @throws UodbcException * */ @@ -145,39 +39,12 @@ function odbc_binmode(int $statement, int $mode): void /** - * Lists columns and associated privileges for the given table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * This result identifier can be used to fetch a list of columns and - * associated privileges. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param string $column + * @return resource * @throws UodbcException * */ @@ -193,47 +60,12 @@ function odbc_columnprivileges($odbc, string $catalog, string $schema, string $t /** - * Lists all columns in the requested range. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -259,10 +91,7 @@ function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?s /** - * Commits all pending transactions on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -277,44 +106,11 @@ function odbc_commit($odbc): void /** - * The connection id returned by this functions is needed by other - * ODBC functions. You can have multiple connections open at once as long as - * they either use different db or different credentials. - * - * With some ODBC drivers, executing a complex stored procedure may - * fail with an error similar to: "Cannot open a cursor on a stored - * procedure that has anything other than a single select statement - * in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some - * drivers don't support the optional row_number parameter in - * odbc_fetch_row. SQL_CUR_USE_ODBC might help - * in that case, too. - * - * @param string $dsn The database source name for the connection. Alternatively, a - * DSN-less connection string can be used. - * @param string $user The username. - * @param string $password The password. - * @param int $cursor_option This sets the type of cursor to be used - * for this connection. This parameter is not normally needed, but - * can be useful for working around problems with some ODBC drivers. - * - * - * - * - * SQL_CUR_USE_IF_NEEDED - * - * - * - * - * SQL_CUR_USE_ODBC - * - * - * - * - * SQL_CUR_USE_DRIVER - * - * - * - * @return resource Returns an ODBC connection. + * @param string $dsn + * @param string $user + * @param string $password + * @param int $cursor_option + * @return resource * @throws UodbcException * */ @@ -330,10 +126,8 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o /** - * Gets the cursorname for the given result_id. - * - * @param resource $statement The result identifier. - * @return string Returns the cursor name, as a string. + * @param resource $statement + * @return string * @throws UodbcException * */ @@ -349,17 +143,9 @@ function odbc_cursor($statement): string /** - * This function will return the list of available DSN (after calling it - * several times). - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $fetch_type The fetch_type can be one of two constant types: - * SQL_FETCH_FIRST, SQL_FETCH_NEXT. - * Use SQL_FETCH_FIRST the first time this function is - * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching - * the last available DSN. + * @param resource $odbc + * @param int $fetch_type + * @return array * @throws UodbcException * */ @@ -375,13 +161,9 @@ function odbc_data_source($odbc, int $fetch_type): array /** - * Sends an SQL statement to the database server. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The SQL statement. - * @return resource Returns an ODBC result identifier if the SQL command was executed - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -397,18 +179,8 @@ function odbc_exec($odbc, string $query) /** - * Executes a statement prepared with odbc_prepare. - * - * @param resource $statement The result id resource, from odbc_prepare. - * @param array $params Parameters in params will be - * substituted for placeholders in the prepared statement in order. - * Elements of this array will be converted to strings by calling this - * function. - * - * Any parameters in params which - * start and end with single quotes will be taken as the name of a - * file to read and send to the database server as the data for the - * appropriate placeholder. + * @param resource $statement + * @param array $params * @throws UodbcException * */ @@ -423,16 +195,10 @@ function odbc_execute($statement, array $params = []): void /** - * Fetch one result row into array. - * - * @param resource $statement The result resource. - * @param array|null $array The result array - * that can be of any type since it will be converted to type - * array. The array will contain the column values starting at array - * index 0. - * @param int $row The row number. - * @return int Returns the number of columns in the result; - * FALSE on error. + * @param resource $statement + * @param array|null $array + * @param int $row + * @return int * @throws UodbcException * */ @@ -448,12 +214,9 @@ function odbc_fetch_into($statement, ?array &$array, int $row = 0): int /** - * Gets the length of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field length. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -469,12 +232,9 @@ function odbc_field_len($statement, int $field): int /** - * Gets the name of the field occupying the given column number in the given - * result identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field name as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -490,13 +250,9 @@ function odbc_field_name($statement, int $field): string /** - * Gets the number of the column slot that corresponds to the named field in - * the given result identifier. - * - * @param resource $statement The result identifier. - * @param string $field The field name. - * @return int Returns the field number as a integer. - * Field numbering starts at 1. + * @param resource $statement + * @param string $field + * @return int * @throws UodbcException * */ @@ -512,12 +268,9 @@ function odbc_field_num($statement, string $field): int /** - * Gets the scale of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field scale as a integer. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -533,12 +286,9 @@ function odbc_field_scale($statement, int $field): int /** - * Gets the SQL type of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field type as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -554,38 +304,14 @@ function odbc_field_type($statement, int $field): string /** - * Retrieves a list of foreign keys in the specified table or a list of - * foreign keys in other tables that refer to the primary key in the - * specified table - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. - * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. - * @param string $pk_table The primary key table. - * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_table The foreign key table. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PKTABLE_CAT - * PKTABLE_SCHEM - * PKTABLE_NAME - * PKCOLUMN_NAME - * FKTABLE_CAT - * FKTABLE_SCHEM - * FKTABLE_NAME - * FKCOLUMN_NAME - * KEY_SEQ - * UPDATE_RULE - * DELETE_RULE - * FK_NAME - * PK_NAME - * DEFERRABILITY - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $pk_catalog + * @param string $pk_schema + * @param string $pk_table + * @param string $fk_catalog + * @param string $fk_schema + * @param string $fk_table + * @return resource * @throws UodbcException * */ @@ -601,34 +327,9 @@ function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $ /** - * Retrieves information about data types supported by the data source. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $data_type The data type, which can be used to restrict the information to a - * single data type. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TYPE_NAME - * DATA_TYPE - * PRECISION - * LITERAL_PREFIX - * LITERAL_SUFFIX - * CREATE_PARAMS - * NULLABLE - * CASE_SENSITIVE - * SEARCHABLE - * UNSIGNED_ATTRIBUTE - * MONEY - * AUTO_INCREMENT - * LOCAL_TYPE_NAME - * MINIMUM_SCALE - * MAXIMUM_SCALE - * - * - * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @param resource $odbc + * @param int $data_type + * @return resource * @throws UodbcException * */ @@ -644,14 +345,8 @@ function odbc_gettypeinfo($odbc, int $data_type = 0) /** - * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. - * The default length can be set using the - * uodbc.defaultlrl php.ini directive. - * - * @param resource $statement The result identifier. - * @param int $length The number of bytes returned to PHP is controlled by the parameter - * length. If it is set to 0, long column data is passed through to the - * client (i.e. printed) when retrieved with odbc_result. + * @param resource $statement + * @param int $length * @throws UodbcException * */ @@ -666,10 +361,8 @@ function odbc_longreadlen($statement, int $length): void /** - * Gets the number of fields (columns) in an ODBC result. - * - * @param resource $statement The result identifier returned by odbc_exec. - * @return int Returns the number of fields. + * @param resource $statement + * @return int * @throws UodbcException * */ @@ -685,23 +378,11 @@ function odbc_num_fields($statement): int /** - * Opens a persistent database connection. - * - * This function is much like - * odbc_connect, except that the connection is - * not really closed when the script has finished. Future requests - * for a connection with the same dsn, - * user, password - * combination (via odbc_connect and - * odbc_pconnect) can reuse the persistent - * connection. - * * @param string $dsn * @param string $user * @param string $password * @param int $cursor_option - * @return resource Returns an ODBC connection. - * error. + * @return resource * @throws UodbcException * */ @@ -717,19 +398,9 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ /** - * Prepares a statement for execution. The result identifier can be used - * later to execute the statement with odbc_execute. - * - * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support - * stored procedures that accept parameters of type IN, INOUT, and OUT as - * defined by the ODBC specification. However, the Unified ODBC driver - * currently only supports parameters of type IN to stored procedures. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The query string statement being prepared. - * @return resource Returns an ODBC result identifier if the SQL command was prepared - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -745,26 +416,11 @@ function odbc_prepare($odbc, string $query) /** - * Returns a result identifier that can be used to fetch the column names - * that comprise the primary key for a table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param resource $odbc + * @param string $catalog + * @param string $schema * @param string $table - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * KEY_SEQ - * PK_NAME - * - * Drivers can report additional columns. + * @return resource * @throws UodbcException * */ @@ -780,50 +436,12 @@ function odbc_primarykeys($odbc, string $catalog, string $schema, string $table) /** - * Retrieve information about parameters to procedures. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The proc. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns the list of input and output parameters, as well as the - * columns that make up the result set for the specified procedures. - * Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * COLUMN_NAME - * COLUMN_TYPE - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -849,34 +467,11 @@ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = /** - * Lists all procedures in the requested range. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC - * result identifier containing the information. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * NUM_INPUT_PARAMS - * NUM_OUTPUT_PARAMS - * NUM_RESULT_SETS - * REMARKS - * PROCEDURE_TYPE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @return resource * @throws UodbcException * */ @@ -900,16 +495,9 @@ function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, /** - * Prints all rows from a result identifier produced by - * odbc_exec. The result is printed in HTML table format. - * The data is not escaped. - * - * This function is not supposed to be used in production environments; it is - * merely meant for development purposes, to get a result set quickly rendered. - * - * @param resource $statement The result identifier. - * @param string $format Additional overall table formatting. - * @return int Returns the number of rows in the result. + * @param resource $statement + * @param string $format + * @return int * @throws UodbcException * */ @@ -925,14 +513,9 @@ function odbc_result_all($statement, string $format = ""): int /** - * Get result data - * - * @param resource $statement The ODBC resource. - * @param mixed $field The field name being retrieved. It can either be an integer containing - * the column number of the field you want; or it can be a string - * containing the name of the field. - * @return mixed Returns the string contents of the field, FALSE on error, NULL for - * NULL data, or TRUE for binary data. + * @param resource $statement + * @param mixed $field + * @return mixed * @throws UodbcException * */ @@ -948,10 +531,7 @@ function odbc_result($statement, $field) /** - * Rolls back all pending statements on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -966,32 +546,10 @@ function odbc_rollback($odbc): void /** - * This function allows fiddling with the ODBC options for a - * particular connection or query result. It was written to help - * find work around to problems in quirky ODBC drivers. You should - * probably only use this function if you are an ODBC programmer and - * understand the effects the various options will have. You will - * certainly need a good ODBC reference to explain all the different - * options and values that can be used. Different driver versions - * support different options. - * - * Because the effects may vary depending on the ODBC driver, use of - * this function in scripts to be made publicly available is - * strongly discouraged. Also, some ODBC options are not available - * to this function because they must be set before the connection - * is established or the query is prepared. However, if on a - * particular job it can make PHP work so your boss doesn't tell you - * to use a commercial product, that's all that really - * matters. - * - * @param resource $odbc Is a connection id or result id on which to change the settings. - * For SQLSetConnectOption(), this is a connection id. - * For SQLSetStmtOption(), this is a result id. - * @param int $which Is the ODBC function to use. The value should be - * 1 for SQLSetConnectOption() and - * 2 for SQLSetStmtOption(). - * @param int $option The option to set. - * @param int $value The value for the given option. + * @param resource $odbc + * @param int $which + * @param int $option + * @param int $value * @throws UodbcException * */ @@ -1006,42 +564,14 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void /** - * Retrieves either the optimal set of columns that uniquely identifies a - * row in the table, or columns that are automatically updated when any - * value in the row is updated by a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $type When the type argument is SQL_BEST_ROWID, - * odbc_specialcolumns returns the - * column or columns that uniquely identify each row in the table. - * - * When the type argument is SQL_ROWVER, - * odbc_specialcolumns returns the column or columns in the - * specified table, if any, that are automatically updated by the data source - * when any value in the row is updated by any transaction. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table. - * @param int $scope The scope, which orders the result set. - * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION - * or SQL_SCOPE_SESSION. - * @param int $nullable Determines whether to return special columns that can have a NULL value. - * One of SQL_NO_NULLS or SQL_NULLABLE . - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * SCOPE - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * PSEUDO_COLUMN - * - * Drivers can report additional columns. + * @param resource $odbc + * @param int $type + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $scope + * @param int $nullable + * @return resource * @throws UodbcException * */ @@ -1057,37 +587,13 @@ function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, /** - * Get statistics about a table and its indexes. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table name. - * @param int $unique The type of the index. - * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. - * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. - * The latter requests that the driver retrieve the CARDINALITY and - * PAGES only if they are readily available from the server. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * NON_UNIQUE - * INDEX_QUALIFIER - * INDEX_NAME - * TYPE - * ORDINAL_POSITION - * COLUMN_NAME - * ASC_OR_DESC - * CARDINALITY - * PAGES - * FILTER_CONDITION - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $unique + * @param int $accuracy + * @return resource * @throws UodbcException * */ @@ -1103,33 +609,11 @@ function odbc_statistics($odbc, string $catalog, string $schema, string $table, /** - * Lists tables in the requested range and the privileges associated - * with each table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource An ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @return resource * @throws UodbcException * */ @@ -1145,75 +629,12 @@ function odbc_tableprivileges($odbc, string $catalog, string $schema, string $ta /** - * Lists all tables in the requested range. - * - * To support enumeration of qualifiers, owners, and table types, - * the following special semantics for the - * catalog, schema, - * table, and - * table_type are available: - * - * - * - * If catalog is a single percent - * character (%) and schema and - * table are empty strings, then the result - * set contains a list of valid qualifiers for the data - * source. (All columns except the TABLE_QUALIFIER column contain - * NULLs.) - * - * - * - * - * If schema is a single percent character - * (%) and catalog and - * table are empty strings, then the result - * set contains a list of valid owners for the data source. (All - * columns except the TABLE_OWNER column contain - * NULLs.) - * - * - * - * - * If table_type is a single percent - * character (%) and catalog, - * schema and table - * are empty strings, then the result set contains a list of - * valid table types for the data source. (All columns except the - * TABLE_TYPE column contain NULLs.) - * - * - * - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $types If table_type is not an empty string, it - * must contain a list of comma-separated values for the types of - * interest; each value may be enclosed in single quotes (') or - * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the - * data source does not support a specified table type, - * odbc_tables does not return any results for - * that type. - * @return resource Returns an ODBC result identifier containing the information. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * TABLE_TYPE - * REMARKS - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $types + * @return resource * @throws UodbcException * */ diff --git a/generated/8.1/uopz.php b/generated/8.1/uopz.php index 17d2e760..de1a0dc9 100644 --- a/generated/8.1/uopz.php +++ b/generated/8.1/uopz.php @@ -5,10 +5,8 @@ use Safe\Exceptions\UopzException; /** - * Makes class extend parent - * - * @param string $class The name of the class to extend - * @param string $parent The name of the class to inherit + * @param string $class + * @param string $parent * @throws UopzException * */ @@ -23,8 +21,6 @@ function uopz_extend(string $class, string $parent): void /** - * Makes class implement interface - * * @param string $class * @param string $interface * @throws UopzException diff --git a/generated/8.1/url.php b/generated/8.1/url.php index ae463211..f65c527b 100644 --- a/generated/8.1/url.php +++ b/generated/8.1/url.php @@ -5,15 +5,9 @@ use Safe\Exceptions\UrlException; /** - * Decodes a base64 encoded string. - * - * @param string $string The encoded data. - * @param bool $strict If the strict parameter is set to TRUE - * then the base64_decode function will return - * FALSE if the input contains character from outside the base64 - * alphabet. Otherwise invalid characters will be silently discarded. - * @return string Returns the decoded data. The returned data may be - * binary. + * @param string $string + * @param bool $strict + * @return string * @throws UrlException * */ @@ -29,16 +23,10 @@ function base64_decode(string $string, bool $strict = false): string /** - * get_headers returns an array with the headers sent - * by the server in response to a HTTP request. - * - * @param string $url The target URL. - * @param bool $associative If the optional associative parameter is set to true, - * get_headers parses the response and sets the - * array's keys. - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return array Returns an indexed or associative array with the headers. + * @param string $url + * @param bool $associative + * @param null|resource $context + * @return array * @throws UrlException * */ @@ -58,40 +46,9 @@ function get_headers(string $url, bool $associative = false, $context = null): a /** - * Opens filename and parses it line by line for - * <meta> tags in the file. The parsing stops at - * </head>. - * - * @param string $filename The path to the HTML file, as a string. This can be a local file or an - * URL. - * - * - * What get_meta_tags parses - * - * - * - * - * - * - * ]]> - * - * - * (pay attention to line endings - PHP uses a native function to - * parse the input, so a Mac file won't work on Unix). - * @param bool $use_include_path Setting use_include_path to TRUE will result - * in PHP trying to open the file along the standard include path as per - * the include_path directive. - * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. - * - * The value of the name property becomes the key, the value of the content - * property becomes the value of the returned array, so you can easily use - * standard array functions to traverse it or access single values. - * Special characters in the value of the name property are substituted with - * '_', the rest is converted to lower case. If two meta tags have the same - * name, only the last one is returned. - * - * Returns FALSE on failure. + * @param string $filename + * @param bool $use_include_path + * @return array * @throws UrlException * */ @@ -107,90 +64,9 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array /** - * This function parses a URL and returns an associative array containing any - * of the various components of the URL that are present. - * The values of the array elements are not URL decoded. - * - * This function is not meant to validate - * the given URL, it only breaks it up into the above listed parts. Partial and invalid - * URLs are also accepted, parse_url tries its best to - * parse them correctly. - * - * @param string $url The URL to parse. - * @param int $component Specify one of PHP_URL_SCHEME, - * PHP_URL_HOST, PHP_URL_PORT, - * PHP_URL_USER, PHP_URL_PASS, - * PHP_URL_PATH, PHP_URL_QUERY - * or PHP_URL_FRAGMENT to retrieve just a specific - * URL component as a string (except when - * PHP_URL_PORT is given, in which case the return - * value will be an int). - * @return array|int|null|string On seriously malformed URLs, parse_url. - * - * If the component parameter is omitted, an - * associative array is returned. At least one element will be - * present within the array. Potential keys within this array are: - * - * - * - * scheme - e.g. http - * - * - * - * - * host - * - * - * - * - * port - * - * - * - * - * user - * - * - * - * - * pass - * - * - * - * - * path - * - * - * - * - * query - after the question mark ? - * - * - * - * - * fragment - after the hashmark # - * - * - * - * - * If the component parameter is specified, - * parse_url returns a string (or an - * int, in the case of PHP_URL_PORT) - * instead of an array. If the requested component doesn't exist - * within the given URL, NULL will be returned. - * As of PHP 8.0.0, parse_url distinguishes absent and empty - * queries and fragments: - * - * - * - * - * - * - * - * Previously all cases resulted in query and fragment being NULL. - * - * Note that control characters (cf. ctype_cntrl) in the - * components are replaced with underscores (_). + * @param string $url + * @param int $component + * @return array|int|null|string * @throws UrlException * */ diff --git a/generated/8.1/var.php b/generated/8.1/var.php index 70f048df..48e3f889 100644 --- a/generated/8.1/var.php +++ b/generated/8.1/var.php @@ -5,48 +5,8 @@ use Safe\Exceptions\VarException; /** - * Set the type of variable var to - * type. - * - * @param mixed $var The variable being converted. - * @param string $type Possibles values of type are: - * - * - * - * "boolean" or "bool" - * - * - * - * - * "integer" or "int" - * - * - * - * - * "float" or "double" - * - * - * - * - * "string" - * - * - * - * - * "array" - * - * - * - * - * "object" - * - * - * - * - * "null" - * - * - * + * @param mixed $var + * @param string $type * @throws VarException * */ diff --git a/generated/8.1/xdiff.php b/generated/8.1/xdiff.php index dab92fce..4ed412cd 100644 --- a/generated/8.1/xdiff.php +++ b/generated/8.1/xdiff.php @@ -5,14 +5,9 @@ use Safe\Exceptions\XdiffException; /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -27,14 +22,9 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * and xdiff_file_rabdiff functions or their string counterparts. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -49,16 +39,9 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -73,20 +56,11 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest /** - * Makes an unified diff containing differences between old_file and - * new_file and stores it in dest file. The - * resulting file is human-readable. An optional context parameter - * specifies how many lines of context should be added around each change. - * Setting minimal parameter to true will result in outputting the shortest - * patch file possible (can take a long time). - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. - * @param int $context Indicates how many lines of context you want to include in diff - * result. - * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result - * (can take a long time). + * @param string $old_file + * @param string $new_file + * @param string $dest + * @param int $context + * @param bool $minimal * @throws XdiffException * */ @@ -101,16 +75,9 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * or xdiff_file_rabdiff functions or their string counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -125,19 +92,9 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi /** - * Makes a binary diff of two files and stores the result in a patch file. - * The difference between this function and xdiff_file_bdiff is different - * algorithm used which should result in faster execution and smaller diff produced. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff - * website. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -152,13 +109,9 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -174,15 +127,9 @@ function xdiff_string_bpatch(string $str, string $patch): string /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -198,24 +145,11 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. - * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if - * it is provided. - * - * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, - * xdiff_file_diff functions or compatible tools. - * @param int $flags flags can be either - * XDIFF_PATCH_NORMAL (default mode, normal patch) - * or XDIFF_PATCH_REVERSE (reversed patch). - * - * Starting from version 1.5.0, you can also use binary OR to enable - * XDIFF_PATCH_IGNORESPACE flag. - * @param null|string $error If provided then rejected parts are stored inside this variable. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @param int $flags + * @param null|string $error + * @return string * @throws XdiffException * */ diff --git a/generated/8.1/xml.php b/generated/8.1/xml.php index 8b53cf72..72f86934 100644 --- a/generated/8.1/xml.php +++ b/generated/8.1/xml.php @@ -5,9 +5,7 @@ use Safe\Exceptions\XmlException; /** - * Frees the given XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to free. + * @param \XMLParser $parser * @throws XmlException * */ @@ -22,48 +20,8 @@ function xml_parser_free(\XMLParser $parser): void /** - * Sets the character data handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up character data handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * data - * - * - * The second parameter, data, contains - * the character data as a string. - * - * - * - * - * - * Character data handler is called for every piece of a text in the XML - * document. It can be called multiple times inside each fragment (e.g. - * for non-ASCII strings). - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -78,50 +36,8 @@ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): /** - * Sets the default handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up default handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * - * data - * - * - * - * The second parameter, data, contains - * the character data.This may be the XML declaration, - * document type declaration, entities or other data for which - * no other handler exists. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -136,63 +52,9 @@ function xml_set_default_handler(\XMLParser $parser, callable $handler): void /** - * Sets the element handler functions for the XML parser. - * start_handler and - * end_handler are strings containing - * the names of functions that must exist when xml_parse - * is called for parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up start and end element handler functions. - * @param callable $start_handler The function named by start_handler - * must accept three parameters: - * - * start_element_handler - * XMLParserparser - * stringname - * arrayattribs - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * name - * - * - * The second parameter, name, contains the name - * of the element for which this handler is called.If case-folding is in effect for this - * parser, the element name will be in uppercase letters. - * - * - * - * - * attribs - * - * - * The third parameter, attribs, contains an - * associative array with the element's attributes (if any).The keys - * of this array are the attribute names, the values are the attribute - * values.Attribute names are case-folded on the same criteria as - * element names.Attribute values are not - * case-folded. - * - * - * The original order of the attributes can be retrieved by walking - * through attribs the normal way, using - * each.The first key in the array was the first - * attribute, and so on. - * - * - * - * - * @param callable $end_handler The first parameter, parser, is a - * reference to the XML parser calling the handler. + * @param \XMLParser $parser + * @param callable $start_handler + * @param callable $end_handler * @throws XmlException * */ @@ -207,49 +69,8 @@ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, ca /** - * Set a handler to be called when leaving the scope of a namespace - * declaration. This will be called, for each namespace declaration, after - * the handler for the end tag of the element in which the namespace was - * declared. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -264,84 +85,8 @@ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handle /** - * Sets the external entity reference handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up external entity reference handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters, and should return an integer value.If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringopen_entity_names - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * open_entity_names - * - * - * The second parameter, open_entity_names, is a - * space-separated list of the names of the entities that are open for - * the parse of this entity (including the name of the referenced - * entity). - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (system_id) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * The fourth parameter, system_id, is the - * system identifier as specified in the entity declaration. - * - * - * - * - * public_id - * - * - * The fifth parameter, public_id, is the - * public identifier as specified in the entity declaration, or - * an empty string if none was specified; the whitespace in the - * public identifier will have been normalized as required by - * the XML spec. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -356,89 +101,8 @@ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handl /** - * Sets the notation declaration handler function for the XML parser - * parser. - * - * A notation declaration is part of the document's DTD and has the - * following format: - * - * name - * { systemId | publicId?> - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param \XMLParser $parser A reference to the XML parser to set up notation declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters: - * - * handler - * XMLParserparser - * stringnotation_name - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * Currently this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -453,13 +117,8 @@ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): v /** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param \XMLParser $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. + * @param \XMLParser $parser + * @param object $object * @throws XmlException * */ @@ -474,66 +133,8 @@ function xml_set_object(\XMLParser $parser, object $object): void /** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * <?target - * data?> - * - * - * You can put PHP code into such a tag, but be aware of one limitation: in - * an XML PI, the PI end tag (?>) can not be quoted, - * so this character sequence should not appear in the PHP code you embed - * with PIs in XML documents.If it does, the rest of the PHP code, as well - * as the "real" PI end tag, will be treated as character data. - * - * @param \XMLParser $parser A reference to the XML parser to set up processing instruction (PI) handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters: - * - * handler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * target - * - * - * The second parameter, target, contains the PI - * target. - * - * - * - * - * data - * - * - * The third parameter, data, contains the PI - * data. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -548,58 +149,8 @@ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $ha /** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * stringuri - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -614,96 +165,8 @@ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $hand /** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param \XMLParser $parser A reference to the XML parser to set up unparsed entity declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept six - * parameters: - * - * handler - * XMLParserparser - * stringentity_name - * stringbase - * stringsystem_id - * stringpublic_id - * stringnotation_name - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the - * handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * - * - * - * notation_name - * - * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ diff --git a/generated/8.1/xmlrpc.php b/generated/8.1/xmlrpc.php index 3007ab7d..38243a14 100644 --- a/generated/8.1/xmlrpc.php +++ b/generated/8.1/xmlrpc.php @@ -5,10 +5,8 @@ use Safe\Exceptions\XmlrpcException; /** - * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * - * @param \DateTime|string $value Value to set the type - * @param string $type 'base64' or 'datetime' + * @param \DateTime|string $value + * @param string $type * @throws XmlrpcException * */ diff --git a/generated/8.1/yaml.php b/generated/8.1/yaml.php index 0b549947..8e6b196f 100644 --- a/generated/8.1/yaml.php +++ b/generated/8.1/yaml.php @@ -5,21 +5,11 @@ use Safe\Exceptions\YamlException; /** - * Convert all or part of a YAML document stream read from a file to a PHP variable. - * - * @param string $filename Path to the file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $filename + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -39,24 +29,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?a /** - * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * - * @param string $url url should be of the form "scheme://...". PHP - * will search for a protocol handler (also known as a wrapper) for that - * scheme. If no wrappers for that protocol are registered, PHP will emit - * a notice to help you track potential problems in your script and then - * continue as though filename specifies a regular file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is - * -1 an array will be returned with one entry - * for each document found in the stream. + * @param string $url + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -76,21 +53,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $ /** - * Convert all or part of a YAML document stream to a PHP variable. - * - * @param string $input The string to parse as a YAML document stream. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $input + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ diff --git a/generated/8.1/yaz.php b/generated/8.1/yaz.php index ce5dd4d0..1832141f 100644 --- a/generated/8.1/yaz.php +++ b/generated/8.1/yaz.php @@ -5,45 +5,9 @@ use Safe\Exceptions\YazException; /** - * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search - * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf - * prior to this function. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array - * containing the valid RPN query under the key rpn. - * - * Upon failure, three indexes are set in this array to indicate the cause - * of failure: - * - * - * - * errorcode - the CCL error code (integer) - * - * - * - * - * errorstring - the CCL error string - * - * - * - * - * errorpos - approximate position in query of failure - * (integer is character position) - * - * - * - * - * errorcode - the CCL error code (integer) - * - * errorstring - the CCL error string - * - * errorpos - approximate position in query of failure - * (integer is character position) + * @param resource $id + * @param string $query + * @param array|null $result * @throws YazException * */ @@ -58,9 +22,7 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void /** - * Closes the connection given by parameter id. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -75,193 +37,9 @@ function yaz_close($id): void /** - * This function returns a connection resource on success, zero on - * failure. - * - * yaz_connect prepares for a connection to a - * Z39.50 server. - * This function is non-blocking and does not attempt to establish - * a connection - it merely prepares a connect to be performed later when - * yaz_wait is called. - * - * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted - * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication - * string (OpenAuth). - * - * If given as an array, the contents of the array serves as options. - * - * - * user - * - * - * Username for authentication. - * - * - * - * - * group - * - * - * Group for authentication. - * - * - * - * - * password - * - * - * Password for authentication. - * - * - * - * - * cookie - * - * - * Cookie for session (YAZ proxy). - * - * - * - * - * proxy - * - * - * Proxy for connection (YAZ proxy). - * - * - * - * - * persistent - * - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * - * - * - * - * piggyback - * - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * - * - * - * charset - * - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * - * preferredMessageSize - * - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * maximumRecordSize - * - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * - * Username for authentication. - * - * Group for authentication. - * - * Password for authentication. - * - * Cookie for session (YAZ proxy). - * - * Proxy for connection (YAZ proxy). - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * @return mixed A connection resource on success, FALSE on error. + * @param string $zurl + * @param mixed $options + * @return mixed * @throws YazException * */ @@ -281,14 +59,8 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by - * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to - * yaz_connect. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are - * separated by a plus sign +. + * @param resource $id + * @param string $databases * @throws YazException * */ @@ -303,15 +75,8 @@ function yaz_database($id, string $databases): void /** - * This function sets the element set name for retrieval. - * - * Call this function before yaz_search or - * yaz_present to specify the element set name for - * records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $elementset Most servers support F (for full records) and - * B (for brief records). + * @param resource $id + * @param string $elementset * @throws YazException * */ @@ -326,12 +91,7 @@ function yaz_element($id, string $elementset): void /** - * This function prepares for retrieval of records after a successful search. - * - * The yaz_range function should be called prior to this - * function to specify the range of records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -346,32 +106,9 @@ function yaz_present($id): void /** - * yaz_search prepares for a search on the given - * connection. - * - * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when - * yaz_wait is called. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 - * query in prefix query notation. - * @param string $query The RPN query is a textual representation of the Type-1 query as - * defined by the Z39.50 standard. However, in the text representation - * as used by YAZ a prefix notation is used, that is the operator - * precedes the operands. The query string is a sequence of tokens where - * white space is ignored unless surrounded by double quotes. Tokens beginning - * with an at-character (@) are considered operators, - * otherwise they are treated as search terms. - * - * You can find information about attributes at the - * Z39.50 Maintenance Agency - * site. - * - * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and - * yaz_ccl_parse. + * @param resource $id + * @param string $type + * @param string $query * @throws YazException * */ @@ -386,44 +123,8 @@ function yaz_search($id, string $type, string $query): void /** - * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and - * yaz_itemorder. - * - * yaz_wait returns when all servers have either - * completed all requests or aborted (in case of errors). - * - * @param array $options An associative array of options: - * - * - * timeout - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * - * - * - * event - * - * - * A boolean. - * - * - * - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * A boolean. - * @return mixed Returns TRUE on success. - * In event mode, returns resource. + * @param array $options + * @return mixed * @throws YazException * */ diff --git a/generated/8.1/zip.php b/generated/8.1/zip.php index d1a628eb..7cbf1cce 100644 --- a/generated/8.1/zip.php +++ b/generated/8.1/zip.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ZipException; /** - * Closes the specified directory entry. - * - * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @param resource $zip_entry * @throws ZipException * */ @@ -22,10 +20,8 @@ function zip_entry_close($zip_entry): void /** - * Returns the compressed size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The compressed size. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -41,11 +37,8 @@ function zip_entry_compressedsize($zip_entry): int /** - * Returns the compression method of the directory entry specified - * by zip_entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The compression method. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -61,10 +54,8 @@ function zip_entry_compressionmethod($zip_entry): string /** - * Returns the actual size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The size of the directory entry. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -80,10 +71,8 @@ function zip_entry_filesize($zip_entry): int /** - * Returns the name of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The name of the directory entry. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -99,16 +88,9 @@ function zip_entry_name($zip_entry): string /** - * Opens a directory entry in a zip file for reading. - * - * @param resource $zip_dp A valid resource handle returned by zip_open. - * @param resource $zip_entry A directory entry returned by zip_read. - * @param string $mode Any of the modes specified in the documentation of - * fopen. - * - * Currently, mode is ignored and is always - * "rb". This is due to the fact that zip support - * in PHP is read only access. + * @param resource $zip_dp + * @param resource $zip_entry + * @param string $mode * @throws ZipException * */ @@ -123,13 +105,9 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void /** - * Reads from an open directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $len The number of bytes to return. - * - * This should be the uncompressed length you wish to read. - * @return string Returns the data read, empty string on end of a file. + * @param resource $zip_entry + * @param int $len + * @return string * @throws ZipException * */ diff --git a/generated/8.1/zlib.php b/generated/8.1/zlib.php index 69d14dc6..38e4f681 100644 --- a/generated/8.1/zlib.php +++ b/generated/8.1/zlib.php @@ -5,20 +5,10 @@ use Safe\Exceptions\ZlibException; /** - * Incrementally deflates data in the specified context. - * - * @param \DeflateContext $context A context created with deflate_init. - * @param string $data A chunk of data to compress. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of compressed data. + * @param \DeflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -34,92 +24,9 @@ function deflate_add(\DeflateContext $context, string $data, int $flush_mode = Z /** - * Initializes an incremental deflate context using the specified - * encoding. - * - * Note that the window option here only sets the window size - * of the algorithm, differently from the zlib filters where the same parameter - * also sets the encoding to use; the encoding must be set with the - * encoding parameter. - * - * Limitation: there is currently no way to set the header information on a GZIP - * compressed stream, which are set as follows: GZIP signature - * (\x1f\x8B); compression method (\x08 - * == DEFLATE); 6 zero bytes; the operating system set to the current system - * (\x00 = Windows, \x03 = Unix, etc.) - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \DeflateContext Returns a deflate context resource (zlib.deflate) on - * success. + * @param int $encoding + * @param array $options + * @return \DeflateContext * @throws ZlibException * */ @@ -135,10 +42,7 @@ function deflate_init(int $encoding, array $options = []): \DeflateContext /** - * Closes the given gz-file pointer. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -153,20 +57,10 @@ function gzclose($stream): void /** - * This function compresses the given string using the ZLIB - * data format. - * - * For details on the ZLIB compression algorithm see the document - * "ZLIB Compressed Data Format - * Specification version 3.3" (RFC 1950). - * - * @param string $data The data to compress. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. - * - * If -1 is used, the default compression of the zlib library is used which is 6. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The compressed string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -182,12 +76,9 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** - * This function returns a decoded version of the input - * data. - * - * @param string $data The data to decode, encoded by gzencode. - * @param int $max_length The maximum length of data to decode. - * @return string The decoded string. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -203,19 +94,10 @@ function gzdecode(string $data, int $max_length = 0): string /** - * This function compresses the given string using the DEFLATE - * data format. - * - * For details on the DEFLATE compression algorithm see the document - * "DEFLATE Compressed Data Format - * Specification version 1.3" (RFC 1951). - * - * @param string $data The data to deflate. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The deflated string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -231,25 +113,10 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ /** - * This function returns a compressed version of the input - * data compatible with the output of the - * gzip program. - * - * For more information on the GZIP file format, see the document: - * GZIP file format specification - * version 4.3 (RFC 1952). - * - * @param string $data The data to encode. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default) - * or FORCE_DEFLATE. - * - * FORCE_DEFLATE generates - * RFC 1950 compliant output, consisting of a zlib header, the deflated - * data, and an Adler checksum. - * @return string The encoded string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -265,13 +132,9 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G /** - * This function is identical to readgzfile, except that - * it returns the file in an array. - * - * @param string $filename The file name. - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return list An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @param string $filename + * @param int $use_include_path + * @return list * @throws ZlibException * */ @@ -287,14 +150,9 @@ function gzfile(string $filename, int $use_include_path = 0): array /** - * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a - * newline, or on EOF (whichever comes first). - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int|null $length The length of data to get. - * @return string The uncompressed string. + * @param resource $stream + * @param int|null $length + * @return string * @throws ZlibException * */ @@ -314,15 +172,9 @@ function gzgets($stream, ?int $length = null): string /** - * This function inflates a deflated string. - * - * @param string $data The data compressed by gzdeflate. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -338,28 +190,10 @@ function gzinflate(string $data, int $max_length = 0): string /** - * Opens a gzip (.gz) file for reading or writing. - * - * gzopen can be used to read a file which is - * not in gzip format; in this case gzread will - * directly read from the file without decompression. - * - * @param string $filename The file name. - * @param string $mode As in fopen (rb or - * wb) but can also include a compression level - * (wb9) or a strategy: f for - * filtered data as in wb6f, h for - * Huffman only compression as in wb1h. - * (See the description of deflateInit2 - * in zlib.h for - * more information about the strategy parameter.) - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return resource Returns a file pointer to the file opened, after that, everything you read - * from this file descriptor will be transparently decompressed and what you - * write gets compressed. - * - * If the open fails, the function returns FALSE. + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return resource * @throws ZlibException * */ @@ -375,13 +209,8 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) /** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The number of uncompressed characters read from gz - * and passed through to the input. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -397,15 +226,9 @@ function gzpassthru($stream): int /** - * gzread reads up to length bytes - * from the given gz-file pointer. Reading stops when - * length (uncompressed) bytes have been read - * or EOF is reached, whichever comes first. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int $length The number of bytes to read. - * @return string The data that have been read. + * @param resource $stream + * @param int $length + * @return string * @throws ZlibException * */ @@ -421,11 +244,7 @@ function gzread($stream, int $length): string /** - * Sets the file position indicator of the given gz-file pointer to the - * beginning of the file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -440,12 +259,8 @@ function gzrewind($stream): void /** - * Gets the position of the given file pointer; i.e., its offset into the - * uncompressed file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The position of the file pointer or FALSE if an error occurs. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -461,15 +276,9 @@ function gztell($stream): int /** - * This function uncompress a compressed string. - * - * @param string $data The data compressed by gzcompress. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -485,18 +294,10 @@ function gzuncompress(string $data, int $max_length = 0): string /** - * gzwrite writes the contents of - * data to the given gz-file. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param string $data The string to write. - * @param int|null $length The number of uncompressed bytes to write. If supplied, writing will - * stop after length (uncompressed) bytes have been - * written or the end of data is reached, - * whichever comes first. - * @return int Returns the number of (uncompressed) bytes written to the given gz-file - * stream. + * @param resource $stream + * @param string $data + * @param int|null $length + * @return int * @throws ZlibException * */ @@ -516,10 +317,8 @@ function gzwrite($stream, string $data, ?int $length = null): int /** - * - * * @param \InflateContext $context - * @return int Returns number of bytes read so far. + * @return int * @throws ZlibException * */ @@ -535,10 +334,8 @@ function inflate_get_read_len(\InflateContext $context): int /** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * * @param \InflateContext $context - * @return int Returns decompression status. + * @return int * @throws ZlibException * */ @@ -554,23 +351,10 @@ function inflate_get_status(\InflateContext $context): int /** - * Incrementally inflates encoded data in the specified context. - * - * Limitation: header information from GZIP compressed data are not made - * available. - * - * @param \InflateContext $context A context created with inflate_init. - * @param string $data A chunk of compressed data. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of uncompressed data. + * @param \InflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -586,73 +370,9 @@ function inflate_add(\InflateContext $context, string $data, int $flush_mode = Z /** - * Initialize an incremental inflate context with the specified - * encoding. - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \InflateContext Returns an inflate context resource (zlib.inflate) on - * success. + * @param int $encoding + * @param array $options + * @return \InflateContext * @throws ZlibException * */ @@ -668,17 +388,9 @@ function inflate_init(int $encoding, array $options = []): \InflateContext /** - * Reads a file, decompresses it and writes it to standard output. - * - * readgzfile can be used to read a file which is not in - * gzip format; in this case readgzfile will directly - * read from the file without decompression. - * - * @param string $filename The file name. This file will be opened from the filesystem and its - * contents written to standard output. - * @param $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return 0|positive-int Returns the number of (uncompressed) bytes read from the file on success + * @param string $filename + * @param $use_include_path + * @return 0|positive-int * @throws ZlibException * */ @@ -694,11 +406,9 @@ function readgzfile(string $filename, $use_include_path = 0): int /** - * Uncompress any raw/gzip/zlib encoded data. - * * @param string $data * @param int $max_length - * @return string Returns the uncompressed data. + * @return string * @throws ZlibException * */ diff --git a/generated/8.2/apache.php b/generated/8.2/apache.php index e6fd372c..8f72116c 100644 --- a/generated/8.2/apache.php +++ b/generated/8.2/apache.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ApacheException; /** - * Fetch the Apache version. - * - * @return string Returns the Apache version on success. + * @return string * @throws ApacheException * */ @@ -23,12 +21,9 @@ function apache_get_version(): string /** - * Retrieve an Apache environment variable specified by - * variable. - * - * @param string $variable The Apache environment variable - * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. - * @return string The value of the Apache environment variable on success + * @param string $variable + * @param bool $walk_to_top + * @return string * @throws ApacheException * */ @@ -44,39 +39,8 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string /** - * This performs a partial request for a URI. It goes just far - * enough to obtain all the important information about the given - * resource. - * - * @param string $filename The filename (URI) that's being requested. - * @return object An object of related URI information. The properties of - * this object are: - * - * - * status - * the_request - * status_line - * method - * content_type - * handler - * uri - * filename - * path_info - * args - * boundary - * no_cache - * no_local_copy - * allowed - * send_bodyct - * bytes_sent - * byterange - * clength - * unparsed_uri - * mtime - * request_time - * - * - * Returns FALSE on failure. + * @param string $filename + * @return object * @throws ApacheException * */ @@ -92,10 +56,7 @@ function apache_lookup_uri(string $filename): object /** - * Fetches all HTTP request headers from the current request. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -111,10 +72,7 @@ function apache_request_headers(): array /** - * Fetch all HTTP response headers. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An array of all Apache response headers on success. + * @return array * @throws ApacheException * */ @@ -130,13 +88,9 @@ function apache_response_headers(): array /** - * apache_setenv sets the value of the Apache - * environment variable specified by - * variable. - * - * @param string $variable The environment variable that's being set. - * @param string $value The new variable value. - * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @param string $variable + * @param string $value + * @param bool $walk_to_top * @throws ApacheException * */ @@ -151,13 +105,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals /** - * Fetches all HTTP headers from the current request. - * - * This function is an alias for apache_request_headers. - * Please read the apache_request_headers - * documentation for more information on how this function works. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -173,19 +121,7 @@ function getallheaders(): array /** - * virtual is an Apache-specific function which - * is similar to <!--#include virtual...--> in - * mod_include. - * It performs an Apache sub-request. It is useful for including - * CGI scripts or .shtml files, or anything else that you would - * parse through Apache. Note that for a CGI script, the script - * must generate valid CGI headers. At the minimum that means it - * must generate a Content-Type header. - * - * To run the sub-request, all buffers are terminated and flushed to the - * browser, pending headers are sent too. - * - * @param string $uri The file that the virtual command will be performed on. + * @param string $uri * @throws ApacheException * */ diff --git a/generated/8.2/apcu.php b/generated/8.2/apcu.php index a8ec70b4..f47fec43 100644 --- a/generated/8.2/apcu.php +++ b/generated/8.2/apcu.php @@ -5,12 +5,8 @@ use Safe\Exceptions\ApcuException; /** - * Retrieves cached information and meta-data from APC's data store. - * - * @param bool $limited If limited is TRUE, the - * return value will exclude the individual list of cache entries. This - * is useful when trying to optimize calls for statistics gathering. - * @return array Array of cached data (and meta-data) + * @param bool $limited + * @return array * @throws ApcuException * */ @@ -26,13 +22,9 @@ function apcu_cache_info(bool $limited = false): array /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value - * with the value of the new parameter. - * - * @param string $key The key of the value being updated. - * @param int $old The old value (the value currently stored). - * @param int $new The new value to update to. + * @param string $key + * @param int $old + * @param int $new * @throws ApcuException * */ @@ -47,14 +39,11 @@ function apcu_cas(string $key, int $old, int $new): void /** - * Decreases a stored integer value. - * - * @param string $key The key of the value being decreased. - * @param int $step The step, or value to decrease. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -70,14 +59,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Increases a stored number. - * - * @param string $key The key of the value being increased. - * @param int $step The step, or value to increase. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -93,11 +79,8 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Retrieves APCu Shared Memory Allocation information. - * - * @param bool $limited When set to FALSE (default) apcu_sma_info will - * return a detailed information about each segment. - * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @param bool $limited + * @return array * @throws ApcuException * */ diff --git a/generated/8.2/array.php b/generated/8.2/array.php index 6c8efa95..328768bd 100644 --- a/generated/8.2/array.php +++ b/generated/8.2/array.php @@ -5,14 +5,9 @@ use Safe\Exceptions\ArrayException; /** - * Creates an array by using the values from the - * keys array as keys and the values from the - * values array as the corresponding values. - * - * @param array $keys Array of keys to be used. Illegal values for key will be - * converted to string. - * @param array $values Array of values to be used - * @return array Returns the combined array. + * @param array $keys + * @param array $values + * @return array * */ function array_combine(array $keys, array $values): array @@ -24,21 +19,8 @@ function array_combine(array $keys, array $values): array /** - * array_flip returns an array in flip - * order, i.e. keys from array become values and values - * from array become keys. - * - * Note that the values of array need to be valid - * keys, i.e. they need to be either int or - * string. A warning will be emitted if a value has the wrong - * type, and the key/value pair in question will not be included - * in the result. - * - * If a value has several occurrences, the latest key will be - * used as its value, and all others will be lost. - * - * @param array $array An array of key/value pairs to be flipped. - * @return array Returns the flipped array. + * @param array $array + * @return array * */ function array_flip(array $array): array @@ -50,27 +32,9 @@ function array_flip(array $array): array /** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second array - * are both arrays, array_replace_recursive will replace - * their respective value recursively. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace_recursive(array $array, array ...$replacements): array @@ -86,22 +50,9 @@ function array_replace_recursive(array $array, array ...$replacements): array /** - * array_replace replaces the values of - * array with values having the same keys in each of the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later arrays overwriting the previous values. - * - * array_replace is not recursive : it will replace - * values in the first array by whatever type is in the second array. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace(array $array, array ...$replacements): array @@ -117,24 +68,9 @@ function array_replace(array $array, array ...$replacements): array /** - * Applies the user-defined callback function to each - * element of the array. This function will recurse - * into deeper arrays. - * - * @param array|object $array The input array. - * @param callable $callback Typically, callback takes on two parameters. - * The array parameter's value being the first, and - * the key/index second. - * - * If callback needs to be working with the - * actual values of the array, specify the first parameter of - * callback as a - * reference. Then, - * any changes made to those elements will be made in the - * original array itself. - * @param mixed $arg If the optional arg parameter is supplied, - * it will be passed as the third parameter to the - * callback. + * @param array|object $array + * @param callable $callback + * @param mixed $arg * @throws ArrayException * */ @@ -153,9 +89,7 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void /** - * This function shuffles (randomizes the order of the elements in) an array. - * - * @param array $array The array. + * @param array $array * @throws ArrayException * */ diff --git a/generated/8.2/bzip2.php b/generated/8.2/bzip2.php index 2ac21619..6205be66 100644 --- a/generated/8.2/bzip2.php +++ b/generated/8.2/bzip2.php @@ -5,10 +5,7 @@ use Safe\Exceptions\Bzip2Exception; /** - * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -23,12 +20,7 @@ function bzclose($bz): void /** - * This function is supposed to force a write of all buffered bzip2 data for the file pointer - * bz, - * but is implemented as null function in libbz2, and as such does nothing. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -43,14 +35,9 @@ function bzflush($bz): void /** - * bzopen opens a bzip2 (.bz2) file for reading or - * writing. - * - * @param resource|string $file The name of the file to open, or an existing stream resource. - * @param string $mode The modes 'r' (read), and 'w' (write) are supported. - * Everything else will cause bzopen to return FALSE. - * @return resource If the open fails, bzopen returns FALSE, otherwise - * it returns a pointer to the newly opened file. + * @param resource|string $file + * @param string $mode + * @return resource * @throws Bzip2Exception * */ @@ -66,17 +53,9 @@ function bzopen($file, string $mode) /** - * bzread reads from the given bzip2 file pointer. - * - * Reading stops when length (uncompressed) bytes have - * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param int $length 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 Returns the uncompressed data. + * @param resource $bz + * @param int $length + * @return string * @throws Bzip2Exception * */ @@ -92,16 +71,10 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file - * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param string $data The written data. - * @param int|null $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of - * data is reached, whichever comes first. - * @return int Returns the number of bytes written. + * @param resource $bz + * @param string $data + * @param int|null $length + * @return int * @throws Bzip2Exception * */ diff --git a/generated/8.2/calendar.php b/generated/8.2/calendar.php index bdbe04db..f426ef08 100644 --- a/generated/8.2/calendar.php +++ b/generated/8.2/calendar.php @@ -5,13 +5,8 @@ use Safe\Exceptions\CalendarException; /** - * Return the Julian Day for a Unix timestamp - * (seconds since 1.1.1970), or for the current day if no - * timestamp is given. Either way, the time is regarded - * as local time (not UTC). - * - * @param int|null $timestamp A unix timestamp to convert. - * @return int A julian day number as integer. + * @param int|null $timestamp + * @return int * @throws CalendarException * */ diff --git a/generated/8.2/classobj.php b/generated/8.2/classobj.php index 06141e26..4f70129b 100644 --- a/generated/8.2/classobj.php +++ b/generated/8.2/classobj.php @@ -5,13 +5,9 @@ use Safe\Exceptions\ClassobjException; /** - * Creates an alias named alias - * based on the user defined class class. - * The aliased class is exactly the same as the original class. - * - * @param string $class The original class. - * @param string $alias The alias name for the class. - * @param bool $autoload Whether to autoload if the original class is not found. + * @param string $class + * @param string $alias + * @param bool $autoload * @throws ClassobjException * */ diff --git a/generated/8.2/com.php b/generated/8.2/com.php index 18313855..81ba5b88 100644 --- a/generated/8.2/com.php +++ b/generated/8.2/com.php @@ -5,12 +5,7 @@ use Safe\Exceptions\ComException; /** - * Generates a Globally Unique Identifier (GUID). - * - * A GUID is generated in the same way as DCE UUID's, except that the - * Microsoft convention is to enclose a GUID in curly braces. - * - * @return string Returns the GUID as a string. + * @return string * @throws ComException * */ @@ -26,24 +21,9 @@ function com_create_guid(): string /** - * Instructs COM to sink events generated by - * variant into the PHP object - * sink_object. - * - * Be careful how you use this feature; if you are doing something similar - * to the example below, then it doesn't really make sense to run it in a - * web server context. - * * @param object $variant - * @param object $sink_object sink_object should be an instance of a class with - * methods named after those of the desired dispinterface; you may use - * com_print_typeinfo to help generate a template class - * for this purpose. - * @param mixed $sink_interface PHP will attempt to use the default dispinterface type specified by - * the typelibrary associated with variant, but - * you may override this choice by setting - * sink_interface to the name of the dispinterface - * that you want to use. + * @param object $sink_object + * @param mixed $sink_interface * @throws ComException * */ @@ -62,54 +42,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = /** - * Loads a type-library and registers its constants in the engine, as though - * they were defined using define. - * - * Note that it is much more efficient to use the com.typelib-file php.ini setting to pre-load and - * register the constants, although not so flexible. - * - * If com.autoregister-typelib is turned on, then - * PHP will attempt to automatically register the constants associated with a - * COM object when you instantiate it. This depends on the interfaces - * provided by the COM object itself, and may not always be possible. - * - * @param string $typelib typelib can be one of the following: - * - * - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * - * - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * - * - * - * PHP will attempt to resolve the type library in this order, as the - * process gets more and more expensive as you progress down the list; - * searching for the type library by name is handled by physically - * enumerating the registry until we find a match. - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * @param bool $case_insensitive The case_insensitive behaves inversely to - * the parameter $case_insensitive in the define - * function. + * @param string $typelib + * @param bool $case_insensitive * @throws ComException * */ @@ -124,17 +58,9 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void /** - * The purpose of this function is to help generate a skeleton class for use - * as an event sink. You may also use it to generate a dump of any COM - * object, provided that it supports enough of the introspection interfaces, - * and that you know the name of the interface you want to display. - * - * @param object $variant variant should be either an instance of a COM - * object, or be the name of a typelibrary (which will be resolved according - * to the rules set out in com_load_typelib). - * @param null|string $dispatch_interface The name of an IDispatch descendant interface that you want to display. - * @param bool $display_sink If set to TRUE, the corresponding sink interface will be displayed - * instead. + * @param object $variant + * @param null|string $dispatch_interface + * @param bool $display_sink * @throws ComException * */ @@ -155,12 +81,8 @@ function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, /** - * Converts variant from a VT_DATE - * (or similar) value into a Unix timestamp. This allows easier - * interopability between the Unix-ish parts of PHP and COM. - * - * @param object $variant The variant. - * @return int Returns a unix timestamp. + * @param object $variant + * @return int * @throws ComException * */ @@ -176,12 +98,9 @@ function variant_date_to_timestamp(object $variant): int /** - * Returns the value of value rounded to - * decimals decimal places. - * - * @param mixed $value The variant. - * @param int $decimals Number of decimal places. - * @return mixed Returns the rounded value. + * @param mixed $value + * @param int $decimals + * @return mixed * @throws ComException * */ diff --git a/generated/8.2/cubrid.php b/generated/8.2/cubrid.php index 423f0cc5..40c5f695 100644 --- a/generated/8.2/cubrid.php +++ b/generated/8.2/cubrid.php @@ -5,122 +5,10 @@ use Safe\Exceptions\CubridException; /** - * The cubrid_bind function is used to bind values to a - * corresponding named or question mark placeholder in the SQL statement that - * was passed to cubrid_prepare. If - * bind_value_type is not given, string will be the - * default. - * - * The following table shows the types of substitute values. - * - * - * CUBRID Bind Date Types - * - * - * - * Support - * Bind Type - * Corresponding SQL Type - * - * - * - * - * Supported - * STRING - * CHAR, VARCHAR - * - * - * - * NCHAR - * NCHAR, NVARCHAR - * - * - * - * BIT - * BIT, VARBIT - * - * - * - * NUMERIC or NUMBER - * SHORT, INT, NUMERIC - * - * - * - * FLOAT - * FLOAT - * - * - * - * DOUBLE - * DOUBLE - * - * - * - * TIME - * TIME - * - * - * - * DATE - * DATE - * - * - * - * TIMESTAMP - * TIMESTAMP - * - * - * - * OBJECT - * OBJECT - * - * - * - * ENUM - * ENUM - * - * - * - * BLOB - * BLOB - * - * - * - * CLOB - * CLOB - * - * - * - * NULL - * NULL - * - * - * Not supported - * SET - * SET - * - * - * - * MULTISET - * MULTISET - * - * - * - * SEQUENCE - * SEQUENCE - * - * - * - * - * - * @param resource $req_identifier Request identifier as a result of - * cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type A type of the value to bind. (It is omitted by default. - * Thus, the system internally uses string by default. However, you need to - * specify the exact type of the value as an argument when they are NCHAR, - * BIT, or BLOB/CLOB). + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -139,14 +27,10 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bin /** - * The cubrid_col_size function is used to get the - * number of elements in a collection type (set, multiset, sequence) - * attribute. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID the instance that you want to work with. - * @param string $attr_name Name of the attribute that you want to work with. - * @return int Number of elements, when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @return int * @throws CubridException * */ @@ -162,11 +46,8 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int /** - * The cubrid_column_names function is used to get the - * column names of the query result by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column names, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -182,11 +63,8 @@ function cubrid_column_names($req_identifier): array /** - * The cubrid_column_types function gets column types of - * query results by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column types, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -202,18 +80,7 @@ function cubrid_column_types($req_identifier): array /** - * The cubrid_commit function is used to execute commit - * on the transaction pointed by conn_identifier, - * currently in progress. Connection to the server is closed after the - * cubrid_commit function is called; However, - * the connection handle is still valid. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction management. - * You can set it by using cubrid_set_autocommit. - * You can get its status by using cubrid_get_autocommit. Before you start a transaction, - * remember to disable the auto-commit mode. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -228,78 +95,11 @@ function cubrid_commit($conn_identifier): void /** - * The cubrid_connect_with_url function is used to - * establish the environment for connecting to your server by using connection - * information passed with an url string argument. If the HA feature is - * enabled in CUBRID, you must specify the connection information of the - * standby server, which is used for failover when failure occurs, in the url - * string argument of this function. If the user name and password is not - * given, then the "PUBLIC" connection will be made by default. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @param bool $new_link If a second call is made to - * cubrid_connect_with_url with the same arguments, - * no new connection will be established, but instead, the connection - * identifier of the already opened connection will be returned. The - * new_link parameter modifies this behavior and - * makes cubrid_connect_with_url always open a new - * connection, even if cubrid_connect_with_url was - * called before with the same parameters. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -323,27 +123,13 @@ function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?stri /** - * The cubrid_connect function is used to establish the - * environment for connecting to your server by using your server address, - * port number, database name, user name, and password. If the user name and - * password is not given, then the "PUBLIC" connection will be made by - * default. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. If not given, the default - * value is "public". - * @param string $passwd User password. If not given, the default value is "". - * @param bool $new_link If a second call is made to - * cubrid_connect with the same arguments, no new - * connection will be established, but instead, the connection identifier - * of the already opened connection will be 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 Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -367,14 +153,8 @@ function cubrid_connect(string $host, int $port, string $dbname, ?string $userid /** - * The cubrid_current_oid function is used to get the - * oid of the current cursor location from the query result. To use - * cubrid_current_oid, the query executed must be a - * updatable query, and the CUBRID_INCLUDE_OID option must be included during - * the query execution. - * - * @param resource $req_identifier Request identifier. - * @return string Oid of current cursor location, when process is successful. + * @param resource $req_identifier + * @return string * @throws CubridException * */ @@ -390,11 +170,7 @@ function cubrid_current_oid($req_identifier): string /** - * The cubrid_disconnect function closes the connection - * handle and disconnects from server. If any request handle is not closed at this point, - * it will be closed. It is similar to the CUBRID MySQL compatible function cubrid_close. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -413,11 +189,8 @@ function cubrid_disconnect($conn_identifier = null): void /** - * The cubrid_drop function is used to delete an - * instance from database by using the oid of the instance. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid Oid of the instance that you want to delete. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -432,12 +205,7 @@ function cubrid_drop($conn_identifier, string $oid): void /** - * This function frees the memory occupied by the result data. It returns - * TRUE on success. Note that it can only frees the - * client fetch buffer now, and if you want free all memory, use function - * cubrid_close_request. - * - * @param resource $req_identifier This is the request identifier. + * @param resource $req_identifier * @throws CubridException * */ @@ -452,12 +220,8 @@ function cubrid_free_result($req_identifier): void /** - * This function returns the current CUBRID connection charset and is similar - * to the CUBRID MySQL compatible function - * cubrid_client_encoding. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID connection charset on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -473,13 +237,9 @@ function cubrid_get_charset($conn_identifier): string /** - * The cubrid_get_class_name function is used to get the - * class name from oid. It doesn't work when selecting data from the system tables, - * for example db_class. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to check the existence. - * @return string Class name when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @return string * @throws CubridException * */ @@ -495,9 +255,7 @@ function cubrid_get_class_name($conn_identifier, string $oid): string /** - * This function returns a string that represents the client library version. - * - * @return string A string that represents the client library version on success. + * @return string * @throws CubridException * */ @@ -513,115 +271,8 @@ function cubrid_get_client_info(): string /** - * This function returns the CUBRID database parameters. - * It returns an associative array with the values for the following parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * PARAM_MAX_STRING_LENGTH - * PARAM_AUTO_COMMIT - * - * - * - * Database parameters - * - * - * - * Parameter - * Description - * - * - * - * - * PARAM_ISOLATION_LEVEL - * The transaction isolation level. - * - * - * LOCK_TIMEOUT - * CUBRID provides the lock timeout feature, which sets the waiting - * time (in seconds) for the lock until the transaction lock setting is - * allowed. The default value of the lock_timeout_in_secs parameter is - * -1, which means the application client will wait indefinitely until - * the transaction lock is allowed. - * - * - * - * PARAM_AUTO_COMMIT - * In CUBRID PHP, auto-commit mode is disabled by default for - * transaction management. It can be set by using - * cubrid_set_autocommit. - * - * - * - * - * - * - * The following table shows the isolation levels from 1 to 6. It consists of - * table schema (row) and isolation level: - * - * Levels of Isolation Supported by CUBRID - * - * - * - * Name - * Description - * - * - * - * - * SERIALIZABLE (6) - * In this isolation level, problems concerning concurrency (e.g. - * dirty read, non-repeatable read, phantom read, etc.) do not - * occur. - * - * - * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience phantom read for the record R that was - * inserted by another transaction T2 when it is repeatedly retrieving a - * specific record. - * - * - * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience R read (non-repeatable read) that was - * updated and committed by another transaction T2 when it is repeatedly - * retrieving the record R. - * - * - * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) - * Default isolation level. Another transaction T2 cannot update - * the schema of table A while transaction T1 is viewing table A. - * Transaction T1 may experience R' read (dirty read) for the record that - * was updated but not committed by another transaction T2. - * - * - * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is viewing table A repeatedly. Transaction T1 may experience - * R' read (non-repeatable read) for the record that was updated and - * committed by another transaction T2 while it is retrieving the record - * R repeatedly. - * - * - * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is repeatedly viewing table A. Transaction T1 may experience - * R' read (dirty read) for the record that was updated but not committed - * by another transaction T2. - * - * - * - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @return array An associative array with CUBRID database parameters; on success. + * @param resource $conn_identifier + * @return array * @throws CubridException * */ @@ -637,11 +288,8 @@ function cubrid_get_db_parameter($conn_identifier): array /** - * The cubrid_get_query_timeout function is used to get - * the query timeout of the request. - * - * @param resource $req_identifier Request identifier. - * @return int Returns the query timeout value in milliseconds of the current request on success. + * @param resource $req_identifier + * @return int * @throws CubridException * */ @@ -657,10 +305,8 @@ function cubrid_get_query_timeout($req_identifier): int /** - * This function returns a string that represents the CUBRID server version. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID server version on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -676,19 +322,8 @@ function cubrid_get_server_info($conn_identifier): string /** - * The cubrid_insert_id function retrieves the ID - * generated for the AUTO_INCREMENT column which is updated by the previous - * INSERT query. It returns 0 if the previous query does not generate new - * rows. - * - * @param resource $conn_identifier The connection identifier previously obtained by a call to - * cubrid_connect. - * @return string A string representing the ID generated for an AUTO_INCREMENT column by the - * previous query, on success. - * - * 0, if the previous query does not generate new rows. - * - * FALSE on failure. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -708,10 +343,7 @@ function cubrid_insert_id($conn_identifier = null): string /** - * cubrid_lob_close is used to close all BLOB/CLOB - * returned from cubrid_lob_get. - * - * @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get. + * @param array $lob_identifier_array * @throws CubridException * */ @@ -726,12 +358,9 @@ function cubrid_lob_close(array $lob_identifier_array): void /** - * cubrid_lob_export is used to get BLOB/CLOB data from CUBRID database, and saves its contents to a file. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. - * @param string $path_name Path name of the file. + * @param resource $conn_identifier + * @param resource $lob_identifier + * @param string $path_name * @throws CubridException * */ @@ -746,15 +375,9 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) /** - * cubrid_lob_get is used to get BLOB/CLOB meta info from CUBRID database, - * CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. - * Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. - * - * Remember to use cubrid_lob_close to release the LOBs if you don't need it any more. - * - * @param resource $conn_identifier Connection identifier. - * @param string $sql SQL statement to be executed. - * @return array Return an array of LOB resources, when process is successful. + * @param resource $conn_identifier + * @param string $sql + * @return array * @throws CubridException * */ @@ -770,11 +393,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array /** - * cubrid_lob_send reads BLOB/CLOB data and passes it straight through to the browser. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. + * @param resource $conn_identifier + * @param resource $lob_identifier * @throws CubridException * */ @@ -789,10 +409,8 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void /** - * cubrid_lob_size is used to get BLOB/CLOB data size. - * - * @param resource $lob_identifier LOB identifier. - * @return string A string representing LOB data size, when process is successful. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -808,17 +426,10 @@ function cubrid_lob_size($lob_identifier): string /** - * The cubrid_lob2_bind function is used to bind BLOB/CLOB datas - * to a corresponding question mark placeholder in the SQL statement that was passed - * to cubrid_prepare. If bind_value_type - * is not given, string will be "BLOB" as the default. But if you use - * cubrid_lob2_new before, bind_value_type - * will be consistent with type in cubrid_lob2_new as the default. - * - * @param resource $req_identifier Request identifier as a result of cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type It must be "BLOB" or "CLOB" and it won't be case-sensitive. If it not be given, the default value is "BLOB". + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -837,10 +448,7 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string /** - * The cubrid_lob2_close function is used to close LOB object - * returned from cubrid_lob2_new or got from the result set. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @param resource $lob_identifier * @throws CubridException * */ @@ -855,15 +463,8 @@ function cubrid_lob2_close($lob_identifier): void /** - * The cubrid_lob2_export function is used to save the - * contents of BLOB/CLOB data to a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID - * database first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to store BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -878,15 +479,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void /** - * The cubrid_lob2_import function is used to save the - * contents of BLOB/CLOB data from a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID database - * first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to import BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -901,14 +495,9 @@ function cubrid_lob2_import($lob_identifier, string $file_name): void /** - * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). - * This function should be used before you bind a lob object. - * - * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, - * the last connection opened by cubrid_connect or - * cubrid_connect_with_url is assumed. - * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". - * @return resource Lob identifier when it is successful. + * @param resource $conn_identifier + * @param string $type + * @return resource * @throws CubridException * */ @@ -930,12 +519,9 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") /** - * The cubrid_lob2_read function reads len bytes from the - * LOB data and returns the bytes read. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $len Length from buffer you want to read from the lob data. - * @return string Returns the contents as a string, FALSE when there is no more data. + * @param resource $lob_identifier + * @param int $len + * @return string * @throws CubridException * */ @@ -951,30 +537,9 @@ function cubrid_lob2_read($lob_identifier, int $len): string /** - * The cubrid_lob2_seek function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move - * backward offset units from the end of LOB object and - * offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param int $offset + * @param int $origin * @throws CubridException * */ @@ -989,31 +554,9 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR /** - * The cubrid_lob2_seek64 function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * If the offset you want to move is larger than an integer - * data can be stored, you can use this function. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move backward - * offset units from the end of LOB object and offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param string $offset + * @param int $origin * @throws CubridException * */ @@ -1028,10 +571,8 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI /** - * The cubrid_lob2_size function is used to get the size of a lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the size of the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1047,13 +588,8 @@ function cubrid_lob2_size($lob_identifier): int /** - * The cubrid_lob2_size64 function is used to get the - * size of a lob object. If the size of a lob object is larger than an - * integer data can be stored, you can use this function and it will return - * the size as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the size of the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1069,10 +605,8 @@ function cubrid_lob2_size64($lob_identifier): string /** - * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the cursor position on the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1088,13 +622,8 @@ function cubrid_lob2_tell($lob_identifier): int /** - * The cubrid_lob2_tell64 function is used to tell the - * cursor position of the LOB object. If the size of a lob object is larger - * than an integer data can be stored, you can use this function and it will - * return the position information as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1110,12 +639,8 @@ function cubrid_lob2_tell64($lob_identifier): string /** - * The cubrid_lob2_write function reads as much as data - * from buf and stores it to the LOB object. Note that - * this function can only append characters now. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $buf Data that need to be written to the lob object. + * @param resource $lob_identifier + * @param string $buf * @throws CubridException * */ @@ -1130,11 +655,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void /** - * The cubrid_lock_read function is used to put read - * lock on the instance pointed by given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put read lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1149,11 +671,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void /** - * The cubrid_lock_write function is used to put write - * lock on the instance pointed by the given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put write lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1168,26 +687,10 @@ function cubrid_lock_write($conn_identifier, string $oid): void /** - * The cubrid_move_cursor function is used to move the - * current cursor location of req_identifier by the - * value set in the offset argument, to the direction - * set in the origin argument. To set the - * origin argument, you can use CUBRID_CURSOR_FIRST - * for the first part of the result, CUBRID_CURSOR_CURRENT for the current - * location of the result, or CUBRID_CURSOR_LAST for the last part of the - * result. If origin argument is not explicitly - * designated, then the function uses CUBRID_CURSOR_CURRENT as its default - * value. - * - * If the value of cursor movement range goes over the valid limit, then the - * cursor moves to the next location after the valid range for the cursor. - * For example, if you move 20 units in the result with the size of 10, then - * the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. - * - * @param resource $req_identifier Request identifier. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. - * @return int Returns TRUE on success. + * @param resource $req_identifier + * @param int $offset + * @param int $origin + * @return int * @throws CubridException * */ @@ -1203,12 +706,7 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C /** - * The cubrid_next_result function is used to get - * results of next query if multiple SQL statements are executed and - * CUBRID_EXEC_QUERY_ALL flag is set upon - * cubrid_execute. - * - * @param resource $result result comes from a call to cubrid_execute + * @param resource $result * @throws CubridException * */ @@ -1223,80 +721,10 @@ function cubrid_next_result($result): void /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect_with_url acts very much like - * cubrid_connect_with_url with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect_with_url). - * - * This type of link is therefore called 'persistent'. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1318,30 +746,12 @@ function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?str /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect acts very much like - * cubrid_connect with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect). - * - * This type of link is therefore called 'persistent'. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1363,20 +773,10 @@ function cubrid_pconnect(string $host, int $port, string $dbname, ?string $useri /** - * The cubrid_prepare function is a sort of API which represents SQL statements - * compiled previously to a given connection handle. This pre-compiled SQL statement will be included - * in the cubrid_prepare. - * - * Accordingly, you can use this statement effectively to execute several times repeatedly or to - * process long data. Only a single statement can be used and a parameter may put a question mark (?) - * to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES - * clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a - * MARK(?) by using the cubrid_bind function only. - * - * @param resource $conn_identifier Connection identifier. - * @param string $prepare_stmt Prepare query. - * @param int $option OID return option CUBRID_INCLUDE_OID. - * @return resource Request identifier, if process is successful. + * @param resource $conn_identifier + * @param string $prepare_stmt + * @param int $option + * @return resource * @throws CubridException * */ @@ -1392,20 +792,10 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) /** - * The cubrid_put function is used to update an - * attribute of the instance of the given oid. - * - * You can update single attribute by using string data type to set - * attr. In such case, you can use integer, - * floating point or string type data for the value - * argument. To update multiple number of attributes, you can disregard the - * attr argument, and set - * value argument with associative array data type. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to update. - * @param string $attr Name of the attribute that you want to update. - * @param mixed $value New value that you want to assign to the attribute. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr + * @param mixed $value * @throws CubridException * */ @@ -1426,15 +816,7 @@ function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value /** - * The cubrid_rollback function executes rollback on the - * transaction pointed by conn_identifier, currently in - * progress. - * - * Connection to server is closed after calling - * cubrid_rollback. Connection handle, however, is - * still valid. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -1449,391 +831,11 @@ function cubrid_rollback($conn_identifier): void /** - * The cubrid_schema function is used to get the - * requested schema information from database. To get information about specific class, - * set the class_name, to get information about specific attribute - * (can be used only with CUBRID_SCH_ATTR_PRIVILEGE), - * set the attr_name. - * - * The result of the cubrid_schema function is returned as a two-dimensional - * array (column (associative array) * row (numeric array)). The following - * tables shows types of schema and the column structure of the result array to - * be returned based on the schema type. - * - * - * Result Composition of Each Type - * - * - * - * Schema - * Column Number - * Column Name - * Value - * - * - * - * - * CUBRID_SCH_CLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_VCLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 1:vclass - * - * - * - * CUBRID_SCH_QUERY_SPEC - * 1 - * QUERY_SPEC - * - * - * - * - * CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE - * 1 - * ATTR_NAME - * - * - * - * - * 2 - * DOMAIN - * - * - * - * - * 3 - * SCALE - * - * - * - * - * 4 - * PRECISION - * - * - * - * - * 5 - * INDEXED - * 1:indexed - * - * - * - * 6 - * NOT NULL - * 1:not null - * - * - * - * 7 - * SHARED - * 1:shared - * - * - * - * 8 - * UNIQUE - * 1:unique - * - * - * - * 9 - * DEFAULT - * - * - * - * - * 10 - * ATTR_ORDER - * base:1 - * - * - * - * 11 - * CLASS_NAME - * - * - * - * - * 12 - * SOURCE_CLASS - * - * - * - * - * 13 - * IS_KEY - * 1:key - * - * - * - * CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD - * 1 - * NAME - * - * - * - * - * 2 - * RET_DOMAIN - * - * - * - * - * 3 - * ARG_DOMAIN - * - * - * - * - * CUBRID_SCH_METHOD_FILE - * 1 - * METHOD_FILE - * - * - * - * - * CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_CONSTRAINT - * 1 - * TYPE - * 0:unique 1:index 2:reverse unique 3:reverse index - * - * - * - * 2 - * NAME - * - * - * - * - * 3 - * ATTR_NAME - * - * - * - * - * 4 - * NUM_PAGES - * - * - * - * - * 5 - * NUM_KEYS - * - * - * - * - * 6 - * PRIMARY_KEY - * 1:primary key - * - * - * - * 7 - * KEY_ORDER - * base:1 - * - * - * - * CUBRID_SCH_TRIGGER - * 1 - * NAME - * - * - * - * - * 2 - * STATUS - * - * - * - * - * 3 - * EVENT - * - * - * - * - * 4 - * TARGET_CLASS - * - * - * - * - * 5 - * TARGET_ATTR - * - * - * - * - * 6 - * ACTION_TIME - * - * - * - * - * 7 - * ACTION - * - * - * - * - * 8 - * PRIORITY - * - * - * - * - * 9 - * CONDITION_TIME - * - * - * - * - * 10 - * CONDITION - * - * - * - * - * CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE - * 1 - * CLASS_NAME / ATTR_NAME - * - * - * - * - * 2 - * PRIVILEGE - * - * - * - * - * 3 - * GRANTABLE - * - * - * - * - * CUBRID_SCH_PRIMARY_KEY - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * ATTR_NAME - * - * - * - * - * 3 - * KEY_SEQ - * base:1 - * - * - * - * 4 - * KEY_NAME - * - * - * - * - * CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE - * 1 - * PKTABLE_NAME - * - * - * - * - * 2 - * PKCOLUMN_NAME - * - * - * - * - * 3 - * FKTABLE_NAME - * base:1 - * - * - * - * 4 - * FKCOLUMN_NAME - * - * - * - * - * 5 - * KEY_SEQ - * base:1 - * - * - * - * 6 - * UPDATE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 7 - * DELETE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 8 - * FK_NAME - * - * - * - * - * 9 - * PK_NAME - * - * - * - * - * - * - * @param resource $conn_identifier Connection identifier. - * @param int $schema_type Schema data that you want to know. - * @param string $class_name Class you want to know the schema of. - * @param string $attr_name Attribute you want to know the schema of. - * @return array Array containing the schema information, when process is successful. + * @param resource $conn_identifier + * @param int $schema_type + * @param string $class_name + * @param string $attr_name + * @return array * @throws CubridException * */ @@ -1855,14 +857,10 @@ function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = /** - * The cubrid_seq_drop function is used to delete an - * element you request from the given sequence type attribute in the - * database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to delete an element from. - * @param int $index Index of the element that you want to delete (1-based). + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index * @throws CubridException * */ @@ -1877,14 +875,11 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ /** - * The cubrid_col_insert function is used to insert an - * element to a sequence type attribute in a requested location. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an instance to. - * @param int $index Location of the element, you want to insert the element to (1-based). - * @param string $seq_element Content of the element that you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1899,14 +894,11 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int /** - * The cubrid_seq_put function is used to update the - * content of the requested element in a sequent type attribute using OID. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to update an element. - * @param int $index Index (1-based) of the element that you want to update. - * @param string $seq_element New content that you want to use for the update. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1921,14 +913,10 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i /** - * The cubrid_set_add function is used to insert a - * single element to a set type attribute (set, multiset, sequence) you - * requested. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an element. - * @param string $set_element Content of the element you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -1943,20 +931,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string /** - * The cubrid_set_autocommit function is used to set the - * CUBRID database auto-commit mode of the current database connection. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction - * management. When auto-commit mode is truned from off to on, any pending work is - * automatically committed. - * - * @param resource $conn_identifier Connection identifier. - * @param bool $mode Auto-commit mode. The following constants can be used: - * - * - * CUBRID_AUTOCOMMIT_FALSE - * CUBRID_AUTOCOMMIT_TRUE - * + * @param resource $conn_identifier + * @param bool $mode * @throws CubridException * */ @@ -1971,19 +947,9 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void /** - * The cubrid_set_db_parameter function is used to set - * the CUBRID database parameters. It can set the following CUBRID database - * parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @param int $param_type Database parameter type. - * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @param resource $conn_identifier + * @param int $param_type + * @param int $param_value * @throws CubridException * */ @@ -1998,14 +964,10 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v /** - * The cubrid_set_drop function is used to delete an - * element that you request from the given set type (set, multiset) attribute - * of the database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to delete an element from. - * @param string $set_element Content of the element you want to delete. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -2020,11 +982,8 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin /** - * The cubrid_set_query_timeout function is used to set - * the timeout time of query execution. - * - * @param resource $req_identifier Request identifier. - * @param int $timeout Timeout time in milliseconds. + * @param resource $req_identifier + * @param int $timeout * @throws CubridException * */ diff --git a/generated/8.2/curl.php b/generated/8.2/curl.php index 80b4d6b5..fa9bb582 100644 --- a/generated/8.2/curl.php +++ b/generated/8.2/curl.php @@ -5,3164 +5,155 @@ use Safe\Exceptions\CurlException; /** - * Copies a cURL handle keeping the same preferences. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return \CurlHandle Returns a new cURL handle. - * @throws CurlException - * - */ -function curl_copy_handle(\CurlHandle $handle): \CurlHandle -{ - error_clear_last(); - $safeResult = \curl_copy_handle($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * This function URL encodes the given string according to RFC 3986. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The string to be encoded. - * @return string Returns escaped string. - * @throws CurlException - * - */ -function curl_escape(\CurlHandle $handle, string $string): string -{ - error_clear_last(); - $safeResult = \curl_escape($handle, $string); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Execute the given cURL session. - * - * This function should be called after initializing a cURL session and all - * the options for the session are set. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return bool|string Returns TRUE on success. However, if the CURLOPT_RETURNTRANSFER - * option is set, it will return - * the result on success. - * @throws CurlException - * - */ -function curl_exec(\CurlHandle $handle) -{ - error_clear_last(); - $safeResult = \curl_exec($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Gets information about the last transfer. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int|null $option This may be one of the following constants: - * - * - * - * CURLINFO_EFFECTIVE_URL - Last effective URL - * - * - * - * - * CURLINFO_HTTP_CODE - The last response code. - * As of cURL 7.10.8, this is a legacy alias of - * CURLINFO_RESPONSE_CODE - * - * - * - * - * CURLINFO_FILETIME - Remote time of the retrieved document, with the CURLOPT_FILETIME enabled; if -1 is returned the time of the document is unknown - * - * - * - * - * CURLINFO_TOTAL_TIME - Total transaction time in seconds for last transfer - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME - Time in seconds until name resolving was complete - * - * - * - * - * CURLINFO_CONNECT_TIME - Time in seconds it took to establish the connection - * - * - * - * - * CURLINFO_PRETRANSFER_TIME - Time in seconds from start until just before file transfer begins - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME - Time in seconds until the first byte is about to be transferred - * - * - * - * - * CURLINFO_REDIRECT_COUNT - Number of redirects, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_TIME - Time in seconds of all redirection steps before final transaction was started, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_URL - With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found in the last transaction, that should be requested manually next. With the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The redirect URL in this case is available in CURLINFO_EFFECTIVE_URL - * - * - * - * - * CURLINFO_PRIMARY_IP - IP address of the most recent connection - * - * - * - * - * CURLINFO_PRIMARY_PORT - Destination port of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_IP - Local (source) IP address of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_PORT - Local (source) port of the most recent connection - * - * - * - * - * CURLINFO_SIZE_UPLOAD - Total number of bytes uploaded - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD - Total number of bytes downloaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD - Average download speed - * - * - * - * - * CURLINFO_SPEED_UPLOAD - Average upload speed - * - * - * - * - * CURLINFO_HEADER_SIZE - Total size of all headers received - * - * - * - * - * CURLINFO_HEADER_OUT - The request string sent. For this to - * work, add the CURLINFO_HEADER_OUT option to the handle by calling - * curl_setopt - * - * - * - * - * CURLINFO_REQUEST_SIZE - Total size of issued requests, currently only for HTTP requests - * - * - * - * - * CURLINFO_SSL_VERIFYRESULT - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD - Content length of download, read from Content-Length: field - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD - Specified size of upload - * - * - * - * - * CURLINFO_CONTENT_TYPE - Content-Type: of the requested document. NULL indicates server did not send valid Content-Type: header - * - * - * - * - * CURLINFO_PRIVATE - Private data associated with this cURL handle, previously set with the CURLOPT_PRIVATE option of curl_setopt - * - * - * - * - * CURLINFO_RESPONSE_CODE - The last response code - * - * - * - * - * CURLINFO_HTTP_CONNECTCODE - The CONNECT response code - * - * - * - * - * CURLINFO_HTTPAUTH_AVAIL - Bitmask indicating the authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_PROXYAUTH_AVAIL - Bitmask indicating the proxy authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_OS_ERRNO - Errno from a connect failure. The number is OS and system specific. - * - * - * - * - * CURLINFO_NUM_CONNECTS - Number of connections curl had to create to achieve the previous transfer - * - * - * - * - * CURLINFO_SSL_ENGINES - OpenSSL crypto-engines supported - * - * - * - * - * CURLINFO_COOKIELIST - All known cookies - * - * - * - * - * CURLINFO_FTP_ENTRY_PATH - Entry path in FTP server - * - * - * - * - * CURLINFO_APPCONNECT_TIME - Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CERTINFO - TLS certificate chain - * - * - * - * - * CURLINFO_CONDITION_UNMET - Info on unmet time conditional - * - * - * - * - * CURLINFO_RTSP_CLIENT_CSEQ - Next RTSP client CSeq - * - * - * - * - * CURLINFO_RTSP_CSEQ_RECV - Recently received CSeq - * - * - * - * - * CURLINFO_RTSP_SERVER_CSEQ - Next RTSP server CSeq - * - * - * - * - * CURLINFO_RTSP_SESSION_ID - RTSP session ID - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD_T - The content-length of the download. This is the value read from the Content-Type: field. -1 if the size isn't known - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD_T - The specified size of the upload. -1 if the size isn't known - * - * - * - * - * CURLINFO_HTTP_VERSION - The version used in the last HTTP connection. The return value will be one of the defined CURL_HTTP_VERSION_* constants or 0 if the version can't be determined - * - * - * - * - * CURLINFO_PROTOCOL - The protocol used in the last HTTP connection. The returned value will be exactly one of the CURLPROTO_* values - * - * - * - * - * CURLINFO_PROXY_SSL_VERIFYRESULT - The result of the certificate verification that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER option). Only used for HTTPS proxies - * - * - * - * - * CURLINFO_SCHEME - The URL scheme used for the most recent connection - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD_T - Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer - * - * - * - * - * CURLINFO_SIZE_UPLOAD_T - Total number of bytes that were uploaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD_T - The average download speed in bytes/second that curl measured for the complete download - * - * - * - * - * CURLINFO_SPEED_UPLOAD_T - The average upload speed in bytes/second that curl measured for the complete upload - * - * - * - * - * CURLINFO_APPCONNECT_TIME_T - Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CONNECT_TIME_T - Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed - * - * - * - * - * CURLINFO_FILETIME_T - Remote time of the retrieved document (as Unix timestamp), an alternative to CURLINFO_FILETIME to allow systems with 32 bit long variables to extract dates outside of the 32bit timestamp range - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME_T - Time in microseconds from the start until the name resolving was completed - * - * - * - * - * CURLINFO_PRETRANSFER_TIME_T - Time taken from the start until the file transfer is just about to begin, in microseconds - * - * - * - * - * CURLINFO_REDIRECT_TIME_T - Total time, in microseconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME_T - Time, in microseconds, it took from the start until the first byte is received - * - * - * - * - * CURLINFO_TOTAL_TIME_T - Total time in microseconds for the previous transfer, including name resolving, TCP connect etc. - * - * - * - * @return mixed If option is given, returns its value. - * Otherwise, returns an associative array with the following elements - * (which correspond to option): - * - * - * - * "url" - * - * - * - * - * "content_type" - * - * - * - * - * "http_code" - * - * - * - * - * "header_size" - * - * - * - * - * "request_size" - * - * - * - * - * "filetime" - * - * - * - * - * "ssl_verify_result" - * - * - * - * - * "redirect_count" - * - * - * - * - * "total_time" - * - * - * - * - * "namelookup_time" - * - * - * - * - * "connect_time" - * - * - * - * - * "pretransfer_time" - * - * - * - * - * "size_upload" - * - * - * - * - * "size_download" - * - * - * - * - * "speed_download" - * - * - * - * - * "speed_upload" - * - * - * - * - * "download_content_length" - * - * - * - * - * "upload_content_length" - * - * - * - * - * "starttransfer_time" - * - * - * - * - * "redirect_time" - * - * - * - * - * "certinfo" - * - * - * - * - * "primary_ip" - * - * - * - * - * "primary_port" - * - * - * - * - * "local_ip" - * - * - * - * - * "local_port" - * - * - * - * - * "redirect_url" - * - * - * - * - * "request_header" (This is only set if the CURLINFO_HEADER_OUT - * is set by a previous call to curl_setopt) - * - * - * - * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. - * @throws CurlException - * - */ -function curl_getinfo(\CurlHandle $handle, ?int $option = null) -{ - error_clear_last(); - if ($option !== null) { - $safeResult = \curl_getinfo($handle, $option); - } else { - $safeResult = \curl_getinfo($handle); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Initializes a new session and return a cURL handle for use with the - * curl_setopt, curl_exec, - * and curl_close functions. - * - * @param null|string $url If provided, the CURLOPT_URL option will be set - * to its value. You can manually set this using the - * curl_setopt function. - * - * The file protocol is disabled by cURL if - * open_basedir is set. - * @return \CurlHandle Returns a cURL handle on success. - * @throws CurlException - * - */ -function curl_init(?string $url = null): \CurlHandle -{ - error_clear_last(); - if ($url !== null) { - $safeResult = \curl_init($url); - } else { - $safeResult = \curl_init(); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * Ask the multi handle if there are any messages or information from the individual transfers. - * Messages may include information such as an error code from the transfer or just the fact - * that a transfer is completed. - * - * Repeated calls to this function will return a new result each time, until a FALSE is returned - * as a signal that there is no more to get at this point. The integer pointed to with - * queued_messages will contain the number of remaining messages after this - * function was called. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int|null $queued_messages Number of messages that are still in the queue - * @return array On success, returns an associative array for the message. - * - * - * Contents of the returned array - * - * - * - * Key: - * Value: - * - * - * - * - * msg - * The CURLMSG_DONE constant. Other return values - * are currently not available. - * - * - * result - * One of the CURLE_* constants. If everything is - * OK, the CURLE_OK will be the result. - * - * - * handle - * Resource of type curl indicates the handle which it concerns. - * - * - * - * - * @throws CurlException - * - */ -function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array -{ - error_clear_last(); - $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } - return $safeResult; -} - - -/** - * Allows the processing of multiple cURL handles asynchronously. - * - * @return \CurlMultiHandle Returns a cURL multi handle on success. - * @throws CurlException - * - */ -function curl_multi_init(): \CurlMultiHandle -{ - error_clear_last(); - $safeResult = \curl_multi_init(); - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * - * - * @param \CurlMultiHandle $multi_handle - * @param int $option One of the CURLMOPT_* constants. - * @param mixed $value The value to be set on option. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLMOPT_PIPELINING - * - * Pass 1 to enable or 0 to disable. Enabling pipelining on a multi - * handle will make it attempt to perform HTTP Pipelining as far as - * possible for transfers using this handle. This means that if you add - * a second request that can use an already existing connection, the - * second request will be "piped" on the same connection. - * As of cURL 7.43.0, the value is a bitmask, and you can also pass 2 to try to multiplex the new - * transfer over an existing HTTP/2 connection if possible. - * Passing 3 instructs cURL to ask for pipelining and multiplexing - * independently of each other. - * As of cURL 7.62.0, setting the pipelining bit has no effect. - * Instead of integer literals, you can also use the CURLPIPE_* - * constants if available. - * - * - * - * CURLMOPT_MAXCONNECTS - * - * Pass a number that will be used as the maximum amount of - * simultaneously open connections that libcurl may cache. - * By default the size will be enlarged to fit four times the number - * of handles added via curl_multi_add_handle. - * When the cache is full, curl closes the oldest one in the cache - * to prevent the number of open connections from increasing. - * - * - * - * CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the chunk length threshold for pipelining - * in bytes. - * - * - * - * CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the size threshold for pipelining - * penalty in bytes. - * - * - * - * CURLMOPT_MAX_HOST_CONNECTIONS - * - * Pass a number that specifies the maximum number of connections to a - * single host. - * - * - * - * CURLMOPT_MAX_PIPELINE_LENGTH - * - * Pass a number that specifies the maximum number of requests in a - * pipeline. - * - * - * - * CURLMOPT_MAX_TOTAL_CONNECTIONS - * - * Pass a number that specifies the maximum number of simultaneously - * open connections. - * - * - * - * CURLMOPT_PUSHFUNCTION - * - * Pass a callable that will be registered to handle server - * pushes and should have the following signature: - * - * intpushfunction - * resourceparent_ch - * resourcepushed_ch - * arrayheaders - * - * - * - * parent_ch - * - * - * The parent cURL handle (the request the client made). - * - * - * - * - * pushed_ch - * - * - * A new cURL handle for the pushed request. - * - * - * - * - * headers - * - * - * The push promise headers. - * - * - * - * - * The push function is supposed to return either - * CURL_PUSH_OK if it can handle the push, or - * CURL_PUSH_DENY to reject it. - * - * - * - * - * - * - * The parent cURL handle (the request the client made). - * - * A new cURL handle for the pushed request. - * - * The push promise headers. - * @throws CurlException - * - */ -function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void -{ - error_clear_last(); - $safeResult = \curl_multi_setopt($multi_handle, $option, $value); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } -} - - -/** - * Sets an option on the given cURL session handle. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int $option The CURLOPT_XXX option to set. - * @param mixed $value The value to be set on option. - * - * value should be a bool for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_AUTOREFERER - * - * TRUE to automatically set the Referer: field in - * requests where it follows a Location: redirect. - * - * - * - * - * - * CURLOPT_COOKIESESSION - * - * TRUE to mark this as a new cookie "session". It will force libcurl - * to ignore all cookies it is about to load that are "session cookies" - * from the previous session. By default, libcurl always stores and - * loads all cookies, independent if they are session cookies or not. - * Session cookies are cookies without expiry date and they are meant - * to be alive and existing for this "session" only. - * - * - * - * - * - * CURLOPT_CERTINFO - * - * TRUE to output SSL certification information to STDERR - * on secure transfers. - * - * - * Added in cURL 7.19.1. - * Requires CURLOPT_VERBOSE to be on to have an effect. - * - * - * - * CURLOPT_CONNECT_ONLY - * - * TRUE tells the library to perform all the required proxy authentication - * and connection setup, but no data transfer. This option is implemented for - * HTTP, SMTP and POP3. - * - * - * Added in 7.15.2. - * - * - * - * CURLOPT_CRLF - * - * TRUE to convert Unix newlines to CRLF newlines - * on transfers. - * - * - * - * - * - * CURLOPT_DISALLOW_USERNAME_IN_URL - * - * TRUE to not allow URLs that include a username. Usernames are allowed by default (0). - * - * - * Added in cURL 7.61.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_SHUFFLE_ADDRESSES - * - * TRUE to shuffle the order of all returned addresses so that they will be used - * in a random order, when a name is resolved and more than one IP address is returned. - * This may cause IPv4 to be used before IPv6 or vice versa. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_HAPROXYPROTOCOL - * - * TRUE to send an HAProxy PROXY protocol v1 header at the start of the connection. - * The default action is not to send this header. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_SSH_COMPRESSION - * - * TRUE to enable built-in SSH compression. This is a request, not an order; - * the server may or may not do it. - * - * - * Added in cURL 7.56.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_USE_GLOBAL_CACHE - * - * TRUE to use a global DNS cache. This option is not thread-safe. - * It is conditionally enabled by default if PHP is built for non-threaded use - * (CLI, FCGI, Apache2-Prefork, etc.). - * - * - * - * - * - * CURLOPT_FAILONERROR - * - * TRUE to fail verbosely if the HTTP code returned - * is greater than or equal to 400. The default behavior is to return - * the page normally, ignoring the code. - * - * - * - * - * - * CURLOPT_SSL_FALSESTART - * - * TRUE to enable TLS false start. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_FILETIME - * - * TRUE to attempt to retrieve the modification - * date of the remote document. This value can be retrieved using - * the CURLINFO_FILETIME option with - * curl_getinfo. - * - * - * - * - * - * CURLOPT_FOLLOWLOCATION - * - * TRUE to follow any - * "Location: " header that the server sends as - * part of the HTTP header. - * See also CURLOPT_MAXREDIRS. - * - * - * - * - * - * CURLOPT_FORBID_REUSE - * - * TRUE to force the connection to explicitly - * close when it has finished processing, and not be pooled for reuse. - * - * - * - * - * - * CURLOPT_FRESH_CONNECT - * - * TRUE to force the use of a new connection - * instead of a cached one. - * - * - * - * - * - * CURLOPT_FTP_USE_EPRT - * - * TRUE to use EPRT (and LPRT) when doing active - * FTP downloads. Use FALSE to disable EPRT and LPRT and use PORT - * only. - * - * - * - * - * - * CURLOPT_FTP_USE_EPSV - * - * TRUE to first try an EPSV command for FTP - * transfers before reverting back to PASV. Set to FALSE - * to disable EPSV. - * - * - * - * - * - * CURLOPT_FTP_CREATE_MISSING_DIRS - * - * TRUE to create missing directories when an FTP operation - * encounters a path that currently doesn't exist. - * - * - * - * - * - * CURLOPT_FTPAPPEND - * - * TRUE to append to the remote file instead of - * overwriting it. - * - * - * - * - * - * CURLOPT_TCP_NODELAY - * - * TRUE to disable TCP's Nagle algorithm, which tries to minimize - * the number of small packets on the network. - * - * - * Available for versions compiled with libcurl 7.11.2 or - * greater. - * - * - * - * CURLOPT_FTPASCII - * - * An alias of - * CURLOPT_TRANSFERTEXT. Use that instead. - * - * - * - * - * - * CURLOPT_FTPLISTONLY - * - * TRUE to only list the names of an FTP - * directory. - * - * - * - * - * - * CURLOPT_HEADER - * - * TRUE to include the header in the output. - * - * - * - * - * - * CURLINFO_HEADER_OUT - * - * TRUE to track the handle's request string. - * - * - * The CURLINFO_ - * prefix is intentional. - * - * - * - * CURLOPT_HTTP09_ALLOWED - * - * Whether to allow HTTP/0.9 responses. Defaults to FALSE as of libcurl 7.66.0; - * formerly it defaulted to TRUE. - * - * - * Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0 - * - * - * - * CURLOPT_HTTPGET - * - * TRUE to reset the HTTP request method to GET. - * Since GET is the default, this is only necessary if the request - * method has been changed. - * - * - * - * - * - * CURLOPT_HTTPPROXYTUNNEL - * - * TRUE to tunnel through a given HTTP proxy. - * - * - * - * - * - * CURLOPT_HTTP_CONTENT_DECODING - * - * FALSE to get the raw HTTP response body. - * - * - * Available if built against libcurl >= 7.16.2. - * - * - * - * CURLOPT_KEEP_SENDING_ON_ERROR - * - * TRUE to keep sending the request body if the HTTP code returned is - * equal to or larger than 300. The default action would be to stop sending - * and close the stream or connection. Suitable for manual NTLM authentication. - * Most applications do not need this option. - * - * - * Available as of PHP 7.3.0 if built against libcurl >= 7.51.0. - * - * - * - * CURLOPT_MUTE - * - * TRUE to be completely silent with regards to - * the cURL functions. - * - * - * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead) - * - * - * - * CURLOPT_NETRC - * - * TRUE to scan the ~/.netrc - * file to find a username and password for the remote site that - * a connection is being established with. - * - * - * - * - * - * CURLOPT_NOBODY - * - * TRUE to exclude the body from the output. - * Request method is then set to HEAD. Changing this to FALSE does - * not change it to GET. - * - * - * - * - * - * CURLOPT_NOPROGRESS - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * - * - * - * - * CURLOPT_NOSIGNAL - * - * TRUE to ignore any cURL function that causes a - * signal to be sent to the PHP process. This is turned on by default - * in multi-threaded SAPIs so timeout options can still be used. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_PATH_AS_IS - * - * TRUE to not handle dot dot sequences. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PIPEWAIT - * - * TRUE to wait for pipelining/multiplexing. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POST - * - * TRUE to do a regular HTTP POST. This POST is the - * normal application/x-www-form-urlencoded kind, - * most commonly used by HTML forms. - * - * - * - * - * - * CURLOPT_PUT - * - * TRUE to HTTP PUT a file. The file to PUT must - * be set with CURLOPT_INFILE and - * CURLOPT_INFILESIZE. - * - * - * - * - * - * CURLOPT_RETURNTRANSFER - * - * TRUE to return the transfer as a string of the - * return value of curl_exec instead of outputting - * it directly. - * - * - * - * - * - * CURLOPT_SASL_IR - * - * TRUE to enable sending the initial response in the first packet. - * - * - * Added in cURL 7.31.10. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_ALPN - * - * FALSE to disable ALPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_NPN - * - * FALSE to disable NPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's - * certificate. Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * - * - * TRUE by default as of cURL 7.10. Default bundle installed as of - * cURL 7.10. - * - * - * - * CURLOPT_SSL_VERIFYSTATUS - * - * TRUE to verify the certificate's status. - * - * - * Added in cURL 7.41.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's certificate. - * Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * When set to false, the peer certificate verification succeeds regardless. - * - * - * TRUE by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_SAFE_UPLOAD - * - * Always TRUE, what disables support for the @ prefix for - * uploading files in CURLOPT_POSTFIELDS, which - * means that values starting with @ can be safely - * passed as fields. CURLFile may be used for - * uploads instead. - * - * - * - * - * - * CURLOPT_SUPPRESS_CONNECT_HEADERS - * - * TRUE to suppress proxy CONNECT response headers from the user callback functions - * CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION, - * when CURLOPT_HTTPPROXYTUNNEL is used and a CONNECT request is made. - * - * - * Added in cURL 7.54.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_TCP_FASTOPEN - * - * TRUE to enable TCP Fast Open. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TFTP_NO_OPTIONS - * - * TRUE to not send TFTP options requests. - * - * - * Added in cURL 7.48.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TRANSFERTEXT - * - * TRUE to use ASCII mode for FTP transfers. - * For LDAP, it retrieves data in plain text instead of HTML. On - * Windows systems, it will not set STDOUT to binary - * mode. - * - * - * - * - * - * CURLOPT_UNRESTRICTED_AUTH - * - * TRUE to keep sending the username and password - * when following locations (using - * CURLOPT_FOLLOWLOCATION), even when the - * hostname has changed. - * - * - * - * - * - * CURLOPT_UPLOAD - * - * TRUE to prepare for an upload. - * - * - * - * - * - * CURLOPT_VERBOSE - * - * TRUE to output verbose information. Writes - * output to STDERR, or the file specified using - * CURLOPT_STDERR. - * - * - * - * - * - * - * - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_BUFFERSIZE - * - * The size of the buffer to use for each read. There is no guarantee - * this request will be fulfilled, however. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_CONNECTTIMEOUT - * - * The number of seconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * - * - * - * - * CURLOPT_CONNECTTIMEOUT_MS - * - * The number of milliseconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_DNS_CACHE_TIMEOUT - * - * The number of seconds to keep DNS entries in memory. This - * option is set to 120 (2 minutes) by default. - * - * - * - * - * - * CURLOPT_EXPECT_100_TIMEOUT_MS - * - * The timeout for Expect: 100-continue responses in milliseconds. - * Defaults to 1000 milliseconds. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS - * - * Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts - * to connect to both IPv4 and IPv6 addresses for dual-stack hosts, - * preferring IPv6 first for timeout milliseconds. - * Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_FTPSSLAUTH - * - * The FTP authentication method (when is activated): - * CURLFTPAUTH_SSL (try SSL first), - * CURLFTPAUTH_TLS (try TLS first), or - * CURLFTPAUTH_DEFAULT (let cURL decide). - * - * - * Added in cURL 7.12.2. - * - * - * - * CURLOPT_HEADEROPT - * - * How to deal with headers. One of the following constants: - * - * CURLHEADER_UNIFIED: the headers specified in - * CURLOPT_HTTPHEADER will be used in requests - * both to servers and proxies. With this option enabled, - * CURLOPT_PROXYHEADER will not have any effect. - * - * - * CURLHEADER_SEPARATE: makes - * CURLOPT_HTTPHEADER headers only get sent to - * a server and not to a proxy. Proxy headers must be set with - * CURLOPT_PROXYHEADER to get used. Note that if - * a non-CONNECT request is sent to a proxy, libcurl will send both - * server headers and proxy headers. When doing CONNECT, libcurl will - * send CURLOPT_PROXYHEADER headers only to the - * proxy and then CURLOPT_HTTPHEADER headers - * only to the server. - * - * - * Defaults to CURLHEADER_SEPARATE as of cURL - * 7.42.1, and CURLHEADER_UNIFIED before. - * - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP_VERSION - * - * CURL_HTTP_VERSION_NONE (default, lets CURL - * decide which version to use), - * CURL_HTTP_VERSION_1_0 (forces HTTP/1.0), - * CURL_HTTP_VERSION_1_1 (forces HTTP/1.1), - * CURL_HTTP_VERSION_2_0 (attempts HTTP 2), - * CURL_HTTP_VERSION_2 (alias of CURL_HTTP_VERSION_2_0), - * CURL_HTTP_VERSION_2TLS (attempts HTTP 2 over TLS (HTTPS) only) or - * CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade). - * - * - * - * - * - * CURLOPT_HTTPAUTH - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * - * - * - * - * CURLOPT_INFILESIZE - * - * The expected size, in bytes, of the file when uploading a file to - * a remote site. Note that using this option will not stop libcurl - * from sending more data, as exactly what is sent depends on - * CURLOPT_READFUNCTION. - * - * - * - * - * - * CURLOPT_LOW_SPEED_LIMIT - * - * The transfer speed, in bytes per second, that the transfer should be - * below during the count of CURLOPT_LOW_SPEED_TIME - * seconds before PHP considers the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_LOW_SPEED_TIME - * - * The number of seconds the transfer speed should be below - * CURLOPT_LOW_SPEED_LIMIT before PHP considers - * the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_MAXCONNECTS - * - * The maximum amount of persistent connections that are allowed. - * When the limit is reached, the oldest one in the cache is closed - * to prevent increasing the number of open connections. - * - * - * - * - * - * CURLOPT_MAXREDIRS - * - * The maximum amount of HTTP redirections to follow. Use this option - * alongside CURLOPT_FOLLOWLOCATION. - * Default value of 20 is set to prevent infinite redirects. - * Setting to -1 allows inifinite redirects, and 0 - * refuses all redirects. - * - * - * - * - * - * CURLOPT_PORT - * - * An alternative port number to connect to. - * - * - * - * - * - * CURLOPT_POSTREDIR - * - * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) - * and 4 (303 See Other) if the HTTP POST method should be maintained - * when CURLOPT_FOLLOWLOCATION is set and a - * specific type of redirect occurs. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PROTOCOLS - * - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_PROXYAUTH - * - * The HTTP authentication method(s) to use for the proxy connection. - * Use the same bitmasks as described in - * CURLOPT_HTTPAUTH. For proxy authentication, - * only CURLAUTH_BASIC and - * CURLAUTH_NTLM are currently supported. - * - * - * Added in cURL 7.10.7. - * - * - * - * CURLOPT_PROXYPORT - * - * The port number of the proxy to connect to. This port number can - * also be set in CURLOPT_PROXY. - * - * - * - * - * - * CURLOPT_PROXYTYPE - * - * Either CURLPROXY_HTTP (default), - * CURLPROXY_SOCKS4, - * CURLPROXY_SOCKS5, - * CURLPROXY_SOCKS4A or - * CURLPROXY_SOCKS5_HOSTNAME. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_REDIR_PROTOCOLS - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in a transfer that it follows to in - * a redirect when CURLOPT_FOLLOWLOCATION is enabled. - * This allows you to limit specific transfers to only be allowed to use a subset - * of protocols in redirections. By default libcurl will allow all protocols - * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions - * which unconditionally would follow to all protocols supported. - * See also CURLOPT_PROTOCOLS for protocol constant values. - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_RESUME_FROM - * - * The offset, in bytes, to resume a transfer from. - * - * - * - * - * - * CURLOPT_SOCKS5_AUTH - * - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_BASIC allows username/password authentication. - * - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * - * CURLAUTH_NONE allows no authentication. - * - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * - * - * Available as of 7.3.0 and curl >= 7.55.0. - * - * - * - * CURLOPT_SSL_OPTIONS - * - * Set SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. - * - * - * - * Added in cURL 7.25.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYHOST - * - * 2 to verify that a Common Name field or a Subject Alternate Name - * field in the SSL peer certificate matches the provided hostname. - * 0 to not check the names. - * 1 should not be used. - * In production environments the value of this option - * should be kept at 2 (default value). - * - * - * Support for value 1 removed in cURL 7.28.1. - * - * - * - * CURLOPT_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT (0), - * CURL_SSLVERSION_TLSv1 (1), - * CURL_SSLVERSION_SSLv2 (2), - * CURL_SSLVERSION_SSLv3 (3), - * CURL_SSLVERSION_TLSv1_0 (4), - * CURL_SSLVERSION_TLSv1_1 (5) or - * CURL_SSLVERSION_TLSv1_2 (6). - * The maximum TLS version can be set by using one of the CURL_SSLVERSION_MAX_* - * constants. It is also possible to OR one of the CURL_SSLVERSION_* - * constants with one of the CURL_SSLVERSION_MAX_* constants. - * CURL_SSLVERSION_MAX_DEFAULT (the maximum version supported by the library), - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, or - * CURL_SSLVERSION_MAX_TLSv1_3. - * - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * - * - * - * - * - * - * CURLOPT_PROXY_SSL_OPTIONS - * - * Set proxy SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. (curl >= 7.44.0) - * - * - * CURLSSLOPT_NO_PARTIALCHAIN: do not accept "partial" - * certificate chains, which it otherwise does by default. (curl >= 7.68.0) - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYHOST - * - * Set to 2 to verify in the HTTPS proxy's certificate name fields against the proxy name. - * When set to 0 the connection succeeds regardless of the names used in the certificate. - * Use that ability with caution! - * 1 treated as a debug option in curl 7.28.0 and earlier. - * From curl 7.28.1 to 7.65.3 CURLE_BAD_FUNCTION_ARGUMENT is returned. - * From curl 7.66.0 onwards 1 and 2 is treated as the same value. - * In production environments the value of this option should be kept at 2 (default value). - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT, - * CURL_SSLVERSION_TLSv1, - * CURL_SSLVERSION_TLSv1_0, - * CURL_SSLVERSION_TLSv1_1, - * CURL_SSLVERSION_TLSv1_2, - * CURL_SSLVERSION_TLSv1_3, - * CURL_SSLVERSION_MAX_DEFAULT, - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, - * CURL_SSLVERSION_MAX_TLSv1_3 or - * CURL_SSLVERSION_SSLv3. - * - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_STREAM_WEIGHT - * - * Set the numerical stream weight (a number between 1 and 256). - * - * - * Added in cURL 7.46.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TCP_KEEPALIVE - * - * If set to 1, TCP keepalive probes will be sent. The delay and - * frequency of these probes can be controlled by the CURLOPT_TCP_KEEPIDLE - * and CURLOPT_TCP_KEEPINTVL options, provided the operating system - * supports them. If set to 0 (default) keepalive probes are disabled. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPIDLE - * - * Sets the delay, in seconds, that the operating system will wait while the connection is - * idle before sending keepalive probes, if CURLOPT_TCP_KEEPALIVE is - * enabled. Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPINTVL - * - * Sets the interval, in seconds, that the operating system will wait between sending - * keepalive probes, if CURLOPT_TCP_KEEPALIVE is enabled. - * Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TIMECONDITION - * - * How CURLOPT_TIMEVALUE is treated. - * Use CURL_TIMECOND_IFMODSINCE to return the - * page only if it has been modified since the time specified in - * CURLOPT_TIMEVALUE. If it hasn't been modified, - * a "304 Not Modified" header will be returned - * assuming CURLOPT_HEADER is TRUE. - * Use CURL_TIMECOND_IFUNMODSINCE for the reverse - * effect. Use CURL_TIMECOND_NONE to ignore - * CURLOPT_TIMEVALUE and always return the page. - * CURL_TIMECOND_NONE is the default. - * - * - * Before cURL 7.46.0 the default was - * CURL_TIMECOND_IFMODSINCE. - * - * - * - * CURLOPT_TIMEOUT - * - * The maximum number of seconds to allow cURL functions to execute. - * - * - * - * - * - * CURLOPT_TIMEOUT_MS - * - * The maximum number of milliseconds to allow cURL functions to - * execute. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_TIMEVALUE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. - * - * - * - * - * - * CURLOPT_TIMEVALUE_LARGE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. Defaults to zero. - * The difference between this option and CURLOPT_TIMEVALUE - * is the type of the argument. On systems where 'long' is only 32 bit wide, - * this option has to be used to set dates beyond the year 2038. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_MAX_RECV_SPEED_LARGE - * - * If a download exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_MAX_SEND_SPEED_LARGE - * - * If an upload exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_SSH_AUTH_TYPES - * - * A bitmask consisting of one or more of - * CURLSSH_AUTH_PUBLICKEY, - * CURLSSH_AUTH_PASSWORD, - * CURLSSH_AUTH_HOST, - * CURLSSH_AUTH_KEYBOARD. Set to - * CURLSSH_AUTH_ANY to let libcurl pick one. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_IPRESOLVE - * - * Allows an application to select what kind of IP addresses to use when - * resolving host names. This is only interesting when using host names that - * resolve addresses using more than one version of IP, possible values are - * CURL_IPRESOLVE_WHATEVER, - * CURL_IPRESOLVE_V4, - * CURL_IPRESOLVE_V6, by default - * CURL_IPRESOLVE_WHATEVER. - * - * - * Added in cURL 7.10.8. - * - * - * - * CURLOPT_FTP_FILEMETHOD - * - * Tell curl which method to use to reach a file on a FTP(S) server. Possible values are - * CURLFTPMETHOD_MULTICWD, - * CURLFTPMETHOD_NOCWD and - * CURLFTPMETHOD_SINGLECWD. - * - * - * Added in cURL 7.15.1. - * - * - * - * - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_BASIC allows username/password authentication. - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * CURLAUTH_NONE allows no authentication. - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * value should be a string for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_ABSTRACT_UNIX_SOCKET - * - * Enables the use of an abstract Unix domain socket instead of - * establishing a TCP connection to a host and sets the path to - * the given string. This option shares the same semantics - * as CURLOPT_UNIX_SOCKET_PATH. These two options - * share the same storage and therefore only one of them can be set - * per handle. - * - * - * Available since PHP 7.3.0 and cURL 7.53.0 - * - * - * - * CURLOPT_CAINFO - * - * The name of a file holding one or more certificates to verify the - * peer with. This only makes sense when used in combination with - * CURLOPT_SSL_VERIFYPEER. - * - * - * Might require an absolute path. - * - * - * - * CURLOPT_CAPATH - * - * A directory that holds multiple CA certificates. Use this option - * alongside CURLOPT_SSL_VERIFYPEER. - * - * - * - * - * - * CURLOPT_COOKIE - * - * The contents of the "Cookie: " header to be - * used in the HTTP request. - * Note that multiple cookies are separated with a semicolon followed - * by a space (e.g., "fruit=apple; colour=red") - * - * - * - * - * - * CURLOPT_COOKIEFILE - * - * The name of the file containing the cookie data. The cookie file can - * be in Netscape format, or just plain HTTP-style headers dumped into - * a file. - * If the name is an empty string, no cookies are loaded, but cookie - * handling is still enabled. - * - * - * - * - * - * CURLOPT_COOKIEJAR - * - * The name of a file to save all internal cookies to when the handle is closed, - * e.g. after a call to curl_close. - * - * - * - * - * - * CURLOPT_COOKIELIST - * - * A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular - * HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store. - * "ALL" erases all cookies held in memory. - * "SESS" erases all session cookies held in memory. - * "FLUSH" writes all known cookies to the file specified by CURLOPT_COOKIEJAR. - * "RELOAD" loads all cookies from the files specified by CURLOPT_COOKIEFILE. - * - * - * Available since cURL 7.14.1. - * - * - * - * CURLOPT_CUSTOMREQUEST - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * - * - * - * - * CURLOPT_DEFAULT_PROTOCOL - * - * The default protocol to use if the URL is missing a scheme name. - * - * - * Added in cURL 7.45.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_INTERFACE - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP4 - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP6 - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_EGDSOCKET - * - * Like CURLOPT_RANDOM_FILE, except a filename - * to an Entropy Gathering Daemon socket. - * - * - * - * - * - * CURLOPT_ENCODING - * - * The contents of the "Accept-Encoding: " header. - * This enables decoding of the response. Supported encodings are - * "identity", "deflate", and - * "gzip". If an empty string, "", - * is set, a header containing all supported encoding types is sent. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_FTPPORT - * - * The value which will be used to get the IP address to use - * for the FTP "PORT" instruction. The "PORT" instruction tells - * the remote server to connect to our specified IP address. The - * string may be a plain IP address, a hostname, a network - * interface name (under Unix), or just a plain '-' to use the - * systems default IP address. - * - * - * - * - * - * CURLOPT_INTERFACE - * - * The name of the outgoing network interface to use. This can be an - * interface name, an IP address or a host name. - * - * - * - * - * - * CURLOPT_KEYPASSWD - * - * The password required to use the CURLOPT_SSLKEY - * or CURLOPT_SSH_PRIVATE_KEYFILE private key. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_KRB4LEVEL - * - * The KRB4 (Kerberos 4) security level. Any of the following values - * (in order from least to most powerful) are valid: - * "clear", - * "safe", - * "confidential", - * "private".. - * If the string does not match one of these, - * "private" is used. Setting this option to NULL - * will disable KRB4 security. Currently KRB4 security only works - * with FTP transactions. - * - * - * - * - * - * CURLOPT_LOGIN_OPTIONS - * - * Can be used to set protocol specific login options, such as the - * preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", - * and should be used in conjunction with the - * CURLOPT_USERNAME option. - * - * - * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PINNEDPUBLICKEY - * - * Set the pinned public key. - * The string can be the file name of your pinned public key. The file - * format expected is "PEM" or "DER". The string can also be any - * number of base64 encoded sha256 hashes preceded by "sha256//" and - * separated by ";". - * - * - * Added in cURL 7.39.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POSTFIELDS - * - * - * The full data to post in a HTTP "POST" operation. - * This parameter can either be - * passed as a urlencoded string like 'para1=val1&para2=val2&...' - * or as an array with the field name as key and field data as value. - * If value is an array, the - * Content-Type header will be set to - * multipart/form-data. - * - * - * Files can be sent using CURLFile or CURLStringFile, - * in which case value must be an array. - * - * - * - * - * - * - * CURLOPT_PRIVATE - * - * Any data that should be associated with this cURL handle. This data - * can subsequently be retrieved with the - * CURLINFO_PRIVATE option of - * curl_getinfo. cURL does nothing with this data. - * When using a cURL multi handle, this private data is typically a - * unique key to identify a standard cURL handle. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_PRE_PROXY - * - * Set a string holding the host name or dotted numerical - * IP address to be used as the preproxy that curl connects to before - * it connects to the HTTP(S) proxy specified in the - * CURLOPT_PROXY option for the upcoming request. - * The preproxy can only be a SOCKS proxy and it should be prefixed with - * [scheme]:// to specify which kind of socks is used. - * A numerical IPv6 address must be written within [brackets]. - * Setting the preproxy to an empty string explicitly disables the use of a preproxy. - * To specify port number in this string, append :[port] - * to the end of the host name. The proxy's port number may optionally be - * specified with the separate option CURLOPT_PROXYPORT. - * Defaults to using port 1080 for proxies if a port is not specified. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY - * - * The HTTP proxy to tunnel requests through. - * - * - * - * - * - * CURLOPT_PROXY_SERVICE_NAME - * - * The proxy authentication service name. - * - * - * Added in cURL 7.43.0 for HTTP proxies, and in cURL 7.49.0 for SOCKS5 proxies. - * Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_CAINFO - * - * The path to proxy Certificate Authority (CA) bundle. Set the path as a - * string naming a file holding one or more certificates to - * verify the HTTPS proxy with. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * Defaults set to the system path where libcurl's cacert bundle is assumed - * to be stored. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CAPATH - * - * The directory holding multiple CA certificates to verify the HTTPS proxy with. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CRLFILE - * - * Set the file name with the concatenation of CRL (Certificate Revocation List) - * in PEM format to use in the certificate validation that occurs during - * the SSL exchange. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_KEYPASSWD - * - * Set the string be used as the password required to use the - * CURLOPT_PROXY_SSLKEY private key. You never needed a - * passphrase to load a certificate but you need one to load your private key. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_PINNEDPUBLICKEY - * - * Set the pinned public key for HTTPS proxy. The string can be the file name - * of your pinned public key. The file format expected is "PEM" or "DER". - * The string can also be any number of base64 encoded sha256 hashes preceded by - * "sha256//" and separated by ";" - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERT - * - * The file name of your client certificate used to connect to the HTTPS proxy. - * The default format is "P12" on Secure Transport and "PEM" on other engines, - * and can be changed with CURLOPT_PROXY_SSLCERTTYPE. - * With NSS or Secure Transport, this can also be the nickname of the certificate - * you wish to authenticate with as it is named in the security database. - * If you want to use a file from the current directory, please precede it with - * "./" prefix, in order to avoid confusion with a nickname. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERTTYPE - * - * The format of your client certificate used when connecting to an HTTPS proxy. - * Supported formats are "PEM" and "DER", except with Secure Transport. - * OpenSSL (versions 0.9.3 and later) and Secure Transport - * (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for - * PKCS#12-encoded files. Defaults to "PEM". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_CIPHER_LIST - * - * The list of ciphers to use for the connection to the HTTPS proxy. - * The list must be syntactically correct, it consists of one or more cipher - * strings separated by colons. Commas or spaces are also acceptable separators - * but colons are normally used, !, - and + can be used as operators. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection to a proxy. - * The list must be syntactically correct, it consists of one or more - * cipher suite strings separated by colons. This option is currently used - * only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_PROXY_SSLKEY - * - * The file name of your private key used for connecting to the HTTPS proxy. - * The default format is "PEM" and can be changed with - * CURLOPT_PROXY_SSLKEYTYPE. - * (iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled. - * - * - * - * CURLOPT_PROXY_SSLKEYTYPE - * - * The format of your private key. Supported formats are "PEM", "DER" and "ENG". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_PASSWORD - * - * The password to use for the TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_USERNAME option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_TYPE - * - * The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP". - * - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_USERNAME - * - * The username to use for the HTTPS proxy TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXYUSERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection to the proxy. - * - * - * - * - * - * CURLOPT_RANDOM_FILE - * - * A filename to be used to seed the random number generator for SSL. - * - * - * - * - * - * CURLOPT_RANGE - * - * Range(s) of data to retrieve in the format - * "X-Y" where X or Y are optional. HTTP transfers - * also support several intervals, separated with commas in the format - * "X-Y,N-M". - * - * - * - * - * - * CURLOPT_REFERER - * - * The contents of the "Referer: " header to be used - * in a HTTP request. - * - * - * - * - * - * CURLOPT_SERVICE_NAME - * - * The authentication service name. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 - * - * A string containing 32 hexadecimal digits. The string should be the - * MD5 checksum of the remote host's public key, and libcurl will reject - * the connection to the host unless the md5sums match. - * This option is only for SCP and SFTP transfers. - * - * - * Added in cURL 7.17.1. - * - * - * - * CURLOPT_SSH_PUBLIC_KEYFILE - * - * The file name for your public key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, - * and just "id_dsa.pub" in the current directory if HOME is not set. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSH_PRIVATE_KEYFILE - * - * The file name for your private key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa if the HOME environment variable is set, - * and just "id_dsa" in the current directory if HOME is not set. - * If the file is password-protected, set the password with - * CURLOPT_KEYPASSWD. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSL_CIPHER_LIST - * - * A list of ciphers to use for SSL. For example, - * RC4-SHA and TLSv1 are valid - * cipher lists. - * - * - * - * - * - * CURLOPT_SSLCERT - * - * The name of a file containing a PEM formatted certificate. - * - * - * - * - * - * CURLOPT_SSLCERTPASSWD - * - * The password required to use the - * CURLOPT_SSLCERT certificate. - * - * - * - * - * - * CURLOPT_SSLCERTTYPE - * - * The format of the certificate. Supported formats are - * "PEM" (default), "DER", - * and "ENG". - * As of OpenSSL 0.9.3, "P12" (for PKCS#12-encoded files) - * is also supported. - * - * - * Added in cURL 7.9.3. - * - * - * - * CURLOPT_SSLENGINE - * - * The identifier for the crypto engine of the private SSL key - * specified in CURLOPT_SSLKEY. - * - * - * - * - * - * CURLOPT_SSLENGINE_DEFAULT - * - * The identifier for the crypto engine used for asymmetric crypto - * operations. - * - * - * - * - * - * CURLOPT_SSLKEY - * - * The name of a file containing a private SSL key. - * - * - * - * - * - * CURLOPT_SSLKEYPASSWD - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * - * - * - * - * CURLOPT_SSLKEYTYPE - * - * The key type of the private SSL key specified in - * CURLOPT_SSLKEY. Supported key types are - * "PEM" (default), "DER", - * and "ENG". - * - * - * - * - * - * CURLOPT_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection. The list must be - * syntactically correct, it consists of one or more cipher suite strings separated by colons. - * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_UNIX_SOCKET_PATH - * - * Enables the use of Unix domain sockets as connection endpoint and - * sets the path to the given string. - * - * - * Added in cURL 7.40.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_URL - * - * The URL to fetch. This can also be set when initializing a - * session with curl_init. - * - * - * - * - * - * CURLOPT_USERAGENT - * - * The contents of the "User-Agent: " header to be - * used in a HTTP request. - * - * - * - * - * - * CURLOPT_USERNAME - * - * The user name to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PASSWORD - * - * The password to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_USERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection. - * - * - * - * - * - * CURLOPT_XOAUTH2_BEARER - * - * Specifies the OAuth 2.0 access token. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * - * - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * The default protocol to use if the URL is missing a scheme name. - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * value should be an array for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_CONNECT_TO - * - * Connect to a specific host and port instead of the URL's host and port. - * Accepts an array of strings with the format - * HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP200ALIASES - * - * An array of HTTP 200 responses that will be treated as valid - * responses and not as errors. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_HTTPHEADER - * - * An array of HTTP header fields to set, in the format - * - * array('Content-type: text/plain', 'Content-length: 100') - * - * - * - * - * - * - * CURLOPT_POSTQUOTE - * - * An array of FTP commands to execute on the server after the FTP - * request has been performed. - * - * - * - * - * - * CURLOPT_PROXYHEADER - * - * An array of custom HTTP headers to pass to proxies. - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_QUOTE - * - * An array of FTP commands to execute on the server prior to the FTP - * request. - * - * - * - * - * - * CURLOPT_RESOLVE - * - * Provide a custom address for a specific host and port pair. An array - * of hostname, port, and IP address strings, each element separated by - * a colon. In the format: - * - * array("example.com:80:127.0.0.1") - * - * - * - * Added in cURL 7.21.3. - * - * - * - * - * - * - * value should be a stream resource (using - * fopen, for example) for the following values of the - * option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLOPT_FILE - * - * The file that the transfer should be written to. The default - * is STDOUT (the browser window). - * - * - * - * CURLOPT_INFILE - * - * The file that the transfer should be read from when uploading. - * - * - * - * CURLOPT_STDERR - * - * An alternative location to output errors to instead of - * STDERR. - * - * - * - * CURLOPT_WRITEHEADER - * - * The file that the header part of the transfer is written to. - * - * - * - * - * - * - * value should be the name of a valid function or a Closure - * for the following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_HEADERFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, the second is a - * string with the header data to be written. The header data must - * be written by this callback. Return the number of - * bytes written. - * - * - * - * - * CURLOPT_PASSWDFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * string containing a password prompt, and the third is the maximum - * password length. Return the string containing the password. - * - * Removed as of PHP 7.3.0. - * - * - * CURLOPT_PROGRESSFUNCTION - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * - * - * - * - * CURLOPT_READFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * stream resource provided to cURL through the option - * CURLOPT_INFILE, and the third is the maximum - * amount of data to be read. The callback must return a string - * with a length equal or smaller than the amount of data requested, - * typically by reading it from the passed stream resource. It should - * return an empty string to signal EOF. - * - * - * - * - * CURLOPT_WRITEFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, and the second is a - * string with the data to be written. The data must be saved by - * this callback. It must return the exact number of bytes written - * or the transfer will be aborted with an error. - * - * - * - * - * CURLOPT_XFERINFOFUNCTION - * - * A callback accepting two parameters. - * Has a similar purpose as CURLOPT_PROGRESSFUNCTION but is more modern - * and the preferred option from cURL. - * - * - * Added in 7.32.0. Available as of PHP 8.2.0. - * - * - * - * - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * Other values: - * - * - * - * - * Option - * Set value to - * - * + * @param \CurlHandle $handle + * @return \CurlHandle + * @throws CurlException * + */ +function curl_copy_handle(\CurlHandle $handle): \CurlHandle +{ + error_clear_last(); + $safeResult = \curl_copy_handle($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param string $string + * @return string + * @throws CurlException * - * CURLOPT_SHARE + */ +function curl_escape(\CurlHandle $handle, string $string): string +{ + error_clear_last(); + $safeResult = \curl_escape($handle, $string); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @return bool|string + * @throws CurlException * - * A result of curl_share_init. Makes the cURL - * handle to use the data from the shared handle. + */ +function curl_exec(\CurlHandle $handle) +{ + error_clear_last(); + $safeResult = \curl_exec($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param int|null $option + * @return mixed + * @throws CurlException * + */ +function curl_getinfo(\CurlHandle $handle, ?int $option = null) +{ + error_clear_last(); + if ($option !== null) { + $safeResult = \curl_getinfo($handle, $option); + } else { + $safeResult = \curl_getinfo($handle); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param null|string $url + * @return \CurlHandle + * @throws CurlException * + */ +function curl_init(?string $url = null): \CurlHandle +{ + error_clear_last(); + if ($url !== null) { + $safeResult = \curl_init($url); + } else { + $safeResult = \curl_init(); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int|null $queued_messages + * @return array + * @throws CurlException * + */ +function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array +{ + error_clear_last(); + $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } + return $safeResult; +} + + +/** + * @return \CurlMultiHandle + * @throws CurlException * + */ +function curl_multi_init(): \CurlMultiHandle +{ + error_clear_last(); + $safeResult = \curl_multi_init(); + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int $option + * @param mixed $value + * @throws CurlException * + */ +function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void +{ + error_clear_last(); + $safeResult = \curl_multi_setopt($multi_handle, $option, $value); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } +} + + +/** + * @param \CurlHandle $handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -3177,11 +168,8 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void /** - * Return an integer containing the last share curl error number. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @return int Returns an integer containing the last share curl error number. + * @param \CurlShareHandle $share_handle + * @return int * @throws CurlException * */ @@ -3197,68 +185,9 @@ function curl_share_errno(\CurlShareHandle $share_handle): int /** - * Sets an option on the given cURL share handle. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. + * @param \CurlShareHandle $share_handle * @param int $option - * - * - * - * Option - * Description - * - * - * - * - * CURLSHOPT_SHARE - * - * Specifies a type of data that should be shared. - * - * - * - * CURLSHOPT_UNSHARE - * - * Specifies a type of data that will be no longer shared. - * - * - * - * - * * @param mixed $value - * - * - * - * Value - * Description - * - * - * - * - * CURL_LOCK_DATA_COOKIE - * - * Shares cookie data. - * - * - * - * CURL_LOCK_DATA_DNS - * - * Shares DNS cache. Note that when you use cURL multi handles, - * all handles added to the same multi handle will share DNS cache - * by default. - * - * - * - * CURL_LOCK_DATA_SSL_SESSION - * - * 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 within the same handle by default. - * - * - * - * - * * @throws CurlException * */ @@ -3273,12 +202,9 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): /** - * This function decodes the given URL encoded string. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The URL encoded string to be decoded. - * @return string Returns decoded string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -3294,18 +220,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string /** - * Available if built against libcurl >= 7.62.0. - * - * Some protocols have "connection upkeep" mechanisms. - * These mechanisms usually send some traffic on existing connections in order to keep them alive; - * this can prevent connections from being closed due to overzealous firewalls, for example. - * - * Connection upkeep is currently available only for HTTP/2 connections. - * A small amount of traffic is usually sent to keep a connection alive. - * HTTP/2 maintains its connection by sending a HTTP/2 PING frame. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. + * @param \CurlHandle $handle * @throws CurlException * */ diff --git a/generated/8.2/datetime.php b/generated/8.2/datetime.php index b4f26c55..3af3bb43 100644 --- a/generated/8.2/datetime.php +++ b/generated/8.2/datetime.php @@ -5,17 +5,9 @@ use Safe\Exceptions\DatetimeException; /** - * This is the procedural version of - * DateTime::__construct. - * - * Unlike the DateTime constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param null|string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTime Returns a new DateTime instance. - * Procedural style returns FALSE on failure. + * @return \DateTime * @throws DatetimeException * */ @@ -35,44 +27,9 @@ function date_create(?string $datetime = "now", ?\DateTimeZone $timezone = null) /** - * Returns associative array with detailed info about given date/time. - * - * @param string $format Documentation on how the format is used, please - * refer to the documentation of - * DateTimeImmutable::createFromFormat. The same - * rules apply. - * @param string $datetime String representing the date/time. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. An example - * below shows such a warning. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. An example - * below shows such an error. + * @param string $format + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -88,63 +45,8 @@ function date_parse_from_format(string $format, string $datetime): ?array /** - * date_parse parses the given - * datetime string according to the same rules as - * strtotime and - * DateTimeImmutable::__construct. Instead of returning a - * Unix timestamp (with strtotime) or a - * DateTimeImmutable object (with - * DateTimeImmutable::__construct), it returns an - * associative array with the information that it could detect in the given - * datetime string. - * - * If no information about a certain group of elements can be found, these - * array elements will be set to FALSE or are missing. If needed for - * constructing a timestamp or DateTimeImmutable object from - * the same datetime string, more fields can be set to - * a non-FALSE value. See the examples for cases where that happens. - * - * @param string $datetime Date/time in format accepted by - * DateTimeImmutable::__construct. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time - * on success. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * If relative time elements are present in the - * datetime string such as +3 days, - * the then returned array includes a nested array with the key - * relative. This array then contains the keys - * year, month, day, - * hour, minute, - * second, and if necessary weekday, and - * weekdays, depending on the string that was passed in. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -160,99 +62,10 @@ function date_parse(string $datetime): ?array /** - * - * - * @param int $timestamp Unix timestamp. - * @param float $latitude Latitude in degrees. - * @param float $longitude Longitude in degrees. - * @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} Returns array on success. - * 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. - * - * - * - * - * - * The values of the array elements are either UNIX timestamps, 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. + * @param int $timestamp + * @param float $latitude + * @param float $longitude + * @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} * @throws DatetimeException * */ @@ -268,84 +81,13 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array /** - * date_sunrise returns the sunrise time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunrise - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunrise_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunrise: the point where the sun becomes visible. - * - * - * 96° - * Civil twilight: conventionally used to signify the start of dawn. - * - * - * 102° - * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunrise time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not rise at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -371,84 +113,13 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ? /** - * date_sunset returns the sunset time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunset - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunset_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunset: the point where the sun becomes invisible. - * - * - * 96° - * Civil twilight: conventionally used to signify the end of dusk. - * - * - * 102° - * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunset time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not set at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -474,19 +145,9 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f /** - * Returns a string formatted according to the given format string using the - * given integer timestamp (Unix timestamp) or the current time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * @param string $format Format accepted by DateTimeInterface::format. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns a formatted date string. If a non-numeric value is used for - * timestamp, FALSE is returned and an - * E_WARNING level error is emitted. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -506,34 +167,13 @@ function date(string $format, ?int $timestamp = null): string /** - * Identical to mktime except the passed parameters represents a - * GMT date. gmmktime internally uses mktime - * so only times valid in derived local time can be used. - * - * Like mktime, arguments may be left out in order - * from right to left, with any omitted arguments being set to the - * current corresponding GMT value. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year The year - * @return int Returns a int Unix timestamp on success. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -561,23 +201,9 @@ function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $mon /** - * Behaves the same as strftime except that the - * time returned is Greenwich Mean Time (GMT). For example, when run - * in Eastern Standard Time (GMT -0500), the first line below prints - * "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 - * 01:00:00". - * - * @param string $format See description in strftime. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * On failure, FALSE is returned. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -597,118 +223,9 @@ function gmstrftime(string $format, ?int $timestamp = null): string /** - * Returns a number formatted according to the given format string using the - * given integer timestamp or the current local time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * Unlike the function date, idate - * accepts just one char in the format parameter. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format character - * Description - * - * - * - * - * B - * Swatch Beat/Internet Time - * - * - * d - * Day of the month - * - * - * h - * Hour (12 hour format) - * - * - * H - * Hour (24 hour format) - * - * - * i - * Minutes - * - * - * I (uppercase i) - * returns 1 if DST is activated, - * 0 otherwise - * - * - * L (uppercase l) - * returns 1 for leap year, - * 0 otherwise - * - * - * m - * Month number - * - * - * N - * ISO-8601 day of the week (1 for Monday - * through 7 for Sunday) - * - * - * o - * ISO-8601 year (4 digits) - * - * - * s - * Seconds - * - * - * t - * Days in current month - * - * - * U - * Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - - * this is the same as time - * - * - * w - * Day of the week (0 on Sunday) - * - * - * W - * ISO-8601 week number of year, weeks starting on - * Monday - * - * - * y - * Year (1 or 2 digits - check note below) - * - * - * Y - * Year (4 digits) - * - * - * z - * Day of the year - * - * - * Z - * Timezone offset in seconds - * - * - * - * - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return int Returns an int on success. - * - * As idate always returns an int and - * as they can't start with a "0", idate may return - * fewer digits than you would expect. See the example below. + * @param int|null $timestamp + * @return int * @throws DatetimeException * */ @@ -728,40 +245,13 @@ function idate(string $format, ?int $timestamp = null): int /** - * Returns the Unix timestamp corresponding to the arguments - * given. This timestamp is a long integer containing the number of - * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time - * specified. - * - * Any - * arguments omitted or NULL will be set to the current value according - * to the local date and time. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year 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 - * is somewhere between 1901 and 2038. - * @return int mktime returns the Unix timestamp of the arguments - * given. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -789,305 +279,9 @@ function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month /** - * Format the time and/or date according to locale settings. Month and weekday - * names and other language-dependent strings respect the current locale set - * with setlocale. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format - * Description - * Example returned values - * - * - * - * - * Day - * --- - * --- - * - * - * %a - * An abbreviated textual representation of the day - * Sun through Sat - * - * - * %A - * A full textual representation of the day - * Sunday through Saturday - * - * - * %d - * Two-digit day of the month (with leading zeros) - * 01 to 31 - * - * - * %e - * - * Day of the month, with a space preceding single digits. Not - * implemented as described on Windows. See below for more information. - * - * 1 to 31 - * - * - * %j - * Day of the year, 3 digits with leading zeros - * 001 to 366 - * - * - * %u - * ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * - * %w - * Numeric representation of the day of the week - * 0 (for Sunday) through 6 (for Saturday) - * - * - * Week - * --- - * --- - * - * - * %U - * Week number of the given year, starting with the first - * Sunday as the first week - * 13 (for the 13th full week of the year) - * - * - * %V - * ISO-8601:1988 week number of the given year, starting with - * the first week of the year with at least 4 weekdays, with Monday - * being the start of the week - * 01 through 53 (where 53 - * accounts for an overlapping week) - * - * - * %W - * A numeric representation of the week of the year, starting - * with the first Monday as the first week - * 46 (for the 46th week of the year beginning - * with a Monday) - * - * - * Month - * --- - * --- - * - * - * %b - * Abbreviated month name, based on the locale - * Jan through Dec - * - * - * %B - * Full month name, based on the locale - * January through December - * - * - * %h - * Abbreviated month name, based on the locale (an alias of %b) - * Jan through Dec - * - * - * %m - * Two digit representation of the month - * 01 (for January) through 12 (for December) - * - * - * Year - * --- - * --- - * - * - * %C - * Two digit representation of the century (year divided by 100, truncated to an integer) - * 19 for the 20th Century - * - * - * %g - * Two digit representation of the year going by ISO-8601:1988 standards (see %V) - * Example: 09 for the week of January 6, 2009 - * - * - * %G - * The full four-digit version of %g - * Example: 2008 for the week of January 3, 2009 - * - * - * %y - * Two digit representation of the year - * Example: 09 for 2009, 79 for 1979 - * - * - * %Y - * Four digit representation for the year - * Example: 2038 - * - * - * Time - * --- - * --- - * - * - * %H - * Two digit representation of the hour in 24-hour format - * 00 through 23 - * - * - * %k - * Hour in 24-hour format, with a space preceding single digits - * 0 through 23 - * - * - * %I - * Two digit representation of the hour in 12-hour format - * 01 through 12 - * - * - * %l (lower-case 'L') - * Hour in 12-hour format, with a space preceding single digits - * 1 through 12 - * - * - * %M - * Two digit representation of the minute - * 00 through 59 - * - * - * %p - * UPPER-CASE 'AM' or 'PM' based on the given time - * Example: AM for 00:31, - * PM for 22:23. The exact result depends on the - * Operating System, and they can also return lower-case variants, or - * variants with dots (such as a.m.). - * - * - * %P - * lower-case 'am' or 'pm' based on the given time - * Example: am for 00:31, - * pm for 22:23. Not supported by all Operating - * Systems. - * - * - * %r - * Same as "%I:%M:%S %p" - * Example: 09:34:17 PM for 21:34:17 - * - * - * %R - * Same as "%H:%M" - * Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM - * - * - * %S - * Two digit representation of the second - * 00 through 59 - * - * - * %T - * Same as "%H:%M:%S" - * Example: 21:34:17 for 09:34:17 PM - * - * - * %X - * Preferred time representation based on locale, without the date - * Example: 03:59:16 or 15:59:16 - * - * - * %z - * The time zone offset. Not implemented as described on - * Windows. See below for more information. - * Example: -0500 for US Eastern Time - * - * - * %Z - * The time zone abbreviation. Not implemented as described on - * Windows. See below for more information. - * Example: EST for Eastern Time - * - * - * Time and Date Stamps - * --- - * --- - * - * - * %c - * Preferred date and time stamp based on locale - * Example: Tue Feb 5 00:45:10 2009 for - * February 5, 2009 at 12:45:10 AM - * - * - * %D - * Same as "%m/%d/%y" - * Example: 02/05/09 for February 5, 2009 - * - * - * %F - * Same as "%Y-%m-%d" (commonly used in database datestamps) - * Example: 2009-02-05 for February 5, 2009 - * - * - * %s - * Unix Epoch Time timestamp (same as the time - * function) - * Example: 305815200 for September 10, 1979 08:40:00 AM - * - * - * %x - * Preferred date representation based on locale, without the time - * Example: 02/05/09 for February 5, 2009 - * - * - * Miscellaneous - * --- - * --- - * - * - * %n - * A newline character ("\n") - * --- - * - * - * %t - * A Tab character ("\t") - * --- - * - * - * %% - * A literal percentage character ("%") - * --- - * - * - * - * - * - * Windows only: - * - * The %e modifier is not supported in the Windows - * implementation of this function. To achieve this value, the - * %#d modifier can be used instead. The example below - * illustrates how to write a cross platform compatible function. - * - * The %z and %Z modifiers both - * return the time zone name instead of the offset or abbreviation. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * The function returns FALSE if format is empty, contains unsupported - * conversion specifiers, or if the length of the returned string would be greater than - * 4095. + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -1107,74 +301,9 @@ function strftime(string $format, ?int $timestamp = null): string /** - * strptime returns an array with the - * timestamp parsed. - * - * Month and weekday names and other language dependent strings respect the - * current locale set with setlocale (LC_TIME). - * - * @param string $timestamp The string to parse (e.g. returned from strftime). - * @param string $format The format used in timestamp (e.g. the same as - * used in strftime). Note that some of the format - * options available to strftime may not have any - * effect within strptime; the exact subset that are - * supported will vary based on the operating system and C library in - * use. - * - * For more information about the format options, read the - * strftime page. - * @return array Returns an array. - * - * - * The following parameters are returned in the array - * - * - * - * parameters - * Description - * - * - * - * - * "tm_sec" - * Seconds after the minute (0-61) - * - * - * "tm_min" - * Minutes after the hour (0-59) - * - * - * "tm_hour" - * Hour since midnight (0-23) - * - * - * "tm_mday" - * Day of the month (1-31) - * - * - * "tm_mon" - * Months since January (0-11) - * - * - * "tm_year" - * Years since 1900 - * - * - * "tm_wday" - * Days since Sunday (0-6) - * - * - * "tm_yday" - * Days since January 1 (0-365) - * - * - * "unparsed" - * the timestamp part which was not - * recognized using the specified format - * - * - * - * + * @param string $timestamp + * @param string $format + * @return array * @throws DatetimeException * */ @@ -1190,16 +319,9 @@ function strptime(string $timestamp, string $format): array /** - * Each parameter of this function uses the default time zone unless a - * time zone is specified in that parameter. Be careful not to use - * different time zones in each parameter unless that is intended. - * See date_default_timezone_get on the various - * ways to define the default time zone. - * - * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. - * @param int|null $baseTimestamp The timestamp which is used as a base for the calculation of relative - * dates. - * @return int Returns a timestamp on success. + * @param string $datetime + * @param int|null $baseTimestamp + * @return int * @throws DatetimeException * */ @@ -1219,23 +341,10 @@ function strtotime(string $datetime, ?int $baseTimestamp = null): int /** - * - * - * @param string $abbr Time zone abbreviation. - * @param int $utcOffset 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 Daylight saving time indicator. Defaults to -1, which means that - * whether the time zone has daylight saving or not is not taken into - * consideration when searching. If this is set to 1, then the - * utcOffset is assumed to be an offset with - * daylight saving in effect; if 0, then utcOffset - * is assumed to be an offset without daylight saving in effect. If - * abbr doesn't exist then the time zone is - * searched solely by the utcOffset and - * isDST. - * @return string Returns time zone name on success. + * @param string $abbr + * @param int $utcOffset + * @param int $isDST + * @return string * @throws DatetimeException * */ diff --git a/generated/8.2/dir.php b/generated/8.2/dir.php index 03a68274..a9c1288a 100644 --- a/generated/8.2/dir.php +++ b/generated/8.2/dir.php @@ -5,10 +5,7 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to - * directory. - * - * @param string $directory The new current directory + * @param string $directory * @throws DirException * */ @@ -23,18 +20,7 @@ function chdir(string $directory): void /** - * Changes the root directory of the current process to - * directory, and changes the current - * working directory to "/". - * - * This function is only available to GNU and BSD systems, and - * only when using the CLI, CGI or Embed SAPI. Also, this function - * requires root privileges. - * - * Calling this function does not change the values of the __DIR__ - * and __FILE__ magic constants. - * - * @param string $directory The path to change the root directory to. + * @param string $directory * @throws DirException * */ @@ -49,13 +35,9 @@ function chroot(string $directory): void /** - * A pseudo-object-oriented mechanism for reading a directory. The - * given directory is opened. - * - * @param string $directory Directory to open - * @param null|resource $context A context stream - * resource. - * @return \Directory Returns an instance of Directory, or FALSE in case of error. + * @param string $directory + * @param null|resource $context + * @return \Directory * @throws DirException * */ @@ -75,15 +57,7 @@ function dir(string $directory, $context = null): \Directory /** - * Gets the current working directory. - * - * @return non-empty-string Returns the current working directory on success. - * - * On some Unix variants, getcwd will return - * FALSE if any one of the parent directories does not have the - * readable or search mode set, even if the current directory - * does. See chmod for more information on - * modes and permissions. + * @return non-empty-string * @throws DirException * */ @@ -99,15 +73,9 @@ function getcwd(): string /** - * Opens up a directory handle to be used in subsequent - * closedir, readdir, and - * rewinddir calls. - * - * @param string $directory The directory path that is to be opened - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return resource Returns a directory handle resource on success + * @param string $directory + * @param null|resource $context + * @return resource * @throws DirException * */ @@ -127,21 +95,10 @@ function opendir(string $directory, $context = null) /** - * Returns an array of files and directories from the - * directory. - * - * @param string $directory The directory that will be scanned. - * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order By default, the sorted order is alphabetical in ascending order. If - * the optional sorting_order is set to - * SCANDIR_SORT_DESCENDING, then the sort order is - * alphabetical in descending order. If it is set to - * SCANDIR_SORT_NONE then the result is unsorted. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return list Returns an array of filenames on success. If directory is not a directory, then - * boolean FALSE is returned, and an error of level - * E_WARNING is generated. + * @param string $directory + * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order + * @param null|resource $context + * @return list * @throws DirException * */ diff --git a/generated/8.2/eio.php b/generated/8.2/eio.php index de2f742e..4fd10a55 100644 --- a/generated/8.2/eio.php +++ b/generated/8.2/eio.php @@ -5,17 +5,11 @@ use Safe\Exceptions\EioException; /** - * eio_busy artificially increases load taking - * delay seconds to execute. May be used for debugging, - * or benchmarking. - * - * @param int $delay Delay in seconds - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. - * @param callable|null $callback This callback is called when all the group requests are done. - * @param mixed $data Arbitrary variable passed to callback. - * @return resource eio_busy returns request resource on success. + * @param int $delay + * @param int $pri + * @param callable|null $callback + * @param mixed $data + * @return resource * @throws EioException * */ @@ -31,43 +25,12 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = /** - * eio_chmod changes file, or directory permissions. The - * new permissions are specified by mode. - * - * @param string $path Path to the target file or directory - * Avoid relative - * paths - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -83,43 +46,13 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * Changes file, or directory permissions. - * - * @param string $path Path to file or directory. - * Avoid relative - * paths - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chown returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -135,40 +68,11 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** - * eio_close closes file specified by - * fd. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_close returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -184,50 +88,11 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_custom executes custom function specified by - * execute processing it just like any other eio_* call. - * - * @param callable $execute Specifies the request function that should match the following prototype: - * - * - * callback is event completion callback that should match the following - * prototype: - * - * - * data is the data passed to - * execute via data argument - * without modifications - * result value returned by execute - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param callable $execute + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_custom returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -243,40 +108,12 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul /** - * eio_dup2 duplicates file descriptor. - * - * @param mixed $fd Source stream, Socket resource, or numeric file descriptor - * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param mixed $fd2 + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_dup2 returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -292,8 +129,6 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = n /** - * eio_event_loop polls libeio until all requests proceeded. - * * @throws EioException * */ @@ -308,47 +143,14 @@ function eio_event_loop(): void /** - * eio_fallocate allows the caller to directly manipulate the allocated disk space for the - * file specified by fd file descriptor for the byte - * range starting at offset and continuing for - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode Currently only one flag is supported for mode: - * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant - * FALLOC_FL_KEEP_SIZE). - * @param int $offset Specifies start of the byte range. - * @param int $length Specifies length the byte range. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fallocate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -364,41 +166,12 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** - * eio_fchmod changes permissions for the file specified - * by fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fchmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -414,42 +187,13 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callb /** - * eio_fchown changes ownership of the file specified by - * fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -465,39 +209,11 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?c /** - * eio_fdatasync synchronizes a file's in-core state with storage device. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fdatasync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -513,40 +229,11 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = nu /** - * eio_fstat returns file status information in - * result argument of callback - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -566,40 +253,11 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** - * eio_fstatvfs returns file system statistics in - * result of callback. - * - * @param mixed $fd A file descriptor of a file within the mounted file system. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fstatvfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -619,39 +277,11 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** - * Synchronize a file's in-core state with storage device - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fsync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -667,42 +297,12 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_ftruncate causes a regular file referenced by - * fd file descriptor to be truncated to precisely - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $offset Offset from beginning of the file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_ftruncate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -718,42 +318,13 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callab /** - * eio_futime changes file last access and modification - * times. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_futime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -769,35 +340,9 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** - * eio_grp creates a request group. - * * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_grp returns request group resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -813,40 +358,11 @@ function eio_grp(callable $callback, ?string $data = null) /** - * eio_lstat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_lstat returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -862,41 +378,12 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) /** - * eio_mkdir creates directory with specified access - * mode. - * - * @param string $path Path for the new directory. - * @param int $mode Access mode, e.g. 0755 - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mkdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -912,57 +399,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * eio_mknod creates ordinary or special(often) file. - * - * @param string $path Path for the new node(file). - * @param int $mode Specifies both the permissions to use and the type of node to be - * created. It should be a combination (using bitwise OR) of one of the - * file types listed below and the permissions for the new node(e.g. 0640). - * - * Possible file types are: EIO_S_IFREG(regular file), - * EIO_S_IFCHR(character file), - * EIO_S_IFBLK(block special file), - * EIO_S_IFIFO(FIFO - named pipe) and - * EIO_S_IFSOCK(UNIX domain socket). - * - * To specify permissions EIO_S_I* constants could be - * used. - * @param int $dev If the file type is EIO_S_IFCHR or - * EIO_S_IFBLK then dev specifies the major and minor - * numbers of the newly created device special file. Otherwise - * dev ignored. See mknod(2) man page for - * details. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $dev + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mknod returns request resource on success. - * @throws EioException + * @param mixed $data + * @return resource + * @throws EioException * */ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null) @@ -977,39 +421,10 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** - * eio_nop does nothing, except go through the whole - * request cycle. Could be useful in debugging. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_nop returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1025,42 +440,13 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = /** - * eio_readahead populates the page cache with data from a file so that subsequent reads from - * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $length Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_readahead returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1076,295 +462,12 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT /** - * Reads through a whole directory(via the opendir, readdir and - * closedir system calls) and returns either the names or an array in - * result argument of callback - * function, depending on the flags argument. - * - * @param string $path Directory path. - * @param int $flags Combination of EIO_READDIR_* constants. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $flags + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readdir returns request resource on success. - * Sets result argument of - * callback function according to - * flags: - * - * - * - * - * - * - * EIO_READDIR_DENTS - * (int) - * - * - * - * eio_readdir flag. If specified, the result argument of the callback - * becomes an array with the following keys: - * 'names' - array of directory names - * 'dents' - array of struct - * eio_dirent-like arrays having the following keys each: - * 'name' - the directory name; - * 'type' - one of EIO_DT_* - * constants; - * 'inode' - the inode number, if available, otherwise - * unspecified; - * - * - * - * - * - * EIO_READDIR_DIRS_FIRST - * (int) - * - * - * - * When this flag is specified, the names will be returned in an order - * where likely directories come first, in optimal stat order. - * - * - * - * - * - * EIO_READDIR_STAT_ORDER - * (int) - * - * - * - * When this flag is specified, then the names will be returned in an order - * suitable for stat'ing each one. When planning to - * stat all files in the given directory, the - * returned order will likely be - * fastest. - * - * - * - * - * - * EIO_READDIR_FOUND_UNKNOWN - * (int) - * - * - * - * - * - * - * - * - * - * - * - * Node types: - * - * - * - * - * - * EIO_DT_UNKNOWN - * (int) - * - * - * - * Unknown node type(very common). Further stat needed. - * - * - * - * - * - * EIO_DT_FIFO - * (int) - * - * - * - * FIFO node type - * - * - * - * - * - * EIO_DT_CHR - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPC - * (int) - * - * - * - * Multiplexed char device (v7+coherent) node type - * - * - * - * - * - * EIO_DT_DIR - * (int) - * - * - * - * Directory node type - * - * - * - * - * - * EIO_DT_NAM - * (int) - * - * - * - * Xenix special named file node type - * - * - * - * - * - * EIO_DT_BLK - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPB - * (int) - * - * - * - * Multiplexed block device (v7+coherent) - * - * - * - * - * - * EIO_DT_REG - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_NWK - * (int) - * - * - * - * - * - * - * - * - * EIO_DT_CMP - * (int) - * - * - * - * HP-UX network special node type - * - * - * - * - * - * EIO_DT_LNK - * (int) - * - * - * - * Link node type - * - * - * - * - * - * EIO_DT_SOCK - * (int) - * - * - * - * Socket node type - * - * - * - * - * - * EIO_DT_DOOR - * (int) - * - * - * - * Solaris door node type - * - * - * - * - * - * EIO_DT_WHT - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MAX - * (int) - * - * - * - * Highest node type value - * - * - * - * - * - * - * + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1380,39 +483,11 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?st /** - * - * - * @param string $path Source symbolic link path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readlink returns request resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1428,40 +503,12 @@ function eio_readlink(string $path, int $pri, callable $callback, ?string $data /** - * eio_rename renames or moves a file to new location. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rename returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1477,39 +524,11 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_rmdir removes a directory. - * - * @param string $path Directory path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rmdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1525,47 +544,13 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback /** - * eio_seek repositions the offset of the open file associated with - * stream, Socket resource, or file descriptor specified by fd to the argument offset according to the directive whence as follows: - * - * EIO_SEEK_SET - Set position equal to offset bytes. - * EIO_SEEK_CUR - Set position to current location plus offset. - * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $whence Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $whence + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_seek returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1581,43 +566,14 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?ca /** - * eio_sendfile copies data between one file descriptor - * and another. See SENDFILE(2) man page for details. - * - * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. - * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. - * @param int $offset Offset within the source file. - * @param int $length Number of bytes to copy. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $out_fd + * @param mixed $in_fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param string $data is custom data passed to the request. - * @return resource eio_sendfile returns request resource on success. + * @param string $data + * @return resource * @throws EioException * */ @@ -1641,41 +597,11 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = nul /** - * eio_stat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_stat returns request resource on success. On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1691,42 +617,11 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null) /** - * eio_statvfs returns file system statistics information in - * result argument of callback - * - * @param string $path Pathname of any file within the mounted file system - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_statvfs returns request resource on success. - * On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1746,41 +641,12 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** - * eio_symlink creates a symbolic link - * new_path to path. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_symlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1796,50 +662,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file - * descriptor fd with disk. - * - * @param mixed $fd File descriptor - * @param int $offset The starting byte of the file range to be synchronized - * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If - * nbytes is zero, then all bytes from offset through - * to the end of file are synchronized. - * @param int $flags A bit-mask. Can include any of the following values: - * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, - * EIO_SYNC_FILE_RANGE_WRITE, - * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have - * the same meaning as their SYNC_FILE_RANGE_* - * counterparts(see SYNC_FILE_RANGE(2) man page). - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $nbytes + * @param int $flags + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_sync_file_range returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1855,12 +685,10 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * * @param int $pri * @param callable|null $callback * @param mixed $data - * @return resource eio_sync returns request resource on success. + * @return resource * @throws EioException * */ @@ -1876,39 +704,11 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data /** - * - * - * @param mixed $fd File descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_syncfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1924,41 +724,12 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_truncate causes the regular file named by path to be truncated to - * a size of precisely length bytes - * - * @param string $path File path - * @param int $offset Offset from beginning of the file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1974,39 +745,11 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** - * eio_unlink deletes a name from the file system. - * - * @param string $path Path to file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_unlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2022,41 +765,13 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callbac /** - * - * - * @param string $path Path to the file. - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_utime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2072,44 +787,14 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ /** - * eio_write writes up to length - * bytes from str at offset - * offset from the beginning of the file. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param string $str Source string - * @param int $length Maximum number of bytes to write. - * @param int $offset Offset from the beginning of file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param string $str + * @param int $length + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_write returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ diff --git a/generated/8.2/errorfunc.php b/generated/8.2/errorfunc.php index 671fe69c..2e0c2df9 100644 --- a/generated/8.2/errorfunc.php +++ b/generated/8.2/errorfunc.php @@ -5,64 +5,10 @@ use Safe\Exceptions\ErrorfuncException; /** - * Sends an error message to the web server's error log or to a file. - * - * @param string $message The error message that should be logged. - * @param 0|1|2|3|4 $message_type Says where the error should go. The possible message types are as - * follows: - * - * - * error_log log types - * - * - * - * 0 - * - * message is sent to PHP's system logger, using - * the Operating System's system logging mechanism or a file, depending - * on what the error_log - * configuration directive is set to. This is the default option. - * - * - * - * 1 - * - * message is sent by email to the address in - * the destination parameter. This is the only - * message type where the fourth parameter, - * additional_headers is used. - * - * - * - * 2 - * - * No longer an option. - * - * - * - * 3 - * - * message is appended to the file - * destination. A newline is not automatically - * added to the end of the message string. - * - * - * - * 4 - * - * message is sent directly to the SAPI logging - * handler. - * - * - * - * - * - * @param null|string $destination The destination. Its meaning depends on the - * message_type parameter as described above. - * @param null|string $additional_headers The extra headers. It's used when the message_type - * parameter is set to 1. - * This message type uses the same internal function as - * mail does. + * @param string $message + * @param 0|1|2|3|4 $message_type + * @param null|string $destination + * @param null|string $additional_headers * @throws ErrorfuncException * */ diff --git a/generated/8.2/exec.php b/generated/8.2/exec.php index 7e35d71b..534f7a89 100644 --- a/generated/8.2/exec.php +++ b/generated/8.2/exec.php @@ -5,30 +5,10 @@ use Safe\Exceptions\ExecException; /** - * exec executes the given - * command. - * - * @param string $command The command that will be executed. - * @param array|null $output If the output argument is present, then the - * specified array will be filled with every line of output from the - * command. Trailing whitespace, such as \n, is not - * included in this array. Note that if the array already contains some - * elements, exec will append to the end of the array. - * If you do not want the function to append elements, call - * unset on the array before passing it to - * exec. - * @param int|null $result_code If the result_code argument is present - * along with the output argument, then the - * return status of the executed command will be written to this - * variable. - * @return string The last line from the result of the command. If you need to execute a - * command and have all the data from the command passed directly back without - * any interference, use the passthru function. - * - * Returns FALSE on failure. - * - * To get the output of the executed command, be sure to set and use the - * output parameter. + * @param string $command + * @param array|null $output + * @param int|null $result_code + * @return string * @throws ExecException * */ @@ -44,18 +24,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null /** - * proc_close is similar to pclose - * except that it only works on processes opened by - * proc_open. - * proc_close waits for the process to terminate, and - * returns its exit code. Open pipes to that process are closed - * when this function is called, in - * order to avoid a deadlock - the child process may not be able to exit - * while the pipes are open. - * - * @param resource $process The proc_open resource that will - * be closed. - * @return int Returns the termination status of the process that was run. + * @param resource $process + * @return int * @throws ExecException * */ @@ -71,22 +41,7 @@ function proc_close($process): int /** - * proc_nice changes the priority of the current - * process by the amount specified in priority. A - * positive priority will lower the priority of the - * current process, whereas a negative priority - * will raise the priority. - * - * proc_nice is not related to - * proc_open and its associated functions in any way. - * - * @param int $priority The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority - * whereas positive values have a lower priority. - * - * For Windows the priority parameter has the - * following meaning: + * @param int $priority * @throws ExecException * */ @@ -101,81 +56,13 @@ function proc_nice(int $priority): void /** - * proc_open is similar to popen - * but provides a much greater degree of control over the program execution. - * - * @param string $command The commandline to execute as string. Special characters have to be properly escaped, - * and proper quoting has to be applied. - * - * As of PHP 7.4.0, command may be passed as array of command parameters. - * In this case the process will be opened directly (without going through a shell) - * and PHP will take care of any necessary argument escaping. - * - * On Windows, the argument escaping of the array elements assumes that the - * command line parsing of the executed command is compatible with the parsing - * of command line arguments done by the VC runtime. - * @param array $descriptor_spec An indexed array where the key represents the descriptor number and the - * value represents how PHP will pass that descriptor to the child - * process. 0 is stdin, 1 is stdout, while 2 is stderr. - * - * Each element can be: - * - * An array describing the pipe to pass to the process. The first - * element is the descriptor type and the second element is an option for - * the given type. Valid types are pipe (the second - * element is either r to pass the read end of the pipe - * to the process, or w to pass the write end) and - * file (the second element is a filename). - * Note that anything else than w is treated like r. - * - * - * A stream resource representing a real file descriptor (e.g. opened file, - * a socket, STDIN). - * - * - * - * The file descriptor numbers are not limited to 0, 1 and 2 - you may - * specify any valid file descriptor number and it will be passed to the - * child process. This allows your script to interoperate with other - * scripts that run as "co-processes". In particular, this is useful for - * passing passphrases to programs like PGP, GPG and openssl in a more - * secure manner. It is also useful for reading status information - * provided by those programs on auxiliary file descriptors. - * @param null|resource[] $pipes Will be set to an indexed array of file pointers that correspond to - * PHP's end of any pipes that are created. - * @param null|string $cwd The initial working dir for the command. This must be an - * absolute directory path, or NULL - * if you want to use the default value (the working dir of the current - * PHP process) - * @param array|null $env_vars An array with the environment variables for the command that will be - * run, or NULL to use the same environment as the current PHP process - * @param array|null $options Allows you to specify additional options. Currently supported options - * include: - * - * - * suppress_errors (windows only): suppresses errors - * generated by this function when it's set to TRUE - * - * - * bypass_shell (windows only): bypass - * cmd.exe shell when set to TRUE - * - * - * blocking_pipes (windows only): force - * blocking pipes when set to TRUE - * - * - * create_process_group (windows only): allow the - * child process to handle CTRL events when set to TRUE - * - * - * create_new_console (windows only): the new process - * has a new console, instead of inheriting its parent's console - * - * - * @return resource Returns a resource representing the process, which should be freed using - * proc_close when you are finished with it. On failure - * returns FALSE. + * @param string $command + * @param array $descriptor_spec + * @param null|resource[] $pipes + * @param null|string $cwd + * @param array|null $env_vars + * @param array|null $options + * @return resource * @throws ExecException * */ @@ -199,10 +86,8 @@ function proc_open(string $command, array $descriptor_spec, ?array &$pipes, ?str /** - * This function is identical to the backtick operator. - * - * @param string $command The command that will be executed. - * @return null|string A string containing the output from the executed command or NULL if an error occurs or the command produces no output. + * @param string $command + * @return null|string * @throws ExecException * */ @@ -218,23 +103,9 @@ function shell_exec(string $command): ?string /** - * system is just like the C version of the - * function in that it executes the given - * command and outputs the result. - * - * The system call also tries to automatically - * flush the web server's output buffer after each line of output if - * PHP is running as a server module. - * - * If you need to execute a command and have all the data from the - * command passed directly back without any interference, use the - * passthru function. - * - * @param string $command The command that will be executed. - * @param int|null $result_code If the result_code argument is present, then the - * return status of the executed command will be written to this - * variable. - * @return string Returns the last line of the command output on success. + * @param string $command + * @param int|null $result_code + * @return string * @throws ExecException * */ diff --git a/generated/8.2/fileinfo.php b/generated/8.2/fileinfo.php index e82e617f..2e832a4e 100644 --- a/generated/8.2/fileinfo.php +++ b/generated/8.2/fileinfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\FileinfoException; /** - * This function closes the instance opened by finfo_open. - * - * @param \finfo $finfo An finfo instance, returned by finfo_open. + * @param \finfo $finfo * @throws FileinfoException * */ @@ -22,24 +20,9 @@ function finfo_close(\finfo $finfo): void /** - * Procedural style - * - * Object-oriented style (constructor): - * - * This function opens a magic database and returns its instance. - * - * @param int $flags One or disjunction of more Fileinfo - * constants. - * @param null|string $magic_database Name of a magic database file, usually something like - * /path/to/magic.mime. If not specified, the - * MAGIC environment variable is used. If the - * environment variable isn't set, then PHP's bundled magic database will - * be used. - * - * Passing NULL or an empty string will be equivalent to the default - * value. - * @return \finfo (Procedural style only) - * Returns an finfo instance on success. + * @param int $flags + * @param null|string $magic_database + * @return \finfo * @throws FileinfoException * */ @@ -59,12 +42,8 @@ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): /** - * Returns the MIME content type for a file as determined by using - * information from the magic.mime file. - * - * @param resource|string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like - * text/plain or application/octet-stream. + * @param resource|string $filename + * @return string * @throws FileinfoException * */ diff --git a/generated/8.2/filesystem.php b/generated/8.2/filesystem.php index 677241be..a3c6ea4a 100644 --- a/generated/8.2/filesystem.php +++ b/generated/8.2/filesystem.php @@ -5,14 +5,8 @@ use Safe\Exceptions\FilesystemException; /** - * Attempts to change the group of the file filename - * to group. - * - * Only the superuser may change the group of a file arbitrarily; other users - * may change the group of a file to any group of which that user is a member. - * - * @param string $filename Path to the file. - * @param int|string $group A group name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -27,35 +21,9 @@ function chgrp(string $filename, $group): void /** - * Attempts to change the mode of the specified file to that given in - * permissions. - * - * @param string $filename Path to the file. - * @param int $permissions Note that permissions is not automatically - * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix permissions with a zero (0). - * Strings such as "g+w" will not work properly. - * - * - * - * - * ]]> - * - * - * - * The permissions parameter consists of three octal - * number components specifying access restrictions for the owner, - * the user group in which the owner is in, and to everybody else in - * this order. One component can be computed by adding up the needed - * permissions for that target user base. Number 1 means that you - * grant execute rights, number 2 means that you make the file - * writeable, number 4 means that you make the file readable. Add - * up these numbers to specify needed rights. You can also read more - * about modes on Unix systems with 'man 1 chmod' - * and 'man 2 chmod'. - * - * - * + * @param string $filename + * @param int $permissions + * @throws FilesystemException * */ function chmod(string $filename, int $permissions): void @@ -69,12 +37,8 @@ function chmod(string $filename, int $permissions): void /** - * Attempts to change the owner of the file filename - * to user user. Only the superuser may change the - * owner of a file. - * - * @param string $filename Path to the file. - * @param int|string $user A user name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -89,19 +53,9 @@ function chown(string $filename, $user): void /** - * Makes a copy of the file from to - * to. - * - * If you wish to move a file, use the rename function. - * - * @param string $from Path to the source file. - * @param string $to The destination path. If to is a URL, the - * copy operation may fail if the wrapper does not support overwriting of - * existing files. - * - * If the destination file already exists, it will be overwritten. - * @param null|resource $context A valid context resource created with - * stream_context_create. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -120,16 +74,8 @@ function copy(string $from, string $to, $context = null): void /** - * Given a string containing a directory, this function will return the - * number of bytes available on the corresponding filesystem or disk - * partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * - * Given a file name instead of a directory, the behaviour of the - * function is unspecified and may differ between operating systems and - * PHP versions. - * @return float Returns the number of available bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -145,11 +91,8 @@ function disk_free_space(string $directory): float /** - * Given a string containing a directory, this function will return the total - * number of bytes on the corresponding filesystem or disk partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * @return float Returns the total number of bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -165,10 +108,7 @@ function disk_total_space(string $directory): float /** - * The file pointed to by stream is closed. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or fsockopen. + * @param resource $stream * @throws FilesystemException * */ @@ -183,15 +123,7 @@ function fclose($stream): void /** - * This function synchronizes stream contents to storage media, just like fsync does, - * but it does not synchronize file meta-data. - * Note that this function is only effectively different in POSIX systems. - * In Windows, this function is aliased to fsync. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -206,13 +138,7 @@ function fdatasync($stream): void /** - * This function forces a write of all buffered output to the resource - * pointed to by the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -227,36 +153,12 @@ function fflush($stream): void /** - * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to length bytes. On failure, - * file_get_contents will return FALSE. - * - * file_get_contents is the preferred way to read the - * contents of a file into a string. It will use memory mapping techniques if - * supported by your OS to enhance performance. - * - * @param string $filename Name of the file to read. - * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used - * to trigger include path - * search. - * This is not possible if strict typing - * is enabled, since FILE_USE_INCLUDE_PATH is an - * int. Use TRUE instead. - * @param null|resource $context A valid context resource created with - * stream_context_create. If you don't need to use a - * custom context, you can skip this parameter by NULL. - * @param int $offset The offset where the reading starts on the original stream. - * Negative offsets count from the end of the stream. - * - * Seeking (offset) is not supported with remote files. - * Attempting to seek on non-local files may work with small offsets, but this - * is unpredictable because it works on the buffered stream. - * @param 0|null|positive-int $length Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the - * stream processed by the filters. - * @return string The function returns the read data. + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @param int $offset + * @param 0|null|positive-int $length + * @return string * @throws FilesystemException * */ @@ -280,76 +182,11 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * This function is identical to calling fopen, - * fwrite and fclose successively - * to write data to a file. - * - * If filename does not exist, the file is created. - * Otherwise, the existing file is overwritten, unless the - * FILE_APPEND flag is set. - * - * @param string $filename Path to the file where to write the data. - * @param mixed $data The data to write. Can be either a string, an - * array or a stream resource. - * - * If data is a stream resource, the - * remaining buffer of that stream will be copied to the specified file. - * This is similar with using stream_copy_to_stream. - * - * You can also specify the data parameter as a single - * dimension array. This is equivalent to - * file_put_contents($filename, implode('', $array)). - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * - * Available flags - * - * - * - * Flag - * Description - * - * - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * Search for filename in the include directory. - * See include_path for more - * information. - * - * - * - * - * FILE_APPEND - * - * - * If file filename already exists, append - * the data to the file instead of overwriting it. - * - * - * - * - * LOCK_EX - * - * - * Acquire an exclusive lock on the file while proceeding to the - * writing. In other words, a flock call happens - * between the fopen call and the - * fwrite call. This is not identical to an - * fopen call with mode "x". - * - * - * - * - * - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return 0|positive-int This function returns the number of bytes that were written to the file. + * @param string $filename + * @param mixed $data + * @param int $flags + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -369,47 +206,10 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n /** - * Reads an entire file into an array. - * - * @param string $filename Path to the file. - * @param int-mask $flags The optional parameter flags can be one, or - * more, of the following constants: - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * - * Search for the file in the include_path. - * - * - * - * - * - * FILE_IGNORE_NEW_LINES - * - * - * - * Omit newline at the end of each array element - * - * - * - * - * - * FILE_SKIP_EMPTY_LINES - * - * - * - * Skip empty lines - * - * - * - * - * @param null|resource $context Search for the file in the include_path. - * @return list Returns the file in an array. Each element of the array corresponds to a - * line in the file, with the newline still attached. Upon failure, - * file returns FALSE. + * @param string $filename + * @param int-mask $flags + * @param null|resource $context + * @return list * @throws FilesystemException * */ @@ -429,11 +229,8 @@ function file(string $filename, int $flags = 0, $context = null): array /** - * Gets the last access time of the given file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last accessed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -449,11 +246,8 @@ function fileatime(string $filename): int /** - * Gets the inode change time of a file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last changed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -469,10 +263,8 @@ function filectime(string $filename): int /** - * Gets the file inode. - * - * @param string $filename Path to the file. - * @return int Returns the inode number of the file. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -488,13 +280,8 @@ function fileinode(string $filename): int /** - * This function returns the time when the data blocks of a file were being - * written to, that is, the time when the content of the file was changed. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last modified. - * The time is returned as a Unix timestamp, which is - * suitable for the date function. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -510,12 +297,8 @@ function filemtime(string $filename): int /** - * Gets the file owner. - * - * @param string $filename Path to the file. - * @return int Returns the user ID of the owner of the file. - * The user ID is returned in numerical format, use - * posix_getpwuid to resolve it to a username. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -531,24 +314,8 @@ function fileowner(string $filename): int /** - * Gets permissions for the given file. - * - * @param string $filename Path to the file. - * @return int Returns the file's permissions as a numeric mode. Lower bits of this mode - * are the same as the permissions expected by chmod, - * however on most platforms the return value will also include information on - * the type of file given as filename. The examples - * below demonstrate how to test the return value for specific permissions and - * file types on POSIX systems, including Linux and macOS. - * - * For local files, the specific return value is that of the - * st_mode member of the structure returned by the C - * library's stat function. Exactly which bits are set - * can vary from platform to platform, and looking up your specific platform's - * documentation is recommended if parsing the non-permission bits of the - * return value is required. - * - * Returns FALSE on failure. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -564,11 +331,8 @@ function fileperms(string $filename): int /** - * Gets the size for the given file. - * - * @param string $filename Path to the file. - * @return 0|positive-int Returns the size of the file in bytes, or FALSE (and generates an error - * of level E_WARNING) in case of an error. + * @param string $filename + * @return 0|positive-int * @throws FilesystemException * */ @@ -584,15 +348,8 @@ function filesize(string $filename): int /** - * Returns the type of the given file. - * - * @param string $filename Path to the file. - * @return string Returns the type of the file. Possible values are fifo, char, - * dir, block, link, file, socket and unknown. - * - * Returns FALSE if an error occurs. filetype will also - * produce an E_NOTICE message if the stat call fails - * or if the file type is unknown. + * @param string $filename + * @return string * @throws FilesystemException * */ @@ -608,44 +365,9 @@ function filetype(string $filename): string /** - * flock allows you to perform a simple reader/writer - * model which can be used on virtually every platform (including most Unix - * derivatives and even Windows). - * - * The lock is released also by fclose, - * or when stream is garbage collected. - * - * PHP supports a portable way of locking complete files in an advisory way - * (which means all accessing programs have to use the same way of locking - * or it will not work). By default, this function will block until the - * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param int-mask $operation operation is one of the following: - * - * - * - * LOCK_SH to acquire a shared lock (reader). - * - * - * - * - * LOCK_EX to acquire an exclusive lock (writer). - * - * - * - * - * LOCK_UN to release a lock (shared or exclusive). - * - * - * - * - * It is also possible to add LOCK_NB as a bitmask to one - * of the above operations, if flock should not - * block during the locking attempt. - * @param 0|1|null $would_block The optional third argument is set to 1 if the lock would block - * (EWOULDBLOCK errno condition). + * @param resource $stream + * @param int-mask $operation + * @param 0|1|null $would_block * @throws FilesystemException * */ @@ -660,201 +382,11 @@ function flock($stream, int $operation, ?int &$would_block = null): void /** - * fopen binds a named resource, specified by - * filename, to a stream. - * - * @param string $filename If filename is of the form "scheme://...", it - * is assumed to be a URL and PHP will search for a protocol handler - * (also known as a wrapper) for that scheme. If no wrappers for that - * protocol are registered, PHP will emit a notice to help you track - * potential problems in your script and then continue as though - * filename specifies a regular file. - * - * If PHP has decided that filename specifies - * a local file, then it will try to open a stream on that file. - * The file must be accessible to PHP, so you need to ensure that - * the file access permissions allow this access. - * If you have enabled - * open_basedir further - * restrictions may apply. - * - * If PHP has decided that filename specifies - * a registered protocol, and that protocol is registered as a - * network URL, PHP will check to make sure that - * allow_url_fopen is - * enabled. If it is switched off, PHP will emit a warning and - * the fopen call will fail. - * - * The list of supported protocols can be found in . Some protocols (also referred to as - * wrappers) support context - * and/or php.ini options. Refer to the specific page for the - * protocol in use for a list of options which can be set. (e.g. - * php.ini value user_agent used by the - * http wrapper). - * - * On the Windows platform, be careful to escape any backslashes - * used in the path to the file, or use forward slashes. - * - * - * - * ]]> - * - * - * @param string $mode The mode parameter specifies the type of access - * you require to the stream. It may be any of the following: - * - * - * A list of possible modes for fopen - * using mode - * - * - * - * - * mode - * Description - * - * - * - * - * 'r' - * - * Open for reading only; place the file pointer at the - * beginning of the file. - * - * - * - * 'r+' - * - * Open for reading and writing; place the file pointer at - * the beginning of the file. - * - * - * - * 'w' - * - * Open for writing only; place the file pointer at the - * beginning of the file and truncate the file to zero length. - * If the file does not exist, attempt to create it. - * - * - * - * 'w+' - * - * Open for reading and writing; otherwise it has the - * same behavior as 'w'. - * - * - * - * 'a' - * - * Open for writing only; place the file pointer at the end of - * the file. If the file does not exist, attempt to create it. - * In this mode, fseek has no effect, writes are always appended. - * - * - * - * 'a+' - * - * Open for reading and writing; place the file pointer at - * the end of the file. If the file does not exist, attempt to - * create it. In this mode, fseek only affects - * the reading position, writes are always appended. - * - * - * - * 'x' - * - * Create and open for writing only; place the file pointer at the - * beginning of the file. If the file already exists, the - * fopen call will fail by returning FALSE and - * generating an error of level E_WARNING. If - * the file does not exist, attempt to create it. This is equivalent - * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * - * 'x+' - * - * Create and open for reading and writing; otherwise it has the - * same behavior as 'x'. - * - * - * - * 'c' - * - * Open the file for writing only. If the file does not exist, it is - * created. If it exists, it is neither truncated (as opposed to - * 'w'), nor the call to this function fails (as is - * the case with 'x'). The file pointer is - * positioned on the beginning of the file. This may be useful if it's - * desired to get an advisory lock (see flock) - * before attempting to modify the file, as using - * 'w' could truncate the file before the lock - * was obtained (if truncation is desired, - * ftruncate can be used after the lock is - * requested). - * - * - * - * 'c+' - * - * Open the file for reading and writing; otherwise it has the same - * behavior as 'c'. - * - * - * - * 'e' - * - * Set close-on-exec flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conform systems. - * - * - * - * - * - * - * Different operating system families have different line-ending - * conventions. When you write a text file and want to insert a line - * break, you need to use the correct line-ending character(s) for your - * operating system. Unix based systems use \n as the - * line ending character, Windows based systems use \r\n - * as the line ending characters and Macintosh based systems (Mac OS Classic) used - * \r as the line ending character. - * - * If you use the wrong line ending characters when writing your files, you - * might find that other applications that open those files will "look - * funny". - * - * Windows offers a text-mode translation flag ('t') - * which will transparently translate \n to - * \r\n when working with the file. In contrast, you - * can also use 'b' to force binary mode, which will not - * translate your data. To use these flags, specify either - * 'b' or 't' as the last character - * of the mode parameter. - * - * The default translation mode is 'b'. - * You can use the 't' - * mode if you are working with plain-text files and you use - * \n to delimit your line endings in your script, but - * expect your files to be readable with applications such as old versions of notepad. You - * should use the 'b' in all other cases. - * - * If you specify the 't' flag when working with binary files, you - * may experience strange problems with your data, including broken image - * files and strange problems with \r\n characters. - * - * For portability, it is also strongly recommended that - * you re-write code that uses or relies upon the 't' - * mode so that it uses the correct line endings and - * 'b' mode instead. - * @param bool $use_include_path The optional third use_include_path parameter - * can be set to '1' or TRUE if you want to search for the file in the - * include_path, too. - * @param null|resource $context A context stream - * resource. - * @return resource Returns a file pointer resource on success + * @param string $filename + * @param string $mode + * @param bool $use_include_path + * @param null|resource $context + * @return resource * @throws FilesystemException * */ @@ -874,41 +406,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ /** - * fread reads up to - * length bytes from the file pointer - * referenced by stream. Reading stops as soon as one - * of the following conditions is met: - * - * - * - * length bytes have been read - * - * - * - * - * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the - * socket timeout occurs (for network streams) - * - * - * - * - * if the stream is read buffered and it does not represent a plain file, at - * most one read of up to a number of bytes equal to the chunk size (usually - * 8192) is made; depending on the previously buffered data, the size of the - * returned data may be larger than the chunk size. - * - * - * - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param positive-int $length Up to length number of bytes read. - * @return string Returns the read string. + * @param resource $stream + * @param positive-int $length + * @return string * @throws FilesystemException * */ @@ -924,16 +424,8 @@ function fread($stream, int $length): string /** - * Gathers the statistics of the file opened by the file - * pointer stream. This function is similar to the - * stat function except that it operates - * on an open file pointer instead of a filename. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @return array Returns an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * Returns FALSE on failure. + * @param resource $stream + * @return array * @throws FilesystemException * */ @@ -949,13 +441,7 @@ function fstat($stream): array /** - * This function synchronizes changes to the file, including its meta-data. This is similar to fflush, - * but it also instructs the operating system to write to the storage media. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -970,16 +456,8 @@ function fsync($stream): void /** - * Returns the position of the file pointer referenced by stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or popen. - * ftell gives undefined results for append-only streams - * (opened with "a" flag). - * @return int Returns the position of the file pointer referenced by - * stream as an integer; i.e., its offset into the file stream. - * - * If an error occurs, returns FALSE. + * @param resource $stream + * @return int * @throws FilesystemException * */ @@ -995,19 +473,8 @@ function ftell($stream): int /** - * Takes the filepointer, stream, and truncates the file to - * length, size. - * - * @param resource $stream The file pointer. - * - * The stream must be open for writing. - * @param 0|positive-int $size The size to truncate to. - * - * If size is larger than the file then the file - * is extended with null bytes. - * - * If size is smaller than the file then the file - * is truncated to that size. + * @param resource $stream + * @param 0|positive-int $size * @throws FilesystemException * */ @@ -1022,18 +489,10 @@ function ftruncate($stream, int $size): void /** - * fwrite writes the contents of - * data to the file stream pointed to by - * stream. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param string $data The string that is to be written. - * @param 0|null|positive-int $length If length is an integer, writing will stop - * after length bytes have been written or the - * end of data is reached, whichever comes first. - * @return 0|positive-int fwrite returns the number of bytes - * written. + * @param resource $stream + * @param string $data + * @param 0|null|positive-int $length + * @return 0|positive-int * @throws FilesystemException * */ @@ -1053,92 +512,9 @@ function fwrite($stream, string $data, ?int $length = null): int /** - * The glob function searches for all the pathnames - * matching pattern according to the rules used by - * the libc glob() function, which is similar to the rules used by common - * shells. - * - * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. - * - * Special characters: - * - * - * - * * - Matches zero or more characters. - * - * - * - * - * ? - Matches exactly one character (any character). - * - * - * - * - * [...] - Matches one character from a group of - * characters. If the first character is !, - * matches any character not in the group. - * - * - * - * - * \ - Escapes the following character, - * except when the GLOB_NOESCAPE flag is used. - * - * - * - * @param int $flags Valid flags: - * - * - * - * GLOB_MARK - Adds a slash (a backslash on Windows) to each directory returned - * - * - * - * - * GLOB_NOSORT - Return files as they appear in the - * directory (no sorting). When this flag is not used, the pathnames are - * sorted alphabetically - * - * - * - * - * GLOB_NOCHECK - Return the search pattern if no - * files matching it were found - * - * - * - * - * GLOB_NOESCAPE - Backslashes do not quote - * metacharacters - * - * - * - * - * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', - * or 'c' - * - * - * - * - * GLOB_ONLYDIR - Return only directory entries - * which match the pattern - * - * - * - * - * GLOB_ERR - Stop on read errors (like unreadable - * directories), by default errors are ignored. - * - * - * - * - * - * The GLOB_BRACE flag is not available on some non GNU - * systems, like Solaris or Alpine Linux. - * - * - * @return list Returns an array containing the matched files/directories, an empty array - * if no file matched. + * @param string $pattern + * @param int $flags + * @return list * @throws FilesystemException * */ @@ -1154,15 +530,8 @@ function glob(string $pattern, int $flags = 0): array /** - * Attempts to change the group of the symlink filename - * to group. - * - * Only the superuser may change the group of a symlink arbitrarily; other - * users may change the group of a symlink to any group of which that user is - * a member. - * - * @param string $filename Path to the symlink. - * @param int|string $group The group specified by name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -1177,13 +546,8 @@ function lchgrp(string $filename, $group): void /** - * Attempts to change the owner of the symlink filename - * to user user. - * - * Only the superuser may change the owner of a symlink. - * - * @param string $filename Path to the file. - * @param int|string $user User name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -1198,10 +562,8 @@ function lchown(string $filename, $user): void /** - * link creates a hard link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1216,18 +578,8 @@ function link(string $target, string $link): void /** - * Gathers the statistics of the file or symbolic link named by - * filename. - * - * @param string $filename Path to a file or a symbolic link. - * @return array See the manual page for stat for information on - * the structure of the array that lstat returns. - * This function is identical to the stat function - * except that if the filename parameter is a symbolic - * link, the status of the symbolic link is returned, not the status of the - * file pointed to by the symbolic link. - * - * On failure, FALSE is returned. + * @param string $filename + * @return array * @throws FilesystemException * */ @@ -1243,30 +595,10 @@ function lstat(string $filename): array /** - * Attempts to create the directory specified by directory. - * - * @param string $directory The directory path. - * A URL can be used as a - * filename with this function if the fopen wrappers have been enabled. - * See fopen for more details on how to specify the - * filename. See the for links to information - * about what abilities the various wrappers have, notes on their usage, - * and information on any predefined variables they may - * provide. - * @param int $permissions The permissions are 0777 by default, which means the widest possible - * access. For more information on permissions, read the details - * on the chmod page. - * - * permissions is ignored on Windows. - * - * Note that you probably want to specify the permissions as an octal number, - * which means it should have a leading zero. The permissions is also modified - * by the current umask, which you can change using - * umask. - * @param bool $recursive If TRUE, then any parent directories to the directory specified will - * also be created, with the same permissions. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param int $permissions + * @param bool $recursive + * @param null|resource $context * @throws FilesystemException * */ @@ -1285,31 +617,10 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal /** - * parse_ini_file loads in the - * ini file specified in filename, - * and returns the settings in it in an associative array. - * - * The structure of the ini file is the same as the php.ini's. - * - * @param string $filename The filename of the ini file being parsed. If a relative path is used, - * it is evaluated relative to the current working directory, then the - * include_path. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $filename + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1325,28 +636,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s /** - * parse_ini_string returns the settings in string - * ini_string in an associative array. - * - * The structure of the ini string is the same as the php.ini's. - * - * @param string $ini_string The contents of the ini file being parsed. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $ini_string + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1362,11 +655,8 @@ function parse_ini_string(string $ini_string, bool $process_sections = false, in /** - * Closes a file pointer to a pipe opened by popen. - * - * @param resource $handle The file pointer must be valid, and must have been returned by a - * successful call to popen. - * @return int Returns the termination status of the process that was run. + * @param resource $handle + * @return int * @throws FilesystemException * */ @@ -1382,28 +672,9 @@ function pclose($handle): int /** - * Opens a pipe to a process executed by forking the command given - * by command. - * - * @param string $command The command - * @param string $mode The mode. Either 'r' for reading, or 'w' - * for writing. - * - * On Windows, popen defaults to text mode, i.e. any \n - * characters written to or read from the pipe will be translated to \r\n. - * If this is not desired, binary mode can be enforced by setting mode - * to 'rb' and 'wb', respectively. - * @return resource Returns a file pointer identical to that returned by - * fopen, except that it is unidirectional (may - * only be used for reading or writing) and must be closed with - * pclose. This pointer may be used with - * fgets, fgetss, and - * fwrite. When the mode is 'r', the returned - * file pointer equals to the STDOUT of the command, when the mode - * is 'w', the returned file pointer equals to the STDIN of the - * command. - * - * If an error occurs, returns FALSE. + * @param string $command + * @param string $mode + * @return resource * @throws FilesystemException * */ @@ -1419,14 +690,10 @@ function popen(string $command, string $mode) /** - * Reads a file and writes it to the output buffer. - * - * @param string $filename The filename being read. - * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if - * you want to search for the file in the include_path, too. - * @param null|resource $context A context stream - * resource. - * @return 0|positive-int Returns the number of bytes read from the file on success + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -1446,10 +713,8 @@ function readfile(string $filename, bool $use_include_path = false, $context = n /** - * readlink does the same as the readlink C function. - * - * @param string $path The symbolic link path. - * @return string Returns the contents of the symbolic link path. + * @param string $path + * @return string * @throws FilesystemException * */ @@ -1465,27 +730,8 @@ function readlink(string $path): string /** - * realpath expands all symbolic links and - * resolves references to /./, /../ and extra / characters in - * the input path and returns the canonicalized - * absolute pathname. - * - * @param string $path The path being checked. - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * @return non-empty-string Returns the canonicalized absolute pathname on success. The resulting path - * will have no symbolic link, /./ or /../ components. Trailing delimiters, - * such as \ and /, are also removed. - * - * realpath returns FALSE on failure, e.g. if - * the file does not exist. + * @param string $path + * @return non-empty-string * @throws FilesystemException * */ @@ -1501,27 +747,9 @@ function realpath(string $path): string /** - * Attempts to rename from to - * to, moving it between directories if necessary. - * If renaming a file and to exists, - * it will be overwritten. If renaming a directory and - * to exists, - * this function will emit a warning. - * - * @param string $from The old name. - * - * The wrapper used in from - * must match the wrapper used in - * to. - * @param string $to The new name. - * - * - * On Windows, if to already exists, it must be writable. - * Otherwise rename fails and issues E_WARNING. - * - * - * @param null|resource $context A context stream - * resource. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -1540,11 +768,7 @@ function rename(string $from, string $to, $context = null): void /** - * Sets the file position indicator for stream - * to the beginning of the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file - * successfully opened by fopen. + * @param resource $stream * @throws FilesystemException * */ @@ -1559,13 +783,8 @@ function rewind($stream): void /** - * Attempts to remove the directory named by directory. - * The directory must be empty, and the relevant permissions must permit this. - * A E_WARNING level error will be generated on failure. - * - * @param string $directory Path to the directory. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param null|resource $context * @throws FilesystemException * */ @@ -1584,12 +803,8 @@ function rmdir(string $directory, $context = null): void /** - * symlink creates a symbolic link to the existing - * target with the specified name - * link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1604,14 +819,9 @@ function symlink(string $target, string $link): void /** - * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. - * If the directory does not exist or is not writable, tempnam may - * generate a file in the system's temporary directory, and return - * the full path to that file, including its name. - * - * @param string $directory The directory where the temporary filename will be created. - * @param string $prefix The prefix of the generated temporary filename. - * @return non-falsy-string Returns the new temporary filename (with path). + * @param string $directory + * @param string $prefix + * @return non-falsy-string * @throws FilesystemException * */ @@ -1627,16 +837,7 @@ function tempnam(string $directory, string $prefix): string /** - * Creates a temporary file with a unique name in read-write (w+) mode and - * returns a file handle. - * - * The file is automatically removed when closed (for example, by calling - * fclose, or when there are no remaining references to - * the file handle returned by tmpfile), or when the - * script ends. - * - * @return resource Returns a file handle, similar to the one returned by - * fopen, for the new file. + * @return resource * @throws FilesystemException * */ @@ -1652,21 +853,9 @@ function tmpfile() /** - * Attempts to set the access and modification times of the file named in the - * filename parameter to the value given in - * mtime. - * Note that the access time is always modified, regardless of the number - * of parameters. - * - * If the file does not exist, it will be created. - * - * @param string $filename The name of the file being touched. - * @param int|null $mtime The touch time. If mtime is NULL, - * the current system time is used. - * @param int|null $atime If not NULL, the access time of the given filename is set to - * the value of atime. Otherwise, it is set to - * the value passed to the mtime parameter. - * If both are NULL, the current system time is used. + * @param string $filename + * @param int|null $mtime + * @param int|null $atime * @throws FilesystemException * */ @@ -1687,16 +876,8 @@ function touch(string $filename, ?int $mtime = null, ?int $atime = null): void /** - * Deletes filename. Similar to the Unix C unlink() - * function. An E_WARNING level error will be generated on - * failure. - * - * @param string $filename Path to the file. - * - * If the file is a symlink, the symlink will be deleted. On Windows, to delete - * a symlink to a directory, rmdir has to be used instead. - * @param null|resource $context A context stream - * resource. + * @param string $filename + * @param null|resource $context * @throws FilesystemException * */ diff --git a/generated/8.2/filter.php b/generated/8.2/filter.php index bac10fe8..0f05571c 100644 --- a/generated/8.2/filter.php +++ b/generated/8.2/filter.php @@ -5,34 +5,10 @@ use Safe\Exceptions\FilterException; /** - * This function is useful for retrieving many values without - * repetitively calling filter_input. - * - * @param int $type One of INPUT_GET, INPUT_POST, - * INPUT_COOKIE, INPUT_SERVER, or - * INPUT_ENV. - * @param array|int $options 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 - * array, valid keys are filter which specifies the - * filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. - * If the input array designated by type is not populated, - * the function returns NULL if the FILTER_NULL_ON_FAILURE - * flag is not given, or FALSE otherwise. For other failures, FALSE is returned. - * - * 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. If the add_empty parameter is FALSE, no array - * element will be added for unset variables. + * @param int $type + * @param array|int $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ @@ -48,25 +24,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt /** - * This function is useful for retrieving many values without - * repetitively calling filter_var. - * - * @param array $array An array with string keys containing the data to filter. - * @param mixed $options 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 array, valid keys are filter - * which specifies the filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if - * the variable is not set. + * @param array $array + * @param mixed $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ diff --git a/generated/8.2/fpm.php b/generated/8.2/fpm.php index c25d951e..73840e0d 100644 --- a/generated/8.2/fpm.php +++ b/generated/8.2/fpm.php @@ -5,10 +5,6 @@ use Safe\Exceptions\FpmException; /** - * 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. - * * @throws FpmException * */ @@ -23,14 +19,7 @@ function fastcgi_finish_request(): void /** - * This function returns the full current FPM pool status as an associative array. It always - * returns the full status, including per-process status information. See the - * FPM status page guide for further - * details. - * - * Note that this function will only be defined if FPM is being used to serve the script. - * - * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} Associative array containing the full FPM pool status. + * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} * @throws FpmException * */ diff --git a/generated/8.2/ftp.php b/generated/8.2/ftp.php index ead4b0a7..cadf5a86 100644 --- a/generated/8.2/ftp.php +++ b/generated/8.2/ftp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to - * allocate space for a file to be uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $size The number of bytes to allocate. - * @param null|string $response A textual representation of the servers response will be returned by - * reference in response if a variable is provided. + * @param \FTP\Connection $ftp + * @param int $size + * @param null|string $response * @throws FtpException * */ @@ -26,9 +22,7 @@ function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @param string $remote_filename * @param string $local_filename * @param FTP_ASCII|FTP_BINARY $mode @@ -46,9 +40,7 @@ function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local /** - * Changes to the parent directory. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -63,10 +55,8 @@ function ftp_cdup(\FTP\Connection $ftp): void /** - * Changes the current directory to the specified one. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The target directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -81,13 +71,10 @@ function ftp_chdir(\FTP\Connection $ftp, string $directory): void /** - * Sets the permissions on the specified remote file to - * permissions. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $permissions The new permissions, given as an octal value. - * @param string $filename The remote file. - * @return int Returns the new file permissions on success. + * @param \FTP\Connection $ftp + * @param int $permissions + * @param string $filename + * @return int * @throws FtpException * */ @@ -103,10 +90,7 @@ function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): in /** - * ftp_close closes the given link identifier - * and releases the resource. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -121,18 +105,10 @@ function ftp_close(\FTP\Connection $ftp): void /** - * ftp_connect opens an FTP connection to the - * specified hostname. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -148,11 +124,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\ /** - * ftp_delete deletes the file specified by - * filename from the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The file to delete. + * @param \FTP\Connection $ftp + * @param string $filename * @throws FtpException * */ @@ -167,15 +140,11 @@ function ftp_delete(\FTP\Connection $ftp, string $filename): void /** - * ftp_fget retrieves remote_filename - * from the FTP server, and writes it to the given file pointer. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param resource $stream An open file pointer in which we store the data. - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param resource $stream + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -190,15 +159,11 @@ function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $m /** - * ftp_fput uploads the data from a file pointer - * to a remote file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param resource $stream An open file pointer on the local file. Reading stops at end of file. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param resource $stream + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -213,15 +178,11 @@ function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $m /** - * ftp_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -236,11 +197,9 @@ function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_fi /** - * Logs in to the given FTP connection. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $username The username (USER). - * @param string $password The password (PASS). + * @param \FTP\Connection $ftp + * @param string $username + * @param string $password * @throws FtpException * */ @@ -255,11 +214,9 @@ function ftp_login(\FTP\Connection $ftp, string $username, string $password): vo /** - * Creates the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The name of the directory that will be created. - * @return string Returns the newly created directory name on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return string * @throws FtpException * */ @@ -275,11 +232,9 @@ function ftp_mkdir(\FTP\Connection $ftp, string $directory): string /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. - * @return array Returns an array of arrays with file infos from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -295,20 +250,12 @@ function ftp_mlsd(\FTP\Connection $ftp, string $directory): array /** - * ftp_nb_put stores a local file on the FTP server. - * - * The difference between this function and the ftp_put - * is that this function uploads the file asynchronously, so your program can - * perform other operations while the file is being uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -324,14 +271,9 @@ function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. This parameter can also include arguments, eg. - * ftp_nlist($ftp, "-la /your/dir");. - * Note that this parameter isn't escaped so there may be some issues with - * filenames containing spaces and other characters. - * @return array Returns an array of filenames from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -347,16 +289,8 @@ function ftp_nlist(\FTP\Connection $ftp, string $directory): array /** - * ftp_pasv turns on or off passive mode. In - * passive mode, data connections are initiated by the client, - * rather than by the server. - * It may be needed if the client is behind firewall. - * - * Please note that ftp_pasv can only be called after a - * successful login or otherwise it will fail. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off. + * @param \FTP\Connection $ftp + * @param bool $enable * @throws FtpException * */ @@ -371,14 +305,11 @@ function ftp_pasv(\FTP\Connection $ftp, bool $enable): void /** - * ftp_put stores a local file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -393,10 +324,8 @@ function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_fi /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the current directory name. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ @@ -412,12 +341,9 @@ function ftp_pwd(\FTP\Connection $ftp): string /** - * ftp_rename renames a file or a directory on the FTP - * server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $from The old file/directory name. - * @param string $to The new name. + * @param \FTP\Connection $ftp + * @param string $from + * @param string $to * @throws FtpException * */ @@ -432,11 +358,8 @@ function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void /** - * Removes the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to delete. This must be either an absolute or relative - * path to an empty directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -451,16 +374,8 @@ function ftp_rmdir(\FTP\Connection $ftp, string $directory): void /** - * ftp_site sends the given SITE - * command to the FTP server. - * - * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and - * group membership. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $command The SITE command. Note that this parameter isn't escaped so there may - * be some issues with filenames containing spaces and other characters. + * @param \FTP\Connection $ftp + * @param string $command * @throws FtpException * */ @@ -475,12 +390,9 @@ function ftp_site(\FTP\Connection $ftp, string $command): void /** - * ftp_size returns the size of the given file in - * bytes. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The remote file. - * @return int Returns the file size on success. + * @param \FTP\Connection $ftp + * @param string $filename + * @return int * @throws FtpException * */ @@ -496,23 +408,10 @@ function ftp_size(\FTP\Connection $ftp, string $filename): int /** - * ftp_ssl_connect opens an explicit SSL-FTP connection to the - * specified hostname. That implies that - * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP, or its certificate is invalid. Only when - * ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail in - * the mentioned cases. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -528,10 +427,8 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \ /** - * Returns the system type identifier of the remote FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the remote system type. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ diff --git a/generated/8.2/funchand.php b/generated/8.2/funchand.php index 2c04487a..c691f7ea 100644 --- a/generated/8.2/funchand.php +++ b/generated/8.2/funchand.php @@ -5,10 +5,7 @@ use Safe\Exceptions\FunchandException; /** - * Registers the given callback to be executed when a - * tick is called. - * - * @param callable(): void $callback The function to register. + * @param callable(): void $callback * @param mixed $args * @throws FunchandException * diff --git a/generated/8.2/gettext.php b/generated/8.2/gettext.php index 5abd6cb6..b75b30d4 100644 --- a/generated/8.2/gettext.php +++ b/generated/8.2/gettext.php @@ -5,14 +5,9 @@ use Safe\Exceptions\GettextException; /** - * The bindtextdomain function sets or gets the path - * for a domain. - * - * @param string $domain The domain. - * @param string $directory The directory path. - * An empty string means the current directory. - * If NULL, the currently set directory is returned. - * @return string The full pathname for the domain currently being set. + * @param string $domain + * @param string $directory + * @return string * @throws GettextException * */ diff --git a/generated/8.2/gmp.php b/generated/8.2/gmp.php index 9017ed2c..09d70b37 100644 --- a/generated/8.2/gmp.php +++ b/generated/8.2/gmp.php @@ -5,17 +5,7 @@ use Safe\Exceptions\GmpException; /** - * - * - * @param \GMP|int|string $seed The seed to be set for the gmp_random, - * gmp_random_bits, and - * gmp_random_range functions. - * - * - * A GMP object, an integer, - * or a string that can be interpreted as a number following the same logic - * as if the string was used in gmp_init with automatic - * base detection (i.e. when base is equal to 0). + * @param \GMP|int|string $seed * */ function gmp_random_seed($seed): void diff --git a/generated/8.2/gnupg.php b/generated/8.2/gnupg.php index 83784522..0c16e88c 100644 --- a/generated/8.2/gnupg.php +++ b/generated/8.2/gnupg.php @@ -5,12 +5,9 @@ use Safe\Exceptions\GnupgException; /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -25,11 +22,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. + * @param resource $identifier + * @param string $fingerprint * @throws GnupgException * */ @@ -44,12 +38,9 @@ function gnupg_addencryptkey($identifier, string $fingerprint): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -68,10 +59,7 @@ function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -86,10 +74,7 @@ function gnupg_cleardecryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -104,10 +89,7 @@ function gnupg_clearencryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -122,12 +104,9 @@ function gnupg_clearsignkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $key The key to delete. - * @param bool $allow_secret It specifies whether to delete secret keys as well. + * @param resource $identifier + * @param string $key + * @param bool $allow_secret * @throws GnupgException * */ @@ -142,13 +121,8 @@ function gnupg_deletekey($identifier, string $key, bool $allow_secret): void /** - * Toggle the armored output. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $armor Pass a non-zero integer-value to this function to enable armored-output - * (default). - * Pass 0 to disable armored output. + * @param resource $identifier + * @param int $armor * @throws GnupgException * */ @@ -163,18 +137,8 @@ function gnupg_setarmor($identifier, int $armor): void /** - * Sets the mode for signing. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $signmode The mode for signing. - * - * signmode takes a constant indicating what type of - * signature should be produced. The possible values are - * GNUPG_SIG_MODE_NORMAL, - * GNUPG_SIG_MODE_DETACH and - * GNUPG_SIG_MODE_CLEAR. - * By default GNUPG_SIG_MODE_CLEAR is used. + * @param resource $identifier + * @param int $signmode * @throws GnupgException * */ diff --git a/generated/8.2/hash.php b/generated/8.2/hash.php index 6a62b104..b9d39c78 100644 --- a/generated/8.2/hash.php +++ b/generated/8.2/hash.php @@ -5,29 +5,12 @@ use Safe\Exceptions\HashException; /** - * - * - * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..) - * See hash_algos for a list of supported algorithms. - * - * - * Non-cryptographic hash functions are not allowed. - * - * - * - * Non-cryptographic hash functions are not allowed. - * @param string $key Input keying material (raw binary). Cannot be empty. - * @param int $length 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. - * @param string $info Application/context-specific info string. - * @param string $salt Salt to use during derivation. - * - * While optional, adding random salt significantly improves the strength of HKDF. - * @return false|non-falsy-string Returns a string containing a raw binary representation of the derived key - * (also known as output keying material - OKM). + * @param string $algo + * @param string $key + * @param int $length + * @param string $info + * @param string $salt + * @return false|non-falsy-string * */ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = "") @@ -39,11 +22,9 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "" /** - * - * - * @param \HashContext $context Hashing context returned by hash_init. - * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. - * @param \HashContext|null $stream_context Stream context as returned by stream_context_create. + * @param \HashContext $context + * @param string $filename + * @param \HashContext|null $stream_context * @throws HashException * */ diff --git a/generated/8.2/ibase.php b/generated/8.2/ibase.php index aca3c032..3eb08b46 100644 --- a/generated/8.2/ibase.php +++ b/generated/8.2/ibase.php @@ -5,10 +5,7 @@ use Safe\Exceptions\IbaseException; /** - * This function will discard a BLOB if it has not yet been closed by - * fbird_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -23,14 +20,12 @@ function fbird_blob_cancel($blob_handle): void /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the new database user. - * @param string $password The password of the new user. - * @param string $first_name The first name of the new database user. - * @param string $middle_name The middle name of the new database user. - * @param string $last_name The last name of the new database user. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -53,29 +48,12 @@ function ibase_add_user($service_handle, string $user_name, string $password, ?s /** - * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. - * @param string $dest_file The path to the backup file on the database server. - * @param int $options Additional options to pass to the database server for backup. - * The options parameter can be a combination - * of the following constants: - * IBASE_BKP_IGNORE_CHECKSUMS, - * IBASE_BKP_IGNORE_LIMBO, - * IBASE_BKP_METADATA_ONLY, - * IBASE_BKP_NO_GARBAGE_COLLECT, - * IBASE_BKP_OLD_DESCRIPTIONS, - * IBASE_BKP_NON_TRANSPORTABLE or - * IBASE_BKP_CONVERT. - * Read the section about for further information. - * @param bool $verbose Since the backup process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the backup process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_db + * @param string $dest_file + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -91,10 +69,7 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int /** - * This function will discard a BLOB if it has not yet been closed by - * ibase_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -109,13 +84,8 @@ function ibase_blob_cancel($blob_handle): void /** - * ibase_blob_create creates a new BLOB for filling with - * data. - * - * @param null|resource $link_identifier An InterBase link identifier. If omitted, the last opened link is - * assumed. - * @return resource Returns a BLOB handle for later use with - * ibase_blob_add. + * @param null|resource $link_identifier + * @return resource * @throws IbaseException * */ @@ -135,12 +105,9 @@ function ibase_blob_create($link_identifier = null) /** - * This function returns at most len bytes from a BLOB - * that has been opened for reading by ibase_blob_open. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. - * @param int $len Size of returned data. - * @return string Returns at most len bytes from the BLOB. + * @param resource $blob_handle + * @param int $len + * @return string * @throws IbaseException * */ @@ -156,14 +123,7 @@ function ibase_blob_get($blob_handle, int $len): string /** - * Closes the link to an InterBase database that's associated with - * a connection id returned from ibase_connect. - * Default transaction on link is committed, other transactions are - * rolled back. - * - * @param null|resource $connection_id An InterBase link identifier returned from - * ibase_connect. If omitted, the last opened link - * is assumed. + * @param null|resource $connection_id * @throws IbaseException * */ @@ -182,15 +142,7 @@ function ibase_close($connection_id = null): void /** - * Commits a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -209,13 +161,7 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** - * Commits a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -234,35 +180,15 @@ function ibase_commit($link_or_trans_identifier = null): void /** - * Establishes a connection to an Firebird/InterBase server. - * - * In case a second call is made to ibase_connect with - * the same arguments, no new link will be established, but instead, the link - * identifier of the already opened link will be returned. The link to the - * server will be closed as soon as the execution of the script ends, unless - * it's closed earlier by explicitly calling ibase_close. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' - * (TCP/IP with interbase server on custom TCP port), '//hostname/' - * (NetBEUI), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an Firebird/InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -296,10 +222,8 @@ function ibase_connect(?string $database = null, ?string $username = null, ?stri /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the user you want to delete from the database. + * @param resource $service_handle + * @param string $user_name * @throws IbaseException * */ @@ -314,11 +238,7 @@ function ibase_delete_user($service_handle, string $user_name): void /** - * This functions drops a database that was opened by either ibase_connect - * or ibase_pconnect. The database is closed and deleted from the server. - * - * @param null|resource $connection An InterBase link identifier. If omitted, the last opened link is - * assumed. + * @param null|resource $connection * @throws IbaseException * */ @@ -337,12 +257,7 @@ function ibase_drop_db($connection = null): void /** - * This function causes the registered event handler specified by - * event to be cancelled. The callback function will - * no longer be called for the events it was registered to handle. - * - * @param resource $event An event resource, created by - * ibase_set_event_handler. + * @param resource $event * @throws IbaseException * */ @@ -357,9 +272,7 @@ function ibase_free_event_handler($event): void /** - * Frees a prepared query. - * - * @param resource $query A query prepared with ibase_prepare. + * @param resource $query * @throws IbaseException * */ @@ -374,10 +287,7 @@ function ibase_free_query($query): void /** - * Frees a result set. - * - * @param resource $result_identifier A result set created by ibase_query or - * ibase_execute. + * @param resource $result_identifier * @throws IbaseException * */ @@ -392,8 +302,6 @@ function ibase_free_result($result_identifier): void /** - * - * * @param resource $service_handle * @param string $db * @param int $action @@ -412,14 +320,12 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the database user to modify. - * @param string $password The user's new password. - * @param string $first_name The user's new first name. - * @param string $middle_name The user's new middle name. - * @param string $last_name The user's new last name. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -442,11 +348,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** - * This function assigns a name to a result set. This name can be used later in - * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * - * @param resource $result An InterBase result set. - * @param string $name The name to be assigned. + * @param resource $result + * @param string $name * @throws IbaseException * */ @@ -461,42 +364,15 @@ function ibase_name_result($result, string $name): void /** - * Opens a persistent connection to an InterBase database. - * - * ibase_pconnect acts very much like - * ibase_connect with two major differences. - * - * First, when connecting, the function will first try to find a (persistent) - * link that's already opened with the same parameters. If one is found, an - * identifier for it will be returned instead of opening a new connection. - * - * Second, the connection to the InterBase server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (ibase_close will not close links - * established by ibase_pconnect). This type of link is - * therefore called 'persistent'. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' - * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. Functional only with InterBase 6 - * and up. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -530,32 +406,12 @@ function ibase_pconnect(?string $database = null, ?string $username = null, ?str /** - * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_file The absolute path on the server where the backup file is located. - * @param string $dest_db The path to create the new database on the server. You can also use database alias. - * @param int $options Additional options to pass to the database server for restore. - * The options parameter can be a combination - * of the following constants: - * IBASE_RES_DEACTIVATE_IDX, - * IBASE_RES_NO_SHADOW, - * IBASE_RES_NO_VALIDITY, - * IBASE_RES_ONE_AT_A_TIME, - * IBASE_RES_REPLACE, - * IBASE_RES_CREATE, - * IBASE_RES_USE_ALL_SPACE, - * IBASE_PRP_PAGE_BUFFERS, - * IBASE_PRP_SWEEP_INTERVAL, - * IBASE_RES_CREATE. - * Read the section about for further information. - * @param bool $verbose Since the restore process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the restore process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_file + * @param string $dest_db + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -571,15 +427,7 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in /** - * Rolls back a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -598,13 +446,7 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** - * Rolls back a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -623,13 +465,10 @@ function ibase_rollback($link_or_trans_identifier = null): void /** - * - * - * @param string $host The name or ip address of the database host. You can define the port by adding - * '/' and port number. If no port is specified, port 3050 will be used. - * @param string $dba_username The name of any valid user. - * @param string $dba_password The user's password. - * @return resource Returns a Interbase / Firebird link identifier on success. + * @param string $host + * @param string $dba_username + * @param string $dba_password + * @return resource * @throws IbaseException * */ @@ -645,9 +484,7 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa /** - * - * - * @param resource $service_handle A previously created connection to the database server. + * @param resource $service_handle * @throws IbaseException * */ diff --git a/generated/8.2/ibmDb2.php b/generated/8.2/ibmDb2.php index 3915371e..a4dcb243 100644 --- a/generated/8.2/ibmDb2.php +++ b/generated/8.2/ibmDb2.php @@ -5,44 +5,9 @@ use Safe\Exceptions\IbmDb2Exception; /** - * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. - * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value One of the following constants: - * - * - * DB2_AUTOCOMMIT_OFF - * - * - * Turns AUTOCOMMIT off. - * - * - * - * - * DB2_AUTOCOMMIT_ON - * - * - * Turns AUTOCOMMIT on. - * - * - * - * - * - * Turns AUTOCOMMIT off. - * - * Turns AUTOCOMMIT on. - * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool When 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 - * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, while a value of DB2_AUTOCOMMIT_ON indicates that - * AUTOCOMMIT is on. - * - * When db2_autocommit receives both the - * connection parameter and - * autocommit parameter, it attempts to set the - * AUTOCOMMIT state of the requested connection to the corresponding state. - * Returns TRUE on success. + * @param resource $connection + * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value + * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool * @throws IbmDb2Exception * */ @@ -62,37 +27,13 @@ function db2_autocommit($connection, $value = null) /** - * Binds a PHP variable to an SQL statement parameter in a statement resource - * returned by db2_prepare. This function gives you more - * control over the parameter type, data type, precision, and scale for the - * parameter than simply passing the variable as part of the optional input - * array to db2_execute. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared - * statement. - * @param string $variable_name A string specifying the name of the PHP variable to bind to the - * parameter specified by parameter_number. - * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the - * SQL parameter as an input parameter (DB2_PARAM_IN), - * an output parameter (DB2_PARAM_OUT), or as a - * parameter that accepts input and returns output - * (DB2_PARAM_INOUT). To avoid memory overhead, you can - * also specify DB2_PARAM_FILE to bind the PHP variable - * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) - * data. - * @param int $data_type A constant specifying the SQL data type that the PHP variable should be - * bound as: one of DB2_BINARY, - * DB2_CHAR, DB2_DOUBLE, or - * DB2_LONG . - * @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 - * output value from the stored procedure. - * @param int $scale Specifies the scale with which the variable should be bound to the - * database. + * @param resource $stmt + * @param int $parameter_number + * @param string $variable_name + * @param int $parameter_type + * @param int $data_type + * @param int $precision + * @param int $scale * @throws IbmDb2Exception * */ @@ -117,111 +58,8 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, ?in /** - * This function returns an object with read-only properties that return - * information about the DB2 database client. The following table lists - * the DB2 client properties: - * - * DB2 client properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * APPL_CODEPAGE - * int - * The application code page. - * - * - * CONN_CODEPAGE - * int - * The code page for the current connection. - * - * - * DATA_SOURCE_NAME - * string - * The data source name (DSN) used to create the current connection - * to the database. - * - * - * DRIVER_NAME - * string - * The name of the library that implements the DB2 Call - * Level Interface (CLI) specification. - * - * - * DRIVER_ODBC_VER - * string - * The version of ODBC that the DB2 client supports. This returns a - * string "MM.mm" where MM is the major version and - * mm is the minor version. The DB2 client always - * returns "03.51". - * - * - * - * DRIVER_VER - * string - * The version of the client, in the form of a string "MM.mm.uuuu" where - * MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * ODBC_SQL_CONFORMANCE - * string - * - * The level of ODBC SQL grammar supported by the client: - * - * - * MINIMUM - * - * - * Supports the minimum ODBC SQL grammar. - * - * - * - * - * CORE - * - * - * Supports the core ODBC SQL grammar. - * - * - * - * - * EXTENDED - * - * - * Supports extended ODBC SQL grammar. - * - * - * - * - * - * - * - * - * ODBC_VER - * string - * The version of ODBC that the ODBC driver manager supports. This - * returns a string "MM.mm.rrrr" where MM is the major - * version, mm is the minor version, and - * rrrr is the release. The DB2 client always returns - * "03.01.0000". - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -237,15 +75,7 @@ function db2_client_info($connection): \stdClass /** - * This function closes a DB2 client connection created with - * db2_connect and returns the corresponding - * resources to the database server. - * - * If you attempt to close a persistent DB2 client connection created with - * db2_pconnect, the close request is ignored and the - * persistent DB2 client connection remains available for the next caller. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -260,13 +90,7 @@ function db2_close($connection): void /** - * Commits an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_commit is not necessary unless AUTOCOMMIT - * has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -281,26 +105,8 @@ function db2_commit($connection): void /** - * db2_execute executes an SQL statement that was - * prepared by db2_prepare. - * - * If the SQL statement returns a result set, for example, a SELECT statement - * or a CALL to a stored procedure that returns one or more result sets, you - * can retrieve a row as an array from the stmt resource - * using db2_fetch_assoc, - * db2_fetch_both, or - * db2_fetch_array. Alternatively, you can use - * db2_fetch_row to move the result set pointer to the - * next row and fetch a column at a time from that row with - * db2_result. - * - * Refer to db2_prepare for a brief discussion of the - * advantages of using db2_prepare and - * db2_execute rather than db2_exec. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param array $parameters An array of input parameters matching any parameter markers contained - * in the prepared statement. + * @param resource $stmt + * @param array $parameters * @throws IbmDb2Exception * */ @@ -319,12 +125,7 @@ function db2_execute($stmt, ?array $parameters = null): void /** - * Frees the system and database resources that are associated with a result - * set. These resources are freed implicitly when a script finishes, but you - * can call db2_free_result to explicitly free the result - * set resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -339,12 +140,7 @@ function db2_free_result($stmt): void /** - * Frees the system and database resources that are associated with a statement - * resource. These resources are freed implicitly when a script finishes, but - * you can call db2_free_stmt to explicitly free the - * statement resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -359,152 +155,9 @@ function db2_free_stmt($stmt): void /** - * Retrieves the value of a specified option value for a statement resource - * or a connection resource. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * 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 - * that can be set during execution with db2_get_option. - * - * - * 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 - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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 - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success. + * @param resource $resource + * @param string $option + * @return string * @throws IbmDb2Exception * */ @@ -520,24 +173,7 @@ function db2_get_option($resource, string $option): string /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system - * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for - * a long period of time. - * - * @param resource $resource Specifies an active DB2 client connection. + * @param resource $resource * @throws IbmDb2Exception * */ @@ -552,13 +188,7 @@ function db2_pclose($resource): void /** - * Rolls back an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_rollback normally has no effect unless - * AUTOCOMMIT has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -573,253 +203,8 @@ function db2_rollback($connection): void /** - * This function returns an object with read-only properties that return - * information about the IBM DB2, Cloudscape, or Apache Derby database server. - * The following table lists the database server properties: - * - * Database server properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * DBMS_NAME - * string - * The name of the database server to which you are - * connected. For DB2 servers this is a combination of - * DB2 followed by the operating system on which - * the database server is running. - * - * - * DBMS_VER - * string - * The version of the database server, in the form of a string - * "MM.mm.uuuu" where MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * DB_CODEPAGE - * int - * The code page of the database to which you are connected. - * - * - * DB_NAME - * string - * The name of the database to which you are connected. - * - * - * DFT_ISOLATION - * string - * - * The default transaction isolation level supported by the - * server: - * - * - * UR - * - * - * Uncommitted read: changes are immediately visible by all - * concurrent transactions. - * - * - * - * - * CS - * - * - * Cursor stability: a row read by one transaction can be altered and - * committed by a second concurrent transaction. - * - * - * - * - * RS - * - * - * Read stability: a transaction can add or remove rows matching a - * search condition or a pending transaction. - * - * - * - * - * RR - * - * - * Repeatable read: data affected by pending transaction is not - * available to other transactions. - * - * - * - * - * NC - * - * - * No commit: any changes are visible at the end of a successful - * operation. Explicit commits and rollbacks are not allowed. - * - * - * - * - * - * - * - * - * IDENTIFIER_QUOTE_CHAR - * string - * The character used to delimit an identifier. - * - * - * INST_NAME - * string - * The instance on the database server that contains the - * database. - * - * - * ISOLATION_OPTION - * array - * An array of the isolation options supported by the - * database server. The isolation options are described in - * the DFT_ISOLATION property. - * - * - * KEYWORDS - * array - * An array of the keywords reserved by the database - * server. - * - * - * LIKE_ESCAPE_CLAUSE - * bool - * TRUE if the database server supports the - * use of % and _ wildcard - * characters. FALSE if the database server does not - * support these wildcard characters. - * - * - * MAX_COL_NAME_LEN - * int - * Maximum length of a column name supported by the database - * server, expressed in bytes. - * - * - * MAX_IDENTIFIER_LEN - * int - * Maximum length of an SQL identifier supported by the database - * server, expressed in characters. - * - * - * MAX_INDEX_SIZE - * int - * Maximum size of columns combined in an index supported by the - * database server, expressed in bytes. - * - * - * MAX_PROC_NAME_LEN - * int - * Maximum length of a procedure name supported by the database - * server, expressed in bytes. - * - * - * MAX_ROW_SIZE - * int - * Maximum length of a row in a base table supported by the - * database server, expressed in bytes. - * - * - * MAX_SCHEMA_NAME_LEN - * int - * Maximum length of a schema name supported by the database - * server, expressed in bytes. - * - * - * MAX_STATEMENT_LEN - * int - * Maximum length of an SQL statement supported by the database - * server, expressed in bytes. - * - * - * MAX_TABLE_NAME_LEN - * int - * Maximum length of a table name supported by the database - * server, expressed in bytes. - * - * - * NON_NULLABLE_COLUMNS - * bool - * TRUE if the database server supports columns that can be - * defined as NOT NULL, FALSE if the database server does not support - * columns defined as NOT NULL. - * - * - * PROCEDURES - * bool - * TRUE if the database server supports the use of the CALL - * statement to call stored procedures, FALSE if the database - * server does not support the CALL statement. - * - * - * SPECIAL_CHARS - * string - * A string containing all of the characters other than - * a-Z, 0-9, and underscore that can be used in an identifier name. - * - * - * SQL_CONFORMANCE - * string - * - * The level of conformance to the ANSI/ISO SQL-92 specification - * offered by the database server: - * - * - * ENTRY - * - * - * Entry-level SQL-92 compliance. - * - * - * - * - * FIPS127 - * - * - * FIPS-127-2 transitional compliance. - * - * - * - * - * FULL - * - * - * Full level SQL-92 compliance. - * - * - * - * - * INTERMEDIATE - * - * - * Intermediate level SQL-92 compliance. - * - * - * - * - * - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -835,379 +220,9 @@ function db2_server_info($connection): \stdClass /** - * Sets options for a statement resource or a connection resource. You - * cannot set options for result set resources. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * db2_pconnect. - * @param array $options An associative array containing valid statement or connection - * options. This parameter can be used to change autocommit values, - * cursor types (scrollable or forward), and to specify the case of - * the column names (lower, upper, or natural) that will appear in a - * result set. - * - * - * autocommit - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * - * - * - * cursor - * - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * - * - * - * binmode - * - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * - * - * - * db2_attr_case - * - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * - * - * - * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * - * - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 - * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * - * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * - * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * - * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * - * - * - * trusted_password - * - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during - * execution with db2_get_option. - * - * - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @param int $type Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. + * @param resource $resource + * @param array $options + * @param int $type * @throws IbmDb2Exception * */ diff --git a/generated/8.2/iconv.php b/generated/8.2/iconv.php index c74a5ef4..0df05789 100644 --- a/generated/8.2/iconv.php +++ b/generated/8.2/iconv.php @@ -5,21 +5,8 @@ use Safe\Exceptions\IconvException; /** - * Retrieve internal configuration variables of iconv extension. - * - * @param string $type The value of the optional type can be: - * - * all - * input_encoding - * output_encoding - * internal_encoding - * - * @return mixed Returns the current value of the internal configuration variable if - * successful. - * - * If type is omitted or set to "all", - * iconv_get_encoding returns an array that - * stores all these variables. + * @param string $type + * @return mixed * @throws IconvException * */ @@ -35,53 +22,10 @@ function iconv_get_encoding(string $type = "all") /** - * Decodes a MIME header field. - * - * @param string $string The encoded header, as a string. - * @param int $mode mode determines the behaviour in the event - * iconv_mime_decode encounters a malformed - * MIME header field. You can specify any combination - * of the following bitmasks. - * - * Bitmasks acceptable to iconv_mime_decode - * - * - * - * Value - * Constant - * Description - * - * - * - * - * 1 - * ICONV_MIME_DECODE_STRICT - * - * If set, the given header is decoded in full conformance with the - * standards defined in RFC2047. - * This option is disabled by default because there are a lot of - * broken mail user agents that don't follow the specification and don't - * produce correct MIME headers. - * - * - * - * 2 - * ICONV_MIME_DECODE_CONTINUE_ON_ERROR - * - * If set, iconv_mime_decode_headers - * attempts to ignore any grammatical errors and continue to process - * a given header. - * - * - * - * - * - * @param null|string $encoding The optional encoding parameter specifies the - * character set to represent the result by. If omitted or NULL, - * iconv.internal_encoding - * will be used. - * @return string Returns a decoded MIME field on success, - * or FALSE if an error occurs during the decoding. + * @param string $string + * @param int $mode + * @param null|string $encoding + * @return string * @throws IconvException * */ @@ -101,108 +45,10 @@ function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = nu /** - * Composes and returns a string that represents a valid MIME - * header field, which looks like the following: - * - * - * - * In the above example, "Subject" is the field name and the portion that - * begins with "=?ISO-8859-1?..." is the field value. - * - * @param string $field_name The field name. - * @param string $field_value The field value. - * @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 options. - * The items supported by iconv_mime_encode are - * listed below. Note that item names are treated case-sensitive. - * - * Configuration items supported by iconv_mime_encode - * - * - * - * Item - * Type - * Description - * Default value - * Example - * - * - * - * - * scheme - * string - * - * Specifies the method to encode a field value by. The value of - * this item may be either "B" or "Q", where "B" stands for - * base64 encoding scheme and "Q" stands for - * quoted-printable encoding scheme. - * - * B - * B - * - * - * input-charset - * string - * - * Specifies the character set in which the first parameter - * field_name and the second parameter - * field_value are presented. If not given, - * iconv_mime_encode assumes those parameters - * are presented to it in the - * iconv.internal_encoding - * ini setting. - * - * - * iconv.internal_encoding - * - * ISO-8859-1 - * - * - * output-charset - * string - * - * Specifies the character set to use to compose the - * MIME header. - * - * - * iconv.internal_encoding - * - * UTF-8 - * - * - * line-length - * int - * - * Specifies the maximum length of the header lines. The resulting - * header is "folded" to a set of multiple lines in case - * the resulting header field would be longer than the value of this - * parameter, according to - * RFC2822 - Internet Message Format. - * If not given, the length will be limited to 76 characters. - * - * 76 - * 996 - * - * - * line-break-chars - * string - * - * Specifies the sequence of characters to append to each line - * as an end-of-line sign when "folding" is performed on a long header - * field. If not given, this defaults to "\r\n" - * (CR LF). Note that - * this parameter is always treated as an ASCII string regardless - * of the value of input-charset. - * - * \r\n - * \n - * - * - * - * - * @return string Returns an encoded MIME field on success, - * or FALSE if an error occurs during the encoding. + * @param string $field_name + * @param string $field_value + * @param array $options + * @return string * @throws IconvException * */ @@ -218,16 +64,8 @@ function iconv_mime_encode(string $field_name, string $field_value, array $optio /** - * Changes the value of the internal configuration variable specified by - * type to encoding. - * - * @param string $type The value of type can be any one of these: - * - * input_encoding - * output_encoding - * internal_encoding - * - * @param string $encoding The character set. + * @param string $type + * @param string $encoding * @throws IconvException * */ @@ -242,18 +80,9 @@ function iconv_set_encoding(string $type, string $encoding): void /** - * In contrast to strlen, - * iconv_strlen counts the occurrences of characters - * in the given byte sequence string on the basis of - * the specified character set, the result of which is not necessarily - * identical to the length of the string in byte. - * - * @param string $string The string. - * @param null|string $encoding If encoding parameter is omitted or NULL, - * string is assumed to be encoded in - * iconv.internal_encoding. - * @return 0|positive-int Returns the character count of string, as an integer, - * or FALSE if an error occurs during the encoding. + * @param string $string + * @param null|string $encoding + * @return 0|positive-int * @throws IconvException * */ @@ -273,28 +102,10 @@ function iconv_strlen(string $string, ?string $encoding = null): int /** - * Converts string from from_encoding - * to to_encoding. - * - * @param string $from_encoding The current encoding used to interpret string. - * @param string $to_encoding The desired encoding of the result. - * - * If the string //TRANSLIT is appended to - * to_encoding, then transliteration is activated. This - * means that when a character can't be represented in the target charset, - * it may be approximated through one or several similarly looking - * characters. If the string //IGNORE is appended, - * characters that cannot be represented in the target charset are silently - * discarded. Otherwise, E_NOTICE is generated and the function - * will return FALSE. - * - * If and how //TRANSLIT works exactly depends on the - * system's iconv() implementation (cf. ICONV_IMPL). - * Some implementations are known to ignore //TRANSLIT, - * so the conversion is likely to fail for characters which are illegal for - * the to_encoding. - * @param string $string The string to be converted. - * @return string Returns the converted string. + * @param string $from_encoding + * @param string $to_encoding + * @param string $string + * @return string * @throws IconvException * */ diff --git a/generated/8.2/image.php b/generated/8.2/image.php index b37bfa2d..98d9f7ec 100644 --- a/generated/8.2/image.php +++ b/generated/8.2/image.php @@ -5,64 +5,9 @@ use Safe\Exceptions\ImageException; /** - * The getimagesize function will determine the - * size of any supported given image file and return the dimensions along with - * the file type and a height/width text string to be used inside a - * normal HTML IMG tag and the - * correspondent HTTP content type. - * - * getimagesize can also return some more information - * in image_info parameter. - * - * @param string $filename This parameter specifies the file you wish to retrieve information - * about. It can reference a local file or (configuration permitting) a - * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended - * information from the image file. Currently, this will return the - * different JPG APP markers as an associative array. - * Some programs use these APP markers to embed text information in - * images. A very common one is to embed - * IPTC information in the APP13 marker. - * You can use the iptcparse function to parse the - * binary APP13 marker into something readable. - * - * The image_info only supports - * JFIF files. - * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null Returns an array with up to 7 elements. Not all image types will include - * the channels and bits elements. - * - * Index 0 and 1 contains respectively the width and the height of the image. - * - * Index 2 is one of the IMAGETYPE_XXX constants indicating - * the type of the image. - * - * Index 3 is a text string with the correct - * height="yyy" width="xxx" string that can be used - * directly in an IMG tag. - * - * mime is the correspondant MIME type of the image. - * This information can be used to deliver images with the correct HTTP - * Content-type header: - * - * getimagesize and MIME types - * - * - * ]]> - * - * - * - * channels will be 3 for RGB pictures and 4 for CMYK - * pictures. - * - * bits is the number of bits for each color. - * - * For some image types, the presence of channels and - * bits values can be a bit - * confusing. As an example, GIF always uses 3 channels - * per pixel, but the number of bits per pixel cannot be calculated for an - * animated GIF with a global color table. - * - * On failure, FALSE is returned. + * @param string $filename + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null * @throws ImageException * */ @@ -78,12 +23,9 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array /** - * Returns the extension for the given IMAGETYPE_XXX - * constant. - * - * @param int $image_type One of the IMAGETYPE_XXX constant. - * @param bool $include_dot Whether to prepend a dot to the extension or not. Default to TRUE. - * @return string A string with the extension corresponding to the given image type. + * @param int $image_type + * @param bool $include_dot + * @return string * @throws ImageException * */ @@ -99,13 +41,10 @@ function image_type_to_extension(int $image_type, bool $include_dot = true): str /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array|null $clip Array with keys "x", "y", "width" and "height"; or NULL. - * @return \GdImage Return affined image object on success. + * @param \GdImage $image + * @param array $affine + * @param array|null $clip + * @return \GdImage * @throws ImageException * */ @@ -125,16 +64,9 @@ function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdIm /** - * Returns the concatenation of two affine transformation matrices, - * what is useful if multiple transformations should be applied to the same - * image in one go. - * - * @param array $matrix1 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param array $matrix1 + * @param array $matrix2 + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -150,19 +82,9 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array /** - * Returns an affine transformation matrix. - * - * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE - * or IMG_AFFINE_SCALE, - * options has to be an array with keys x - * and y, both having float values. - * - * If type is IMG_AFFINE_ROTATE, - * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, - * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param int $type + * @param array|float $options + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -178,21 +100,8 @@ function imageaffinematrixget(int $type, $options): array /** - * imagealphablending allows for two different - * modes of drawing on truecolor images. In blending mode, the - * alpha channel component of the color supplied to all drawing function, - * such as imagesetpixel determines how much of the - * underlying color should be allowed to shine through. As a result, gd - * automatically blends the existing color at that point with the drawing color, - * and stores the result in the image. The resulting pixel is opaque. In - * non-blending mode, the drawing color is copied literally with its alpha channel - * information, replacing the destination pixel. Blending mode is not available - * when drawing on palette images. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable the blending mode or not. On true color images - * the default value is TRUE otherwise the default value is FALSE + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -207,20 +116,8 @@ function imagealphablending(\GdImage $image, bool $enable): void /** - * Activate the fast drawing antialiased methods for lines and wired polygons. - * It does not support alpha components. It works using a direct blend - * operation. It works only with truecolor images. - * - * Thickness and styled are not supported. - * - * Using antialiased primitives with transparent background color can end with - * some unexpected results. The blend method uses the background color as any - * other colors. The lack of alpha component support does not allow an alpha - * based antialiasing method. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable antialiasing or not. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -235,20 +132,14 @@ function imageantialias(\GdImage $image, bool $enable): void /** - * imagearc draws an arc of circle centered at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color * @throws ImageException * */ @@ -263,17 +154,10 @@ function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int /** - * Outputs or saves a AVIF Raster image from the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) - * to 100 (best quality, larger file). - * If -1 is provided, the default value 30 is used. - * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) - * to 10 (fast, larger file). - * If -1 is provided, the default value 6 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $speed * @throws ImageException * */ @@ -296,15 +180,9 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed /** - * Outputs or saves a BMP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the compressed arguments is - * not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @param \GdImage $image + * @param null|resource|string $file + * @param bool $compressed * @throws ImageException * */ @@ -325,21 +203,12 @@ function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void /** - * imagechar draws the first character of - * char in the image identified by - * image with its upper-left at - * x,y (top left is 0, - * 0) with the color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -354,18 +223,12 @@ function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int /** - * Draws the character char vertically at the specified - * coordinate on the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -380,19 +243,10 @@ function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, i /** - * Returns the index of the color of the pixel at the - * specified location in the image specified by image. - * - * If the image is a - * truecolor image, this function returns the RGB value of that pixel as - * integer. Use bitshifting and masking to access the distinct red, green and blue - * component values: - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of the point. - * @param int $y y-coordinate of the point. - * @return int Returns the index of the color. + * @param \GdImage $image + * @param int $x + * @param int $y + * @return int * @throws ImageException * */ @@ -408,13 +262,8 @@ function imagecolorat(\GdImage $image, int $x, int $y): int /** - * De-allocates a color previously allocated with - * imagecolorallocate or - * imagecolorallocatealpha. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color identifier. + * @param \GdImage $image + * @param int $color * @throws ImageException * */ @@ -429,11 +278,8 @@ function imagecolordeallocate(\GdImage $image, int $color): void /** - * Makes the colors of the palette version of an image more closely match the true color version. - * - * @param \GdImage $image1 A truecolor image object. - * @param \GdImage $image2 A palette image object pointing to an image that has the same - * size as image1. + * @param \GdImage $image1 + * @param \GdImage $image2 * @throws ImageException * */ @@ -448,18 +294,12 @@ function imagecolormatch(\GdImage $image1, \GdImage $image2): void /** - * This sets the specified index in the palette to the specified - * color. This is useful for creating flood-fill-like effects in - * palleted images without the overhead of performing the actual - * flood-fill. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color An index in the palette. - * @param int $red Value of red component. - * @param int $green Value of green component. - * @param int $blue Value of blue component. - * @param int $alpha Value of alpha component. + * @param \GdImage $image + * @param int $color + * @param int $red + * @param int $green + * @param int $blue + * @param int $alpha * @throws ImageException * */ @@ -474,13 +314,9 @@ function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $b /** - * Gets the color for a specified index. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color index. - * @return array{red: int, green: int, blue: int, alpha: int} Returns an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index. + * @param \GdImage $image + * @param int $color + * @return array{red: int, green: int, blue: int, alpha: int} * */ function imagecolorsforindex(\GdImage $image, int $color): array @@ -492,14 +328,10 @@ function imagecolorsforindex(\GdImage $image, int $color): array /** - * Applies a convolution matrix on the image, using the given coefficient and - * offset. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. - * @param float $divisor The divisor of the result of the convolution, used for normalization. - * @param float $offset Color offset. + * @param \GdImage $image + * @param array $matrix + * @param float $divisor + * @param float $offset * @throws ImageException * */ @@ -514,22 +346,14 @@ function imageconvolution(\GdImage $image, array $matrix, float $divisor, float /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -544,28 +368,15 @@ function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $ds /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, except for - * ignoring alpha components, while it implements alpha transparency - * for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -580,32 +391,15 @@ function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, in /** - * imagecopymergegray copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * This function is identical to imagecopymerge except - * that when merging it preserves the hue of the source by converting - * the destination pixels to gray scale before the copy operation. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The src_image will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, except for - * ignoring alpha components, while - * it implements alpha transparency for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -620,37 +414,16 @@ function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresampled copies a rectangular - * portion of one image to another image, smoothly interpolating pixel - * values so that, in particular, reducing the size of an image still - * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -665,37 +438,16 @@ function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresized copies a rectangular - * portion of one image to another image. - * dst_image is the destination image, - * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -710,20 +462,9 @@ function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, /** - * imagecreate returns an image identifier - * representing a blank image of specified size. - * - * In general, we recommend the use of - * imagecreatetruecolor instead of - * imagecreate so that image processing occurs on the - * highest quality image possible. If you want to output a palette image, then - * imagetruecolortopalette should be called immediately - * before saving the image with imagepng or - * imagegif. - * - * @param int $width The image width. - * @param int $height The image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -739,11 +480,8 @@ function imagecreate(int $width, int $height): \GdImage /** - * imagecreatefromavif returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the AVIF raster image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -759,11 +497,8 @@ function imagecreatefromavif(string $filename): \GdImage /** - * imagecreatefrombmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the BMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -779,10 +514,8 @@ function imagecreatefrombmp(string $filename): \GdImage /** - * Create a new image from GD file or URL. - * - * @param string $filename Path to the GD file. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -798,10 +531,8 @@ function imagecreatefromgd(string $filename): \GdImage /** - * Create a new image from GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -817,14 +548,12 @@ function imagecreatefromgd2(string $filename): \GdImage /** - * Create a new image from a given part of GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @param int $x x-coordinate of source point. - * @param int $y y-coordinate of source point. - * @param int $width Source width. - * @param int $height Source height. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -840,11 +569,8 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in /** - * imagecreatefromgif returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the GIF image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -860,11 +586,8 @@ function imagecreatefromgif(string $filename): \GdImage /** - * imagecreatefromjpeg returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the JPEG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -880,11 +603,8 @@ function imagecreatefromjpeg(string $filename): \GdImage /** - * imagecreatefrompng returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the PNG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -900,15 +620,8 @@ function imagecreatefrompng(string $filename): \GdImage /** - * imagecreatefromstring returns an image identifier - * representing the image obtained from the given data. - * These types will be automatically detected if your build of PHP supports - * them: JPEG, PNG, GIF, BMP, WBMP, GD2, and WEBP. - * - * @param string $data A string containing the image data. - * @return \GdImage An image object will be returned on success. FALSE is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. + * @param string $data + * @return \GdImage * @throws ImageException * */ @@ -924,11 +637,8 @@ function imagecreatefromstring(string $data): \GdImage /** - * imagecreatefromtga returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the Truevision TGA image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -944,11 +654,8 @@ function imagecreatefromtga(string $filename): \GdImage /** - * imagecreatefromwbmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WBMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -964,12 +671,8 @@ function imagecreatefromwbmp(string $filename): \GdImage /** - * imagecreatefromwebp returns an image identifier - * representing the image obtained from the given filename. - * Note that animated WebP files cannot be read. - * - * @param string $filename Path to the WebP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -985,11 +688,8 @@ function imagecreatefromwebp(string $filename): \GdImage /** - * imagecreatefromxbm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XBM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1005,11 +705,8 @@ function imagecreatefromxbm(string $filename): \GdImage /** - * imagecreatefromxpm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XPM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1025,12 +722,9 @@ function imagecreatefromxpm(string $filename): \GdImage /** - * imagecreatetruecolor returns an image object - * representing a black image of the specified size. - * - * @param int $width Image width. - * @param int $height Image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -1046,15 +740,9 @@ function imagecreatetruecolor(int $width, int $height): \GdImage /** - * Crops an image to the given rectangular area and returns the resulting image. - * The given image is not modified. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys - * x, y, width and - * height. - * @return \GdImage Return cropped image object on success. + * @param \GdImage $image + * @param array $rectangle + * @return \GdImage * @throws ImageException * */ @@ -1070,18 +758,11 @@ function imagecrop(\GdImage $image, array $rectangle): \GdImage /** - * Automatically crops an image according to the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode One of the following constants: - * @param float $threshold Same as IMG_CROP_TRANSPARENT. - * Before PHP 7.4.0, the bundled libgd fell back to IMG_CROP_SIDES, - * if the image had no transparent color. - * @param int $color Crops out a transparent background. - * @return \GdImage Returns a cropped image object on success. - * If the complete image was cropped, imagecrop returns FALSE. + * @param \GdImage $image + * @param int $mode + * @param float $threshold + * @param int $color + * @return \GdImage * @throws ImageException * */ @@ -1097,17 +778,12 @@ function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $thr /** - * This function is deprecated. Use combination of - * imagesetstyle and imageline - * instead. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1122,11 +798,7 @@ function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, in /** - * Prior to PHP 8.0.0, imagedestroy freed any memory associated - * with image image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. + * @param \GdImage $image * @throws ImageException * */ @@ -1141,15 +813,12 @@ function imagedestroy(\GdImage $image): void /** - * Draws an ellipse centered at the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1164,15 +833,10 @@ function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, /** - * Performs a flood fill starting at the given coordinate (top left is 0, 0) - * with the given color in the - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start point. - * @param int $y y-coordinate of start point. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -1187,36 +851,15 @@ function imagefill(\GdImage $image, int $x, int $y, int $color): void /** - * Draws a partial arc centered at the specified coordinate in the - * given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. - * @param int $style A bitwise OR of the following possibilities: - * - * IMG_ARC_PIE - * IMG_ARC_CHORD - * IMG_ARC_NOFILL - * IMG_ARC_EDGED - * - * IMG_ARC_PIE and IMG_ARC_CHORD are - * mutually exclusive; IMG_ARC_CHORD just - * connects the starting and ending angles with a straight line, while - * IMG_ARC_PIE produces a rounded edge. - * IMG_ARC_NOFILL indicates that the arc - * or chord should be outlined, not filled. IMG_ARC_EDGED, - * used together with IMG_ARC_NOFILL, indicates that the - * beginning and ending angles should be connected to the center - this is a - * good way to outline (rather than fill) a 'pie slice'. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color + * @param int $style * @throws ImageException * */ @@ -1231,16 +874,12 @@ function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $widt /** - * Draws an ellipse centered at the specified coordinate on the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1255,17 +894,12 @@ function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $ /** - * Creates a rectangle filled with color in the given - * image starting at point 1 and ending at point 2. - * 0, 0 is the top left corner of the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for point 1. - * @param int $y1 y-coordinate for point 1. - * @param int $x2 x-coordinate for point 2. - * @param int $y2 y-coordinate for point 2. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1280,18 +914,11 @@ function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y /** - * imagefilltoborder performs a flood fill - * whose border color is defined by border_color. - * The starting point for the fill is x, - * y (top left is 0, 0) and the region is - * filled with color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start. - * @param int $y y-coordinate of start. - * @param int $border_color The border color. A color identifier created with imagecolorallocate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $border_color + * @param int $color * @throws ImageException * */ @@ -1306,138 +933,9 @@ function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, i /** - * imagefilter applies the given filter - * filter on the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $filter filter can be one of the following: - * - * - * - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * - * - * - * - * IMG_FILTER_GRAYSCALE: Converts the image into - * grayscale by changing the red, green and blue components to their - * weighted sum using the same coefficients as the REC.601 luma (Y') - * calculation. The alpha components are retained. For palette images the - * result may differ due to palette limitations. - * - * - * - * - * IMG_FILTER_BRIGHTNESS: Changes the brightness - * of the image. Use args to set the level of - * brightness. The range for the brightness is -255 to 255. - * - * - * - * - * IMG_FILTER_CONTRAST: Changes the contrast of - * the image. Use args to set the level of - * contrast. - * - * - * - * - * IMG_FILTER_COLORIZE: Like - * IMG_FILTER_GRAYSCALE, except you can specify the - * color. Use args, arg2 and - * arg3 in the form of - * red, green, - * blue and arg4 for the - * alpha channel. The range for each color is 0 to 255. - * - * - * - * - * IMG_FILTER_EDGEDETECT: Uses edge detection to - * highlight the edges in the image. - * - * - * - * - * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * - * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using - * the Gaussian method. - * - * - * - * - * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * - * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to - * achieve a "sketchy" effect. - * - * - * - * - * IMG_FILTER_SMOOTH: Makes the image smoother. - * Use args to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use args to set the block size - * and arg2 to set the pixelation effect mode. - * - * - * - * - * IMG_FILTER_SCATTER: Applies scatter effect - * to the image, use args and - * arg2 to define the effect strength and - * additionally arg3 to only apply the - * on select pixel colors. - * - * - * + * @param \GdImage $image + * @param int $filter * @param int $args - * - * - * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * - * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * - * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * - * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * - * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * - * IMG_FILTER_SCATTER: Effect substraction level. - * This must not be higher or equal to the addition level set with - * arg2. - * - * - * * @throws ImageException * */ @@ -1456,43 +954,8 @@ function imagefilter(\GdImage $image, int $filter, int ...$args): void /** - * Flips the image image using the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * - * Constant - * Meaning - * - * - * - * - * IMG_FLIP_HORIZONTAL - * - * Flips the image horizontally. - * - * - * - * IMG_FLIP_VERTICAL - * - * Flips the image vertically. - * - * - * - * IMG_FLIP_BOTH - * - * Flips the image both horizontally and vertically. - * - * - * - * - * + * @param \GdImage $image + * @param int $mode * @throws ImageException * */ @@ -1507,83 +970,12 @@ function imageflip(\GdImage $image, int $mode): void /** - * This function calculates and returns the bounding box in pixels - * for a FreeType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be - * measured. - * @param string $font_filename The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1599,100 +991,16 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size to use in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The index of the desired color for the text, see - * imagecolorexact. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * font_filename does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * @param string $text Text to be inserted into image. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * - * - * - * - * 0 - * lower left x-coordinate - * - * - * 1 - * lower left y-coordinate - * - * - * 2 - * lower right x-coordinate - * - * - * 3 - * lower right y-coordinate - * - * - * 4 - * upper right x-coordinate - * - * - * 5 - * upper right y-coordinate - * - * - * 6 - * upper left x-coordinate - * - * - * 7 - * upper left y-coordinate - * - * - * - * - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1708,13 +1016,9 @@ function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, /** - * Applies gamma correction to the given gd image - * given an input and an output gamma. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $input_gamma The input gamma. - * @param float $output_gamma The output gamma. + * @param \GdImage $image + * @param float $input_gamma + * @param float $output_gamma * @throws ImageException * */ @@ -1729,11 +1033,8 @@ function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_ga /** - * Outputs a GD image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1752,15 +1053,10 @@ function imagegd(\GdImage $image, $file = null): void /** - * Outputs a GD2 image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $chunk_size Chunk size. - * @param int $mode Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $chunk_size + * @param int $mode * @throws ImageException * */ @@ -1783,20 +1079,8 @@ function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mod /** - * imagegif creates the GIF - * file in file from the image image. The - * image argument is the return from the - * imagecreate or imagecreatefrom* - * function. - * - * The image format will be GIF87a unless the - * image has been made transparent with - * imagecolortransparent, in which case the - * image format will be GIF89a. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1815,9 +1099,7 @@ function imagegif(\GdImage $image, $file = null): void /** - * Grabs a screenshot of the whole screen. - * - * @return \GdImage Returns an image object on success. + * @return \GdImage * @throws ImageException * */ @@ -1833,11 +1115,9 @@ function imagegrabscreen(): \GdImage /** - * Grabs a window or its client area using a windows handle (HWND property in COM instance) - * - * @param int $handle The HWND window ID. - * @param bool $client_area Include the client area of the application window. - * @return \GdImage Returns an image object on success. + * @param int $handle + * @param bool $client_area + * @return \GdImage * @throws ImageException * */ @@ -1853,15 +1133,9 @@ function imagegrabwindow(int $handle, bool $client_area = false): \GdImage /** - * imagejpeg creates a JPEG file from - * the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default (-1) uses the default IJG quality value (about 75). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -1882,57 +1156,8 @@ function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void /** - * Set the alpha blending flag to use layering effects. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $effect One of the following constants: - * - * - * IMG_EFFECT_REPLACE - * - * - * Use pixel replacement (equivalent of passing TRUE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_ALPHABLEND - * - * - * Use normal pixel blending (equivalent of passing FALSE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_NORMAL - * - * - * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * - * IMG_EFFECT_OVERLAY - * - * - * Overlay has the effect that black background pixels will remain - * black, white background pixels will remain white, but grey - * background pixels will take the colour of the foreground pixel. - * - * - * - * - * IMG_EFFECT_MULTIPLY - * - * - * Overlays with a multiply effect. - * - * - * - * + * @param \GdImage $image + * @param int $effect * @throws ImageException * */ @@ -1947,15 +1172,12 @@ function imagelayereffect(\GdImage $image, int $effect): void /** - * Draws a line between the two given points. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for first point. - * @param int $y1 y-coordinate for first point. - * @param int $x2 x-coordinate for second point. - * @param int $y2 y-coordinate for second point. - * @param int $color The line color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1970,58 +1192,8 @@ function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $col /** - * imageloadfont loads a user-defined bitmap and returns - * its identifier. - * - * @param string $filename The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * - * - * Font file format - * - * - * - * byte position - * C data type - * description - * - * - * - * - * byte 0-3 - * int - * number of characters in the font - * - * - * byte 4-7 - * int - * - * value of first character in the font (often 32 for space) - * - * - * - * byte 8-11 - * int - * pixel width of each character - * - * - * byte 12-15 - * int - * pixel height of each character - * - * - * byte 16- - * char - * - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * - * @return int Returns an GdFont instance. + * @param string $filename + * @return int * @throws ImageException * */ @@ -2037,24 +1209,10 @@ function imageloadfont(string $filename): int /** - * Outputs or saves a PNG image from the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the quality and - * filters arguments are not used. - * @param int $quality Compression level: from 0 (no compression) to 9. - * The default (-1) uses the zlib compression default. - * For more information see the zlib manual. - * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_XXX - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * The default value (-1) disables filtering. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $filters * @throws ImageException * */ @@ -2077,17 +1235,12 @@ function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters /** - * imagerectangle creates a rectangle starting at - * the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate - * 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -2102,27 +1255,10 @@ function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int /** - * imageresolution allows to set and get the resolution of - * an image in DPI (dots per inch). If the optional parameters are NULL, - * the current resolution is returned as an indexed array. If only - * resolution_x is not NULL, the horizontal and vertical resolution - * are set to this value. If none of the optional parameters are NULL, the horizontal - * and vertical resolution are set to these values, respectively. - * - * The resolution is only used as meta information when images are read from and - * written to formats supporting this kind of information (curently PNG and - * JPEG). It does not affect any drawing operations. The default resolution - * for new images is 96 DPI. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int|null $resolution_x The horizontal resolution in DPI. - * @param int|null $resolution_y The vertical resolution in DPI. - * @return mixed When used as getter, - * it returns an indexed array of the horizontal and vertical resolution on - * success. - * When used as setter, it returns - * TRUE on success. + * @param \GdImage $image + * @param int|null $resolution_x + * @param int|null $resolution_y + * @return mixed * @throws ImageException * */ @@ -2144,19 +1280,11 @@ function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resol /** - * Rotates the image image using the given - * angle in degrees. - * - * The center of rotation is the center of the image, and the rotated - * image may have different dimensions than the original image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the - * number of degrees to rotate the image anticlockwise. - * @param int $background_color Specifies the color of the uncovered zone after the rotation - * @param bool $ignore_transparent This parameter is unused. - * @return \GdImage Returns an image object for the rotated image. + * @param \GdImage $image + * @param float $angle + * @param int $background_color + * @param bool $ignore_transparent + * @return \GdImage * @throws ImageException * */ @@ -2172,28 +1300,8 @@ function imagerotate(\GdImage $image, float $angle, int $background_color, bool /** - * imagesavealpha sets the flag which determines whether to retain - * full alpha channel information (as opposed to single-color transparency) - * when saving images. - * This is only supported for image formats which support full alpha channel information, - * i.e. PNG, WebP and AVIF. - * - * - * imagesavealpha is only meaningful for PNG - * images, since the full alpha channel is always saved for WebP - * and AVIF. It is not recommended to rely on this behavior, - * as it may change in the future. Thus, imagesavealpha - * should be called deliberately also for WebP and - * AVIF images. - * - * - * - * Alphablending has to be disabled (imagealphablending($im, false)) - * to retain the alpha-channel in the first place. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -2208,25 +1316,11 @@ function imagesavealpha(\GdImage $image, bool $enable): void /** - * imagescale scales an image using the given - * interpolation algorithm. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $width The width to scale the image to. - * @param int $height The height to scale the image to. If omitted or negative, the aspect - * ratio will be preserved. - * @param int $mode One of IMG_NEAREST_NEIGHBOUR, - * IMG_BILINEAR_FIXED, - * IMG_BICUBIC, - * IMG_BICUBIC_FIXED or anything else (will use two - * pass). - * - * - * IMG_WEIGHTED4 is not yet supported. - * - * - * @return \GdImage Return the scaled image object on success. + * @param \GdImage $image + * @param int $width + * @param int $height + * @param int $mode + * @return \GdImage * @throws ImageException * */ @@ -2242,15 +1336,8 @@ function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = I /** - * imagesetbrush sets the brush image to be - * used by all line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * colors IMG_COLOR_BRUSHED or - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $brush An image object. + * @param \GdImage $image + * @param \GdImage $brush * @throws ImageException * */ @@ -2265,15 +1352,11 @@ function imagesetbrush(\GdImage $image, \GdImage $brush): void /** - * imagesetclip sets the current clipping rectangle, i.e. - * the area beyond which no pixels will be drawn. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 * @throws ImageException * */ @@ -2288,119 +1371,8 @@ function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void /** - * Sets the interpolation method, setting an interpolation method affects the rendering - * of various functions in GD, such as the imagerotate function. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $method The interpolation method, which can be one of the following: - * - * - * - * IMG_BELL: Bell filter. - * - * - * - * - * IMG_BESSEL: Bessel filter. - * - * - * - * - * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * - * IMG_BLACKMAN: Blackman window function. - * - * - * - * - * IMG_BOX: Box blur filter. - * - * - * - * - * IMG_BSPLINE: Spline interpolation. - * - * - * - * - * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * - * IMG_GAUSSIAN: Gaussian function. - * - * - * - * - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * - * IMG_HERMITE: Hermite interpolation. - * - * - * - * - * IMG_HAMMING: Hamming filter. - * - * - * - * - * IMG_HANNING: Hanning filter. - * - * - * - * - * IMG_MITCHELL: Mitchell filter. - * - * - * - * - * IMG_POWER: Power interpolation. - * - * - * - * - * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * - * IMG_SINC: Sinc function. - * - * - * - * - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * - * IMG_WEIGHTED4: Weighting filter. - * - * - * - * - * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * @param \GdImage $image + * @param int $method * @throws ImageException * */ @@ -2415,14 +1387,10 @@ function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED /** - * imagesetpixel draws a pixel at the specified - * coordinate. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate. - * @param int $y y-coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -2437,18 +1405,8 @@ function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void /** - * imagesetstyle sets the style to be used by all - * line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * color IMG_COLOR_STYLED or lines of images with color - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * Note that style must not be an empty array. + * @param \GdImage $image + * @param array $style * @throws ImageException * */ @@ -2463,13 +1421,8 @@ function imagesetstyle(\GdImage $image, array $style): void /** - * imagesetthickness sets the thickness of the lines - * drawn when drawing rectangles, polygons, arcs etc. to - * thickness pixels. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $thickness Thickness, in pixels. + * @param \GdImage $image + * @param int $thickness * @throws ImageException * */ @@ -2484,19 +1437,8 @@ function imagesetthickness(\GdImage $image, int $thickness): void /** - * imagesettile sets the tile image to be - * used by all region filling functions (such as imagefill - * and imagefilledpolygon) when filling with the special - * color IMG_COLOR_TILED. - * - * A tile is an image used to fill an area with a repeated pattern. Any - * GD image can be used as a tile, and by setting the transparent color index of the tile - * image with imagecolortransparent, a tile allows certain parts - * of the underlying area to shine through can be created. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $tile The image object to be used as a tile. + * @param \GdImage $image + * @param \GdImage $tile * @throws ImageException * */ @@ -2511,17 +1453,12 @@ function imagesettile(\GdImage $image, \GdImage $tile): void /** - * Draws a string at the given coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the upper left corner. - * @param int $y y-coordinate of the upper left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2536,18 +1473,12 @@ function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, /** - * Draws a string vertically at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the bottom left corner. - * @param int $y y-coordinate of the bottom left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2562,11 +1493,8 @@ function imagestringup(\GdImage $image, int $font, int $x, int $y, string $strin /** - * Returns the width of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the width of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2582,11 +1510,8 @@ function imagesx(\GdImage $image): int /** - * Returns the height of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the height of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2602,21 +1527,9 @@ function imagesy(\GdImage $image): int /** - * imagetruecolortopalette converts a truecolor image - * to a palette image. The code for this function was originally drawn from - * the Independent JPEG Group library code, which is excellent. The code - * has been modified to preserve as much alpha channel information as - * possible in the resulting palette, in addition to preserving colors as - * well as possible. This does not work as well as might be hoped. It is - * usually best to simply produce a truecolor output image instead, which - * guarantees the highest output quality. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $dither Indicates if the image should be dithered - if it is TRUE then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * @param int $num_colors Sets the maximum number of colors that should be retained in the palette. + * @param \GdImage $image + * @param bool $dither + * @param int $num_colors * @throws ImageException * */ @@ -2631,87 +1544,12 @@ function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) /** - * This function calculates and returns the bounding box in pixels - * for a TrueType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be measured. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * @return array imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and FALSE on error. - * - * - * - * - * key - * contents - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. + * @return array * @throws ImageException * */ @@ -2727,68 +1565,16 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ /** - * Writes the given text into the image using TrueType - * fonts. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $text The text string in UTF-8 encoding. - * - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings. - * - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * @return array Returns an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. + * @return array * @throws ImageException * */ @@ -2804,15 +1590,9 @@ function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y /** - * imagewbmp outputs or save a WBMP - * version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. + * @param \GdImage $image + * @param null|resource|string $file + * @param int|null $foreground_color * @throws ImageException * */ @@ -2833,13 +1613,9 @@ function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) /** - * Outputs or saves a WebP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -2860,22 +1636,9 @@ function imagewebp(\GdImage $image, $file = null, int $quality = -1): void /** - * Outputs or save an XBM version of the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. - * - * The filename (without the .xbm extension) is also - * used for the C identifiers of the XBM, whereby non - * alphanumeric characters of the current locale are substituted by - * underscores. If filename is set to NULL, - * image is used to build the C identifiers. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. All other colors are treated as - * background. + * @param \GdImage $image + * @param null|resource|string $filename + * @param int|null $foreground_color * @throws ImageException * */ @@ -2894,13 +1657,10 @@ function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): vo /** - * Embeds binary IPTC data into a JPEG image. - * - * @param string $iptc_data The data to be written. - * @param string $filename Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be - * returned as a string. Otherwise the JPEG will be printed to STDOUT. - * @return bool|string If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @param string $iptc_data + * @param string $filename + * @param int $spool + * @return bool|string * @throws ImageException * */ @@ -2916,11 +1676,8 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) /** - * Parses an IPTC block into its single tags. - * - * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the - * value. It returns FALSE on error or if no IPTC data was found. + * @param string $iptc_block + * @return array * @throws ImageException * */ diff --git a/generated/8.2/imap.php b/generated/8.2/imap.php index f020a981..f718bd4b 100644 --- a/generated/8.2/imap.php +++ b/generated/8.2/imap.php @@ -5,11 +5,8 @@ use Safe\Exceptions\ImapException; /** - * Convert an 8bit string to a quoted-printable string (according to - * RFC2045, section 6.7). - * - * @param string $string The 8bit string to convert - * @return string Returns a quoted-printable string. + * @param string $string + * @return string * @throws ImapException * */ @@ -25,19 +22,11 @@ function imap_8bit(string $string): string /** - * Appends a string message to the specified folder. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $folder The mailbox name, see imap_open for more - * information - * @param string $message The message to be append, as a string - * - * When talking to the Cyrus IMAP server, you must use "\r\n" as - * your end-of-line terminator instead of "\n" or the operation will - * fail - * @param null|string $options If provided, the options will also be written - * to the folder - * @param null|string $internal_date 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. + * @param \IMAP\Connection $imap + * @param string $folder + * @param string $message + * @param null|string $options + * @param null|string $internal_date * @throws ImapException * */ @@ -58,10 +47,8 @@ function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?s /** - * Decodes the given BASE-64 encoded string. - * - * @param string $string The encoded text - * @return string Returns the decoded message as a string. + * @param string $string + * @return string * @throws ImapException * */ @@ -77,10 +64,8 @@ function imap_base64(string $string): string /** - * Convert an 8bit string to a base64 string according to RFC2045, Section 6.8. - * - * @param string $string The 8bit string - * @return string Returns a base64 encoded string. + * @param string $string + * @return string * @throws ImapException * */ @@ -96,39 +81,10 @@ function imap_binary(string $string): string /** - * imap_body returns the body of the message, - * numbered message_num in the current - * mailbox. - * - * imap_body will only return a verbatim copy of the - * message body. To extract single parts of a multipart MIME-encoded - * message you have to use imap_fetchstructure to - * analyze its structure and imap_fetchbody to - * extract a copy of a single body component. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The optional flags are a bit mask - * with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if not already set - * - * - * - * - * FT_INTERNAL - The return string is in internal format, will - * not canonicalize to CRLF. - * - * - * - * @return string Returns the body of the specified message, as a string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -144,15 +100,10 @@ function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): st /** - * Read the structure of a specified body section of a specific message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param string $section The body section to read - * @return \stdClass Returns the information in an object. - * For a detailed description - * of the object structure and properties see - * imap_fetchstructure. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @return \stdClass * @throws ImapException * */ @@ -168,40 +119,8 @@ function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $secti /** - * Checks information about the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns 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 - * - * - * - * - * Mailbox - the mailbox name - * - * - * - * - * Nmsgs - number of messages in the mailbox - * - * - * - * - * Recent - number of recent messages in the mailbox - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -217,26 +136,10 @@ function imap_check(\IMAP\Connection $imap): \stdClass /** - * This function causes a store to delete the specified - * flag to the flags set for the - * messages in the specified sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", - * "\\Deleted", and "\\Draft" (as defined by RFC2060) - * @param int $options options are a bit mask and may contain - * the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -251,13 +154,8 @@ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $f /** - * Closes the imap stream. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags 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 + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -272,12 +170,8 @@ function imap_close(\IMAP\Connection $imap, int $flags = 0): void /** - * Creates a new mailbox specified by mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information. Names containing international characters should be - * encoded by imap_utf7_encode + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -292,11 +186,8 @@ function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void /** - * Deletes the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -311,108 +202,10 @@ function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void /** - * This function fetches mail headers for the given - * sequence and returns an overview of their - * contents. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A message sequence description. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param int $flags sequence will contain a sequence of message - * indices or UIDs, if this parameter is set to - * FT_UID. - * @return array Returns an array of objects describing one message header each. - * The object will only define a property if it exists. The possible - * properties are: - * - * - * - * subject - the messages subject - * - * - * - * - * from - who sent it - * - * - * - * - * to - recipient - * - * - * - * - * date - when was it sent - * - * - * - * - * message_id - Message-ID - * - * - * - * - * references - is a reference to this message id - * - * - * - * - * in_reply_to - is a reply to this message id - * - * - * - * - * size - size in bytes - * - * - * - * - * uid - UID the message has in the mailbox - * - * - * - * - * msgno - message sequence number in the mailbox - * - * - * - * - * recent - this message is flagged as recent - * - * - * - * - * flagged - this message is flagged - * - * - * - * - * answered - this message is flagged as answered - * - * - * - * - * deleted - this message is flagged for deletion - * - * - * - * - * seen - this message is flagged as already read - * - * - * - * - * draft - this message is flagged as being a draft - * - * - * - * - * udate - the UNIX timestamp of the arrival date - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param int $flags + * @return array * @throws ImapException * */ @@ -428,35 +221,11 @@ function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flag /** - * Fetch of a particular section of the body of the specified messages. - * Body parts are not decoded by this function. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -472,36 +241,10 @@ function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $sectio /** - * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified - * message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The possible flags are: - * - * - * - * FT_UID - The message_num - * argument is a UID - * - * - * - * - * FT_INTERNAL - The return string - * is in "internal" format, without any attempt to - * canonicalize to CRLF newlines - * - * - * - * - * FT_PREFETCHTEXT - The RFC822.TEXT - * should be pre-fetched at the same time. This avoids an - * extra RTT on an IMAP connection if a full message text is - * desired (e.g. in a "save to local file" operation) - * - * - * - * @return string Returns the header of the specified message as a text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -517,34 +260,11 @@ function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = /** - * Fetch the MIME headers of a particular section of the body of the specified messages. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns the MIME headers of a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -560,138 +280,10 @@ function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $sectio /** - * Fetches all the structured information for a given message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags This optional parameter only has a single option, - * FT_UID, which tells the function to treat the - * message_num argument as a - * UID. - * @return \stdClass Returns an object with properties listed in the table below. - * - * - * - * Returned Object for imap_fetchstructure - * - * - * - * - * type - * Primary body type - * - * - * encoding - * Body transfer encoding - * - * - * ifsubtype - * TRUE if there is a subtype string - * - * - * subtype - * MIME subtype - * - * - * ifdescription - * TRUE if there is a description string - * - * - * description - * Content description string - * - * - * ifid - * TRUE if there is an identification string - * - * - * id - * Identification string - * - * - * lines - * Number of lines - * - * - * bytes - * Number of bytes - * - * - * ifdisposition - * TRUE if there is a disposition string - * - * - * disposition - * Disposition string - * - * - * ifdparameters - * TRUE if the dparameters array exists - * - * - * dparameters - * An array of objects where each object has an - * "attribute" and a "value" - * property corresponding to the parameters on the - * Content-disposition MIME - * header. - * - * - * ifparameters - * TRUE if the parameters array exists - * - * - * parameters - * An array of objects where each object has an - * "attribute" and a "value" - * property. - * - * - * parts - * An array of objects identical in structure to the top-level - * object, each of which corresponds to a MIME body - * part. - * - * - * - * - * - * - * Primary body type (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 0textTYPETEXT - * 1multipartTYPEMULTIPART - * 2messageTYPEMESSAGE - * 3applicationTYPEAPPLICATION - * 4audioTYPEAUDIO - * 5imageTYPEIMAGE - * 6videoTYPEVIDEO - * 7modelTYPEMODEL - * 8otherTYPEOTHER - * - * - * - * - * - * Transfer encodings (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 07bitENC7BIT - * 18bitENC8BIT - * 2BinaryENCBINARY - * 3Base64ENCBASE64 - * 4Quoted-PrintableENCQUOTEDPRINTABLE - * 5otherENCOTHER - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -707,14 +299,8 @@ function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flag /** - * Purges the cache of entries of a specific type. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), - * IMAP_GC_ENV (envelope and bodies), - * IMAP_GC_TEXTS (texts). + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -729,12 +315,9 @@ function imap_gc(\IMAP\Connection $imap, int $flags): void /** - * Gets the ACL for a given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @return array * @throws ImapException * */ @@ -750,78 +333,11 @@ function imap_getacl(\IMAP\Connection $imap, string $mailbox): array /** - * Gets information on the mailboxes. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox not contains, and may not contain any - * "children" (there are no mailboxes below this one). Calling - * imap_createmailbox will not work on this mailbox. - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. This means that it may - * contain new messages since the last time it was checked. Not provided by all IMAP - * servers. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked, does not contain new - * messages. If either MARKED or UNMARKED is - * provided, you can assume the IMAP server supports this feature for this mailbox. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. - * @throws ImapException + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array + * @throws ImapException * */ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array @@ -836,77 +352,10 @@ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pa /** - * Gets information about the subscribed mailboxes. - * - * Identical to imap_getmailboxes, except that it only - * returns mailboxes that the user is subscribed to. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox has no - * "children" (there are no mailboxes below this one). - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -922,216 +371,11 @@ function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $p /** - * Gets information about the given message number by reading its headers. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $from_length Number of characters for the fetchfrom property. - * Must be greater than or equal to zero. - * @param int $subject_length Number of characters for the fetchsubject property - * Must be greater than or equal to zero. - * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * - * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * - * reply_to - an array of objects from the Reply-To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * - * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and - * host - * - * - * - * - * remail - - * - * - * - * - * date - The message date as found in its headers - * - * - * - * - * Date - Same as date - * - * - * - * - * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * - * Recent - R if recent and seen, N - * if recent and not seen, ' ' if not recent. - * - * - * - * - * Unseen - U if not seen AND not recent, ' ' if seen - * OR not seen and recent - * - * - * - * - * Flagged - F if flagged, ' ' if not flagged - * - * - * - * - * Answered - A if answered, ' ' if unanswered - * - * - * - * - * Deleted - D if deleted, ' ' if not deleted - * - * - * - * - * Draft - X if draft, ' ' if not draft - * - * - * - * - * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * - * Size - The message size - * - * - * - * - * udate - mail message date in Unix time - * - * - * - * - * fetchfrom - from line formatted to fit from_length - * characters - * - * - * - * - * fetchsubject - subject line formatted to fit - * subject_length characters - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $from_length + * @param int $subject_length + * @return \stdClass * @throws ImapException * */ @@ -1147,12 +391,8 @@ function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_len /** - * Returns headers for all messages in a mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One - * element per mail message. - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return array * @throws ImapException * */ @@ -1168,33 +408,11 @@ function imap_headers(\IMAP\Connection $imap): array /** - * Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. - * - * This function is similar to imap_listmailbox, - * but it will additionally check for the presence of the string - * content inside the mailbox data. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @param string $content + * @return array * @throws ImapException * */ @@ -1210,26 +428,10 @@ function imap_listscan(\IMAP\Connection $imap, string $reference, string $patter /** - * Gets an array of all the mailboxes that you have subscribed. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -1245,109 +447,9 @@ function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): /** - * Create a MIME message based on the given envelope - * and bodies sections. - * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", - * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", - * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. - * To set additional headers, the key "custom_headers" is supported, which expects - * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; - * only if it has a type of TYPEMULTIPART, further bodies - * are processed; these bodies constitute the bodies of the parts. - * - * - * Body Array Structure - * - * - * - * Key - * Type - * Description - * - * - * - * - * type - * int - * - * The MIME type. - * One of TYPETEXT (default), TYPEMULTIPART, - * TYPEMESSAGE, TYPEAPPLICATION, - * TYPEAUDIO, TYPEIMAGE, - * TYPEMODEL or TYPEOTHER. - * - * - * - * encoding - * int - * - * The Content-Transfer-Encoding. - * One of ENC7BIT (default), ENC8BIT, - * ENCBINARY, ENCBASE64, - * ENCQUOTEDPRINTABLE or ENCOTHER. - * - * - * - * charset - * string - * The charset parameter of the MIME type. - * - * - * type.parameters - * array - * An associative array of Content-Type parameter names and their values. - * - * - * subtype - * string - * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. - * - * - * id - * string - * The Content-ID. - * - * - * description - * string - * The Content-Description. - * - * - * disposition.type - * string - * The Content-Disposition, e.g. 'attachment'. - * - * - * disposition - * array - * An associative array of Content-Disposition parameter names and values. - * - * - * contents.data - * string - * The payload. - * - * - * lines - * int - * The size of the payload in lines. - * - * - * bytes - * int - * The size of the payload in bytes. - * - * - * md5 - * string - * The MD5 checksum of the payload. - * - * - * - * - * @return string Returns the MIME message as string. + * @param array $envelope + * @param array $bodies + * @return string * @throws ImapException * */ @@ -1363,29 +465,10 @@ function imap_mail_compose(array $envelope, array $bodies): string /** - * Copies mail messages specified by message_nums - * to specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message - * numbers (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask of one or more of - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * - * - * CP_MOVE - Delete the messages from - * the current mailbox after copying. If this flag is set, the function - * behaves identically to imap_mail_move. - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1400,25 +483,10 @@ function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $ma /** - * Moves mail messages specified by message_nums to the - * specified mailbox. - * Note that the mail messages are actually copied to the - * mailbox, and the original messages are flagged for deletion. - * That implies that the messages in mailbox are assigned new UIDs. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message numbers - * (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask and may contain the single option: - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1432,23 +500,14 @@ function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $ma } -/** - * This function allows sending of emails with correct handling of - * Cc and Bcc receivers. - * - * The parameters to, cc - * and bcc are all strings and are all parsed - * as RFC822 address lists. - * - * @param string $to The receiver - * @param string $subject The mail subject - * @param string $message The mail body, see imap_mail_compose - * @param null|string $additional_headers As string with additional headers to be set on the mail +/** + * @param string $to + * @param string $subject + * @param string $message + * @param null|string $additional_headers * @param null|string $cc - * @param null|string $bcc The receivers specified in bcc will get the - * mail, but are excluded from the headers. - * @param null|string $return_path Use this parameter to specify return path upon mail delivery failure. - * This is useful when using PHP as a mail client for multiple users. + * @param null|string $bcc + * @param null|string $return_path * @throws ImapException * */ @@ -1473,54 +532,8 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi /** - * Checks the current mailbox status on the server. It is similar to - * imap_status, but will additionally sum up the size of - * all messages in the mailbox, which will take some additional time to - * execute. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns the information in an object with following properties: - * - * Mailbox properties - * - * - * - * Date - * date of last change (current datetime) - * - * - * Driver - * driver - * - * - * Mailbox - * name of the mailbox - * - * - * Nmsgs - * number of messages - * - * - * Recent - * number of recent messages - * - * - * Unread - * number of unread messages - * - * - * Deleted - * number of deleted messages - * - * - * Size - * mailbox size - * - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -1536,18 +549,8 @@ function imap_mailboxmsginfo(\IMAP\Connection $imap): \stdClass /** - * Decodes MIME message header extensions that are non ASCII text (see RFC2047). - * - * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each - * object has two properties, charset and - * text. - * - * If the element hasn't been encoded, and in other words is in - * plain US-ASCII, the charset property of that element is - * set to default. - * - * The function returns FALSE on failure. + * @param string $string + * @return array * @throws ImapException * */ @@ -1563,10 +566,8 @@ function imap_mime_header_decode(string $string): array /** - * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * - * @param string $string A string encoded in modified UTF-7. - * @return string Returns string converted to UTF-8. + * @param string $string + * @return string * @throws ImapException * */ @@ -1582,10 +583,8 @@ function imap_mutf7_to_utf8(string $string): string /** - * Gets the number of messages in the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return int Return the number of messages in the current mailbox, as an integer. + * @param \IMAP\Connection $imap + * @return int * @throws ImapException * */ @@ -1601,206 +600,13 @@ function imap_num_msg(\IMAP\Connection $imap): int /** - * Opens an IMAP stream to a mailbox. - * - * This function can also be used to open streams to POP3 and - * NNTP servers, but some functions and features are only - * available on IMAP servers. - * - * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. - * The special name INBOX stands for the current users - * personal mailbox. Mailbox names that contain international characters - * besides those in the printable ASCII space have to be encoded with - * imap_utf7_encode. - * - * The server part, which is enclosed in '{' and '}', consists of the servers - * name or ip address, an optional port (prefixed by ':'), and an optional - * protocol specification (prefixed by '/'). - * - * The server part is mandatory in all mailbox - * 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. - * - * - * - * - * port - optional TCP port number, default is the - * default port for that service - * - * - * - * - * flags - optional flags, see following table. - * - * - * - * - * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * - * Optional flags for names - * - * - * - * Flag - * Description - * - * - * - * - * /service=service - * mailbox access service, default is "imap" - * - * - * /user=user - * remote user name for login on the server - * - * - * /authuser=user - * remote authentication user; if specified this is the user name - * whose password is used (e.g. administrator) - * - * - * /anonymous - * remote access as anonymous user - * - * - * /debug - * record protocol telemetry in application's debug log - * - * - * /secure - * do not transmit a plaintext password over the network - * - * - * /imap, /imap2, - * /imap2bis, /imap4, - * /imap4rev1 - * equivalent to /service=imap - * - * - * /pop3 - * equivalent to /service=pop3 - * - * - * /nntp - * equivalent to /service=nntp - * - * - * /norsh - * do not use rsh or ssh to establish a preauthenticated IMAP - * session - * - * - * /ssl - * use the Secure Socket Layer to encrypt the session - * - * - * /validate-cert - * validate certificates from TLS/SSL server (this is the default - * behavior) - * - * - * /novalidate-cert - * do not validate certificates from TLS/SSL server, needed if - * server uses self-signed certificates - * - * - * /tls - * force use of start-TLS to encrypt the session, and reject - * connection to servers that do not support it - * - * - * /notls - * do not do start-TLS to encrypt the session, even with servers - * that support it - * - * - * /readonly - * request read-only mailbox open (IMAP only; ignored on NNTP, and - * an error with SMTP and POP3) - * - * - * - * - * @param string $user The user name - * @param string $password The password associated with the user - * @param int $flags The flags are a bit mask with one or more of - * the following: - * - * - * - * OP_READONLY - Open mailbox read-only - * - * - * - * - * OP_ANONYMOUS - Don't use or update a - * .newsrc for news (NNTP only) - * - * - * - * - * OP_HALFOPEN - For IMAP - * and NNTP names, open a connection but - * don't open a mailbox. - * - * - * - * - * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close - * (see also imap_delete and - * imap_expunge) - * - * - * - * - * OP_DEBUG - Debug protocol negotiations - * - * - * - * - * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * - * OP_SILENT - Don't pass up events (internal use) - * - * - * - * - * OP_PROTOTYPE - Return driver prototype - * - * - * - * - * OP_SECURE - Don't do non-secure authentication - * - * - * - * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used - * to set one or more connection parameters: - * - * - * - * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * - * @return \IMAP\Connection Returns an IMAP\Connection instance on success. + * @param string $mailbox + * @param string $user + * @param string $password + * @param int $flags + * @param int $retries + * @param array $options + * @return \IMAP\Connection * @throws ImapException * */ @@ -1816,10 +622,8 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = /** - * Convert a quoted-printable string to an 8 bit string according to RFC2045, section 6.7. - * - * @param string $string A quoted-printable string - * @return string Returns an 8 bits string. + * @param string $string + * @return string * @throws ImapException * */ @@ -1835,15 +639,9 @@ function imap_qprint(string $string): string /** - * This function renames on old mailbox to new mailbox (see - * imap_open for the format of - * mbox names). - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $from The old mailbox name, see imap_open for more - * information - * @param string $to The new mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $from + * @param string $to * @throws ImapException * */ @@ -1858,13 +656,10 @@ function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): v /** - * Returns a properly formatted email address as defined in RFC2822 given the needed information. - * - * @param null|string $mailbox The mailbox name, see imap_open for more - * information - * @param null|string $hostname The email host part - * @param null|string $personal The name of the account owner - * @return string Returns a string properly formatted email address as defined in RFC2822. + * @param null|string $mailbox + * @param null|string $hostname + * @param null|string $personal + * @return string * @throws ImapException * */ @@ -1880,34 +675,11 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string /** - * Saves a part or the whole body of the specified message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int|resource|string $file The path to the saved file as a string, or a valid file descriptor - * returned by fopen. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * + * @param \IMAP\Connection $imap + * @param int|resource|string $file + * @param int $message_num + * @param string $section + * @param int $flags * @throws ImapException * */ @@ -1922,12 +694,9 @@ function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $ /** - * Sets an upper limit quota on a per mailbox basis. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard - * format for a mailbox: user.name. - * @param int $mailbox_size The maximum size (in KB) for the quota_root + * @param \IMAP\Connection $imap + * @param string $quota_root + * @param int $mailbox_size * @throws ImapException * */ @@ -1942,14 +711,10 @@ function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox /** - * Sets the ACL for a giving mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param string $user_id The user to give the rights to. - * @param string $rights The rights to give to the user. Passing an empty string will delete - * acl. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param string $user_id + * @param string $rights * @throws ImapException * */ @@ -1964,27 +729,10 @@ function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, s /** - * Causes a store to add the specified flag to the - * flags set for the messages in the specified - * sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, - * \Answered, \Flagged, - * \Deleted, and \Draft as - * defined by RFC2060. - * @param int $options A bit mask that may contain the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -1999,67 +747,13 @@ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $fla /** - * Gets and sorts message numbers by the given parameters. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $criteria Criteria can be one (and only one) of the following: - * - * - * - * SORTDATE - message Date - * - * - * - * - * SORTARRIVAL - arrival date - * - * - * - * - * SORTFROM - mailbox in first From address - * - * - * - * - * SORTSUBJECT - message subject - * - * - * - * - * SORTTO - mailbox in first To address - * - * - * - * - * SORTCC - mailbox in first cc address - * - * - * - * - * SORTSIZE - size of message in octets - * - * - * - * @param int $reverse Whether to sort in reverse order. - * @param int $flags The flags are a bitmask of one or more of the - * following: - * - * - * - * SE_UID - Return UIDs instead of sequence numbers - * - * - * - * - * SE_NOPREFETCH - Don't prefetch searched messages - * - * - * - * @param null|string $search_criteria IMAP2-format search criteria string. For details see - * imap_search. - * @param null|string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given - * parameters. + * @param \IMAP\Connection $imap + * @param int $criteria + * @param int $reverse + * @param int $flags + * @param null|string $search_criteria + * @param null|string $charset + * @return array * @throws ImapException * */ @@ -2081,57 +775,10 @@ function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $fla /** - * Gets status information about the given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags Valid flags are: - * - * - * - * SA_MESSAGES - set $status->messages to the - * number of messages in the mailbox - * - * - * - * - * SA_RECENT - set $status->recent to the number - * of recent messages in the mailbox - * - * - * - * - * SA_UNSEEN - set $status->unseen to the number - * of unseen (new) messages in the mailbox - * - * - * - * - * SA_UIDNEXT - set $status->uidnext to the next - * uid to be used in the mailbox - * - * - * - * - * SA_UIDVALIDITY - set $status->uidvalidity to a - * constant that changes when uids for the mailbox may no longer be - * valid - * - * - * - * - * SA_ALL - set all of the above - * - * - * - * @return \stdClass This function returns an object containing status information. - * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. - * - * flags is also set, which contains a bitmask which can - * be checked against any of the above constants. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -2147,11 +794,8 @@ function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdC /** - * Subscribe to a new mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2166,26 +810,9 @@ function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Gets a tree of a threaded message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. + * @param \IMAP\Connection $imap * @param int $flags - * @return array imap_thread returns an associative array containing - * a tree of messages threaded by REFERENCES. - * - * Every message in the current mailbox will be represented by three entries - * in the resulting array: - * - * - * $thread["XX.num"] - current message number - * - * - * $thread["XX.next"] - * - * - * $thread["XX.branch"] - * - * + * @return array * @throws ImapException * */ @@ -2201,20 +828,9 @@ function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array /** - * Sets or fetches the imap timeout. - * - * @param int $timeout_type One of the following: - * IMAP_OPENTIMEOUT, - * IMAP_READTIMEOUT, - * IMAP_WRITETIMEOUT, or - * IMAP_CLOSETIMEOUT. - * @param int $timeout The timeout, in seconds. - * @return mixed If the timeout parameter is set, this function - * returns TRUE on success. - * - * If timeout is not provided or evaluates to -1, - * the current timeout value of timeout_type is - * returned as an integer. + * @param int $timeout_type + * @param int $timeout + * @return mixed * @throws ImapException * */ @@ -2230,13 +846,8 @@ function imap_timeout(int $timeout_type, int $timeout = -1) /** - * Removes the deletion flag for a specified message, which is set by - * imap_delete or imap_mail_move. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums A string representing one or more messages in IMAP4-style sequence format - * ("n", "n:m", or combination of these - * delimited by commas). + * @param \IMAP\Connection $imap + * @param string $message_nums * @param int $flags * @throws ImapException * @@ -2252,11 +863,8 @@ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags /** - * Unsubscribe from the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2271,10 +879,8 @@ function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * - * @param string $string A UTF-8 encoded string. - * @return string Returns string converted to modified UTF-7. + * @param string $string + * @return string * @throws ImapException * */ diff --git a/generated/8.2/info.php b/generated/8.2/info.php index 284a36fa..e318b57f 100644 --- a/generated/8.2/info.php +++ b/generated/8.2/info.php @@ -5,104 +5,9 @@ use Safe\Exceptions\InfoException; /** - * Set the various assert control options or just query - * their current settings. - * * @param int $what - * Assert Options - * - * - * - * Option - * INI Setting - * Default value - * Description - * - * - * - * - * ASSERT_ACTIVE - * assert.active - * 1 - * enable assert evaluation - * - * - * ASSERT_WARNING - * assert.warning - * 1 - * issue a PHP warning for each failed assertion - * - * - * ASSERT_BAIL - * assert.bail - * 0 - * terminate execution on failed assertions - * - * - * ASSERT_QUIET_EVAL - * assert.quiet_eval - * 0 - * - * disable error_reporting during assertion expression - * evaluation - * - * - * - * ASSERT_CALLBACK - * assert.callback - * (NULL) - * Callback to call on failed assertions - * - * - * - * - * @param mixed $value An optional new value for the option. - * - * The callback function set via ASSERT_CALLBACK or assert.callback should - * have the following signature: - * - * voidassert_callback - * stringfile - * intline - * stringassertion - * stringdescription - * - * - * - * file - * - * - * The file where assert has been called. - * - * - * - * - * line - * - * - * The line where assert has been called. - * - * - * - * - * assertion - * - * - * The assertion that has been passed to assert, - * converted to a string. - * - * - * - * - * description - * - * - * The description that has been passed to assert. - * - * - * - * - * @return mixed Returns the original setting of any options. + * @param mixed $value + * @return mixed * @throws InfoException * */ @@ -122,11 +27,7 @@ function assert_options(int $what, $value = null) /** - * Sets the process title visible in tools such as top and - * ps. This function is available only in - * CLI mode. - * - * @param string $title The new title. + * @param string $title * @throws InfoException * */ @@ -141,56 +42,7 @@ function cli_set_process_title(string $title): void /** - * Loads the PHP extension given by the parameter - * extension_filename. - * - * Use extension_loaded to test whether a given - * extension is already available or not. This works on both built-in - * extensions and dynamically loaded ones (either through php.ini or - * dl). - * - * @param string $extension_filename This parameter is only the filename of the - * extension to load which also depends on your platform. For example, - * the sockets extension (if compiled - * as a shared module, not the default!) would be called - * sockets.so on Unix platforms whereas it is called - * php_sockets.dll on the Windows platform. - * - * The directory where the extension is loaded from depends on your - * platform: - * - * Windows - If not explicitly set in the php.ini, the extension is - * loaded from C:\php5\ by default. - * - * Unix - If not explicitly set in the php.ini, the default extension - * directory depends on - * - * - * - * whether PHP has been built with --enable-debug - * or not - * - * - * - * - * whether PHP has been built with ZTS (Zend Thread Safety) - * support or not - * - * - * - * - * the current internal ZEND_MODULE_API_NO (Zend - * internal module API number, which is basically the date on which a - * major module API change happened, e.g. 20010901) - * - * - * - * Taking into account the above, the directory then defaults to - * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, - * e.g. - * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 - * or - * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @param string $extension_filename * @throws InfoException * */ @@ -205,18 +57,8 @@ function dl(string $extension_filename): void /** - * Gets the value of a PHP configuration option. - * - * This function will not return configuration information set when the PHP - * was compiled, or read from an Apache configuration file. - * - * To check whether the system is using a configuration file, try retrieving the - * value of the cfg_file_path configuration setting. If this is available, a - * configuration file is being used. - * - * @param string $option The configuration option name. - * @return mixed Returns the current value of the PHP configuration variable specified by - * option, or FALSE if an error occurs. + * @param string $option + * @return mixed * @throws InfoException * */ @@ -232,10 +74,7 @@ function get_cfg_var(string $option) /** - * Gets the current include_path - * configuration option value. - * - * @return string Returns the path, as a string. + * @return string * @throws InfoException * */ @@ -251,14 +90,7 @@ function get_include_path(): string /** - * Gets the time of the last modification of the main script of execution. - * - * If you're interested in getting the last modification time - * of a different file, consider using filemtime. - * - * @return int Returns the time of the last modification of the current - * page. The value returned is a Unix timestamp, suitable for - * feeding to date. + * @return int * @throws InfoException * */ @@ -274,9 +106,7 @@ function getlastmod(): int /** - * Gets the group ID of the current script. - * - * @return int Returns the group ID of the current script. + * @return int * @throws InfoException * */ @@ -292,9 +122,7 @@ function getmygid(): int /** - * Gets the inode of the current script. - * - * @return int Returns the current script's inode as an integer. + * @return int * @throws InfoException * */ @@ -310,9 +138,7 @@ function getmyinode(): int /** - * Gets the current PHP process ID. - * - * @return int Returns the current PHP process ID. + * @return int * @throws InfoException * */ @@ -328,9 +154,7 @@ function getmypid(): int /** - * Gets the user ID of the current script. - * - * @return int Returns the user ID of the current script. + * @return int * @throws InfoException * */ @@ -346,25 +170,10 @@ function getmyuid(): int /** - * Parses options passed to the script. - * - * @param string $short_options Each character in this string will be used as option characters and - * matched against options passed to the script starting with a single - * hyphen (-). - * - * For example, an option string "x" recognizes an - * option -x. - * - * Only a-z, A-Z and 0-9 are allowed. - * @param array $long_options An array of options. Each element in this array will be used as option - * strings and matched against options passed to the script starting with - * two hyphens (--). - * - * For example, an longopts element "opt" recognizes an - * option --opt. - * @param int|null $rest_index If the rest_index parameter is present, then the - * index where argument parsing stopped will be written to this variable. - * @return array|array|array This function will return an array of option / argument pairs. + * @param string $short_options + * @param array $long_options + * @param int|null $rest_index + * @return array|array|array * @throws InfoException * */ @@ -380,14 +189,8 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind /** - * This is an interface to getrusage(2). It gets data returned - * from the system call. - * - * @param int $mode If mode is 1, getrusage will be called with - * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system - * call. All entries are accessible by using their documented field names. - * Returns FALSE on failure. + * @param int $mode + * @return array * @throws InfoException * */ @@ -403,12 +206,8 @@ function getrusage(int $mode = 0): array /** - * Returns the value of the configuration option on success. - * - * @param string $option The configuration option name. - * @return string Returns the value of the configuration option as a string on success, or an - * empty string for null values. Returns FALSE if the - * configuration option doesn't exist. + * @param string $option + * @return string * @throws InfoException * */ @@ -424,15 +223,9 @@ function ini_get(string $option): string /** - * Sets the value of the given configuration option. The configuration option - * will keep this new value during the script's execution, and will be restored - * at the script's ending. - * - * @param string $option Not all the available options can be changed using - * ini_set. There is a list of all available options - * in the appendix. - * @param bool|float|int|null|string $value The new value for the option. - * @return string Returns the old value on success. + * @param string $option + * @param bool|float|int|null|string $value + * @return string * @throws InfoException * */ @@ -448,22 +241,7 @@ function ini_set(string $option, $value): string /** - * Returns a lowercase string that describes the type of interface - * (the Server API, SAPI) that PHP is using. For example, in CLI PHP this - * string will be "cli" whereas with Apache it may have several different - * values depending on the exact SAPI used. Possible values are listed - * below. - * - * @return non-empty-string Returns the interface type, as a lowercase string. - * - * Although not exhaustive, the possible return values include - * apache, - * apache2handler, - * cgi (until PHP 5.3), - * cgi-fcgi, cli, cli-server, - * embed, fpm-fcgi, - * litespeed, - * phpdbg. + * @return non-empty-string * @throws InfoException * */ @@ -479,71 +257,7 @@ function php_sapi_name(): string /** - * This function prints out the credits listing the PHP developers, - * modules, etc. It generates the appropriate HTML codes to insert - * the information in a page. - * - * @param int $flags To generate a custom credits page, you may want to use the - * flags parameter. - * - * - * Pre-defined phpcredits flags - * - * - * - * name - * description - * - * - * - * - * CREDITS_ALL - * - * All the credits, equivalent to using: CREDITS_DOCS + - * CREDITS_GENERAL + CREDITS_GROUP + - * CREDITS_MODULES + CREDITS_FULLPAGE. - * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * - * CREDITS_DOCS - * The credits for the documentation team - * - * - * CREDITS_FULLPAGE - * - * Usually used in combination with the other flags. Indicates - * that a complete stand-alone HTML page needs to be - * printed including the information indicated by the other - * flags. - * - * - * - * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors - * and SAPI module. - * - * - * - * CREDITS_GROUP - * A list of the core developers - * - * - * CREDITS_MODULES - * - * A list of the extension modules for PHP, and their authors - * - * - * - * CREDITS_SAPI - * - * A list of the server API modules for PHP, and their authors - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -558,102 +272,7 @@ function phpcredits(int $flags = CREDITS_ALL): void /** - * Outputs a large amount of information about the current state of PHP. - * This includes information about PHP compilation options and extensions, - * the PHP version, server information and environment (if compiled as a - * module), the PHP environment, OS version information, paths, master and - * local values of configuration options, HTTP headers, and the PHP License. - * - * Because every system is setup differently, phpinfo is - * commonly used to check configuration settings and for available - * predefined variables - * on a given system. - * - * phpinfo is also a valuable debugging tool as it - * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * - * @param int $flags The output may be customized by passing one or more of the - * following constants bitwise values summed - * together in the optional flags parameter. - * One can also combine the respective constants or bitwise values - * together with the bitwise or operator. - * - * - * phpinfo options - * - * - * - * Name (constant) - * Value - * Description - * - * - * - * - * INFO_GENERAL - * 1 - * - * The configuration line, php.ini location, build date, Web - * Server, System and more. - * - * - * - * INFO_CREDITS - * 2 - * - * PHP Credits. See also phpcredits. - * - * - * - * INFO_CONFIGURATION - * 4 - * - * Current Local and Master values for PHP directives. See - * also ini_get. - * - * - * - * INFO_MODULES - * 8 - * - * Loaded modules and their respective settings. See also - * get_loaded_extensions. - * - * - * - * INFO_ENVIRONMENT - * 16 - * - * Environment Variable information that's also available in - * $_ENV. - * - * - * - * INFO_VARIABLES - * 32 - * - * Shows all - * predefined variables from EGPCS (Environment, GET, - * POST, Cookie, Server). - * - * - * - * INFO_LICENSE - * 64 - * - * PHP License information. See also the license FAQ. - * - * - * - * INFO_ALL - * -1 - * - * Shows all of the above. - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -668,12 +287,7 @@ function phpinfo(int $flags = INFO_ALL): void /** - * Adds assignment to the server environment. The - * environment variable will only exist for the duration of the current - * request. At the end of the request the environment is restored to its - * original state. - * - * @param string $assignment The setting, like "FOO=BAR" + * @param string $assignment * @throws InfoException * */ @@ -688,12 +302,8 @@ function putenv(string $assignment): void /** - * Sets the include_path - * configuration option for the duration of the script. - * - * @param string $include_path The new value for the include_path - * @return string Returns the old include_path on - * success. + * @param string $include_path + * @return string * @throws InfoException * */ @@ -709,19 +319,7 @@ function set_include_path(string $include_path): string /** - * Set the number of seconds a script is allowed to run. If this is reached, - * the script returns a fatal error. The default limit is 30 seconds or, if - * it exists, the max_execution_time value defined in the - * php.ini. - * - * When called, set_time_limit restarts the timeout - * counter from zero. In other words, if the timeout is the default 30 - * seconds, and 25 seconds into script execution a call such as - * set_time_limit(20) is made, the script will run for a - * total of 45 seconds before timing out. - * - * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit - * is imposed. + * @param int $seconds * @throws InfoException * */ diff --git a/generated/8.2/inotify.php b/generated/8.2/inotify.php index e5e632b1..8820dde6 100644 --- a/generated/8.2/inotify.php +++ b/generated/8.2/inotify.php @@ -5,10 +5,7 @@ use Safe\Exceptions\InotifyException; /** - * Initialize an inotify instance for use with - * inotify_add_watch - * - * @return resource A stream resource. + * @return resource * @throws InotifyException * */ @@ -24,13 +21,8 @@ function inotify_init() /** - * inotify_rm_watch removes the watch - * watch_descriptor from the inotify instance - * inotify_instance. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param int $watch_descriptor Watch to remove from the instance + * @param resource $inotify_instance + * @param int $watch_descriptor * @throws InotifyException * */ diff --git a/generated/8.2/json.php b/generated/8.2/json.php index 2518fa1e..cafc2923 100644 --- a/generated/8.2/json.php +++ b/generated/8.2/json.php @@ -5,45 +5,10 @@ use Safe\Exceptions\JsonException; /** - * Returns a string containing the JSON representation of the supplied - * value. If the parameter is an array or object, - * it will be serialized recursively. - * - * If a value to be serialized is an object, then by default only publicly visible - * properties will be included. Alternatively, a class may implement JsonSerializable - * to control how its values are serialized to JSON. - * - * The encoding is affected by the supplied flags - * and additionally the encoding of float values depends on the value of - * serialize_precision. - * - * @param mixed $value The value being encoded. Can be any type except - * a resource. - * - * All string data must be UTF-8 encoded. - * - * PHP implements a superset of JSON as specified in the original - * RFC 7159. - * @param int $flags Bitmask consisting of - * JSON_FORCE_OBJECT, - * JSON_HEX_QUOT, - * JSON_HEX_TAG, - * JSON_HEX_AMP, - * JSON_HEX_APOS, - * JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, - * JSON_NUMERIC_CHECK, - * JSON_PARTIAL_OUTPUT_ON_ERROR, - * JSON_PRESERVE_ZERO_FRACTION, - * JSON_PRETTY_PRINT, - * JSON_UNESCAPED_LINE_TERMINATORS, - * JSON_UNESCAPED_SLASHES, - * JSON_UNESCAPED_UNICODE, - * JSON_THROW_ON_ERROR. - * The behaviour of these constants is described on the - * JSON constants page. - * @param positive-int $depth Set the maximum depth. Must be greater than zero. - * @return non-empty-string Returns a JSON encoded string on success. + * @param mixed $value + * @param int $flags + * @param positive-int $depth + * @return non-empty-string * @throws JsonException * */ diff --git a/generated/8.2/ldap.php b/generated/8.2/ldap.php index 9c1b80ef..fbc69ab6 100644 --- a/generated/8.2/ldap.php +++ b/generated/8.2/ldap.php @@ -5,15 +5,8 @@ use Safe\Exceptions\LdapException; /** - * Translate ISO-8859 characters to t61 - * characters. - * - * This function is useful if you have to talk to a legacy - * LDAPv2 server. - * - * @param string $value The text to be translated. - * @return string Return the t61 translation of - * value. + * @param string $value + * @return string * @throws LdapException * */ @@ -29,21 +22,10 @@ function ldap_8859_to_t61(string $value): string /** - * Add entries in the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * - * - * ]]> - * - * - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -62,9 +44,7 @@ function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $cont /** - * Binds to the LDAP directory with specified RDN and password. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password * @throws LdapException @@ -87,16 +67,12 @@ function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password /** - * Compare value of attribute - * with value of same attribute in an LDAP directory entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $attribute The attribute name. - * @param string $value The compared value. - * @param array|null $controls Array of LDAP Controls to send with the request. - * @return bool Returns TRUE if value matches otherwise returns - * FALSE. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $attribute + * @param string $value + * @param array|null $controls + * @return bool * @throws LdapException * */ @@ -116,12 +92,10 @@ function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, str /** - * Retrieve the pagination information send by the server. - * - * @param resource $link An LDAP resource, returned by ldap_connect. + * @param resource $link * @param resource $result - * @param null|string $cookie An opaque structure sent by the server. - * @param int|null $estimated The estimated number of entries to retrieve. + * @param null|string $cookie + * @param int|null $estimated * @throws LdapException * */ @@ -136,15 +110,10 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n /** - * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * - * @param resource $link An LDAP resource, returned by ldap_connect. - * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. - * If true and if the server doesn't support pagination, the search - * will return no result. - * @param string $cookie An opaque structure sent by the server - * (ldap_control_paged_result_response). + * @param resource $link + * @param int $pagesize + * @param bool $iscritical + * @param string $cookie * @throws LdapException * */ @@ -159,12 +128,9 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** - * Returns the number of entries stored in the result of previous search - * operations. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return int Returns number of entries in the result. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return int * @throws LdapException * */ @@ -180,11 +146,9 @@ function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int /** - * Deletes a particular entry in LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array|null $controls * @throws LdapException * */ @@ -203,11 +167,8 @@ function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null /** - * Turns the specified dn, into a more user-friendly - * form, stripping off type names. - * - * @param string $dn The distinguished name of an LDAP entity. - * @return string Returns the user friendly name. + * @param string $dn + * @return string * @throws LdapException * */ @@ -223,17 +184,12 @@ function ldap_dn2ufn(string $dn): string /** - * Performs a PASSWD extended operation. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $user dn of the user to change the password of. - * @param string $old_password The old password of this user. May be ommited depending of server configuration. - * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @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. - * @return bool|string Returns the generated password if new_password is empty or omitted. - * Otherwise returns TRUE on success. + * @param \LDAP\Connection $ldap + * @param string $user + * @param string $old_password + * @param string $new_password + * @param array|null $controls + * @return bool|string * @throws LdapException * */ @@ -249,10 +205,8 @@ function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old /** - * Performs a WHOAMI extended operation and returns the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @return bool|string The data returned by the server. + * @param \LDAP\Connection $ldap + * @return bool|string * @throws LdapException * */ @@ -268,20 +222,13 @@ function ldap_exop_whoami(\LDAP\Connection $ldap) /** - * Performs an extended operation on the specified ldap with - * request_oid the OID of the operation and - * request_data the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, 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 null|string $request_data 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 Array of LDAP Controls to send with the request. - * @param null|string $response_data 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 null|string $response_oid Will be filled with the response OID if provided, usually equal to the request OID. - * @return bool|resource When used with response_data, returns TRUE on success. - * When used without response_data, returns a result identifier. + * @param \LDAP\Connection $ldap + * @param string $request_oid + * @param null|string $request_data + * @param array|null $controls + * @param null|string $response_data + * @param null|string $response_oid + * @return bool|resource * @throws LdapException * */ @@ -307,19 +254,9 @@ function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request /** - * Splits the DN returned by ldap_get_dn and breaks it - * up into its component parts. Each part is known as Relative Distinguished - * Name, or RDN. - * - * @param string $dn The distinguished name of an LDAP entity. - * @param int $with_attrib Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - * @return array Returns an array of all DN components. - * The first element in the array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. + * @param string $dn + * @param int $with_attrib + * @return array * @throws LdapException * */ @@ -335,16 +272,9 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** - * Gets the first attribute in the given entry. Remaining attributes are - * retrieved by calling ldap_next_attribute successively. - * - * Similar to reading entries, attributes are also read one by one from a - * particular entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the first attribute in the entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -360,17 +290,9 @@ function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Returns the entry identifier for first entry in the result. This entry - * identifier is then supplied to ldap_next_entry - * routine to get successive entries from the result. - * - * Entries in the LDAP result are read sequentially using the - * ldap_first_entry and - * ldap_next_entry functions. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return \LDAP\ResultEntry Returns an LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return \LDAP\ResultEntry * @throws LdapException * */ @@ -386,15 +308,7 @@ function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\R /** - * Frees up the memory allocated internally to store the result. All result - * memory will be automatically freed when the script terminates. - * - * Typically all the memory allocated for the LDAP result gets freed at the - * end of the script. In case the script is making successive searches which - * return large result sets, ldap_free_result could be - * called to keep the runtime memory usage by the script low. - * - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. + * @param \LDAP\Result $result * @throws LdapException * */ @@ -409,24 +323,9 @@ function ldap_free_result(\LDAP\Result $result): void /** - * Reads attributes and values from an entry in the search result. - * - * Having located a specific entry in the directory, you can find out what - * information is held for that entry by using this call. You would use this - * call for an application which "browses" directory entries and/or where you - * do not know the structure of the directory entries. In many applications - * you will be searching for a specific attribute such as an email address or - * a surname, and won't care what other data is held. - * - * - * - * - * - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array - * on success and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return array * @throws LdapException * */ @@ -442,11 +341,9 @@ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Finds out the DN of an entry in the result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the DN of the result entry and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -462,23 +359,9 @@ function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string /** - * Reads multiple entries from the given result, and then reading the - * attributes and multiple values. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on - * success. - * - * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - * - * - * - * - * + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return array * @throws LdapException * */ @@ -494,184 +377,9 @@ function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array /** - * Sets value to the value of the specified option. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_REFERRALS - * int - * - * - * - * LDAP_OPT_RESTART - * int - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_NONE - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_PEER - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_ALL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PACKAGE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * - * - * - * - * - * @param mixed $value This will be set to the option value. + * @param \LDAP\Connection $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -686,18 +394,10 @@ function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): v /** - * Reads all the values of the attribute in the entry in the result. - * - * This function is used exactly like ldap_get_values - * except that it handles binary data and not string data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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. + * @return array * @throws LdapException * */ @@ -713,35 +413,10 @@ function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, s /** - * Reads all the values of the attribute in the entry in the result. - * - * This call needs a entry, - * so needs to be preceded by one of the ldap search calls and one - * of the calls to get an individual entry. - * - * You application will either be hard coded to look for certain - * attributes (such as "surname" or "mail") or you will have to use - * the ldap_get_attributes call to work out - * what attributes exist for a given entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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 - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - * - * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * - * - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - * - * + * @return array * @throws LdapException * */ @@ -757,13 +432,10 @@ function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, strin /** - * Adds one or more attribute values to the specified dn. - * To add a whole new object see ldap_add function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -782,14 +454,10 @@ function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Removes one or more attribute values from the specified dn. - * Object deletions are done by the - * ldap_delete function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. + * @param \LDAP\Connection $ldap + * @param string $dn * @param array $entry - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param array|null $controls * @throws LdapException * */ @@ -808,13 +476,10 @@ function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Replaces one or more attributes from the specified dn. - * It may also add or remove attributes. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -833,87 +498,10 @@ function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?arr /** - * Modifies an existing entry in the LDAP directory. Allows detailed - * specification of the modifications to perform. - * - * @param \LDAP\Connection $ldap An LDAP resource, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An 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, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - * - * Possible values for modtype include: - * - * - * LDAP_MODIFY_BATCH_ADD - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE - * - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * - * - * - * LDAP_MODIFY_BATCH_REPLACE - * - * - * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - * - * - * - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * 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|null $controls Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $modifications_info + * @param array|null $controls * @throws LdapException * */ @@ -932,15 +520,9 @@ function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modificati /** - * Retrieves the attributes in an entry. The first call to - * ldap_next_attribute is made with the - * entry returned from - * ldap_first_attribute. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the next attribute in an entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -956,12 +538,10 @@ function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Parse LDAP extended operation data from result object result - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param null|string $response_data Will be filled by the response data. - * @param null|string $response_oid Will be filled by the response OID. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param null|string $response_data + * @param null|string $response_oid * @throws LdapException * */ @@ -976,20 +556,13 @@ function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string & /** - * Parses an LDAP search result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param int|null $error_code A reference to a variable that will be set to the LDAP error code in - * the result, or 0 if no error occurred. - * @param null|string $matched_dn A reference to a variable that will be set to a matched DN if one was - * recognised within the request, otherwise it will be set to NULL. - * @param null|string $error_message A reference to a variable that will be set to the LDAP error message in - * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set - * to all of the referral strings in the result, or an empty array if no - * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param int|null $error_code + * @param null|string $matched_dn + * @param null|string $error_message + * @param array|null $referrals + * @param array|null $controls * @throws LdapException * */ @@ -1004,15 +577,12 @@ function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$ /** - * The entry specified by dn is renamed/moved. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $new_rdn The new RDN. - * @param string $new_parent The new parent/superior entry. - * @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|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $new_rdn + * @param string $new_parent + * @param bool $delete_old_rdn + * @param array|null $controls * @throws LdapException * */ @@ -1031,8 +601,6 @@ function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string /** - * - * * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password @@ -1071,180 +639,9 @@ function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $pas /** - * Sets the value of the specified option to be value. - * - * @param null|resource $ldap Either an LDAP\Connection instance, returned by - * ldap_connect, to set the option for that connection, - * or NULL to set the option globally. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * Available since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - * @param mixed $value The new value for the specified option. + * @param null|resource $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -1259,9 +656,7 @@ function ldap_set_option($ldap, int $option, $value): void /** - * Unbinds from the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @throws LdapException * */ diff --git a/generated/8.2/libxml.php b/generated/8.2/libxml.php index 481d5776..aa6180a3 100644 --- a/generated/8.2/libxml.php +++ b/generated/8.2/libxml.php @@ -5,47 +5,7 @@ use Safe\Exceptions\LibxmlException; /** - * Changes the default external entity loader. - * This can be used to suppress the expansion of arbitrary external entities to avoid XXE attacks, - * even when LIBXML_NOENT has been set for the respective operation, - * and is usually preferable over calling libxml_disable_entity_loader. - * - * @param callable $resolver_function A callable with the following signature: - * - * resourcestringnullresolver - * stringpublic_id - * stringsystem_id - * arraycontext - * - * - * - * public_id - * - * - * The public ID. - * - * - * - * - * system_id - * - * - * The system ID. - * - * - * - * - * context - * - * - * An array with the four elements "directory", "intSubName", - * "extSubURI" and "extSubSystem". - * - * - * - * - * This callable should return a resource, a string from which a resource can be - * opened. If NULL is returned, the entity reference resolution will fail. + * @param callable $resolver_function * @throws LibxmlException * */ diff --git a/generated/8.2/lzf.php b/generated/8.2/lzf.php index 7ea98c4d..0e90111e 100644 --- a/generated/8.2/lzf.php +++ b/generated/8.2/lzf.php @@ -5,11 +5,8 @@ use Safe\Exceptions\LzfException; /** - * lzf_compress compresses the given - * data string using LZF encoding. - * - * @param string $data The string to compress. - * @return string Returns the compressed data. + * @param string $data + * @return string * @throws LzfException * */ @@ -25,11 +22,8 @@ function lzf_compress(string $data): string /** - * lzf_compress decompresses the given - * data string containing lzf encoded data. - * - * @param string $data The compressed string. - * @return string Returns the decompressed data. + * @param string $data + * @return string * @throws LzfException * */ diff --git a/generated/8.2/mailparse.php b/generated/8.2/mailparse.php index 82c75d63..66b6d383 100644 --- a/generated/8.2/mailparse.php +++ b/generated/8.2/mailparse.php @@ -5,24 +5,10 @@ use Safe\Exceptions\MailparseException; /** - * 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. - * - * @param resource $mimemail A valid MIME resource, created with - * mailparse_msg_create. - * @param mixed $filename Can be a file name or a valid stream resource. - * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the - * extracted section, or NULL to make this function return the - * extracted section. - * - * If not specified, the contents will be sent to "stdout". - * @return string If callbackfunc is not NULL returns TRUE on - * success. - * - * If callbackfunc is set to NULL, returns the - * extracted section as a string. + * @param resource $mimemail + * @param mixed $filename + * @param callable $callbackfunc + * @return string * @throws MailparseException * */ @@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba /** - * Frees a MIME resource. - * - * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or - * mailparse_msg_parse_file. + * @param resource $mimemail * @throws MailparseException * */ @@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void /** - * Parses a file. - * This is the optimal way of parsing a mail file that you have on disk. - * - * @param string $filename Path to the file holding the message. - * The file is opened and streamed through the parser. - * - * The message contained in filename is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. - * @return resource Returns a MIME resource representing the structure. + * @param string $filename + * @return resource * @throws MailparseException * */ @@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename) /** - * Incrementally parse data into the supplied mime mail resource. - * - * This function allow you to stream portions of a file at a time, rather - * than read and parse the whole thing. - * - * @param resource $mimemail A valid MIME resource. - * @param string $data The final chunk of data is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. + * @param resource $mimemail + * @param string $data * @throws MailparseException * */ @@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void /** - * Streams data from the source file pointer, apply - * encoding and write to the destination file pointer. - * - * @param resource $sourcefp A valid file handle. The file is streamed through the parser. - * @param resource $destfp The destination file handle in which the encoded data will be written. - * @param string $encoding One of the character encodings supported by the - * mbstring module. + * @param resource $sourcefp + * @param resource $destfp + * @param string $encoding * @throws MailparseException * */ diff --git a/generated/8.2/mbstring.php b/generated/8.2/mbstring.php index c51b6831..1861c94c 100644 --- a/generated/8.2/mbstring.php +++ b/generated/8.2/mbstring.php @@ -5,17 +5,9 @@ use Safe\Exceptions\MbstringException; /** - * Returns a string containing the character specified by the Unicode code point value, - * encoded in the specified encoding. - * - * This function complements mb_ord. - * - * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return string A string containing the requested character, if it can be represented in the specified - * encoding. + * @param int $codepoint + * @param null|string $encoding + * @return string * @throws MbstringException * */ @@ -35,26 +27,10 @@ function mb_chr(int $codepoint, ?string $encoding = null): string /** - * Converts string from from_encoding, - * or the current internal encoding, to to_encoding. - * If string is an array, all its string values will be - * converted recursively. - * - * @param array|string $string The string or array to be converted. - * @param string $to_encoding The desired encoding of the result. - * @param mixed $from_encoding The current encoding used to interpret string. - * Multiple encodings may be specified as an array or comma separated - * list, in which case the correct encoding will be guessed using the - * same algorithm as mb_detect_encoding. - * - * If from_encoding is NULL or not specified, the - * mbstring.internal_encoding setting - * will be used if set, otherwise the default_charset setting. - * - * See supported encodings - * for valid values of to_encoding - * and from_encoding. - * @return array|string The encoded string or array on success. + * @param array|string $string + * @param string $to_encoding + * @param mixed $from_encoding + * @return array|string * @throws MbstringException * */ @@ -74,27 +50,11 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null /** - * Converts - * character encoding of variables var and vars in - * encoding from_encoding to encoding - * to_encoding. - * - * mb_convert_variables join strings in Array - * or Object to detect encoding, since encoding detection tends to - * fail for short strings. Therefore, it is impossible to mix - * encoding in single array or object. - * - * @param string $to_encoding The encoding that the string is being converted to. - * @param array|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 - * is omitted, detect_order is used. - * @param array|object|string $var var is the reference to the - * variable being converted. String, Array and Object are accepted. - * mb_convert_variables assumes all parameters - * have the same encoding. - * @param array|object|string $vars Additional vars. - * @return string The character encoding before conversion for success. + * @param string $to_encoding + * @param array|string $from_encoding + * @param array|object|string $var + * @param array|object|string $vars + * @return string * @throws MbstringException * */ @@ -110,31 +70,8 @@ function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$va /** - * Sets the automatic character - * encoding detection order to encoding. - * - * @param non-empty-list|non-falsy-string|null $encoding encoding is an array or - * comma separated list of character encoding. See supported encodings. - * - * If encoding is omitted or NULL, it returns - * the current character encoding detection order as array. - * - * This setting affects mb_detect_encoding and - * mb_send_mail. - * - * mbstring currently implements the following - * encoding detection filters. If there is an invalid byte sequence - * for the following encodings, encoding detection will fail. - * - * For ISO-8859-*, mbstring - * always detects as ISO-8859-*. - * - * For UTF-16, UTF-32, - * UCS2 and UCS4, encoding - * detection will fail always. - * @return bool|list When setting the encoding detection order, TRUE is returned on success. - * - * When getting the encoding detection order, an ordered array of the encodings is returned. + * @param non-empty-list|non-falsy-string|null $encoding + * @return bool|list * @throws MbstringException * */ @@ -154,10 +91,8 @@ function mb_detect_order($encoding = null) /** - * Returns an array of aliases for a known encoding type. - * - * @param string $encoding The encoding type being checked, for aliases. - * @return list Returns a numerically indexed array of encoding aliases on success + * @param string $encoding + * @return list * @throws MbstringException * */ @@ -173,36 +108,11 @@ function mb_encoding_aliases(string $encoding): array /** - * Scans string for matches to - * pattern, then replaces the matched text - * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, - * except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. - * - * You'll often need the callback function - * for a mb_ereg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * mb_ereg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param callable(array):string $callback + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -222,19 +132,11 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param string $replacement The replacement text. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -254,17 +156,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, ? /** - * Retrieve the result from the last multibyte regular expression match - * - * @return array An array - * including the sub-string of matched part by last - * mb_ereg_search, - * mb_ereg_search_pos, - * mb_ereg_search_regs. If there are some - * matches, the first element will have the matched 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. + * @return array * @throws MbstringException * */ @@ -280,16 +172,9 @@ function mb_ereg_search_getregs(): array /** - * mb_ereg_search_init sets - * string and pattern - * for a multibyte regular expression. These values are used for - * mb_ereg_search, - * mb_ereg_search_pos, and - * mb_ereg_search_regs. - * - * @param string $string The search string. - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. + * @param string $string + * @param null|string $pattern + * @param null|string $options * @throws MbstringException * */ @@ -310,16 +195,9 @@ function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $o /** - * Returns the matched part of a multibyte regular expression. - * - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return array mb_ereg_search_regs executes the multibyte - * regular expression match, and if there are some matched part, it - * 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. + * @param null|string $pattern + * @param null|string $options + * @return array * @throws MbstringException * */ @@ -341,10 +219,7 @@ function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): /** - * mb_ereg_search_setpos sets the starting - * point of a match for mb_ereg_search. - * - * @param int $offset The position to set. If it is negative, it counts from the end of the string. + * @param int $offset * @throws MbstringException * */ @@ -359,17 +234,11 @@ function mb_ereg_search_setpos(int $offset): void /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement. - * - * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. - * @param string $replacement The replacement text. - * @param string $string The searched string. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return string The resultant string. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return string * @throws MbstringException * */ @@ -389,29 +258,8 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, /** - * mb_get_info returns the internal setting parameters of mbstring. - * - * @param string $type If type is not specified or is specified as "all", - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * and "strict_detection" - * will be returned. - * - * If type is specified as - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * or "strict_detection" - * the specified setting parameter will be returned. - * @return mixed An array of type information if type - * is not specified, otherwise a specific type. + * @param string $type + * @return mixed * @throws MbstringException * */ @@ -427,20 +275,8 @@ function mb_get_info(string $type = "all") /** - * Set/Get the HTTP output character encoding. - * Output after this function is called will be converted from the set internal encoding to encoding. - * - * @param null|string $encoding If encoding is set, - * mb_http_output sets the HTTP output character - * encoding to encoding. - * - * If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. - * @return bool|string If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. Otherwise, - * Returns TRUE on success. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -460,18 +296,8 @@ function mb_http_output(?string $encoding = null) /** - * Set/Get the internal character encoding - * - * @param null|string $encoding 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. - * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then - * the current character encoding name is returned. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -491,15 +317,9 @@ function mb_internal_encoding(?string $encoding = null) /** - * Returns the Unicode code point value of the given character. - * - * This function complements mb_chr. - * - * @param string $string A string - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return int The Unicode code point for the first character of string. + * @param string $string + * @param null|string $encoding + * @return int * @throws MbstringException * */ @@ -519,15 +339,8 @@ function mb_ord(string $string, ?string $encoding = null): int /** - * Parses GET/POST/COOKIE data and - * sets global variables. Since PHP does not provide raw POST/COOKIE - * data, it can only be used for GET data for now. It parses URL - * encoded data, detects encoding, converts coding to internal - * encoding and set values to the result array or - * global variables. - * - * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param string $string + * @param array|null $result * @throws MbstringException * */ @@ -542,16 +355,8 @@ function mb_parse_str(string $string, ?array &$result): void /** - * Set/Get character encoding for a multibyte regex. - * - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * 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. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -571,59 +376,11 @@ function mb_regex_encoding(?string $encoding = null) /** - * Sends email. Headers and messages are converted and encoded according - * to the mb_language setting. It's a wrapper function - * for mail, so see also mail for details. - * - * @param string $to The mail addresses being sent to. Multiple - * recipients may be specified by putting a comma between each - * address in to. - * This parameter is not automatically encoded. - * @param string $subject The subject of the mail. - * @param string $message The message of the mail. - * @param array|null|string $additional_headers String or array to be inserted at the end of the email header. - * - * This is typically used to add extra headers (From, Cc, and Bcc). - * Multiple extra headers should be separated with a CRLF (\r\n). - * Validate parameter not to be injected unwanted headers by attackers. - * - * If an array is passed, its keys are the header names and its - * values are the respective header values. - * - * When sending mail, the mail must contain - * a From header. This can be set with the - * additional_headers parameter, or a default - * can be set in php.ini. - * - * Failing to do this will result in an error - * message similar to Warning: mail(): "sendmail_from" not - * set in php.ini or custom "From:" header missing. - * The From header sets also - * Return-Path under Windows. - * - * If messages are not received, try using a LF (\n) only. - * Some Unix mail transfer agents (most notably - * qmail) replace LF by CRLF - * automatically (which leads to doubling CR if CRLF is used). - * This should be a last resort, as it does not comply with - * RFC 2822. - * @param null|string $additional_params additional_params is a MTA command line - * parameter. It is useful when setting the correct Return-Path - * header when using sendmail. - * - * This parameter is escaped by escapeshellcmd internally - * to prevent command execution. escapeshellcmd prevents - * command execution, but allows to add additional parameters. For security reason, - * this parameter should be validated. - * - * Since escapeshellcmd is applied automatically, some characters - * that are allowed as email addresses by internet RFCs cannot be used. Programs - * that are required to use these characters mail cannot be used. - * - * The user that the webserver runs as should be added as a trusted user to the - * sendmail configuration to prevent a 'X-Warning' header from being added - * to the message when the envelope sender (-f) is set using this method. - * For sendmail users, this file is /etc/mail/trusted-users. + * @param string $to + * @param string $subject + * @param string $message + * @param array|null|string $additional_headers + * @param null|string $additional_params * @throws MbstringException * */ @@ -642,17 +399,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ /** - * Split a multibyte - * string using regular expression - * pattern and returns the result as an - * array. - * - * @param string $pattern The regular expression pattern. - * @param string $string The string being split. - * @param int $limit If optional parameter limit is specified, - * it will be split in limit elements as - * maximum. - * @return list The result as an array. + * @param string $pattern + * @param string $string + * @param int $limit + * @return list * @throws MbstringException * */ diff --git a/generated/8.2/misc.php b/generated/8.2/misc.php index 5bbab456..5a8b5453 100644 --- a/generated/8.2/misc.php +++ b/generated/8.2/misc.php @@ -5,26 +5,9 @@ use Safe\Exceptions\MiscException; /** - * Defines a named constant at runtime. - * - * @param string $constant_name The name of the constant. - * - * It is possible to define constants with reserved or - * even invalid names, whose value can (only) be retrieved with - * constant. However, doing so is not recommended. - * @param mixed $value The value of the constant. In PHP 5, value must - * be a scalar value (int, - * float, string, bool, or - * NULL). In PHP 7, array values are also accepted. - * - * While it is possible to define resource constants, it is - * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive 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. - * - * Case-insensitive constants are stored as lower-case. + * @param string $constant_name + * @param mixed $value + * @param bool $case_insensitive * @throws MiscException * */ @@ -39,22 +22,9 @@ function define(string $constant_name, $value, bool $case_insensitive = false): /** - * Prints out or returns a syntax highlighted version of the code contained - * in filename using the colors defined in the - * built-in syntax highlighter for PHP. - * - * Many servers are configured to automatically highlight files - * with a phps extension. For example, - * example.phps when viewed will show the - * syntax highlighted source of the file. To enable this, add this - * line to the httpd.conf: - * - * @param string $filename Path to the PHP file to be highlighted. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $filename + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -70,15 +40,9 @@ function highlight_file(string $filename, bool $return = false) /** - * Outputs or returns html markup for a syntax highlighted version of the given PHP code - * using the colors defined in the built-in syntax highlighter for PHP. - * - * @param string $string The PHP code to be highlighted. This should include the opening tag. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $string + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -94,16 +58,8 @@ function highlight_string(string $string, bool $return = false) /** - * Returns the system's high resolution time, counted from an arbitrary point in time. - * The delivered timestamp is monotonic and can not be adjusted. - * - * @param bool $as_number Whether the high resolution time should be returned as array - * or number. - * @return array{0:int,1:int}|float|int Returns an array of integers in the form [seconds, nanoseconds], if the - * parameter as_number is false. Otherwise the nanoseconds - * are returned as int (64bit platforms) or float - * (32bit platforms). - * Returns FALSE on failure. + * @param bool $as_number + * @return array{0:int,1:int}|float|int * @throws MiscException * */ @@ -119,156 +75,9 @@ function hrtime(bool $as_number = false) /** - * Pack given arguments into a binary string according to - * format. - * - * The idea for this function was taken from Perl and all formatting codes - * work the same as in Perl. However, there are some formatting codes that are - * missing such as Perl's "u" format code. - * - * Note that the distinction between signed and unsigned values only - * affects the function unpack, where as - * function pack gives the same result for - * signed and unsigned format codes. - * - * @param string $format The format string consists of format codes - * followed by an optional repeater argument. The repeater argument can - * be either an integer value or * for repeating to - * the end of the input data. For a, A, h, H the repeat count specifies - * how many characters of one data argument are taken, for @ it is the - * absolute position where to put the next data, for everything else the - * repeat count specifies how many data arguments are consumed and packed - * into the resulting binary string. - * - * Currently implemented formats are: - * - * pack format characters - * - * - * - * Code - * Description - * - * - * - * - * a - * NUL-padded string - * - * - * A - * SPACE-padded string - * - * h - * Hex string, low nibble first - * - * H - * Hex string, high nibble first - * csigned char - * - * C - * unsigned char - * - * s - * signed short (always 16 bit, machine byte order) - * - * - * S - * unsigned short (always 16 bit, machine byte order) - * - * - * n - * unsigned short (always 16 bit, big endian byte order) - * - * - * v - * unsigned short (always 16 bit, little endian byte order) - * - * - * i - * signed integer (machine dependent size and byte order) - * - * - * I - * unsigned integer (machine dependent size and byte order) - * - * - * l - * signed long (always 32 bit, machine byte order) - * - * - * L - * unsigned long (always 32 bit, machine byte order) - * - * - * N - * unsigned long (always 32 bit, big endian byte order) - * - * - * V - * unsigned long (always 32 bit, little endian byte order) - * - * - * q - * signed long long (always 64 bit, machine byte order) - * - * - * Q - * unsigned long long (always 64 bit, machine byte order) - * - * - * J - * unsigned long long (always 64 bit, big endian byte order) - * - * - * P - * unsigned long long (always 64 bit, little endian byte order) - * - * - * f - * float (machine dependent size and representation) - * - * - * g - * float (machine dependent size, little endian byte order) - * - * - * G - * float (machine dependent size, big endian byte order) - * - * - * d - * double (machine dependent size and representation) - * - * - * e - * double (machine dependent size, little endian byte order) - * - * - * E - * double (machine dependent size, big endian byte order) - * - * - * x - * NUL byte - * - * - * X - * Back up one byte - * - * - * Z - * NUL-padded string - * - * - * @ - * NUL-fill to absolute position - * - * - * - * + * @param string $format * @param mixed $values - * @return string Returns a binary string containing data. + * @return string * @throws MiscException * */ @@ -288,15 +97,10 @@ function pack(string $format, ...$values): string /** - * Convert string from one codepage to another. - * - * @param int|string $in_codepage The codepage of the subject string. - * Either the codepage name or identifier. - * @param int|string $out_codepage The codepage to convert the subject string to. - * Either the codepage name or identifier. - * @param string $subject The string to convert. - * @return string The subject string converted to - * out_codepage. + * @param int|string $in_codepage + * @param int|string $out_codepage + * @param string $subject + * @return string * @throws MiscException * */ @@ -312,9 +116,7 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str /** - * Set the codepage of the current process. - * - * @param int $codepage A codepage identifier. + * @param int $codepage * @throws MiscException * */ @@ -329,13 +131,8 @@ function sapi_windows_cp_set(int $codepage): void /** - * Sends a CTRL event to another process in the same process group. - * - * @param int $event The CTRL even to send; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * @param int $pid The ID of the process to which to send the event to. If 0 - * is given, the event is sent to all processes of the process group. + * @param int $event + * @param int $pid * @throws MiscException * */ @@ -350,35 +147,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void /** - * Sets or removes a CTRL event handler, which allows Windows - * CLI processes to intercept or ignore CTRL+C and - * CTRL+BREAK events. Note that in multithreaded environments, - * this is only possible when called from the main thread. - * - * @param callable|null $handler A callback function to set or remove. If set, this function will be called - * whenever a CTRL+C or CTRL+BREAK event - * occurs. The function is supposed to have the following signature: - * - * voidhandler - * intevent - * - * - * - * event - * - * - * The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * - * - * - * - * Setting a NULL handler causes the process to ignore - * CTRL+C events, but not CTRL+BREAK events. - * @param bool $add The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param callable|null $handler + * @param bool $add * @throws MiscException * */ @@ -393,18 +163,8 @@ function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): vo /** - * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled. - * - * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. - * If the feature has been successfully enabled (or disabled). - * - * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * - * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. - * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. - * - * @param resource $stream The stream on which the function will operate. - * @param bool|null $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @param resource $stream + * @param bool|null $enable * @throws MiscException * */ @@ -423,18 +183,8 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): void /** - * Delays the program execution for the given number of - * seconds. - * - * @param int $seconds Halt time in seconds (must be greater than or equal to 0). - * @return false|int Returns zero on success. - * - * If the call was interrupted by a signal, sleep returns - * a non-zero value. On Windows, this value will always be - * 192 (the value of the - * WAIT_IO_COMPLETION constant within the Windows API). - * On other platforms, the return value will be the number of seconds left to - * sleep. + * @param int $seconds + * @return false|int * */ function sleep(int $seconds) @@ -446,29 +196,9 @@ function sleep(int $seconds) /** - * Delays program execution for the given number of - * seconds and nanoseconds. - * - * @param int $seconds Must be a non-negative integer. - * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool Returns TRUE on success. - * - * If the delay was interrupted by a signal, an associative array will be - * returned with the components: - * - * - * - * seconds - number of seconds remaining in - * the delay - * - * - * - * - * nanoseconds - number of nanoseconds - * remaining in the delay - * - * - * + * @param int $seconds + * @param int $nanoseconds + * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool * @throws MiscException * */ @@ -484,10 +214,7 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** - * Makes the script sleep until the specified - * timestamp. - * - * @param float $timestamp The timestamp when the script should wake. + * @param float $timestamp * @throws MiscException * */ @@ -502,35 +229,10 @@ function time_sleep_until(float $timestamp): void /** - * Unpacks from a binary string into an array according to the given - * format. - * - * The unpacked data is stored in an associative array. To - * accomplish this you have to name the different format codes and - * separate them by a slash /. If a repeater argument is present, - * then each of the array keys will have a sequence number behind - * the given name. - * - * Changes were made to bring this function into line with Perl: - * - * - * The "a" code now retains trailing NULL bytes. - * - * - * The "A" code now strips all trailing ASCII whitespace (spaces, tabs, - * newlines, carriage returns, and NULL bytes). - * - * - * The "Z" code was added for NULL-padded strings, and removes trailing - * NULL bytes. - * - * - * - * @param string $format See pack for an explanation of the format codes. - * @param string $string The packed data. - * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary - * string. + * @param string $format + * @param string $string + * @param int $offset + * @return array * @throws MiscException * */ diff --git a/generated/8.2/mysql.php b/generated/8.2/mysql.php index 559a8190..f96eb641 100644 --- a/generated/8.2/mysql.php +++ b/generated/8.2/mysql.php @@ -5,24 +5,7 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened - * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see - * freeing resources - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no connection is found or - * established, an E_WARNING level error is - * generated. + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -37,39 +20,12 @@ function mysql_close($link_identifier = null): void /** - * Opens or reuses a connection to a MySQL server. - * - * @param string $server 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 SQL safe mode, this parameter is ignored - * and value 'localhost:3306' is always used. - * @param string $username The username. Default value is defined by mysql.default_user. In - * SQL safe mode, this parameter is ignored and the name of the user that - * owns the server process is used. - * @param string $password The password. Default value is defined by mysql.default_password. In - * SQL safe mode, this parameter is ignored and empty password is used. - * @param bool $new_link If a second call is made to mysql_connect - * with the same arguments, no new link will be established, but - * instead, the link identifier of the already opened link will be - * returned. The new_link parameter modifies this - * behavior and makes mysql_connect always open - * a new link, even if mysql_connect was called - * before with the same parameters. - * In SQL safe mode, this parameter is ignored. - * @param int $client_flags The client_flags parameter can be a combination - * of the following constants: - * 128 (enable LOAD DATA LOCAL handling), - * MYSQL_CLIENT_SSL, - * MYSQL_CLIENT_COMPRESS, - * MYSQL_CLIENT_IGNORE_SPACE or - * MYSQL_CLIENT_INTERACTIVE. - * Read the section about for further information. - * In SQL safe mode, this parameter is ignored. - * @return resource Returns a MySQL link identifier on success. + * @param string $server + * @param string $username + * @param string $password + * @param bool $new_link + * @param int $client_flags + * @return resource * @throws MysqlException * */ @@ -97,17 +53,8 @@ function mysql_connect(?string $server = null, ?string $username = null, ?string /** - * mysql_create_db attempts to create a new - * database on the server associated with the specified link - * identifier. - * - * @param string $database_name The name of the database being created. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -122,23 +69,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void /** - * mysql_data_seek moves the internal row - * pointer of the MySQL result associated with the specified result - * identifier to point to the specified row number. The next call - * to a MySQL fetch function, such as mysql_fetch_assoc, - * would return that row. - * - * row_number starts at 0. The - * row_number should be a value in the range from 0 to - * mysql_num_rows - 1. However if the result set - * is empty (mysql_num_rows == 0), a seek to 0 will - * fail with an E_WARNING and - * mysql_data_seek will return FALSE. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row_number The desired row number of the new result pointer. + * @param resource $result + * @param int $row_number * @throws MysqlException * */ @@ -153,15 +85,10 @@ function mysql_data_seek($result, int $row_number): void /** - * Retrieve the database name from a call to - * mysql_list_dbs. - * - * @param resource $result The result pointer from a call to mysql_list_dbs. - * @param int $row The index into the result set. - * @param mixed $field The field name. - * @return string Returns the database name on success. If FALSE - * is returned, use mysql_error to determine the nature - * of the error. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -177,22 +104,10 @@ function mysql_db_name($result, int $row, $field = null): string /** - * mysql_db_query selects a database, and executes a - * query on it. - * - * @param string $database The name of the database that will be selected. - * @param string $query The MySQL query. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for - * INSERT/UPDATE/DELETE - * queries to indicate success/failure. + * @param string $database + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -208,19 +123,8 @@ function mysql_db_query(string $database, string $query, $link_identifier = null /** - * mysql_drop_db attempts to drop (remove) an - * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql - * DROP DATABASE statement instead. - * - * @param string $database_name The name of the database that will be deleted. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -235,21 +139,8 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void /** - * Returns an array that corresponds to the lengths of each field - * in the last row fetched by MySQL. - * - * mysql_fetch_lengths stores the lengths of - * each result column in the last row returned by - * mysql_fetch_row, - * mysql_fetch_assoc, - * mysql_fetch_array, and - * mysql_fetch_object in an array, starting at - * offset 0. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return array An array of lengths on success. + * @param resource $result + * @return array * @throws MysqlException * */ @@ -265,27 +156,9 @@ function mysql_fetch_lengths($result): array /** - * mysql_field_flags returns the field flags of - * the specified field. The flags are reported as a single word - * per flag separated by a single space, so that you can split the - * returned value using explode. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string Returns a string of flags associated with the result. - * - * 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", - * "unsigned", "zerofill", - * "binary", "enum", - * "auto_increment" and "timestamp". + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -301,17 +174,9 @@ function mysql_field_flags($result, int $field_offset): string /** - * mysql_field_len returns the length of the - * specified field. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return int The length of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return int * @throws MysqlException * */ @@ -327,17 +192,9 @@ function mysql_field_len($result, int $field_offset): int /** - * mysql_field_name returns the name of the - * specified field index. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string The name of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -353,18 +210,8 @@ function mysql_field_name($result, int $field_offset): string /** - * Seeks to the specified field offset. If the next call to - * mysql_fetch_field doesn't include a field - * offset, the field offset specified in - * mysql_field_seek will be returned. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. + * @param resource $result + * @param int $field_offset * @throws MysqlException * */ @@ -379,17 +226,7 @@ function mysql_field_seek($result, int $field_offset): void /** - * mysql_free_result will free all memory - * associated with the result identifier result. - * - * mysql_free_result only needs to be called if - * you are concerned about how much memory is being used for queries - * that return large result sets. All associated result memory is - * automatically freed at the end of the script's execution. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. + * @param resource $result * @throws MysqlException * */ @@ -404,17 +241,8 @@ function mysql_free_result($result): void /** - * Describes the type of connection in use for the connection, including the - * server host name. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns a string describing the type of MySQL connection in use for the - * connection. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -430,15 +258,8 @@ function mysql_get_host_info($link_identifier = null): string /** - * Retrieves the MySQL protocol. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int Returns the MySQL protocol on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -454,15 +275,8 @@ function mysql_get_proto_info($link_identifier = null): int /** - * Retrieves the MySQL server version. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the MySQL server version on success. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -478,17 +292,8 @@ function mysql_get_server_info($link_identifier = null): string /** - * Returns detailed information about the last query. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns information about the statement on success. See the example below for which statements provide information, - * and what the returned value may look like. Statements that are not listed - * will return FALSE. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -504,18 +309,8 @@ function mysql_info($link_identifier = null): string /** - * Returns a result pointer containing the databases available from the - * current mysql daemon. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse - * this result pointer, or any function for result tables, such as - * mysql_fetch_array. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -531,26 +326,10 @@ function mysql_list_dbs($link_identifier = null) /** - * Retrieves information about the given table name. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW COLUMNS FROM - * table [LIKE 'name'] statement instead. - * - * @param string $database_name The name of the database that's being queried. - * @param string $table_name The name of the table that's being queried. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * The returned result can be used with mysql_field_flags, - * mysql_field_len, - * mysql_field_name and - * mysql_field_type. + * @param string $database_name + * @param string $table_name + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -566,15 +345,8 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden /** - * Retrieves the current MySQL server threads. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -590,24 +362,9 @@ function mysql_list_processes($link_identifier = null) /** - * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param string $database The name of the database - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param string $database + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -623,13 +380,8 @@ function mysql_list_tables(string $database, $link_identifier = null) /** - * Retrieves the number of fields from a query. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int Returns the number of fields in the result set resource on - * success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -645,15 +397,8 @@ function mysql_num_fields($result): int /** - * Retrieves the number of rows from a result set. This command is only valid - * for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or - * DELETE query, use mysql_affected_rows. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int The number of rows in a result set on success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -669,41 +414,9 @@ function mysql_num_rows($result): int /** - * mysql_query sends a unique query (multiple queries - * are not supported) to the currently - * active database on the server that's associated with the - * specified link_identifier. - * - * @param string $query An SQL query - * - * The query string should not end with a semicolon. - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, - * mysql_query - * returns a resource on success. - * - * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, - * mysql_query returns TRUE on success. - * - * The returned result resource should be passed to - * mysql_fetch_array, and other - * functions for dealing with result tables, to access the returned data. - * - * Use mysql_num_rows to find out how many rows - * were returned for a SELECT statement or - * mysql_affected_rows to find out how many - * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - * statement. - * - * mysql_query will also fail and return FALSE - * if the user does not have permission to access the table(s) referenced by - * the query. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -719,28 +432,9 @@ function mysql_query(string $query, $link_identifier = null) /** - * Escapes special characters in the unescaped_string, - * taking into account the current character set of the connection so that it - * is safe to place it in a mysql_query. If binary data - * is to be inserted, this function must be used. - * - * mysql_real_escape_string calls MySQL's library function - * mysql_real_escape_string, which prepends backslashes to the following characters: - * \x00, \n, - * \r, \, ', - * " and \x1a. - * - * This function must always (with few exceptions) be used to make data - * safe before sending a query to MySQL. - * - * @param string $unescaped_string The string that is to be escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the escaped string. + * @param string $unescaped_string + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -756,28 +450,10 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n /** - * Retrieves the contents of one cell from a MySQL result set. - * - * When working on large result sets, you should consider using one - * of the functions that fetch an entire row (specified below). As - * these functions return the contents of multiple cells in one - * function call, they're MUCH quicker than - * mysql_result. Also, note that specifying a - * numeric offset for the field argument is much quicker than - * specifying a fieldname or tablename.fieldname argument. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row The row number from the result that's being retrieved. Row numbers - * start at 0. - * @param mixed $field 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 - * dot field name (tablename.fieldname). If the column name has been - * 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. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -793,17 +469,8 @@ function mysql_result($result, int $row, $field = 0): string /** - * Sets the current active database on the server that's associated with the - * specified link identifier. Every subsequent call to - * mysql_query will be made on the active database. - * - * @param string $database_name The name of the database that is to be selected. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -818,15 +485,8 @@ function mysql_select_db(string $database_name, $link_identifier = null): void /** - * Sets the default character set for the current connection. - * - * @param string $charset A valid character set name. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $charset + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -841,20 +501,9 @@ function mysql_set_charset(string $charset, $link_identifier = null): void /** - * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from - * mysql_list_tables. - * @param int $i The integer index (row/table number) - * @return string The name of the table on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param resource $result + * @param int $i + * @return string * @throws MysqlException * */ @@ -870,17 +519,8 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will - * change. This means only retrieve the thread ID when needed. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int The thread ID on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -896,34 +536,9 @@ function mysql_thread_id($link_identifier = null): int /** - * mysql_unbuffered_query sends the SQL query - * query to MySQL without automatically - * fetching and buffering the result rows as - * mysql_query does. This saves a considerable - * amount of memory with SQL queries that produce large result sets, - * and you can start working on the result set immediately after the - * first row has been retrieved as you don't have to wait until the - * complete SQL query has been performed. To use - * mysql_unbuffered_query while multiple database - * connections are open, you must specify the optional parameter - * link_identifier to identify which connection - * you want to use. - * - * @param string $query The SQL query to execute. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query - * returns a resource on success. - * - * For other type of SQL statements, UPDATE, DELETE, DROP, etc, - * mysql_unbuffered_query returns TRUE on success. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ diff --git a/generated/8.2/mysqli.php b/generated/8.2/mysqli.php index 8eb49159..b6c6660f 100644 --- a/generated/8.2/mysqli.php +++ b/generated/8.2/mysqli.php @@ -5,9 +5,7 @@ use Safe\Exceptions\MysqliException; /** - * Returns client per-process statistics. - * - * @return array|false Returns an array with client stats. + * @return array|false * */ function mysqli_get_client_stats() diff --git a/generated/8.2/network.php b/generated/8.2/network.php index d52ae368..e2d37215 100644 --- a/generated/8.2/network.php +++ b/generated/8.2/network.php @@ -5,9 +5,6 @@ use Safe\Exceptions\NetworkException; /** - * closelog closes the descriptor being used to write to - * the system logger. The use of closelog is optional. - * * @throws NetworkException * */ @@ -22,227 +19,12 @@ function closelog(): void /** - * Fetch DNS Resource Records associated with the given - * hostname. - * - * @param string $hostname hostname should be a valid DNS hostname such - * as "www.example.com". Reverse lookups can be generated - * using in-addr.arpa notation, but - * gethostbyaddr is more suitable for - * the majority of reverse lookups. - * - * Per DNS standards, email addresses are given in user.host format (for - * example: hostmaster.example.com as opposed to hostmaster@example.com), - * be sure to check this value and modify if necessary before using it - * with a functions such as mail. - * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. - * To limit the query, specify the optional type - * parameter. May be any one of the following: - * DNS_A, DNS_CNAME, - * DNS_HINFO, DNS_CAA, - * DNS_MX, DNS_NS, - * DNS_PTR, DNS_SOA, - * DNS_TXT, DNS_AAAA, - * DNS_SRV, DNS_NAPTR, - * DNS_A6, DNS_ALL - * or DNS_ANY. - * - * Because of eccentricities in the performance of libresolv - * between platforms, DNS_ANY will not - * always return every record, the slower DNS_ALL - * will collect all records more reliably. - * - * Windows: DNS_CAA is not supported. - * Support for DNS_A6 is not implemented. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource - * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any - * Additional Records. - * @param bool $raw The type will be interpreted as a raw DNS type ID - * (the DNS_* constants cannot be used). - * The return value will contain a data key, which needs - * to be manually parsed. - * @return list This function returns an array of associative arrays. Each associative array contains - * at minimum the following keys: - * - * Basic DNS attributes - * - * - * - * Attribute - * Meaning - * - * - * - * - * host - * - * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * - * class - * - * dns_get_record only returns Internet class records and as - * such this parameter will always return IN. - * - * - * - * type - * - * String containing the record type. Additional attributes will also be contained - * in the resulting array dependant on the value of type. See table below. - * - * - * - * ttl - * - * "Time To Live" remaining for this record. This will not equal - * the record's original ttl, but will rather equal the original ttl minus whatever - * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * - * Other keys in associative arrays dependant on 'type' - * - * - * - * Type - * Extra Columns - * - * - * - * - * A - * - * ip: An IPv4 addresses in dotted decimal notation. - * - * - * - * MX - * - * pri: Priority of mail exchanger. - * Lower numbers indicate greater priority. - * target: FQDN of the mail exchanger. - * See also dns_get_mx. - * - * - * - * CNAME - * - * target: FQDN of location in DNS namespace to which - * the record is aliased. - * - * - * - * NS - * - * target: FQDN of the name server which is authoritative - * for this hostname. - * - * - * - * PTR - * - * target: Location within the DNS namespace to which - * this record points. - * - * - * - * TXT - * - * txt: Arbitrary string data associated with this record. - * - * - * - * HINFO - * - * cpu: IANA number designating the CPU of the machine - * referenced by this record. - * os: IANA number designating the Operating System on - * the machine referenced by this record. - * See IANA's Operating System - * Names for the meaning of these values. - * - * - * - * CAA - * - * flags: A one-byte bitfield; currently only bit 0 is defined, - * meaning 'critical'; other bits are reserved and should be ignored. - * tag: The CAA tag name (alphanumeric ASCII string). - * value: The CAA tag value (binary string, may use subformats). - * For additional information see: RFC 6844 - * - * - * - * SOA - * - * mname: FQDN of the machine from which the resource - * records originated. - * rname: Email address of the administrative contact - * for this domain. - * serial: Serial # of this revision of the requested - * domain. - * refresh: Refresh interval (seconds) secondary name - * servers should use when updating remote copies of this domain. - * retry: Length of time (seconds) to wait after a - * failed refresh before making a second attempt. - * expire: Maximum length of time (seconds) a secondary - * DNS server should retain remote copies of the zone data without a - * successful refresh before discarding. - * minimum-ttl: Minimum length of time (seconds) a - * client can continue to use a DNS resolution before it should request - * a new resolution from the server. Can be overridden by individual - * resource records. - * - * - * - * AAAA - * - * ipv6: IPv6 address - * - * - * - * A6 - * - * masklen: Length (in bits) to inherit from the target - * specified by chain. - * ipv6: Address for this specific record to merge with - * chain. - * chain: Parent record to merge with - * ipv6 data. - * - * - * - * SRV - * - * pri: (Priority) lowest priorities should be used first. - * weight: Ranking to weight which of commonly prioritized - * targets should be chosen at random. - * target and port: hostname and port - * where the requested service can be found. - * For additional information see: RFC 2782 - * - * - * - * NAPTR - * - * order and pref: Equivalent to - * pri and weight above. - * flags, services, regex, - * and replacement: Parameters as defined by - * RFC 2915. - * - * - * - * - * + * @param string $hostname + * @param int $type + * @param array|null $authoritative_name_servers + * @param array|null $additional_records + * @param bool $raw + * @return list * @throws NetworkException * */ @@ -258,51 +40,12 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authorit /** - * Initiates a socket connection to the resource specified by - * hostname. - * - * PHP supports targets in the Internet and Unix domains as described in - * . A list of supported transports can also be - * retrieved using stream_get_transports. - * - * The socket will by default be opened in blocking mode. You can - * switch it to non-blocking mode by using - * stream_set_blocking. - * - * The function stream_socket_client is similar but - * provides a richer set of options, including non-blocking connection and the - * ability to provide a stream context. - * - * @param string $hostname If OpenSSL support is - * installed, you may prefix the hostname - * with either ssl:// or tls:// to - * use an SSL or TLS client connection over TCP/IP to connect to the - * remote host. - * @param int $port The port number. This can be omitted and skipped with - * -1 for transports that do not use ports, such as - * unix://. - * @param int|null $error_code If provided, holds the system level error number that occurred in the - * system-level connect() call. - * - * If the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the - * connect() call. This is most likely due to a - * problem initializing the socket. - * @param null|string $error_message The error message as a string. - * @param float|null $timeout The connection timeout, in seconds. When NULL, the - * default_socket_timeout php.ini setting is used. - * - * If you need to set a timeout for reading/writing data over the - * socket, use stream_set_timeout, as the - * timeout parameter to - * fsockopen only applies while connecting the - * socket. - * @return resource fsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). If the call fails, it will return FALSE + * @param string $hostname + * @param int $port + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @return resource * @throws NetworkException * */ @@ -322,11 +65,7 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? /** - * gethostname gets the standard host name for - * the local machine. - * - * @return string Returns a string with the hostname on success, otherwise FALSE is - * returned. + * @return string * @throws NetworkException * */ @@ -342,12 +81,8 @@ function gethostname(): string /** - * getprotobyname returns the protocol number - * associated with the protocol protocol as per - * /etc/protocols. - * - * @param string $protocol The protocol name. - * @return int Returns the protocol number. + * @param string $protocol + * @return int * @throws NetworkException * */ @@ -363,12 +98,8 @@ function getprotobyname(string $protocol): int /** - * getprotobynumber returns the protocol name - * associated with protocol protocol as per - * /etc/protocols. - * - * @param int $protocol The protocol number. - * @return string Returns the protocol name as a string. + * @param int $protocol + * @return string * @throws NetworkException * */ @@ -384,14 +115,9 @@ function getprotobynumber(int $protocol): string /** - * getservbyport returns the Internet service - * associated with port for the specified - * protocol as per /etc/services. - * - * @param int $port The port number. - * @param string $protocol protocol is either "tcp" - * or "udp" (in lowercase). - * @return string Returns the Internet service name as a string. + * @param int $port + * @param string $protocol + * @return string * @throws NetworkException * */ @@ -407,14 +133,7 @@ function getservbyport(int $port, string $protocol): string /** - * Registers a function that will be called when PHP starts sending output. - * - * The callback is executed just after PHP prepares all - * headers to be sent, and before any other output is sent, creating a window - * to manipulate the outgoing headers before being sent. - * - * @param callable $callback Function called just before the headers are sent. It gets no parameters - * and the return value is ignored. + * @param callable $callback * @throws NetworkException * */ @@ -429,12 +148,8 @@ function header_register_callback(callable $callback): void /** - * This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * string representation. - * - * @param string $ip A 32bit IPv4, or 128bit IPv6 address. - * @return string Returns a string representation of the address. + * @param string $ip + * @return string * @throws NetworkException * */ @@ -450,15 +165,8 @@ function inet_ntop(string $ip): string /** - * This function converts a human readable IPv4 or IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * 32bit or 128bit binary structure. - * - * @param string $ip A human readable IPv4 or IPv6 address. - * @return string Returns the in_addr representation of the given - * ip, or FALSE if a syntactically invalid - * ip is given (for example, an IPv4 address - * without dots or an IPv6 address without colons). + * @param string $ip + * @return string * @throws NetworkException * */ @@ -474,12 +182,8 @@ function inet_pton(string $ip): string /** - * The function long2ip generates an Internet address - * in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer - * representation. - * - * @param int $ip A proper address representation in long integer. - * @return string Returns the Internet IP address as a string. + * @param int $ip + * @return string * @throws NetworkException * */ @@ -495,96 +199,7 @@ function long2ip(int $ip): string /** - * Returns an enumeration of network interfaces (adapters) on the local machine. - * - * @return array Returns an associative array where the key is the name of the interface and - * the value an associative array of interface attributes. - * - * Each interface associative array contains: - * - * Interface attributes - * - * - * - * Name - * Description - * - * - * - * - * description - * - * Optional string value for description of the interface. - * Windows only. - * - * - * - * mac - * - * Optional string value for MAC address of the interface. - * Windows only. - * - * - * - * mtu - * - * Integer value for Maximum transmission unit (MTU) of the interface. - * Windows only. - * - * - * - * unicast - * - * Array of associative arrays, see Unicast attributes below. - * - * - * - * up - * - * Boolean status (on/off) for interface. - * - * - * - * - * - * - * - * Unicast attributes - * - * - * - * Name - * Description - * - * - * - * - * flags - * - * Integer value. - * - * - * - * family - * - * Integer value. - * - * - * - * address - * - * String value for address in either IPv4 or IPv6. - * - * - * - * netmask - * - * String value for netmask in either IPv4 or IPv6. - * - * - * - * - * + * @return array * @throws NetworkException * */ @@ -600,134 +215,9 @@ function net_get_interfaces(): array /** - * openlog opens a connection to the system - * logger for a program. - * - * The use of openlog is optional. It - * will automatically be called by syslog if - * necessary, in which case prefix will default - * to FALSE. - * - * @param string $prefix The string prefix is added to each message. - * @param int $flags The flags argument is used to indicate - * what logging options will be used when generating a log message. - * - * openlog Options - * - * - * - * Constant - * Description - * - * - * - * - * LOG_CONS - * - * if there is an error while sending data to the system logger, - * write directly to the system console - * - * - * - * LOG_NDELAY - * - * open the connection to the logger immediately - * - * - * - * LOG_ODELAY - * - * (default) delay opening the connection until the first - * message is logged - * - * - * - * LOG_PERROR - * print log message also to standard error - * - * - * LOG_PID - * include PID with each message - * - * - * - * - * You can use one or more of these options. When using multiple options - * you need to OR them, i.e. to open the connection - * immediately, write to the console and include the PID in each message, - * you will use: LOG_CONS | LOG_NDELAY | LOG_PID - * @param int $facility The facility argument is used to specify what - * type of program is logging the message. This allows you to specify - * (in your machine's syslog configuration) how messages coming from - * different facilities will be handled. - * - * openlog Facilities - * - * - * - * Constant - * Description - * - * - * - * - * LOG_AUTH - * - * security/authorization messages (use - * LOG_AUTHPRIV instead - * in systems where that constant is defined) - * - * - * - * LOG_AUTHPRIV - * security/authorization messages (private) - * - * - * LOG_CRON - * clock daemon (cron and at) - * - * - * LOG_DAEMON - * other system daemons - * - * - * LOG_KERN - * kernel messages - * - * - * LOG_LOCAL0 ... LOG_LOCAL7 - * reserved for local use, these are not available in Windows - * - * - * LOG_LPR - * line printer subsystem - * - * - * LOG_MAIL - * mail subsystem - * - * - * LOG_NEWS - * USENET news subsystem - * - * - * LOG_SYSLOG - * messages generated internally by syslogd - * - * - * LOG_USER - * generic user-level messages - * - * - * LOG_UUCP - * UUCP subsystem - * - * - * - * - * - * LOG_USER is the only valid log type under Windows - * operating systems + * @param string $prefix + * @param int $flags + * @param int $facility * @throws NetworkException * */ @@ -742,20 +232,12 @@ function openlog(string $prefix, int $flags, int $facility): void /** - * This function behaves exactly as fsockopen with the - * difference that the connection is not closed after the script finishes. - * It is the persistent version of fsockopen. - * * @param string $hostname * @param int $port * @param int|null $error_code * @param null|string $error_message * @param float|null $timeout - * @return resource pfsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @return resource * @throws NetworkException * */ @@ -775,64 +257,8 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, /** - * syslog generates a log message that will be - * distributed by the system logger. - * - * For information on setting up a user defined log handler, see the - * syslog.conf - * 5 Unix manual page. More - * information on the syslog facilities and option can be found in the man - * pages for syslog - * 3 on Unix machines. - * - * @param int $priority priority is a combination of the facility and - * the level. Possible values are: - * - * syslog Priorities (in descending order) - * - * - * - * Constant - * Description - * - * - * - * - * LOG_EMERG - * system is unusable - * - * - * LOG_ALERT - * action must be taken immediately - * - * - * LOG_CRIT - * critical conditions - * - * - * LOG_ERR - * error conditions - * - * - * LOG_WARNING - * warning conditions - * - * - * LOG_NOTICE - * normal, but significant, condition - * - * - * LOG_INFO - * informational message - * - * - * LOG_DEBUG - * debug-level message - * - * - * - * - * @param string $message The message to send. + * @param int $priority + * @param string $message * @throws NetworkException * */ diff --git a/generated/8.2/oci8.php b/generated/8.2/oci8.php index 85acf026..e1235f27 100644 --- a/generated/8.2/oci8.php +++ b/generated/8.2/oci8.php @@ -5,99 +5,12 @@ use Safe\Exceptions\Oci8Exception; /** - * Binds the PHP array var to the Oracle - * placeholder param, which points to an Oracle PL/SQL - * array. Whether it will be used for input or output will be determined at - * run-time. - * - * @param resource $statement A valid OCI statement identifier. - * @param string $param The Oracle placeholder. - * @param array $var An array. - * @param int $max_array_length Sets the maximum length both for incoming and result arrays. - * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, - * oci_bind_array_by_name will find the longest - * element in the incoming array and will use it as the maximum length. - * @param int $type Should be used to set the type of PL/SQL array items. See list of - * available types below: - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * - * - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * - * - * - * SQLT_FLT - for arrays of FLOAT. - * - * - * - * - * SQLT_AFC - for arrays of CHAR. - * - * - * - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * - * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * - * SQLT_AVC - for arrays of CHARZ. - * - * - * - * - * SQLT_STR - for arrays of STRING. - * - * - * - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * - * SQLT_ODT - for arrays of DATE. - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * SQLT_FLT - for arrays of FLOAT. - * - * SQLT_AFC - for arrays of CHAR. - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * SQLT_VCS - for arrays of VARCHAR. - * - * SQLT_AVC - for arrays of CHARZ. - * - * SQLT_STR - for arrays of STRING. - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * SQLT_ODT - for arrays of DATE. + * @param resource $statement + * @param string $param + * @param array $var + * @param int $max_array_length + * @param int $max_item_length + * @param int $type * @throws Oci8Exception * */ @@ -112,198 +25,11 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max /** - * Binds a PHP variable var to the Oracle - * bind variable placeholder param. Binding - * is important for Oracle database performance and also as a way to - * avoid SQL Injection security issues. - * - * Binding allows the database to reuse the statement context and - * caches from previous executions of the statement, even if another - * user or process originally executed it. Binding reduces SQL - * Injection concerns because the data associated with a bind - * variable is never treated as part of the SQL statement. It does - * not need quoting or escaping. - * - * PHP variables that have been bound can be changed and the - * statement re-executed without needing to re-parse the statement or - * re-bind. - * - * In Oracle, bind variables are commonly divided - * into IN binds for values that are passed into - * the database, and OUT binds for values that are - * returned to PHP. A bind variable may be - * both IN and OUT. Whether a - * bind variable will be used for input or output is determined at - * run-time. - * - * You must specify max_length when using - * an OUT bind so that PHP allocates enough memory - * to hold the returned value. - * - * For IN binds it is recommended to set - * the max_length length if the statement is - * re-executed multiple times with different values for the PHP - * variable. Otherwise Oracle may truncate data to the length of the - * initial PHP variable value. If you don't know what the maximum - * length will be, then re-call oci_bind_by_name - * with the current data size prior to - * each oci_execute call. Binding an - * unnecessarily large length will have an impact on process memory - * in the database. - * - * A bind call tells Oracle which memory address to read data from. - * For IN binds that address needs to contain - * valid data when oci_execute is called. This - * means that the variable bound must remain in scope until - * execution. If it doesn't, unexpected results or errors such as - * "ORA-01460: unimplemented or unreasonable conversion requested" - * may occur. For OUT binds one symptom is no - * value being set in the PHP variable. - * - * For a statement that is repeatedly executed, binding values that - * never change may reduce the ability of the Oracle optimizer to - * choose the best statement execution plan. Long running statements - * that are rarely re-executed may not benefit from binding. However - * in both cases, binding might be safer than joining strings into a - * SQL statement, as this can be a security risk if unfiltered user - * text is concatenated. - * - * @param resource $statement A valid OCI8 statement identifier. - * @param string $param The colon-prefixed bind variable placeholder used in the - * statement. The colon is optional - * in param. Oracle does not use question - * marks for placeholders. - * @param mixed $var The PHP variable to be associated with param - * @param int $max_length Sets the maximum length for the data. If you set it to -1, this - * function will use the current length - * of var to set the maximum - * length. In this case the var must - * exist and contain data - * when oci_bind_by_name is called. - * @param int $type The datatype that Oracle will treat the data as. The - * default type used - * is SQLT_CHR. Oracle will convert the data - * between this type and the database column (or PL/SQL variable - * type), when possible. - * - * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - * need to allocate it first using the - * oci_new_descriptor function. The - * length is not used for abstract datatypes - * and should be set to -1. - * - * Possible values for type are: - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * - * - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * - * - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * - * - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * - * - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * - * - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * - * - * - * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * - * SQLT_CHR - for VARCHARs; - * - * - * - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * - * - * - * SQLT_LNG - for LONG columns; - * - * - * - * - * SQLT_LBI - for LONG RAW columns; - * - * - * - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * - * - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) - * - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * SQLT_INT or OCI_B_INT - for integers; - * - * SQLT_CHR - for VARCHARs; - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * SQLT_LNG - for LONG columns; - * - * SQLT_LBI - for LONG RAW columns; - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) + * @param resource $statement + * @param string $param + * @param mixed $var + * @param int $max_length + * @param int $type * @throws Oci8Exception * */ @@ -318,10 +44,7 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 /** - * Invalidates a cursor, freeing all associated resources and cancels the - * ability to read from it. - * - * @param resource $statement An OCI statement. + * @param resource $statement * @throws Oci8Exception * */ @@ -336,24 +59,7 @@ function oci_cancel($statement): void /** - * Commits the outstanding transaction for the - * Oracle connection. A commit ends the - * current transaction and makes permanent all changes. It releases - * all locks held. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -368,101 +74,12 @@ function oci_commit($connection): void /** - * Returns a connection identifier needed for most other OCI8 operations. - * - * For performance, most applications should use persistent connections - * with oci_pconnect instead - * of oci_connect. - * See Connection Handling for general - * information on connection management and connection pooling. - * - * From PHP 5.1.2 (PECL OCI8 1.1) oci_close can - * be used to close the connection. - * - * The second and subsequent calls to oci_connect - * with the same parameters will return the connection handle returned - * from the first call. This means that transactions in one handle are - * also in the other handles, because they use the - * same underlying database connection. If two - * handles need to be transactionally isolated from each other, use - * oci_new_connect instead. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -486,28 +103,10 @@ function oci_connect(string $username, string $password, ?string $connection_str /** - * Associates a PHP variable with a column for query fetches using oci_fetch. - * - * The oci_define_by_name call must occur before - * executing oci_execute. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param string $column The column name used in the query. - * - * Use uppercase for Oracle's default, non-case sensitive column - * names. Use the exact column name case for case-sensitive - * column names. - * @param mixed $var The PHP variable that will contain the returned column value. - * @param int $type The data type to be returned. Generally not needed. Note that - * Oracle-style data conversions are not performed. For example, - * SQLT_INT will be ignored and the returned - * data type will still be SQLT_CHR. - * - * You can optionally use oci_new_descriptor - * to allocate LOB/ROWID/BFILE descriptors. + * @param resource $statement + * @param string $column + * @param mixed $var + * @param int $type * @throws Oci8Exception * */ @@ -522,79 +121,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v /** - * Executes a statement previously returned - * from oci_parse. - * - * After execution, statements like INSERT will - * have data committed to the database by default. For statements - * like SELECT, execution performs the logic of the - * query. Query results can subsequently be fetched in PHP with - * functions like oci_fetch_array. - * - * Each parsed statement may be executed multiple times, saving the - * cost of re-parsing. This is commonly used - * for INSERT statements when data is bound - * with oci_bind_by_name. - * - * @param resource $statement A valid OCI statement identifier. - * @param int $mode An optional second parameter can be one of the following constants: - * - * Execution Modes - * - * - * - * Constant - * Description - * - * - * - * - * OCI_COMMIT_ON_SUCCESS - * Automatically commit all outstanding changes for - * this connection when the statement has succeeded. This - * is the default. - * - * - * OCI_DESCRIBE_ONLY - * Make query meta data available to functions - * like oci_field_name but do not - * create a result set. Any subsequent fetch call such - * as oci_fetch_array will - * fail. - * - * - * OCI_NO_AUTO_COMMIT - * Do not automatically commit changes. Prior to PHP - * 5.3.2 (PECL OCI8 1.4) - * use OCI_DEFAULT which is equivalent - * to OCI_NO_AUTO_COMMIT. - * - * - * - * - * - * Using OCI_NO_AUTO_COMMIT mode starts or continues a - * transaction. Transactions are automatically rolled back when - * the connection is closed, or when the script ends. Explicitly - * call oci_commit to commit a transaction, - * or oci_rollback to abort it. - * - * When inserting or updating data, using transactions is - * recommended for relational data consistency and for performance - * reasons. - * - * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and - * oci_commit - * or oci_rollback is not subsequently - * called, then OCI8 will perform a rollback at the end of the - * script even if no data was changed. To avoid an unnecessary - * rollback, many scripts do not - * use OCI_NO_AUTO_COMMIT mode for queries or - * PL/SQL. Be careful to ensure the appropriate transactional - * consistency for the application when - * using oci_execute with different modes in - * the same script. + * @param resource $statement + * @param int $mode * @throws Oci8Exception * */ @@ -609,11 +137,9 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** - * Returns the name of the column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return string Returns the name as a string + * @param resource $statement + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -629,15 +155,9 @@ function oci_field_name($statement, $column): string /** - * Returns precision of the column. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the precision as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -653,15 +173,9 @@ function oci_field_precision($statement, $column): int /** - * Returns the scale of the column with column index. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the scale as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -677,11 +191,9 @@ function oci_field_scale($statement, $column): int /** - * Returns the size of a column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the size of a column in bytes + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -697,13 +209,9 @@ function oci_field_size($statement, $column): int /** - * Returns Oracle's raw "SQLT" data type of the column. - * - * If you want a field's type name, then use oci_field_type instead. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns Oracle's raw data type as a number + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -719,11 +227,9 @@ function oci_field_type_raw($statement, $column): int /** - * Returns a field's data type name. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return mixed Returns the field data type as a string or an integer + * @param resource $statement + * @param mixed $column + * @return mixed * @throws Oci8Exception * */ @@ -739,9 +245,7 @@ function oci_field_type($statement, $column) /** - * Frees a descriptor allocated by oci_new_descriptor. - * - * @param \OCILob $lob Descriptor allocated by oci_new_descriptor. + * @param \OCILob $lob * @throws Oci8Exception * */ @@ -756,11 +260,7 @@ function oci_free_descriptor(\OCILob $lob): void /** - * Frees resources associated with Oracle's cursor or statement, which was - * received from as a result of oci_parse or obtained - * from Oracle. - * - * @param resource $statement A valid OCI statement identifier. + * @param resource $statement * @throws Oci8Exception * */ @@ -775,14 +275,10 @@ function oci_free_statement($statement): void /** - * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param string $type_name Should be a valid named type (uppercase). - * @param null|string $schema Should point to the scheme, where the named type was created. The name - * of the current user is used when NULL is passed. - * @return \OCI-Collection Returns a new OCICollection object. + * @param resource $connection + * @param string $type_name + * @param null|string $schema + * @return \OCI-Collection * @throws Oci8Exception * */ @@ -802,90 +298,12 @@ function oci_new_collection($connection, string $type_name, ?string $schema = nu /** - * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and - * oci_pconnect, oci_new_connect - * does not cache connections and will always return a brand-new freshly - * opened connection handle. This is useful if your application needs - * transactional isolation between two sets of queries. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -909,11 +327,8 @@ function oci_new_connect(string $username, string $password, ?string $connection /** - * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @return resource Returns a new statement handle. + * @param resource $connection + * @return resource * @throws Oci8Exception * */ @@ -929,14 +344,9 @@ function oci_new_cursor($connection) /** - * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: - * OCI_DTYPE_FILE, OCI_DTYPE_LOB and - * OCI_DTYPE_ROWID. - * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success. + * @param resource $connection + * @param int $type + * @return \OCI-Lob|false * @throws Oci8Exception * */ @@ -952,10 +362,8 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** - * Gets the number of rows affected during statement execution. - * - * @param resource $statement A valid OCI statement identifier. - * @return 0|positive-int Returns the number of rows affected as an integer + * @param resource $statement + * @return 0|positive-int * @throws Oci8Exception * */ @@ -971,24 +379,9 @@ function oci_num_rows($statement): int /** - * Prepares sql using - * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, - * oci_execute and other functions. - * - * Statement identifiers can be freed - * with oci_free_statement or by setting the - * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. - * @param string $sql The SQL or PL/SQL statement. - * - * SQL statements should not end with a - * semi-colon (";"). PL/SQL - * statements should end with a semi-colon - * (";"). - * @return resource Returns a statement handle on success. + * @param resource $connection + * @param string $sql + * @return resource * @throws Oci8Exception * */ @@ -1004,91 +397,12 @@ function oci_parse($connection, string $sql) /** - * Creates a persistent connection to an Oracle server and logs on. - * - * Persistent connections are cached and re-used between requests, resulting in - * reduced overhead on each page load; a typical PHP application will have a - * single persistent connection open against an Oracle server per Apache child - * process (or PHP FPM process). See the OCI8 - * Connection Handling and Connection Pooling section for more - * information. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -1112,30 +426,8 @@ function oci_pconnect(string $username, string $password, ?string $connection_st /** - * Registers a user-defined callback function to connection. - * If connection fails due to instance or network failure, - * the registered callback function will be invoked for several times during - * failover. See OCI8 Transparent Application Failover - * (TAF) Support for information. - * - * When oci_register_taf_callback is called multiple times, - * each registration overwrites the previous one. - * - * Use oci_unregister_taf_callback to explicitly unregister a - * user-defined callback. - * - * TAF callback registration will NOT be saved across - * persistent connections, therefore the callback needs to be re-registered for - * a new persistent connection. - * - * @param resource $connection An Oracle connection identifier. - * @param callable $callback A user-defined callback to register for Oracle TAF. It can be a - * string of the function name or a Closure (anonymous function). - * - * The interface of a TAF user-defined callback function is as follows: - * - * See the parameter description and an example on - * OCI8 Transparent Application Failover (TAF) Support page. + * @param resource $connection + * @param callable $callback * @throws Oci8Exception * */ @@ -1150,20 +442,9 @@ function oci_register_taf_callback($connection, callable $callback): void /** - * Returns the data from column in the current row, - * fetched by oci_fetch. - * - * For details on the data type mapping performed by - * the OCI8 extension, see the datatypes - * supported by the driver - * * @param resource $statement - * @param mixed $column Can be either use the column number (1-based) or the column name. - * The case of the column name must be the case that Oracle meta data - * describes the column as, which is uppercase for columns created - * case insensitively. - * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and - * FILEs). + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -1179,25 +460,7 @@ function oci_result($statement, $column): string /** - * Reverts all uncommitted changes for the Oracle - * connection and ends the transaction. It - * releases all locks held. All Oracle SAVEPOINTS - * are erased. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect - * or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -1212,10 +475,8 @@ function oci_rollback($connection): void /** - * Returns a string with the Oracle Database version and available options - * * @param resource $connection - * @return string Returns the version information as a string. + * @return string * @throws Oci8Exception * */ @@ -1231,23 +492,8 @@ function oci_server_version($connection): string /** - * Sets the action name for Oracle tracing. - * - * The action name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The action name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string up to 32 bytes long. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1262,34 +508,8 @@ function oci_set_action($connection, string $action): void /** - * Sets a timeout limiting the maxium time a database round-trip using this connection may take. - * - * Each OCI8 operation may make zero or more calls to Oracle's client - * library. These internal calls may then may make zero or more - * round-trips to Oracle Database. If any one of those round-trips - * takes more than time_out milliseconds, then the - * operation is cancelled and an error is returned to the application. - * - * The time_out value applies to each round-trip - * individually, not to the sum of all round-trips. Time spent - * processing in PHP OCI8 before or after the completion of each - * round-trip is not counted. - * - * When a call is interrupted, Oracle will attempt to clean up the - * connection for reuse. This operation is allowed to run for - * another time_out period. Depending on the - * outcome of the cleanup, the connection may or may not be reusable. - * - * When persistent connections are used, the timeout value will be - * retained across PHP requests. - * - * The oci_set_call_timeout function is available - * when OCI8 uses Oracle 18 (or later) Client libraries. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @param resource $connection + * @param int $timeout * @throws Oci8Exception * */ @@ -1304,27 +524,8 @@ function oci_set_call_timeout($connection, int $timeout): void /** - * Sets the client identifier used by various database components to - * identify lightweight application users who authenticate as the same - * database user. - * - * The client identifier is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The identifier can subsequently be queried, for example - * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') - * FROM DUAL. Database administration views such - * as V$SESSION will also contain the value. It - * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE - * for tracing and can also be used for auditing. - * - * The value may be retained across page requests that use the same persistent connection. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_id User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_id * @throws Oci8Exception * */ @@ -1339,21 +540,8 @@ function oci_set_client_identifier($connection, string $client_id): void /** - * Sets the client information for Oracle tracing. - * - * The client information is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The client information can subsequently be queried from database - * administration views such as V$SESSION. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_info User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_info * @throws Oci8Exception * */ @@ -1368,22 +556,8 @@ function oci_set_client_info($connection, string $client_info): void /** - * Sets the DBOP for Oracle tracing. - * - * The database operation name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when a SQL - * statement is executed. - * - * The database operation can subsequently be queried from database administration - * views such as V$SQL_MONITOR. - * - * The oci_set_db_operation function is available - * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1398,26 +572,7 @@ function oci_set_db_operation($connection, string $action): void /** - * Sets the database "edition" of objects to be used by a subsequent - * connections. - * - * Oracle Editions allow concurrent versions of applications to run - * using the same schema and object names. This is useful for - * upgrading live systems. - * - * Call oci_set_edition before calling - * oci_connect, oci_pconnect - * or oci_new_connect. - * - * If an edition is set that is not valid in the database, connection - * will fail even if oci_set_edition returns success. - * - * When using persistent connections, if a connection with the - * requested edition setting already exists, it is reused. Otherwise, - * a different persistent connection is created - * - * @param string $edition Oracle Database edition name previously created with the SQL - * "CREATE EDITION" command. + * @param string $edition * @throws Oci8Exception * */ @@ -1432,23 +587,8 @@ function oci_set_edition(string $edition): void /** - * Sets the module name for Oracle tracing. - * - * The module name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $name User chosen string up to 48 bytes long. + * @param resource $connection + * @param string $name * @throws Oci8Exception * */ @@ -1463,28 +603,8 @@ function oci_set_module_name($connection, string $name): void /** - * Sets the internal buffer size used to fetch each CLOB or BLOB value when the - * implementation gets the internal Oracle LOB locator from the database after - * a successful query call to oci_execute and for each - * subsequent internal fetch request to the database. Increasing this value - * can improve the performance of fetching smaller LOBs by reducing round-trips - * between PHP and the database. Memory usage will change. - * - * The value affects LOBs returned as OCILob instances and also those returned - * using OCI_RETURN_LOBS. - * - * Call oci_set_prefetch_lob before - * calling oci_execute. If it is not called, the value - * of oci8.prefetch_lob_size - * is used. - * - * The LOB prefetch value should only be set with Oracle Database 12.2 or later. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $prefetch_lob_size The number of bytes of each LOB to be prefetched, >= 0 + * @param resource $statement + * @param int $prefetch_lob_size * @throws Oci8Exception * */ @@ -1499,56 +619,8 @@ function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void /** - * Sets the number of rows to be buffered by the Oracle Client - * libraries after a successful query call - * to oci_execute and for each subsequent - * internal fetch request to the database. For queries returning a - * large number of rows, performance can be significantly improved by - * increasing the prefetch count above the - * default oci8.default_prefetch - * value. - * - * Prefetching is Oracle's efficient way of returning more than one - * data row from the database in each network request. This can - * result in better network and CPU utilization. The buffering of - * rows is internal to OCI8 and the behavior of OCI8 fetching - * functions is unchanged regardless of the prefetch count. For - * example, oci_fetch_row will always return one - * row. The prefetch buffer is per-statement and is not used by - * re-executed statements or by other connections. - * - * Call oci_set_prefetch before - * calling oci_execute. - * - * A tuning goal is to set the prefetch value to a reasonable size for - * the network and database to handle. For queries returning a very - * large number of rows, overall system efficiency might be better if - * rows are retrieved from the database in several chunks (i.e set the - * prefetch value smaller than the number of rows). This allows the - * database to handle other users' statements while the PHP script is - * processing the current set of rows. - * - * Query prefetching was introduced in Oracle 8i. REF CURSOR - * prefetching was introduced in Oracle 11gR2 and occurs when PHP is - * linked with Oracle 11gR2 (or later) Client libraries. - * Nested cursor prefetching was - * introduced in Oracle 11gR2 and requires both the Oracle Client - * libraries and the database to be version 11gR2 or greater. - * - * Prefetching is not supported when queries contain LONG or LOB - * columns. The prefetch value is ignored and single-row fetches will - * be used in all the situations when prefetching is not supported. - * - * When using Oracle Database 12c, the prefetch - * value set by PHP can be overridden by Oracle's - * client oraaccess.xml configuration file. Refer - * to Oracle documentation for more detail. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $rows The number of rows to be prefetched, >= 0 + * @param resource $statement + * @param int $rows * @throws Oci8Exception * */ @@ -1563,64 +635,8 @@ function oci_set_prefetch($statement, int $rows): void /** - * Returns a keyword identifying the type of the - * OCI8 statement. - * - * @param resource $statement A valid OCI8 statement identifier from oci_parse. - * @return string Returns the type of statement as one of the - * following strings. - * - * Statement type - * - * - * - * Return String - * Notes - * - * - * - * - * ALTER - * - * - * - * BEGIN - * - * - * - * CALL - * Introduced in PHP 5.2.1 (PECL OCI8 1.2.3) - * - * - * CREATE - * - * - * - * DECLARE - * - * - * - * DELETE - * - * - * - * DROP - * - * - * - * INSERT - * - * - * - * SELECT - * - * - * - * UPDATE - * - * - * - * UNKNOW. + * @param resource $statement + * @return string * @throws Oci8Exception * */ @@ -1636,12 +652,7 @@ function oci_statement_type($statement): string /** - * Unregister the user-defined callback function registered to connection - * by oci_register_taf_callback. See - * OCI8 Transparent Application Failover (TAF) Support - * for information. - * - * @param resource $connection An Oracle connection identifier. + * @param resource $connection * @throws Oci8Exception * */ diff --git a/generated/8.2/opcache.php b/generated/8.2/opcache.php index 88d1c435..df3d1999 100644 --- a/generated/8.2/opcache.php +++ b/generated/8.2/opcache.php @@ -5,11 +5,7 @@ use Safe\Exceptions\OpcacheException; /** - * This function compiles a PHP script and adds it to the opcode cache without - * executing it. This can be used to prime the cache after a Web server - * restart by pre-caching files that will be included in later requests. - * - * @param string $filename The path to the PHP script to be compiled. + * @param string $filename * @throws OpcacheException * */ @@ -24,11 +20,8 @@ function opcache_compile_file(string $filename): void /** - * This function returns state information about the in-memory cache instance. It will not return any - * information about the file cache. - * - * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @param bool $include_scripts + * @return array * @throws OpcacheException * */ diff --git a/generated/8.2/openssl.php b/generated/8.2/openssl.php index 776b9669..2bcc19fd 100644 --- a/generated/8.2/openssl.php +++ b/generated/8.2/openssl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\OpensslException; /** - * Gets the cipher initialization vector (iv) length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -24,10 +22,8 @@ function openssl_cipher_iv_length(string $cipher_algo): int /** - * Gets the cipher key length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -43,14 +39,11 @@ function openssl_cipher_key_length(string $cipher_algo): int /** - * Decrypts a CMS message. - * - * @param string $input_filename The name of a file containing encrypted content. - * @param string $output_filename The name of the file to deposit the decrypted content. - * @param \OpenSSLCertificate|string $certificate The name of the file containing a certificate of the recipient. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key The name of the file containing a PKCS#8 key. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key + * @param int $encoding * @throws OpensslException * */ @@ -71,17 +64,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c /** - * This function encrypts content to one or more recipients, - * based on the certificates that are passed to it. - * - * @param string $input_filename The file to be encrypted. - * @param string $output_filename The output file. - * @param \OpenSSLCertificate|array|string $certificate Recipients to encrypt to. - * @param array|null $headers Headers to include when S/MIME is used. - * @param int $flags Flags to be passed to CMS_sign. - * @param int $encoding An encoding to output. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param int $cipher_algo A cypher to use. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|array|string $certificate + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param int $cipher_algo * @throws OpensslException * */ @@ -96,8 +85,6 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c /** - * Performs the exact analog to openssl_pkcs7_read. - * * @param string $input_filename * @param array $certificates * @throws OpensslException @@ -114,19 +101,14 @@ function openssl_cms_read(string $input_filename, array &$certificates): void /** - * This function signs a file with an X.509 certificate and key. - * - * @param string $input_filename The name of the file to be signed. - * @param string $output_filename The name of the file to deposit the results. - * @param \OpenSSLCertificate|string $certificate The signing certificate. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The key associated with certificate. - * See Key/Certificate parameters for a list of valid values. - * @param array|null $headers An array of headers to be included in S/MIME output. - * @param int $flags Flags to be passed to cms_sign. - * @param int $encoding The encoding of the output file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param null|string $untrusted_certificates_filename Intermediate certificates to be included in the signature. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -145,18 +127,15 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert /** - * This function verifies a CMS signature, either attached or detached, with the specified encoding. - * - * @param string $input_filename The input file. - * @param int $flags Flags to pass to cms_verify. - * @param null|string $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. - * @param null|string $untrusted_certificates_filename A file containing additional intermediate certificates. - * @param null|string $content A file pointing to the content when signatures are detached. + * @param string $input_filename + * @param int $flags + * @param null|string $certificates + * @param array $ca_info + * @param null|string $untrusted_certificates_filename + * @param null|string $content * @param null|string $pk7 - * @param null|string $sigfile A file to save the signature to. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param null|string $sigfile + * @param int $encoding * @throws OpensslException * */ @@ -187,17 +166,9 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $cer /** - * openssl_csr_export_to_file takes the Certificate - * Signing Request represented by csr and saves it - * in PEM format into the file named by output_filename. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -212,18 +183,9 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text /** - * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in - * PEM format in output, which is passed by - * reference. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param null|string $output on success, this string will contain the PEM encoded CSR + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -238,12 +200,9 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void /** - * openssl_csr_get_public_key extracts the public key - * from csr and prepares it for use by other functions. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names This parameter is ignored - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -259,16 +218,9 @@ function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsy /** - * openssl_csr_get_subject returns subject - * distinguished name information encoded in the csr - * including fields commonName (CN), organizationName (O), countryName (C) etc. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names shortnames controls how the data is indexed in the - * array - if shortnames is TRUE (the default) then - * fields will be indexed with the short name form, otherwise, the long name - * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return array * @throws OpensslException * */ @@ -284,112 +236,11 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array /** - * openssl_csr_new generates a new CSR (Certificate Signing Request) - * based on the information provided by distinguished_names. - * - * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param array|null $options By default, the information in your system openssl.conf - * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key of - * options. You can also specify an alternative - * openssl configuration file by setting the value of the - * config key to the path of the file you want to use. - * The following keys, if present in options - * behave as their equivalents in the openssl.conf, as - * listed in the table below. - * - * Configuration overrides - * - * - * - * options key - * type - * openssl.conf equivalent - * description - * - * - * - * - * digest_alg - * string - * default_md - * Digest method or signature hash, usually one of openssl_get_md_methods - * - * - * x509_extensions - * string - * x509_extensions - * Selects which extensions should be used when creating an x509 - * certificate - * - * - * req_extensions - * string - * req_extensions - * Selects which extensions should be used when creating a CSR - * - * - * private_key_bits - * int - * default_bits - * Specifies how many bits should be used to generate a private - * key - * - * - * private_key_type - * int - * none - * Specifies the type of private key to create. This can be one - * of OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_RSA or - * OPENSSL_KEYTYPE_EC. - * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * - * encrypt_key - * bool - * encrypt_key - * Should an exported key (with passphrase) be encrypted? - * - * - * encrypt_key_cipher - * int - * none - * - * One of cipher constants. - * - * - * - * curve_name - * string - * none - * - * One of openssl_get_curve_names. - * - * - * - * config - * string - * N/A - * - * Path to your own alternative openssl.conf file. - * - * - * - * - * - * @param array|null $extra_attributes extra_attributes is used to specify additional - * configuration options for the CSR. Both distinguished_names and - * extra_attributes are associative arrays whose keys are - * converted to OIDs and applied to the relevant part of the request. - * @return \OpenSSLCertificateSigningRequest Returns the CSR. + * @param array $distinguished_names + * @param \OpenSSLAsymmetricKey $private_key + * @param array|null $options + * @param array|null $extra_attributes + * @return \OpenSSLCertificateSigningRequest * @throws OpensslException * */ @@ -411,25 +262,13 @@ function openssl_csr_new(array $distinguished_names, \OpenSSLAsymmetricKey &$pri /** - * openssl_csr_sign generates an x509 certificate from the given CSR. - * - * @param \OpenSSLCertificateSigningRequest|string $csr A CSR previously generated by openssl_csr_new. - * It can also be the path to a PEM encoded CSR when specified as - * file://path/to/csr or an exported string generated - * by openssl_csr_export. - * @param \OpenSSLCertificate|null|string $ca_certificate The generated certificate will be signed by ca_certificate. - * If ca_certificate is NULL, the generated certificate - * will be a self-signed certificate. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key that corresponds to - * ca_certificate. - * @param int $days days specifies the length of time for which the - * generated certificate will be valid, in days. - * @param array|null $options You can finetune the CSR signing by options. - * See openssl_csr_new for more information about - * options. - * @param int $serial An optional the serial number of issued certificate. If not specified - * it will default to 0. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param \OpenSSLCertificate|null|string $ca_certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $days + * @param array|null $options + * @param int $serial + * @return \OpenSSLCertificate * @throws OpensslException * */ @@ -451,19 +290,14 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array /** - * Takes a raw or base64 encoded string and decrypts it using a given method and key. - * - * @param string $data The encrypted message to be decrypted. - * @param string $cipher_algo The cipher method. For a list of available cipher methods, use - * openssl_get_cipher_methods. - * @param string $passphrase The key. - * @param int $options options can be one of - * OPENSSL_RAW_DATA, - * OPENSSL_ZERO_PADDING. - * @param string $iv A non-NULL Initialization Vector. - * @param null|string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. - * @param string $aad Additional authenticated data. - * @return string The decrypted string on success. + * @param string $data + * @param string $cipher_algo + * @param string $passphrase + * @param int $options + * @param string $iv + * @param null|string $tag + * @param string $aad + * @return string * @throws OpensslException * */ @@ -485,13 +319,9 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, /** - * The shared secret returned by openssl_dh_compute_key is - * often used as an encryption key to secretly communicate with a remote party. - * This is known as the Diffie-Hellman key exchange. - * - * @param string $public_key DH Public key of the remote party. - * @param \OpenSSLAsymmetricKey $private_key A local DH private key, corresponding to the public key to be shared with the remote party. - * @return string Returns shared secret on success. + * @param string $public_key + * @param \OpenSSLAsymmetricKey $private_key + * @return string * @throws OpensslException * */ @@ -507,14 +337,10 @@ function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $priva /** - * Computes a digest hash value for the given data using a given method, - * and returns a raw or binhex encoded string. - * - * @param string $data The data. - * @param string $digest_algo The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. - * @param bool $binary Setting to TRUE will return as raw output data, otherwise the return - * value is binhex encoded. - * @return string Returns the digested hash value on success. + * @param string $data + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -530,53 +356,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) /** - * Gets the list of available curve names for use in Elliptic curve - * cryptography (ECC) for public/private key operations. The two most widely - * standardized/supported curves are prime256v1 - * (NIST P-256) and secp384r1 (NIST P-384). - * - * Approximate Equivalancies of AES, RSA, DSA and ECC Keysizes - * - * - * - * AES Symmetric Keysize (Bits) - * RSA and DSA Keysize (Bits) - * ECC Keysize (Bits) - * - * - * - * - * 80 - * 1024 - * 160 - * - * - * 112 - * 2048 - * 224 - * - * - * 128 - * 3072 - * 256 - * - * - * 192 - * 7680 - * 384 - * - * - * 256 - * 15360 - * 512 - * - * - * - * - * NIST - * recommends using ECC curves with at least 256 bits. - * - * @return list An array of available curve names. + * @return list * @throws OpensslException * */ @@ -592,28 +372,12 @@ function openssl_get_curve_names(): array /** - * openssl_open opens (decrypts) - * data using the private key associated with - * the key identifier private_key and the envelope key - * encrypted_key, and fills - * output with the decrypted data. - * The envelope key is generated when the - * data are sealed and can only be used by one specific private key. See - * openssl_seal for more information. - * * @param string $data - * @param null|string $output If the call is successful the opened data is returned in this - * parameter. + * @param null|string $output * @param string $encrypted_key * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. + * @param string $cipher_algo + * @param null|string $iv * @throws OpensslException * */ @@ -632,16 +396,12 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr /** - * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), - * a key derivation function defined in PKCS5 v2. - * - * @param string $password Password from which the derived key is generated. - * @param string $salt PBKDF2 recommends a crytographic salt of at least 64 bits (8 bytes). - * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. NIST - * recommends at least 10,000. - * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1. - * @return string Returns raw binary string. + * @param string $password + * @param string $salt + * @param int $key_length + * @param int $iterations + * @param string $digest_algo + * @return string * @throws OpensslException * */ @@ -657,36 +417,11 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it /** - * openssl_pkcs12_export_to_file stores - * certificate into a file named by - * output_filename in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -701,36 +436,11 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p /** - * openssl_pkcs12_export stores - * certificate into a string named by - * output in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PKCS#12. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -745,13 +455,9 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str /** - * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by - * pkcs12 into a array named - * certificates. - * - * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. + * @param string $pkcs12 + * @param array|null $certificates + * @param string $passphrase * @throws OpensslException * */ @@ -766,14 +472,8 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass /** - * Decrypts the S/MIME encrypted message contained in the file specified by - * input_filename using the certificate and its - * associated private key specified by certificate and - * private_key. - * * @param string $input_filename - * @param string $output_filename The decrypted message is written to the file specified by - * output_filename. + * @param string $output_filename * @param \OpenSSLCertificate|string $certificate * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key * @throws OpensslException @@ -794,24 +494,12 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, /** - * openssl_pkcs7_encrypt takes the contents of the - * file named input_filename and encrypts them using an RC2 - * 40-bit cipher so that they can only be read by the intended recipients - * specified by certificate. - * * @param string $input_filename * @param string $output_filename - * @param \OpenSSLCertificate|array|string $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been encrypted. - * - * headers can be either an associative array - * keyed by header name, or an indexed array, where each element contains - * a single header line. - * @param int $flags flags can be used to specify options that affect - * the encoding process - see PKCS7 - * constants. - * @param int $cipher_algo One of cipher constants. + * @param \OpenSSLCertificate|array|string $certificate + * @param array $headers + * @param int $flags + * @param int $cipher_algo * @throws OpensslException * */ @@ -826,10 +514,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, /** - * - * - * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param string $data + * @param array|null $certificates * @throws OpensslException * */ @@ -844,26 +530,13 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void /** - * openssl_pkcs7_sign takes the contents of the file - * named input_filename and signs them using the - * certificate and its matching private key specified by - * certificate and private_key - * parameters. - * - * @param string $input_filename The input file you are intending to digitally sign. - * @param string $output_filename The file which the digital signature will be written to. - * @param \OpenSSLCertificate|string $certificate The X.509 certificate used to digitally sign input_filename. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key corresponding to certificate. - * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been signed (see - * openssl_pkcs7_encrypt for more information about - * the format of this parameter). - * @param int $flags flags can be used to alter the output - see PKCS7 constants. - * @param null|string $untrusted_certificates_filename untrusted_certificates_filename specifies the name of a file containing - * a bunch of extra certificates to include in the signature which can for - * example be used to help the recipient to verify the certificate that you used. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array $headers + * @param int $flags + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -882,15 +555,10 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce /** - * openssl_pkey_derive takes a set of a public_key - * and private_key and derives a shared secret, for either DH or EC keys. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key is the public key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param int $key_length If not zero, will set the desired length of the derived secret. - * @return string The derived secret on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $key_length + * @return string * @throws OpensslException * */ @@ -906,18 +574,10 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** - * openssl_pkey_export_to_file saves an ascii-armoured - * (PEM encoded) rendition of key into the file named - * by output_filename. - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key - * @param string $output_filename Path to the output file. - * @param null|string $passphrase The key can be optionally protected by a - * passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param string $output_filename + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -938,17 +598,10 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas /** - * openssl_pkey_export exports - * key as a PEM encoded string and stores it into - * output (which is passed by reference). - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key * @param null|string $output - * @param null|string $passphrase The key is optionally protected by passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -969,20 +622,8 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, /** - * This function returns the key details (bits, key, type). - * - * @param \OpenSSLAsymmetricKey $key Resource holding the key. - * @return array Returns an array with the key details in success or FALSE in failure. - * Returned array has indexes bits (number of bits), - * key (string representation of the public key) and - * type (type of the key which is one of - * OPENSSL_KEYTYPE_RSA, - * OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_EC or -1 meaning unknown). - * - * Depending on the key type used, additional details may be returned. Note that - * some elements may not always be available. + * @param \OpenSSLAsymmetricKey $key + * @return array * @throws OpensslException * */ @@ -998,21 +639,9 @@ function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array /** - * openssl_pkey_get_private parses - * private_key and prepares it for use by other functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key can be one of the following: - * - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/private key (it may contain both). - * - * - * A PEM formatted private key. - * - * @param null|string $passphrase The optional parameter passphrase must be used - * if the specified key is encrypted (protected by a passphrase). - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param null|string $passphrase + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1032,21 +661,8 @@ function openssl_pkey_get_private($private_key, ?string $passphrase = null): \Op /** - * openssl_pkey_get_public extracts the public key from - * public_key and prepares it for use by other - * functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key can be one of the following: - * - * an OpenSSLAsymmetricKey instance - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/public key (it may contain both). - * - * - * A PEM formatted public key. - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1062,15 +678,8 @@ function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey /** - * openssl_pkey_new generates a new private - * key. - * How to obtain the public component of the key is shown in an example below. - * - * @param array|null $options You can finetune the key generation (such as specifying the number of - * bits) using options. See - * openssl_csr_new for more information about - * options. - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance for the pkey on success. + * @param array|null $options + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1090,22 +699,10 @@ function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey /** - * openssl_private_decrypt decrypts - * data that was previously encrypted via - * openssl_public_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1120,20 +717,10 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat /** - * openssl_private_encrypt encrypts data - * with private private_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_public_decrypt. - * - * This function can be used e.g. to sign data (or its hash) to prove that it - * is not written by someone else. - * * @param string $data * @param null|string $encrypted_data * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param int $padding * @throws OpensslException * */ @@ -1148,21 +735,10 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat /** - * openssl_public_decrypt decrypts - * data that was previous encrypted via - * openssl_private_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to check if the message was written by the - * owner of the private key. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1177,23 +753,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ /** - * openssl_public_encrypt encrypts data - * with public public_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_private_decrypt. - * - * This function can be used e.g. to encrypt message which can be then read - * only by owner of the private key. It can be also used to store secure data - * in database. - * * @param string $data - * @param null|string $encrypted_data This will hold the result of the encryption. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key The public key. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param null|string $encrypted_data + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1208,19 +771,9 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ /** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer less than or equal to 2147483647. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes. + * @param int $length + * @param bool|null $strong_result + * @return string * */ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string @@ -1232,32 +785,13 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): /** - * openssl_seal seals (encrypts) - * data by using the given cipher_algo with a randomly generated - * secret key. The key is encrypted with each of the public keys - * associated with the identifiers in public_key - * and each encrypted key is returned - * in encrypted_keys. This means that one can send - * sealed data to multiple recipients (provided one has obtained their - * public keys). Each recipient must receive both the sealed data and - * the envelope key that was encrypted with the recipient's public key. - * - * @param string $data The data to seal. - * @param null|string $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. - * @return int Returns the length of the sealed data on success. - * If successful the sealed data is returned in - * sealed_data, and the envelope keys in - * encrypted_keys. + * @param string $data + * @param null|string $sealed_data + * @param array|null $encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param null|string $iv + * @return int * @throws OpensslException * */ @@ -1273,21 +807,10 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke /** - * openssl_sign computes a signature for the - * specified data by generating a cryptographic - * digital signature using the private key associated with - * private_key. Note that the data itself is - * not encrypted. - * - * @param string $data The string of data you wish to sign - * @param null|string $signature If the call was successful the signature is returned in - * signature. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey - * - * string - a PEM formatted key - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @param string $data + * @param null|string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int|string $algorithm * @throws OpensslException * */ @@ -1302,10 +825,8 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith /** - * Exports challenge from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated challenge string. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1321,10 +842,8 @@ function openssl_spki_export_challenge(string $spki): ?string /** - * Exports PEM formatted public key from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated PEM formatted public key. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1340,16 +859,10 @@ function openssl_spki_export(string $spki): ?string /** - * Generates a signed public key and challenge using specified hashing algorithm - * - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param string $challenge The challenge associated to associate with the SPKAC - * @param int $digest_algo The digest algorithm. See openssl_get_md_method(). - * @return null|string Returns a signed public key and challenge string. + * @param \OpenSSLAsymmetricKey $private_key + * @param string $challenge + * @param int $digest_algo + * @return null|string * @throws OpensslException * */ @@ -1365,9 +878,7 @@ function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, /** - * Validates the supplied signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge + * @param string $spki * @throws OpensslException * */ @@ -1382,23 +893,11 @@ function openssl_spki_verify(string $spki): void /** - * openssl_verify verifies that the - * signature is correct for the specified - * data using the public key associated with - * public_key. This must be the public key - * corresponding to the private key used for signing. - * - * @param string $data The string of data used to generate the signature previously - * @param string $signature A raw binary string, generated by openssl_sign or similar means - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key OpenSSLAsymmetricKey - a key, returned by openssl_get_publickey - * - * string - a PEM formatted key, example, "-----BEGIN PUBLIC KEY----- - * MIIBCgK..." - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". - * @return -1|0|1 Returns 1 if the signature is correct, 0 if it is incorrect, and - * -1. + * @param string $data + * @param string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int|string $algorithm + * @return -1|0|1 * @throws OpensslException * */ @@ -1414,63 +913,11 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm /** - * openssl_x509_checkpurpose examines a certificate to - * see if it can be used for the specified purpose. - * - * @param \OpenSSLCertificate|string $certificate The examined certificate. + * @param \OpenSSLCertificate|string $certificate * @param int $purpose - * openssl_x509_checkpurpose purposes - * - * - * - * Constant - * Description - * - * - * - * - * X509_PURPOSE_SSL_CLIENT - * Can the certificate be used for the client side of an SSL - * connection? - * - * - * X509_PURPOSE_SSL_SERVER - * Can the certificate be used for the server side of an SSL - * connection? - * - * - * X509_PURPOSE_NS_SSL_SERVER - * Can the cert be used for Netscape SSL server? - * - * - * X509_PURPOSE_SMIME_SIGN - * Can the cert be used to sign S/MIME email? - * - * - * X509_PURPOSE_SMIME_ENCRYPT - * Can the cert be used to encrypt S/MIME email? - * - * - * X509_PURPOSE_CRL_SIGN - * Can the cert be used to sign a certificate revocation list - * (CRL)? - * - * - * X509_PURPOSE_ANY - * Can the cert be used for Any/All purposes? - * - * - * - * - * These options are not bitfields - you may specify one only! - * @param array $ca_info ca_info should be an array of trusted CA files/dirs - * as described in Certificate - * Verification. - * @param null|string $untrusted_certificates_file If specified, this should be the name of a PEM encoded file holding - * certificates that can be used to help verify the certificate, although - * no trust is placed in the certificates that come from that file. - * @return bool|int Returns TRUE if the certificate can be used for the intended purpose, - * FALSE if it cannot. + * @param array $ca_info + * @param null|string $untrusted_certificates_file + * @return bool|int * @throws OpensslException * */ @@ -1490,17 +937,9 @@ function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = /** - * openssl_x509_export_to_file stores - * certificate into a file named by - * output_filename in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1515,17 +954,9 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool /** - * openssl_x509_export stores - * certificate into a string named by - * output in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PEM. + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1540,15 +971,10 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru /** - * openssl_x509_fingerprint returns the digest of - * certificate as a string. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $digest_algo The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. - * @param bool $binary When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless binary is set to TRUE in which case the raw binary representation of the message digest is returned. - * - * Returns FALSE on failure. + * @param \OpenSSLCertificate|string $certificate + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -1564,12 +990,8 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo /** - * openssl_x509_read parses the certificate supplied by - * certificate and returns an OpenSSLCertificate object for - * it. - * - * @param \OpenSSLCertificate|string $certificate X509 certificate. See Key/Certificate parameters for a list of valid values. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificate|string $certificate + * @return \OpenSSLCertificate * @throws OpensslException * */ diff --git a/generated/8.2/outcontrol.php b/generated/8.2/outcontrol.php index 2e094bc8..85c33892 100644 --- a/generated/8.2/outcontrol.php +++ b/generated/8.2/outcontrol.php @@ -5,15 +5,6 @@ use Safe\Exceptions\OutcontrolException; /** - * This function discards the contents of the output buffer. - * - * This function does not destroy the output buffer like - * ob_end_clean does. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * flag. Otherwise ob_clean will not work. - * * @throws OutcontrolException * */ @@ -28,17 +19,6 @@ function ob_clean(): void /** - * This function discards the contents of the topmost output buffer and turns - * off this output buffering. If you want to further process the buffer's - * contents you have to call ob_get_contents before - * ob_end_clean as the buffer contents are discarded - * when ob_end_clean is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_clean will not work. - * * @throws OutcontrolException * */ @@ -53,18 +33,6 @@ function ob_end_clean(): void /** - * This function will send the contents of the topmost output buffer (if - * any) and turn this output buffer off. If you want to further - * process the buffer's contents you have to call - * ob_get_contents before - * ob_end_flush as the buffer contents are - * discarded after ob_end_flush is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_flush will not work. - * * @throws OutcontrolException * */ @@ -79,15 +47,6 @@ function ob_end_flush(): void /** - * This function will send the contents of the output buffer (if any). If you - * want to further process the buffer's contents you have to call - * ob_get_contents before ob_flush - * as the buffer contents are discarded after ob_flush - * is called. - * - * This function does not destroy the output buffer like - * ob_end_flush does. - * * @throws OutcontrolException * */ @@ -102,19 +61,7 @@ function ob_flush(): void /** - * Gets the current buffer contents and delete current output buffer. - * - * ob_get_clean essentially executes both - * ob_get_contents and - * ob_end_clean. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_get_clean will not work. - * - * @return string Returns the contents of the output buffer and end output buffering. - * If output buffering isn't active then FALSE is returned. + * @return string * @throws OutcontrolException * */ @@ -130,89 +77,9 @@ function ob_get_clean(): string /** - * This function will turn output buffering on. While output buffering is - * active no output is sent from the script (other than headers), instead the - * output is stored in an internal buffer. - * - * The contents of this internal buffer may be copied into a string variable - * using ob_get_contents. To output what is stored in - * the internal buffer, use ob_end_flush. Alternatively, - * ob_end_clean will silently discard the buffer - * contents. - * - * Output buffers are stackable, that is, you may call - * ob_start while another - * ob_start is active. Just make - * sure that you call ob_end_flush - * the appropriate number of times. If multiple output callback - * functions are active, output is being filtered sequentially - * through each of them in nesting order. - * - * If output buffering is still active when the script ends, PHP outputs the - * contents automatically. - * - * @param array|callable|null|string $callback An optional callback function may be - * specified. This function takes a string as a parameter and should - * return a string. The function will be called when - * the output buffer is flushed (sent) or cleaned (with - * ob_flush, ob_clean or similar - * function) or when the output buffer - * is flushed to the browser at the end of the request. When - * callback is called, it will receive the - * contents of the output buffer as its parameter and is expected to - * return a new output buffer as a result, which will be sent to the - * browser. If the callback is not a - * callable function, this function will return FALSE. - * This is the callback signature: - * - * - * stringhandler - * stringbuffer - * intphase - * - * - * - * buffer - * - * - * Contents of the output buffer. - * - * - * - * - * phase - * - * - * Bitmask of PHP_OUTPUT_HANDLER_* constants. - * - * - * - * - * - * If callback returns FALSE original - * input is sent to the browser. - * - * The callback parameter may be bypassed - * by passing a NULL value. - * - * ob_end_clean, ob_end_flush, - * ob_clean, ob_flush and - * ob_start may not be called from a callback - * function. If you call them from callback function, the behavior is - * undefined. If you would like to delete the contents of a buffer, - * return "" (a null string) from callback function. - * You can't even call functions using the output buffering functions like - * print_r($expression, true) or - * highlight_file($filename, true) from a callback - * function. - * - * ob_gzhandler function exists to - * facilitate sending gz-encoded data to web browsers that support - * compressed web pages. ob_gzhandler determines - * what type of content encoding the browser will accept and will return - * its output accordingly. - * @param int $chunk_size Contents of the output buffer. - * @param int $flags Bitmask of PHP_OUTPUT_HANDLER_* constants. + * @param array|callable|null|string $callback + * @param int $chunk_size + * @param int $flags * @throws OutcontrolException * */ @@ -235,19 +102,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT /** - * This function adds another name/value pair to the URL rewrite mechanism. - * The name and value will be added to URLs (as GET parameter) and forms - * (as hidden input fields) the same way as the session ID when transparent - * URL rewriting is enabled with session.use_trans_sid. - * - * This function's behaviour is controlled by the url_rewriter.tags and - * url_rewriter.hosts php.ini - * parameters. - * - * Note that this function can be successfully called at most once per request. - * - * @param string $name The variable name. - * @param string $value The variable value. + * @param string $name + * @param string $value * @throws OutcontrolException * */ @@ -262,10 +118,6 @@ function output_add_rewrite_var(string $name, string $value): void /** - * This function resets the URL rewriter and removes all rewrite - * variables previously set by the output_add_rewrite_var - * function. - * * @throws OutcontrolException * */ diff --git a/generated/8.2/pcntl.php b/generated/8.2/pcntl.php index 5105a993..85bf4966 100644 --- a/generated/8.2/pcntl.php +++ b/generated/8.2/pcntl.php @@ -5,17 +5,9 @@ use Safe\Exceptions\PcntlException; /** - * pcntl_getpriority gets the priority of - * process_id. Because priority levels can differ between - * system types and kernel versions, please see your system's getpriority(2) - * man page for specific details. - * - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. - * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable - * scheduling. + * @param int|null $process_id + * @param int $mode + * @return int * @throws PcntlException * */ @@ -37,19 +29,9 @@ function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): i /** - * pcntl_setpriority sets the priority of - * process_id. - * - * @param int $priority priority is generally a value in the range - * -20 to 20. The default priority - * is 0 while a lower numerical value causes more - * favorable scheduling. Because priority levels can differ between - * system types and kernel versions, please see your system's setpriority(2) - * man page for specific details. - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. + * @param int $priority + * @param int|null $process_id + * @param int $mode * @throws PcntlException * */ @@ -70,10 +52,6 @@ function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = P /** - * The pcntl_signal_dispatch function calls the signal - * handlers installed by pcntl_signal for each pending - * signal. - * * @throws PcntlException * */ @@ -88,47 +66,9 @@ function pcntl_signal_dispatch(): void /** - * The pcntl_signal function installs a new - * signal handler or replaces the current signal handler for the signal indicated by signal. - * - * @param int $signal The signal number. - * @param callable|int $handler The signal handler. This may be either a callable, which - * will be invoked to handle the signal, or either of the two global - * constants SIG_IGN or SIG_DFL, - * which will ignore the signal or restore the default signal handler - * respectively. - * - * If a callable is given, it must implement the following - * signature: - * - * - * voidhandler - * intsigno - * mixedsiginfo - * - * - * - * signal - * - * - * The signal being handled. - * - * - * - * - * siginfo - * - * - * If operating systems supports siginfo_t structures, this will be an array of signal information dependent on the signal. - * - * - * - * - * - * Note that when you set a handler to an object method, that object's - * reference count is increased which makes it persist until you either - * change the handler to something else, or your script ends. - * @param bool $restart_syscalls The signal being handled. + * @param int $signal + * @param callable|int $handler + * @param bool $restart_syscalls * @throws PcntlException * */ @@ -143,22 +83,9 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi /** - * The pcntl_sigprocmask function adds, removes or sets blocked - * signals, depending on the mode parameter. - * - * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible - * values: - * - * SIG_BLOCK: Add the signals to the - * currently blocked signals. - * SIG_UNBLOCK: Remove the signals from the - * currently blocked signals. - * SIG_SETMASK: Replace the currently - * blocked signals by the given list of signals. - * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array - * containing the list of the previously blocked signals. + * @param int $mode + * @param array $signals + * @param array|null $old_signals * @throws PcntlException * */ @@ -173,19 +100,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul /** - * The pcntl_sigtimedwait function operates in exactly - * the same way as pcntl_sigwaitinfo except that it takes - * two additional parameters, seconds and - * nanoseconds, which enable an upper bound to be placed - * on the time for which the script is suspended. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing - * information about the signal. See - * pcntl_sigwaitinfo. - * @param int $seconds Timeout in seconds. - * @param int $nanoseconds Timeout in nanoseconds. - * @return int pcntl_sigtimedwait returns a signal number on success. + * @param array $signals + * @param array|null $info + * @param int $seconds + * @param int $nanoseconds + * @return int * @throws PcntlException * */ @@ -201,46 +120,9 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 /** - * The pcntl_sigwaitinfo function suspends execution of the - * calling script until one of the signals given in signals - * are delivered. If one of the signal is already pending (e.g. blocked by - * pcntl_sigprocmask), - * pcntl_sigwaitinfo will return immediately. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing - * information about the signal. - * - * The following elements are set for all signals: - * - * signo: Signal number - * errno: An error number - * code: Signal code - * - * - * The following elements may be set for the SIGCHLD signal: - * - * status: Exit value or signal - * utime: User time consumed - * stime: System time consumed - * pid: Sending process ID - * uid: Real user ID of sending process - * - * - * The following elements may be set for the SIGILL, - * SIGFPE, SIGSEGV and - * SIGBUS signals: - * - * addr: Memory location which caused fault - * - * - * The following element may be set for the SIGPOLL - * signal: - * - * band: Band event - * fd: File descriptor number - * - * @return int Returns a signal number on success. + * @param array $signals + * @param array|null $info + * @return int * @throws PcntlException * */ diff --git a/generated/8.2/pcre.php b/generated/8.2/pcre.php index a6b3175c..1e15de35 100644 --- a/generated/8.2/pcre.php +++ b/generated/8.2/pcre.php @@ -5,17 +5,10 @@ use Safe\Exceptions\PcreException; /** - * Returns the array consisting of the elements of the - * array array that match the given - * pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. - * @param int $flags If set to PREG_GREP_INVERT, this function returns - * the elements of the input array that do not match - * the given pattern. - * @return array Returns an array indexed using the keys from the - * array array. + * @param string $pattern + * @param array $array + * @param int $flags + * @return array * @throws PcreException * */ @@ -31,345 +24,12 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array /** - * Searches subject for all matches to the regular - * expression given in pattern and puts them in - * matches in the order specified by - * flags. - * - * After the first match is found, the subsequent searches are continued - * on from end of the last match. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to - * flags. - * @param int $flags Can be a combination of the following flags (note that it doesn't make - * sense to use PREG_PATTERN_ORDER together with - * PREG_SET_ORDER): - * - * - * PREG_PATTERN_ORDER - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * - * - * - * PREG_SET_ORDER - * - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * If no order flag is given, PREG_PATTERN_ORDER is - * assumed. - * @param int $offset Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|positive-int Returns the number of full pattern matches (which might be zero). + * @param string $pattern + * @param string $subject + * @param array|null $matches + * @param int $flags + * @param int $offset + * @return 0|positive-int * @throws PcreException * */ @@ -385,228 +45,12 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul /** - * Searches subject for a match to the regular - * expression given in pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param null|string[] $matches If matches is provided, then it is filled with - * the results of search. $matches[0] will contain the - * text that matched the full pattern, $matches[1] - * will have the text that matched the first captured parenthesized - * subpattern, and so on. - * @param int $flags flags can be a combination of the following flags: - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * - * - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * The above example will output: - * @param int $offset If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|1 preg_match returns 1 if the pattern - * matches given subject, 0 if it does not. + * @param string $pattern + * @param string $subject + * @param null|string[] $matches + * @param int $flags + * @param int $offset + * @return 0|1 * @throws PcreException * */ @@ -622,28 +66,12 @@ function preg_match(string $pattern, string $subject, ?array &$matches = null, i /** - * The behavior of this function is similar to - * preg_replace_callback, except that callbacks are - * executed on a per-pattern basis. - * - * @param array $pattern An associative array mapping patterns (keys) to callables (values). - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback_array returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array $pattern + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -659,57 +87,13 @@ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, /** - * The behavior of this function is almost identical to - * preg_replace, except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param array|string $pattern The pattern to search for. It can be either a string or an array with - * strings. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. This is the callback signature: - * - * - * stringhandler - * arraymatches - * - * - * You'll often need the callback function - * for a preg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * preg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * - * - * preg_replace_callback and - * anonymous function - * - * - * ]]> - * - * - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array|string $pattern + * @param callable(array):string $callback + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -725,55 +109,11 @@ function preg_replace_callback($pattern, callable $callback, $subject, int $limi /** - * Split the given string by a regular expression. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param int|null $limit If specified, then only substrings up to limit - * are returned with the rest of the string being placed in the last - * substring. A limit of -1 or 0 means "no limit". - * @param int $flags flags can be any combination of the following - * flags (combined with the | bitwise operator): - * - * - * PREG_SPLIT_NO_EMPTY - * - * - * If this flag is set, only non-empty pieces will be returned by - * preg_split. - * - * - * - * - * PREG_SPLIT_DELIM_CAPTURE - * - * - * If this flag is set, parenthesized expression in the delimiter pattern - * will be captured and returned as well. - * - * - * - * - * PREG_SPLIT_OFFSET_CAPTURE - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * - * - * - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * @return list Returns an array containing substrings of subject - * split along boundaries matched by pattern. + * @param string $pattern + * @param string $subject + * @param int|null $limit + * @param int $flags + * @return list * @throws PcreException * */ diff --git a/generated/8.2/pgsql.php b/generated/8.2/pgsql.php index b532b440..32c7896f 100644 --- a/generated/8.2/pgsql.php +++ b/generated/8.2/pgsql.php @@ -5,12 +5,7 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with - * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using - * pg_query. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -25,49 +20,9 @@ function pg_cancel_query(\PgSql\Connection $connection): void /** - * pg_connect opens a connection to a - * PostgreSQL database specified by the - * connection_string. - * - * If a second call is made to pg_connect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * The old syntax with multiple parameters - * $conn = pg_connect("host", "port", "options", "tty", "dbname") - * has been deprecated. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname (defaults to value of user), - * user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * - * The options parameter can be used to set command line parameters - * to be invoked by the server. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * - * If PGSQL_CONNECT_ASYNC is given, then the - * connection is established asynchronously. The state of the connection - * can then be checked via pg_connect_poll or - * pg_connection_status. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -83,10 +38,7 @@ function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connectio /** - * pg_connection_reset resets the connection. - * It is useful for error recovery. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -101,22 +53,11 @@ function pg_connection_reset(\PgSql\Connection $connection): void /** - * pg_convert checks and converts the values in - * values into suitable values for use in an SQL - * statement. Precondition for pg_convert is the - * existence of a table table_name which has at least - * as many columns as values has elements. The - * fieldnames in table_name must match the indices in - * values and the corresponding datatypes must be - * compatible. Returns an array with the converted values on success. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. - * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, - * PGSQL_CONV_FORCE_NULL or - * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return array * @throws PgsqlException * */ @@ -132,20 +73,11 @@ function pg_convert(\PgSql\Connection $connection, string $table_name, array $va /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command - * internally to insert records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. - * Each value in rows becomes a row in table_name. - * Each value in rows should be a delimited string of the values - * to insert into each field. Values should be linefeed terminated. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $rows + * @param string $separator + * @param string $null_as * @throws PgsqlException * */ @@ -160,17 +92,11 @@ function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $ /** - * pg_copy_to copies a table to an array. It - * issues COPY TO SQL command internally to - * retrieve records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to copy the data into rows. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param string $separator + * @param string $null_as + * @return array * @throws PgsqlException * */ @@ -186,37 +112,11 @@ function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $s /** - * pg_delete deletes records from a table - * specified by the keys and values in conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_delete passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be deleted. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -232,18 +132,7 @@ function pg_delete(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_end_copy syncs the PostgreSQL frontend - * (usually a web server process) with the PostgreSQL server after - * doing a copy operation performed by - * pg_put_line. pg_end_copy - * must be issued, otherwise the PostgreSQL server may get out of - * sync with the frontend and will report an error. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -262,37 +151,10 @@ function pg_end_copy(?\PgSql\Connection $connection = null): void /** - * Sends a request to execute a prepared statement with given parameters, and - * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. - * pg_execute is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a - * prepared statement is given instead of a query string. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name of the prepared statement to execute. if - * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, - * pg_send_prepare or a PREPARE SQL - * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Elements are converted to strings by calling this function. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -316,16 +178,9 @@ function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_field_num will return the number of the - * field number that corresponds to the - * field in the given result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param string $field The name of the field. - * The given name is treated like an identifier in an SQL command, - * that is, it is downcased unless double-quoted. - * @return int The field number (numbered from 0). + * @param \PgSql\Result $result + * @param string $field + * @return int * @throws PgsqlException * */ @@ -341,16 +196,10 @@ function pg_field_num(\PgSql\Result $result, string $field): int /** - * pg_field_table returns the name of the table that field - * belongs to, or the table's oid if oid_only is TRUE. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field Field number, starting from 0. - * @param bool $oid_only By default the tables name that field belongs to is returned but - * if oid_only is set to TRUE, then the - * oid will instead be returned. - * @return mixed On success either the fields table name or oid. + * @param \PgSql\Result $result + * @param int $field + * @param bool $oid_only + * @return mixed * @throws PgsqlException * */ @@ -366,13 +215,8 @@ function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = fals /** - * pg_flush flushes any outbound query data waiting to be - * sent on the connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return mixed Returns TRUE if the flush was successful or no data was waiting to be - * flushed, 0 if part of the pending data was flushed but - * more remains. + * @param \PgSql\Connection $connection + * @return mixed * @throws PgsqlException * */ @@ -388,15 +232,7 @@ function pg_flush(\PgSql\Connection $connection) /** - * pg_free_result frees the memory and data associated with the - * specified PgSql\Result instance. - * - * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will - * be automatically freed when the script ends. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). + * @param \PgSql\Result $result * @throws PgsqlException * */ @@ -411,17 +247,8 @@ function pg_free_result(\PgSql\Result $result): void /** - * pg_host returns the host name of the given - * PostgreSQL connection instance is - * connected to. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @return string A string containing the name of the host the - * connection is to. + * @param \PgSql\Connection|null $connection + * @return string * @throws PgsqlException * */ @@ -441,39 +268,11 @@ function pg_host(?\PgSql\Connection $connection = null): string /** - * pg_insert inserts the values - * of values into the table specified - * by table_name. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_insert passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to insert rows. The table table_name must at least - * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be inserted. - * @param int $flags Any number of PGSQL_CONV_OPTS, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -489,30 +288,8 @@ function pg_insert(\PgSql\Connection $connection, string $table_name, array $val /** - * pg_last_oid is used to retrieve the - * OID assigned to an inserted row. - * - * OID field became an optional field from PostgreSQL 7.2 and will - * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use - * pg_result_status to check for successful - * insertion. - * - * To get the value of a SERIAL field in an inserted - * row, it is necessary to use the PostgreSQL CURRVAL - * function, naming the sequence whose last value is required. If the - * name of the sequence is unknown, the pg_get_serial_sequence - * PostgreSQL 8.0 function is necessary. - * - * PostgreSQL 8.1 has a function LASTVAL that returns - * the value of the most recently used sequence in the session. This avoids - * the need for naming the sequence, table or column altogether. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @return string An int or string containing the OID assigned to the most recently inserted - * row in the specified connection or - * no available OID. + * @param \PgSql\Result $result + * @return string * @throws PgsqlException * */ @@ -528,12 +305,7 @@ function pg_last_oid(\PgSql\Result $result): string /** - * pg_lo_close closes a large object. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. + * @param \PgSql\Lob $lob * @throws PgsqlException * */ @@ -548,21 +320,9 @@ function pg_lo_close(\PgSql\Lob $lob): void /** - * pg_lo_export takes a large object in a - * PostgreSQL database and saves its contents to a file on the local - * filesystem. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $pathname The full path and file name of the file in which to write the - * large object on the client filesystem. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $pathname * @throws PgsqlException * */ @@ -585,26 +345,10 @@ function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ? /** - * pg_lo_import creates a new large object - * in the database using a file on the filesystem as its data - * source. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $pathname The full path and file name of the file on the client - * filesystem from which to read the large object data. - * @param $object_id If an object_id is given the function - * will try to create a large object with this id, else a free - * object id is assigned by the server. The parameter - * relies on functionality that first - * appeared in PostgreSQL 8.1. - * @return int The OID of the newly created large object. + * @param \PgSql\Connection $connection + * @param string $pathname + * @param $object_id + * @return int * @throws PgsqlException * */ @@ -628,21 +372,10 @@ function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = /** - * pg_lo_open opens a large object in the database - * and returns an PgSql\Lob instance so that it can be manipulated. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and - * write. - * @return \PgSql\Lob An PgSql\Lob instance. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $mode + * @return \PgSql\Lob * @throws PgsqlException * */ @@ -658,17 +391,9 @@ function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgS /** - * pg_lo_read reads at most - * length bytes from a large object and - * returns it as a string. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $length An optional maximum number of bytes to return. - * @return string A string containing length bytes from the - * large object. + * @param \PgSql\Lob $lob + * @param int $length + * @return string * @throws PgsqlException * */ @@ -684,16 +409,9 @@ function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string /** - * pg_lo_seek seeks a position within an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), - * PGSQL_SEEK_CUR (seek from current position) - * or PGSQL_SEEK_END (seek from object end) . + * @param \PgSql\Lob $lob + * @param int $offset + * @param int $whence * @throws PgsqlException * */ @@ -708,13 +426,8 @@ function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void /** - * pg_lo_truncate truncates an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $size The number of bytes to truncate. + * @param \PgSql\Lob $lob + * @param int $size * @throws PgsqlException * */ @@ -729,18 +442,8 @@ function pg_lo_truncate(\PgSql\Lob $lob, int $size): void /** - * pg_lo_unlink deletes a large object with the - * oid. Returns TRUE on success. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. + * @param \PgSql\Connection $connection + * @param int $oid * @throws PgsqlException * */ @@ -755,20 +458,10 @@ function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void /** - * pg_lo_write writes data into a large object - * at the current seek position. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param string $data The data to be written to the large object. If length is - * an int and is less than the length of data, only - * length bytes will be written. - * @param int|null $length An optional maximum number of bytes to write. Must be greater than zero - * and no greater than the length of data. Defaults to - * the length of data. - * @return int The number of bytes written to the large object. + * @param \PgSql\Lob $lob + * @param string $data + * @param int|null $length + * @return int * @throws PgsqlException * */ @@ -788,13 +481,10 @@ function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int /** - * pg_meta_data returns table definition for - * table_name as an array. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name The name of the table. - * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param bool $extended + * @return array * @throws PgsqlException * */ @@ -810,41 +500,9 @@ function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $e /** - * Looks up a current parameter setting of the server. - * - * Certain parameter values are reported by the server automatically at - * connection startup or whenever their values change. pg_parameter_status can be - * used to interrogate these settings. It returns the current value of a - * parameter if known, or FALSE if the parameter is not known. - * - * Parameters reported as of PostgreSQL 8.0 include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and integer_datetimes. - * (server_encoding, TimeZone, and - * integer_datetimes were not reported by releases before 8.0.) Note that - * server_version, server_encoding and integer_datetimes - * cannot change after PostgreSQL startup. - * - * PostgreSQL 7.3 or lower servers do not report parameter settings, - * pg_parameter_status - * includes logic to obtain values for server_version and - * client_encoding - * anyway. Applications are encouraged to use pg_parameter_status rather than ad - * hoc code to determine these values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $param_name Possible param_name values include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and - * integer_datetimes. Note that this value is case-sensitive. - * @return string A string containing the value of the parameter or invalid - * param_name. + * @param \PgSql\Connection $connection + * @param string $param_name + * @return string * @throws PgsqlException * */ @@ -866,46 +524,9 @@ function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $par /** - * pg_pconnect opens a connection to a - * PostgreSQL database. It returns an PgSql\Connection instance that is - * needed by other PostgreSQL functions. - * - * If a second call is made to pg_pconnect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * To enable persistent connection, the pgsql.allow_persistent - * php.ini directive must be set to "On" (which is the default). - * The maximum number of persistent connection can be defined with the pgsql.max_persistent - * php.ini directive (defaults to -1 for no limit). The total number - * of connections can be set with the pgsql.max_links - * php.ini directive. - * - * pg_close will not close persistent links - * generated by pg_pconnect. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname, user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -921,14 +542,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connecti /** - * pg_ping pings a database connection and tries to - * reconnect it if it is broken. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -947,38 +561,10 @@ function pg_ping(?\PgSql\Connection $connection = null): void /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * pg_prepare is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters - * are used, they are referred to in the query as $1, $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is more flexible since it - * does not require parameter types to be pre-specified.) Also, although there - * is no PHP function for deleting a prepared statement, the SQL DEALLOCATE - * statement can be used for that purpose. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If - * "" is specified, then an unnamed statement is created, overwriting any - * previously defined unnamed statement. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1002,25 +588,8 @@ function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_put_line sends a NULL-terminated string - * to the PostgreSQL backend server. This is needed in conjunction - * with PostgreSQL's COPY FROM command. - * - * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, - * and in a single transaction. - * - * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler - * interface. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL - * terminator is added automatically. + * @param \PgSql\Connection $connection + * @param string $data * @throws PgsqlException * */ @@ -1041,53 +610,10 @@ function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null /** - * Submits a command to the server and waits for the result, with the ability - * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. - * pg_query_params is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * If parameters are used, they are referred to in the - * query string as $1, $2, etc. The same parameter may - * appear more than once in the query; the same value - * will be used in that case. params specifies the - * actual values of the parameters. A NULL value in this array means the - * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, - * but not more than one nonempty command.) - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * - * User-supplied values should always be passed as parameters, not - * interpolated into the query string, where they form possible - * SQL injection - * attack vectors and introduce bugs when handling data containing quotes. - * If for some reason you cannot use a parameter, ensure that interpolated - * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Values intended for bytea fields are not supported as - * parameters. Use pg_escape_bytea instead, or use the - * large object functions. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1111,42 +637,9 @@ function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = /** - * pg_query executes the query - * on the specified database connection. - * pg_query_params should be preferred - * in most cases. - * - * If an error occurs, and FALSE is returned, details of the error can - * be retrieved using the pg_last_error - * function if the connection is valid. - * - * - * - * Although connection can be omitted, it - * is not recommended, since it can be the cause of hard to find - * bugs in scripts. - * - * - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, - * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands - * included in the query string. However, using multiple transactions in one function call is not recommended. - * - * String interpolation of user-supplied data is extremely dangerous and is - * likely to lead to SQL - * injection vulnerabilities. In most cases - * pg_query_params should be preferred, passing - * user-supplied values as parameters rather than substituting them into - * the query string. - * - * Any user-supplied data substituted directly into a query string should - * be properly escaped. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1168,31 +661,9 @@ function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): /** - * pg_result_error_field returns one of the detailed error message - * fields associated with result instance. It is only available - * against a PostgreSQL 7.4 or above server. The error field is specified by - * the field_code. - * - * Because pg_query and pg_query_params return FALSE if the query fails, - * you must use pg_send_query and - * pg_get_result to get the result handle. - * - * If you need to get additional error information from failed pg_query queries, - * use pg_set_error_verbosity and pg_last_error - * and then parse the result. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field_code Possible field_code values are: PGSQL_DIAG_SEVERITY, - * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, - * PGSQL_DIAG_MESSAGE_DETAIL, - * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, - * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), - * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), - * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, - * PGSQL_DIAG_SOURCE_LINE or - * PGSQL_DIAG_SOURCE_FUNCTION. - * @return null|string A string containing the contents of the error field, NULL if the field does not exist. + * @param \PgSql\Result $result + * @param int $field_code + * @return null|string * @throws PgsqlException * */ @@ -1208,13 +679,8 @@ function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string /** - * pg_result_seek sets the internal row offset in - * the result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $row Row to move the internal offset to in the PgSql\Result instance. - * Rows are numbered starting from zero. + * @param \PgSql\Result $result + * @param int $row * @throws PgsqlException * */ @@ -1229,41 +695,12 @@ function pg_result_seek(\PgSql\Result $result, int $row): void /** - * pg_select selects records specified by - * conditions which has - * field=>value. For a successful query, it returns an - * array containing all records and fields that match the condition - * specified by conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_select passes raw values. Values - * must be escaped or PGSQL_DML_ESCAPE option must be - * specified. PGSQL_DML_ESCAPE quotes and escapes - * parameters/identifiers. Therefore, table/column names became case - * sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be retrieved. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags * @param int $mode - * @return mixed Returns string if PGSQL_DML_STRING is passed - * via flags, otherwise it returns an array on success. + * @return mixed * @throws PgsqlException * */ @@ -1279,11 +716,8 @@ function pg_select(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_socket returns a read only resource - * corresponding to the socket underlying the given PostgreSQL connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return resource A socket resource on success. + * @param \PgSql\Connection $connection + * @return resource * @throws PgsqlException * */ @@ -1299,26 +733,9 @@ function pg_socket(\PgSql\Connection $connection) /** - * pg_trace enables tracing of the PostgreSQL - * frontend/backend communication to a file. To fully understand the results, - * one needs to be familiar with the internals of PostgreSQL - * communication protocol. - * - * For those who are not, it can still be - * useful for tracing errors in queries sent to the server, you - * could do for example grep '^To backend' - * trace.log and see what queries actually were sent to the - * PostgreSQL server. For more information, refer to the - * PostgreSQL Documentation. - * - * @param string $filename The full path and file name of the file in which to write the - * trace log. Same as in fopen. - * @param string $mode An optional file access mode, same as for fopen. - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param string $filename + * @param string $mode + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -1337,39 +754,12 @@ function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $conn /** - * pg_update updates records that matches - * conditions with values. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_update passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be updated. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ diff --git a/generated/8.2/posix.php b/generated/8.2/posix.php index f79a82fe..609089ec 100644 --- a/generated/8.2/posix.php +++ b/generated/8.2/posix.php @@ -5,18 +5,8 @@ use Safe\Exceptions\PosixException; /** - * posix_access checks the user's permission of a file. - * - * @param string $filename The name of the file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -31,55 +21,8 @@ function posix_access(string $filename, int $flags = 0): void /** - * Gets information about a group provided its id. - * - * @param int $group_id The group id. - * @return array{name: string, passwd: string, gid: int, members: list} The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID, should be the same as the - * group_id parameter used when calling the - * function, and hence redundant. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $group_id + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -95,55 +38,8 @@ function posix_getgrgid(int $group_id): array /** - * Gets information about a group provided its name. - * - * @param string $name The name of the group - * @return array{name: string, passwd: string, gid: int, members: list} Returns an array on success. - * The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. This should be the same as - * the name parameter used when - * calling the function, and hence redundant. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID of the group in numeric form. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * + * @param string $name + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -159,10 +55,7 @@ function posix_getgrnam(string $name): array /** - * Gets the group set of the current process. - * - * @return list Returns an array of integers containing the numeric group ids of the group - * set of the current process. + * @return list * @throws PosixException * */ @@ -178,9 +71,7 @@ function posix_getgroups(): array /** - * Returns the login name of the user owning the current process. - * - * @return string Returns the login name of the user, as a string. + * @return string * @throws PosixException * */ @@ -196,83 +87,8 @@ function posix_getlogin(): string /** - * Returns an array of information about the user - * referenced by the given user ID. - * - * @param int $user_id The user identifier. - * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} Returns an associative array with the following elements: - * - * The user information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the username of the user. This is - * a short, usually less than 16 character "handle" of the - * user, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the user's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * uid - * - * User ID, should be the same as the - * user_id parameter used when calling the - * function, and hence redundant. - * - * - * - * gid - * - * The group ID of the user. Use the function - * posix_getgrgid to resolve the group - * name and a list of its members. - * - * - * - * gecos - * - * GECOS is an obsolete term that refers to the finger - * information field on a Honeywell batch processing system. - * The field, however, lives on, and its contents have been - * formalized by POSIX. The field contains a comma separated - * list containing the user's full name, office phone, office - * number, and home phone number. On most systems, only the - * user's full name is available. - * - * - * - * dir - * - * This element contains the absolute path to the - * home directory of the user. - * - * - * - * shell - * - * The shell element contains the absolute path to the - * executable of the user's default shell. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $user_id + * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} * @throws PosixException * */ @@ -288,101 +104,7 @@ function posix_getpwuid(int $user_id): array /** - * posix_getrlimit returns an array - * of information about the current resource's soft and hard limits. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @return array Returns an associative array of elements for each - * limit that is defined. Each limit has a soft and a hard limit. - * - * List of possible limits returned - * - * - * - * Limit name - * Limit description - * - * - * - * - * core - * - * The maximum size of the core file. When 0, not core files are - * created. When core files are larger than this size, they will - * be truncated at this size. - * - * - * - * totalmem - * - * The maximum size of the memory of the process, in bytes. - * - * - * - * virtualmem - * - * The maximum size of the virtual memory for the process, in bytes. - * - * - * - * data - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * stack - * - * The maximum size of the process stack, in bytes. - * - * - * - * rss - * - * The maximum number of virtual pages resident in RAM - * - * - * - * maxproc - * - * The maximum number of processes that can be created for the - * real user ID of the calling process. - * - * - * - * memlock - * - * The maximum number of bytes of memory that may be locked into RAM. - * - * - * - * cpu - * - * The amount of time the process is allowed to use the CPU. - * - * - * - * filesize - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * openfiles - * - * One more than the maximum number of open file descriptors. - * - * - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -398,14 +120,8 @@ function posix_getrlimit(): array /** - * Return the session id of the process process_id. - * The session id of a process is the process group id of the session leader. - * - * @param int $process_id The process identifier. If set to 0, the current process is - * assumed. If an invalid process_id is - * specified, then FALSE is returned and an error is set which - * can be checked with posix_get_last_error. - * @return int Returns the identifier, as an int. + * @param int $process_id + * @return int * @throws PosixException * */ @@ -421,10 +137,8 @@ function posix_getsid(int $process_id): int /** - * Calculates the group access list for the user specified in name. - * - * @param string $username The user to calculate the list for. - * @param int $group_id Typically the group number from the password file. + * @param string $username + * @param int $group_id * @throws PosixException * */ @@ -439,11 +153,8 @@ function posix_initgroups(string $username, int $group_id): void /** - * Send the signal signal to the process with - * the process identifier process_id. - * - * @param int $process_id The process identifier. - * @param int $signal One of the PCNTL signals constants. + * @param int $process_id + * @param int $signal * @throws PosixException * */ @@ -458,16 +169,8 @@ function posix_kill(int $process_id, int $signal): void /** - * posix_mkfifo creates a special - * FIFO file which exists in the file system and acts as - * a bidirectional communication endpoint for processes. - * - * @param string $filename Path to the FIFO file. - * @param int $permissions The second parameter permissions has to be given in - * octal notation (e.g. 0644). The permission of the newly created - * FIFO also depends on the setting of the current - * umask. The permissions of the created file are - * (mode & ~umask). + * @param string $filename + * @param int $permissions * @throws PosixException * */ @@ -482,17 +185,10 @@ function posix_mkfifo(string $filename, int $permissions): void /** - * Creates a special or ordinary file. - * - * @param string $filename The file to create - * @param int $flags This parameter is constructed by a bitwise OR between file type (one of - * the following constants: POSIX_S_IFREG, - * POSIX_S_IFCHR, POSIX_S_IFBLK, - * POSIX_S_IFIFO or - * POSIX_S_IFSOCK) and permissions. - * @param int $major The major device kernel identifier (required to pass when using - * S_IFCHR or S_IFBLK). - * @param int $minor The minor device kernel identifier. + * @param string $filename + * @param int $flags + * @param int $major + * @param int $minor * @throws PosixException * */ @@ -507,11 +203,7 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = /** - * Set the effective group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -526,11 +218,7 @@ function posix_setegid(int $group_id): void /** - * Set the effective user ID of the current process. This is a privileged - * function and needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -545,14 +233,7 @@ function posix_seteuid(int $user_id): void /** - * Set the real group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. The - * appropriate order of function calls is - * posix_setgid first, - * posix_setuid last. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -567,11 +248,8 @@ function posix_setgid(int $group_id): void /** - * Let the process process_id join the process group - * process_group_id. - * - * @param int $process_id The process id. - * @param int $process_group_id The process group id. + * @param int $process_id + * @param int $process_group_id * @throws PosixException * */ @@ -586,23 +264,9 @@ function posix_setpgid(int $process_id, int $process_group_id): void /** - * posix_setrlimit sets the soft and hard limits for a - * given system resource. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int $resource The - * resource limit constant - * corresponding to the limit that is being set. - * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. - * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. + * @param int $resource + * @param int $soft_limit + * @param int $hard_limit * @throws PosixException * */ @@ -617,9 +281,7 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void /** - * Make the current process a session leader. - * - * @return int Returns the session ids. + * @return int * @throws PosixException * */ @@ -635,11 +297,7 @@ function posix_setsid(): int /** - * Set the real user ID of the current process. This is a privileged - * function that needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -654,39 +312,7 @@ function posix_setuid(int $user_id): void /** - * Gets information about the current CPU usage. - * - * @return array Returns a hash of strings with information about the current - * process CPU usage. The indices of the hash are: - * - * - * - * ticks - the number of clock ticks that have elapsed since - * reboot. - * - * - * - * - * utime - user time used by the current process. - * - * - * - * - * stime - system time used by the current process. - * - * - * - * - * cutime - user time used by current process and children. - * - * - * - * - * cstime - system time used by current process and children. - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -702,41 +328,7 @@ function posix_times(): array /** - * Gets information about the system. - * - * Posix requires that assumptions must not be made about the - * format of the values, e.g. the assumption that a release may contain - * three digits or anything else returned by this function. - * - * @return array Returns a hash of strings with information about the - * system. The indices of the hash are - * - * - * sysname - operating system name (e.g. Linux) - * - * - * nodename - system name (e.g. valiant) - * - * - * release - operating system release (e.g. 2.2.10) - * - * - * version - operating system version (e.g. #4 Tue Jul 20 - * 17:01:36 MEST 1999) - * - * - * machine - system architecture (e.g. i586) - * - * - * domainname - DNS domainname (e.g. example.com) - * - * - * - * domainname is a GNU extension and not part of POSIX.1, so this - * field is only available on GNU systems or when using the GNU - * libc. - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ diff --git a/generated/8.2/ps.php b/generated/8.2/ps.php index 1eaa9774..912fbb4e 100644 --- a/generated/8.2/ps.php +++ b/generated/8.2/ps.php @@ -5,23 +5,12 @@ use Safe\Exceptions\PsException; /** - * Places a hyperlink at the given position pointing to a file program - * which is being started when clicked on. The hyperlink's source position - * is a rectangle - * with its lower left corner at (llx, lly) and its upper right corner at - * (urx, ury). The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The path of the program to be started, when the link is clicked on. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename * @throws PsException * */ @@ -36,30 +25,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur /** - * Places a hyperlink at the given position pointing to a page in the same - * document. Clicking on the link will jump to the given page. The first page - * in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param int $page The number of the page displayed when clicking on the link. - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param int $page + * @param string $dest * @throws PsException * */ @@ -74,31 +46,15 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury /** - * Adds a note at a certain position on the page. Notes are like little - * rectangular sheets with text on it, which can be placed anywhere on - * a page. They - * are shown either folded or unfolded. If folded, the specified icon - * is used as a placeholder. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $contents The text of the note. - * @param string $title The title of the note as displayed in the header of the note. - * @param string $icon The icon shown if the note is folded. This parameter can be set - * to comment, insert, - * note, paragraph, - * newparagraph, key, or - * help. - * @param int $open If open is unequal to zero the note will - * be shown unfolded after opening the document with a pdf viewer. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open * @throws PsException * */ @@ -113,32 +69,14 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str /** - * Places a hyperlink at the given position pointing to a second pdf document. - * Clicking on the link will branch to the document at the given page. The - * first page in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The name of the pdf document to be opened when clicking on - * this link. - * @param int $page The page number of the destination pdf document - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param int $page + * @param string $dest * @throws PsException * */ @@ -153,25 +91,12 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Places a hyperlink at the given position pointing to a web page. The - * hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and - * its upper right corner at (urx, - * ury). The rectangle has by default a thin - * blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $url The url of the hyperlink to be opened when clicking on - * this link, e.g. http://www.php.net. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $url * @throws PsException * */ @@ -186,21 +111,12 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn counterclockwise (use - * ps_arcn to draw clockwise). The subpath added - * to the current path starts on the arc at angle alpha - * and ends on the arc at angle beta. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The start angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -215,21 +131,12 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn clockwise (use - * ps_arc to draw counterclockwise). The subpath added to - * the current path starts on the arc at angle beta and - * ends on the arc at angle alpha. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The starting angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -244,43 +151,9 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float /** - * Starts a new page. Although the parameters width - * and height imply a different page size for each - * page, this is not possible in PostScript. The first call of - * ps_begin_page will set the page size for the whole - * document. Consecutive calls will have no effect, except for creating a new - * page. The situation is different if you intent to convert the PostScript - * document into PDF. This function places pdfmarks into the document which - * can set the size for each page indiviually. The resulting PDF document will - * have different page sizes. - * - * Though PostScript does not know different page sizes, pslib places - * a bounding box for each page into the document. This size is evaluated - * by some PostScript viewers and will have precedence over the BoundingBox - * in the Header of the document. This can lead to unexpected results when - * you set a BoundingBox whose lower left corner is not (0, 0), because the - * bounding box of the page will always have a lower left corner (0, 0) - * and overwrites the global setting. - * - * Each page is encapsulated into save/restore. This means, that most of the - * settings made on one page will not be retained on the next page. - * - * If there is up to the first call of ps_begin_page no - * call of ps_findfont, then the header of the PostScript - * document will be output and the bounding box will be set to the size of - * the first page. The lower left corner of the bounding box is set to (0, 0). - * If ps_findfont was called before, then the - * header has been output already, and the document will not have a valid - * bounding box. In order to prevent this, one should call - * ps_set_info to set the info field - * BoundingBox and possibly Orientation - * before any ps_findfont or - * ps_begin_page calls. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the page in pixel, e.g. 596 for A4 format. - * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @param resource $psdoc + * @param float $width + * @param float $height * @throws PsException * */ @@ -295,21 +168,13 @@ function ps_begin_page($psdoc, float $width, float $height): void /** - * Starts a new pattern. A pattern is like a page containing e.g. a drawing - * which can be used for filling areas. It is used like a color by calling - * ps_setcolor and setting the color space to - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the pattern in pixel. - * @param float $height The height of the pattern in pixel. - * @param float $xstep The distance in pixel of placements of the pattern in - * horizontal direction. - * @param float $ystep The distance in pixel of placements of the pattern in - * vertical direction. - * @param int $painttype Must be 1 or 2. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param float $width + * @param float $height + * @param float $xstep + * @param float $ystep + * @param int $painttype + * @return int * @throws PsException * */ @@ -325,18 +190,10 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo /** - * Starts a new template. A template is called a form in the postscript - * language. It is created similar to a pattern but used like an image. - * Templates are often used for drawings which are placed several times - * through out the document, e.g. like a company logo. All drawing functions - * may be used within a template. The template will not be drawn until - * it is placed by ps_place_image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the template in pixel. - * @param float $height The height of the template in pixel. - * @return int Returns TRUE on success. + * @param resource $psdoc + * @param float $width + * @param float $height + * @return int * @throws PsException * */ @@ -352,20 +209,10 @@ function ps_begin_template($psdoc, float $width, float $height): int /** - * Draws a circle with its middle point at (x, - * y). The circle starts and ends at position - * (x+radius, - * y). If this function is called outside a path it - * will start a new path. If it is called within a path it will add the circle - * as a subpath. If the last drawing operation does not end in point - * (x+radius, - * y) then there will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius * @throws PsException * */ @@ -380,11 +227,7 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** - * Takes the current path and uses it to define the border of a clipping area. - * Everything drawn outside of that area will not be visible. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -399,14 +242,8 @@ function ps_clip($psdoc): void /** - * Closes an image and frees its resources. Once an image is closed - * it cannot be used anymore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid Resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. + * @param resource $psdoc + * @param int $imageid * @throws PsException * */ @@ -421,17 +258,7 @@ function ps_close_image($psdoc, int $imageid): void /** - * Closes the PostScript document. - * - * This function writes the trailer of the PostScript document. - * It also writes the bookmark tree. ps_close does - * not free any resources, which is done by ps_delete. - * - * This function is also called by ps_delete if it - * has not been called before. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -446,11 +273,7 @@ function ps_close($psdoc): void /** - * Connects the last point with first point of a path and draws the resulting - * closed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -465,11 +288,7 @@ function ps_closepath_stroke($psdoc): void /** - * Connects the last point with the first point of a path. The resulting - * path can be used for stroking, filling, clipping, etc.. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -484,15 +303,8 @@ function ps_closepath($psdoc): void /** - * Output a text one line below the last line. The line spacing is - * taken from the value "leading" which must be set with - * ps_set_value. The actual position of the - * text is determined by the values "textx" and "texty" which can be requested - * with ps_get_value - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -507,17 +319,13 @@ function ps_continue_text($psdoc, string $text): void /** - * Add a section of a cubic Bézier curve described by the three given control - * points to the current path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x1 x-coordinate of first control point. - * @param float $y1 y-coordinate of first control point. - * @param float $x2 x-coordinate of second control point. - * @param float $y2 y-coordinate of second control point. - * @param float $x3 x-coordinate of third control point. - * @param float $y3 y-coordinate of third control point. + * @param resource $psdoc + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PsException * */ @@ -532,15 +340,7 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x /** - * Mainly frees memory used by the document. Also closes a file, if it was not - * closed before with ps_close. You should in any case - * close the file with ps_close before, because - * ps_close not just closes the file but also outputs a - * trailor containing PostScript comments like the number of pages in the - * document and adding the bookmark hierarchy. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -555,13 +355,7 @@ function ps_delete($psdoc): void /** - * Ends a page which was started with ps_begin_page. - * Ending a page will leave the current drawing context, which e.g. requires - * to reload fonts if they were loading within the page, and to set many - * other drawing parameters like the line width, or color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -576,12 +370,7 @@ function ps_end_page($psdoc): void /** - * Ends a pattern which was started with ps_begin_pattern. - * Once a pattern has been ended, it can be used like a color to fill - * areas. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -596,11 +385,7 @@ function ps_end_pattern($psdoc): void /** - * Ends a template which was started with ps_begin_template. - * Once a template has been ended, it can be used like an image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -615,11 +400,7 @@ function ps_end_template($psdoc): void /** - * Fills and draws the path constructed with previously called drawing - * functions like ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -634,11 +415,7 @@ function ps_fill_stroke($psdoc): void /** - * Fills the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -653,128 +430,10 @@ function ps_fill($psdoc): void /** - * Gets several parameters which were directly set by - * ps_set_parameter or indirectly by one of the other - * functions. Parameters are by definition string - * values. This function cannot be used to retrieve resources which were also - * set by ps_set_parameter. - * - * The parameter name can have the following values. - * - * - * - * fontname - * - * - * The name of the currently active font or the font whose - * identifier is passed in parameter modifier. - * - * - * - * - * fontencoding - * - * - * The encoding of the currently active font. - * - * - * - * - * dottedversion - * - * - * The version of the underlying pslib library in the format - * <major>.<minor>.<subminor> - * - * - * - * - * scope - * - * - * The current drawing scope. Can be object, document, null, page, - * pattern, path, template, prolog, font, glyph. - * - * - * - * - * ligaturedisolvechar - * - * - * The character which dissolves a ligature. If your are using a font - * which contains the ligature `ff' and `|' is the char to dissolve the - * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * - * imageencoding - * - * - * The encoding used for encoding images. Can be either - * hex or 85. hex encoding - * uses two bytes in the postscript file each byte in the image. - * 85 stand for Ascii85 encoding. - * - * - * - * - * linenumbermode - * - * - * Set to paragraph if lines are numbered - * within a paragraph or box if they are - * numbered within the surrounding box. - * - * - * - * - * linebreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will add a line - * break. - * - * - * - * - * parbreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will start - * a new paragraph. - * - * - * - * - * hyphenation - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE the paragraph will be hyphenated - * if a hypen dictionary is set and exists. - * - * - * - * - * hyphendict - * - * - * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name Name of the parameter. - * @param float $modifier An identifier needed if a parameter of a resource is requested, - * e.g. the size of an image. In such a case the resource id is - * passed. - * @return string Returns the value of the parameter. + * @param resource $psdoc + * @param string $name + * @param float $modifier + * @return string * @throws PsException * */ @@ -794,23 +453,9 @@ function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string /** - * Hyphenates the passed word. ps_hyphenate evaluates the - * value hyphenminchars (set by ps_set_value) and - * the parameter hyphendict (set by ps_set_parameter). - * hyphendict must be set before calling this function. - * - * This function requires the locale category LC_CTYPE to be set properly. - * This is done when the extension is initialized by using the environment - * variables. On Unix systems read the man page of locale for more information. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text text should not contain any non alpha - * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in - * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in - * the text. + * @param resource $psdoc + * @param string $text + * @return array * @throws PsException * */ @@ -826,12 +471,7 @@ function ps_hyphenate($psdoc, string $text): array /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param string $file * @throws PsException * @@ -847,14 +487,9 @@ function ps_include_file($psdoc, string $file): void /** - * Adds a straight line from the current point to the given coordinates to the - * current path. Use ps_moveto to set the starting point - * of the line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the end point of the line. - * @param float $y y-coordinate of the end point of the line. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -869,15 +504,9 @@ function ps_lineto($psdoc, float $x, float $y): void /** - * Sets the current point to new coordinates. If this is the first call of - * ps_moveto after a previous path has been ended then it - * will start a new path. If this function is called in the middle of a path - * it will just set the current point and start a subpath. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the point to move to. - * @param float $y y-coordinate of the point to move to. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -892,13 +521,7 @@ function ps_moveto($psdoc, float $x, float $y): void /** - * Creates a new document instance. It does not create the file on disk or in - * memory, it just sets up everything. ps_new is usually - * followed by a call of ps_open_file to actually create - * the postscript document. - * - * @return resource Resource of PostScript document. The return value - * is passed to all other functions as the first argument. + * @return resource * @throws PsException * */ @@ -914,14 +537,8 @@ function ps_new() /** - * Creates a new file on disk and writes the PostScript document into it. The - * file will be closed when ps_close is called. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $filename The name of the postscript file. - * If filename is not passed the document will be - * created in memory and all output will go straight to the browser. + * @param resource $psdoc + * @param string $filename * @throws PsException * */ @@ -940,20 +557,11 @@ function ps_open_file($psdoc, ?string $filename = null): void /** - * Places a formerly loaded image on the page. The image can be scaled. - * If the image shall be rotated as well, you will have to rotate the - * coordinate system before with ps_rotate. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. - * @param float $x x-coordinate of the lower left corner of the image. - * @param float $y y-coordinate of the lower left corner of the image. - * @param float $scale The scaling factor for the image. A scale of 1.0 will result - * in a resolution of 72 dpi, because each pixel is equivalent to - * 1 point. + * @param resource $psdoc + * @param int $imageid + * @param float $x + * @param float $y + * @param float $scale * @throws PsException * */ @@ -968,19 +576,11 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): /** - * Draws a rectangle with its lower left corner at (x, - * y). The rectangle starts and ends in its lower left - * corner. If this function is called outside a path it will start a new path. - * If it is called within a path it will add the rectangle as a subpath. If - * the last drawing operation does not end in the lower left corner then there - * will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the lower left corner of the rectangle. - * @param float $y y-coordinate of the lower left corner of the rectangle. - * @param float $width The width of the image. - * @param float $height The height of the image. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PsException * */ @@ -995,14 +595,7 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void /** - * Restores a previously saved graphics context. Any call of - * ps_save must be accompanied by a call to - * ps_restore. All coordinate transformations, line - * style settings, color settings, etc. are being restored to the state - * before the call of ps_save. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1017,11 +610,8 @@ function ps_restore($psdoc): void /** - * Sets the rotation of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $rot Angle of rotation in degree. + * @param resource $psdoc + * @param float $rot * @throws PsException * */ @@ -1036,12 +626,7 @@ function ps_rotate($psdoc, float $rot): void /** - * Saves the current graphics context, containing colors, translation and - * rotation settings and some more. A saved context can be restored with - * ps_restore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1056,12 +641,9 @@ function ps_save($psdoc): void /** - * Sets horizontal and vertical scaling of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x Scaling factor in horizontal direction. - * @param float $y Scaling factor in vertical direction. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1076,18 +658,10 @@ function ps_scale($psdoc, float $x, float $y): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the color of the rectangle's border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $red The red component of the border color. - * @param float $green The green component of the border color. - * @param float $blue The blue component of the border color. + * @param resource $psdoc + * @param float $red + * @param float $green + * @param float $blue * @throws PsException * */ @@ -1102,18 +676,9 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the length of the black and white portion of a - * dashed border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $black The length of the dash. - * @param float $white The length of the gap between dashes. + * @param resource $psdoc + * @param float $black + * @param float $white * @throws PsException * */ @@ -1128,18 +693,9 @@ function ps_set_border_dash($psdoc, float $black, float $white): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the appearance and width of the border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $style style can be solid or - * dashed. - * @param float $width The line width of the border. + * @param resource $psdoc + * @param string $style + * @param float $width * @throws PsException * */ @@ -1154,39 +710,9 @@ function ps_set_border_style($psdoc, string $style, float $width): void /** - * Sets certain information fields of the document. This fields will be shown - * as a comment in the header of the PostScript file. If the document is - * converted to pdf this fields will also be used for the document - * information. - * - * The BoundingBox is usually set to the value given to the - * first page. This only works if ps_findfont has not - * been called before. In such cases the BoundingBox would be left unset - * unless you set it explicitly with this function. - * - * This function will have no effect anymore when the header of the postscript - * file has been already written. It must be called before the first page - * or the first call of ps_findfont. - * - * @param resource $p Resource identifier of the postscript file - * as returned by ps_new. - * @param string $key The name of the information field to set. The values which can be - * set are Keywords, Subject, - * Title, Creator, - * Author, BoundingBox, and - * Orientation. Be aware that some of them has a - * meaning to PostScript viewers. - * @param string $val The value of the information field. The field - * Orientation can be set to either - * Portrait or Landscape. The - * BoundingBox is a string consisting of four numbers. - * The first two numbers are the coordinates of the lower left corner of - * the page. The last two numbers are the coordinates of the upper - * right corner. - * - * Up to version 0.2.6 of pslib, the BoundingBox and Orientation - * will be overwritten by ps_begin_page, - * unless ps_findfont has been called before. + * @param resource $p + * @param string $key + * @param string $val * @throws PsException * */ @@ -1201,13 +727,9 @@ function ps_set_info($p, string $key, string $val): void /** - * Sets several parameters which are used by many functions. Parameters are by - * definition string values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name For a list of possible names see ps_get_parameter. - * @param string $value The value of the parameter. + * @param resource $psdoc + * @param string $name + * @param string $value * @throws PsException * */ @@ -1222,19 +744,9 @@ function ps_set_parameter($psdoc, string $name, string $value): void /** - * Set the position for the next text output. You may alternatively set the x - * and y value separately by calling ps_set_value and - * choosing textx respectively texty as - * the value name. - * - * If you want to output text at a certain position it is more convenient - * to use ps_show_xy instead of setting the text position - * and calling ps_show. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the new text position. - * @param float $y y-coordinate of the new text position. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1249,65 +761,9 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** - * Sets several values which are used by many functions. Parameters are by - * definition float values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name The name can be one of the following: - * - * - * textrendering - * - * - * The way how text is shown. - * - * - * - * - * textx - * - * - * The x coordinate for text output. - * - * - * - * - * texty - * - * - * The y coordinate for text output. - * - * - * - * - * wordspacing - * - * - * The distance between words relative to the width of a space. - * - * - * - * - * leading - * - * - * The distance between lines in pixels. - * - * - * - * - * - * The way how text is shown. - * - * The x coordinate for text output. - * - * The y coordinate for text output. - * - * The distance between words relative to the width of a space. - * - * The distance between lines in pixels. - * @param float $value The way how text is shown. + * @param resource $psdoc + * @param string $name + * @param float $value * @throws PsException * */ @@ -1322,27 +778,13 @@ function ps_set_value($psdoc, string $name, float $value): void /** - * Sets the color for drawing, filling, or both. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The parameter type can be - * both, fill, or - * fillstroke. - * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, - * spot, pattern. Depending on the - * colorspace either only the first, the first three or all parameters - * will be used. - * @param float $c1 Depending on the colorspace this is either the red component (rgb), - * the cyan component (cmyk), the gray value (gray), the identifier of - * the spot color or the identifier of the pattern. - * @param float $c2 Depending on the colorspace this is either the green component (rgb), - * the magenta component (cmyk). - * @param float $c3 Depending on the colorspace this is either the blue component (rgb), - * the yellow component (cmyk). - * @param float $c4 This must only be set in cmyk colorspace and specifies the black - * component. + * @param resource $psdoc + * @param string $type + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PsException * */ @@ -1357,12 +799,9 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** - * Sets the length of the black and white portions of a dashed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $on The length of the dash. - * @param float $off The length of the gap between dashes. + * @param resource $psdoc + * @param float $on + * @param float $off * @throws PsException * */ @@ -1377,13 +816,8 @@ function ps_setdash($psdoc, float $on, float $off): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The value must be between 0.2 and 1. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1398,14 +832,9 @@ function ps_setflat($psdoc, float $value): void /** - * Sets a font, which has to be loaded before with - * ps_findfont. Outputting text without setting a font - * results in an error. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $fontid The font identifier as returned by ps_findfont. - * @param float $size The size of the font. + * @param resource $psdoc + * @param int $fontid + * @param float $size * @throws PsException * */ @@ -1420,11 +849,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** - * Sets the gray value for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $gray The value must be between 0 (white) and 1 (black). + * @param resource $psdoc + * @param float $gray * @throws PsException * */ @@ -1439,14 +865,8 @@ function ps_setgray($psdoc, float $gray): void /** - * Sets how line ends look like. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The type of line ends. Possible values are - * PS_LINECAP_BUTT, - * PS_LINECAP_ROUND, or - * PS_LINECAP_SQUARED. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1461,14 +881,8 @@ function ps_setlinecap($psdoc, int $type): void /** - * Sets how lines are joined. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The way lines are joined. Possible values are - * PS_LINEJOIN_MITER, - * PS_LINEJOIN_ROUND, or - * PS_LINEJOIN_BEVEL. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1483,11 +897,8 @@ function ps_setlinejoin($psdoc, int $type): void /** - * Sets the line width for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of lines in points. + * @param resource $psdoc + * @param float $width * @throws PsException * */ @@ -1502,16 +913,8 @@ function ps_setlinewidth($psdoc, float $width): void /** - * If two lines join in a small angle and the line join is set to - * PS_LINEJOIN_MITER, then - * the resulting spike will be very long. The miter limit is the maximum - * ratio of the miter length (the length of the spike) and the line width. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The maximum ratio between the miter length and the line width. Larger - * values (> 10) will result in very long spikes when two lines meet - * in a small angle. Keep the default unless you know what you are doing. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1526,12 +929,7 @@ function ps_setmiterlimit($psdoc, float $value): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param int $mode * @throws PsException * @@ -1547,14 +945,8 @@ function ps_setoverprintmode($psdoc, int $mode): void /** - * Sets the length of the black and white portions of a dashed line. - * ps_setpolydash is used to set more complicated dash - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $arr arr is a list of length elements alternately for - * the black and white portion. + * @param resource $psdoc + * @param float $arr * @throws PsException * */ @@ -1569,16 +961,10 @@ function ps_setpolydash($psdoc, float $arr): void /** - * Creates a pattern based on a shading, which has to be created before with - * ps_shading. Shading patterns can be used like regular - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. - * @param string $optlist This argument is not currently used. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param int $shadingid + * @param string $optlist + * @return int * @throws PsException * */ @@ -1594,36 +980,18 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** - * Creates a shading, which can be used by ps_shfill or - * ps_shading_pattern. - * - * The color of the shading can be in any color space except for - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The type of shading can be either radial or - * axial. Each shading starts with the current fill - * color and ends with the given color values passed in the parameters - * c1 to c4 - * (see ps_setcolor for their meaning). - * @param float $x0 The coordinates x0, y0, - * x1, y1 are the start and - * end point of the shading. If the type of shading is - * radial the two points are the middle points of - * a starting and ending circle. - * @param float $y0 See ps_setcolor for their meaning. - * @param float $x1 If the shading is of type radial the - * optlist must also contain the parameters - * r0 and r1 with the radius of the - * start and end circle. + * @param resource $psdoc + * @param string $type + * @param float $x0 + * @param float $y0 + * @param float $x1 * @param float $y1 * @param float $c1 * @param float $c2 * @param float $c3 * @param float $c4 * @param string $optlist - * @return int Returns the identifier of the pattern. + * @return int * @throws PsException * */ @@ -1639,15 +1007,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float /** - * Fills an area with a shading, which has to be created before with - * ps_shading. This is an alternative way to creating - * a pattern from a shading ps_shading_pattern and using - * the pattern as the filling color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. + * @param resource $psdoc + * @param int $shadingid * @throws PsException * */ @@ -1662,13 +1023,10 @@ function ps_shfill($psdoc, int $shadingid): void /** - * Output a text at the given text position. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param float $x x-coordinate of the lower left corner of the box surrounding the text. - * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @param resource $psdoc + * @param string $text + * @param float $x + * @param float $y * @throws PsException * */ @@ -1683,10 +1041,6 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param resource $psdoc * @param string $text * @param int $len @@ -1706,19 +1060,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) /** - * Output a text at the current text position. The text position can be set - * by storing the x and y coordinates into the values textx - * and texty with the function - * ps_set_value. The function will issue an - * error if a font was not set before with ps_setfont. - * - * ps_show evaluates the following parameters and values - * as set by ps_set_parameter and - * ps_set_value. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -1733,12 +1076,9 @@ function ps_show($psdoc, string $text): void /** - * Output text at the current position. Do not print more than len characters. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param int $len The maximum number of characters to print. + * @param resource $psdoc + * @param string $text + * @param int $len * @throws PsException * */ @@ -1753,11 +1093,7 @@ function ps_show2($psdoc, string $text, int $len): void /** - * Draws the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1772,13 +1108,8 @@ function ps_stroke($psdoc): void /** - * Output the glyph at position ord in the font - * encoding vector of the current font. The font encoding for a font can be - * set when loading the font with ps_findfont. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $ord The position of the glyph in the font encoding vector. + * @param resource $psdoc + * @param int $ord * @throws PsException * */ @@ -1793,12 +1124,9 @@ function ps_symbol($psdoc, int $ord): void /** - * Sets a new initial point of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the origin of the translated coordinate system. - * @param float $y y-coordinate of the origin of the translated coordinate system. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ diff --git a/generated/8.2/pspell.php b/generated/8.2/pspell.php index 826a9ce3..e94a271e 100644 --- a/generated/8.2/pspell.php +++ b/generated/8.2/pspell.php @@ -5,14 +5,8 @@ use Safe\Exceptions\PspellException; /** - * pspell_add_to_personal adds a word to the personal - * wordlist. If you used pspell_new_config with - * pspell_config_personal to open the dictionary, - * you can save the wordlist later with - * pspell_save_wordlist. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -27,12 +21,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void /** - * pspell_add_to_session adds a word to the wordlist - * associated with the current session. It is very similar to - * pspell_add_to_personal - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -47,11 +37,7 @@ function pspell_add_to_session(int $dictionary, string $word): void /** - * pspell_clear_session clears the current session. - * The current wordlist becomes blank, and, for example, if you try to save - * it with pspell_save_wordlist, nothing happens. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -66,35 +52,11 @@ function pspell_clear_session(int $dictionary): void /** - * Create a config used to open a dictionary. - * - * pspell_config_create has a very similar syntax to - * pspell_new. In fact, using - * pspell_config_create immediately followed by - * pspell_new_config will produce the exact same result. - * However, after creating a new config, you can also use - * pspell_config_* functions before calling - * pspell_new_config to take advantage of some - * advanced functionality. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @return int Returns an PSpell\Config instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @return int * @throws PspellException * */ @@ -110,10 +72,6 @@ function pspell_config_create(string $language, string $spelling = "", string $j /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -130,10 +88,6 @@ function pspell_config_data_dir(int $config, string $directory): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -150,12 +104,8 @@ function pspell_config_dict_dir(int $config, string $directory): void /** - * pspell_config_ignore should be used on a config - * before calling pspell_new_config. This function - * allows short words to be skipped by the spell checker. - * - * @param int $config An PSpell\Config instance. - * @param int $min_length Words less than min_length characters will be skipped. + * @param int $config + * @param int $min_length * @throws PspellException * */ @@ -170,33 +120,8 @@ function pspell_config_ignore(int $config, int $min_length): void /** - * pspell_config_mode should be used on a config - * before calling pspell_new_config. This function - * determines how many suggestions will be returned by - * pspell_suggest. - * - * @param int $config An PSpell\Config instance. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * + * @param int $config + * @param int $mode * @throws PspellException * */ @@ -211,17 +136,8 @@ function pspell_config_mode(int $config, int $mode): void /** - * Set a file that contains personal wordlist. The personal wordlist will be - * loaded and used in addition to the standard one after you call - * pspell_new_config. The file is also the file where - * pspell_save_wordlist will save personal wordlist to. - * - * pspell_config_personal should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The personal wordlist. If the file does not exist, it will be created. - * The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -236,19 +152,8 @@ function pspell_config_personal(int $config, string $filename): void /** - * Set a file that contains replacement pairs. - * - * The replacement pairs improve the quality of the spellchecker. When a word - * is misspelled, and a proper suggestion was not found in the list, - * pspell_store_replacement can be used to store a - * replacement pair and then pspell_save_wordlist to - * save the wordlist along with the replacement pairs. - * - * pspell_config_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -263,18 +168,8 @@ function pspell_config_repl(int $config, string $filename): void /** - * This function determines whether run-together words will be treated as - * legal compounds. That is, "thecat" will be a legal compound, although - * there should be a space between the two words. Changing this setting only - * affects the results returned by pspell_check; - * pspell_suggest will still return suggestions. - * - * pspell_config_runtogether should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $allow TRUE if run-together words should be treated as legal compounds, - * FALSE otherwise. + * @param int $config + * @param bool $allow * @throws PspellException * */ @@ -289,19 +184,8 @@ function pspell_config_runtogether(int $config, bool $allow): void /** - * pspell_config_save_repl determines whether - * pspell_save_wordlist will save the replacement pairs - * along with the wordlist. Usually there is no need to use this function - * because if pspell_config_repl is used, the - * replacement pairs will be saved by - * pspell_save_wordlist anyway, and if it is not, - * the replacement pairs will not be saved. - * - * pspell_config_save_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise. + * @param int $config + * @param bool $save * @throws PspellException * */ @@ -316,17 +200,8 @@ function pspell_config_save_repl(int $config, bool $save): void /** - * pspell_new_config opens up a new dictionary with - * settings specified in a config, created with - * pspell_config_create and modified with - * pspell_config_* functions. This method provides you - * with the most flexibility and has all the functionality provided by - * pspell_new and - * pspell_new_personal. - * - * @param int $config The config parameter is the one returned by - * pspell_config_create when the config was created. - * @return int Returns an PSpell\Dictionary instance on success + * @param int $config + * @return int * @throws PspellException * */ @@ -342,61 +217,13 @@ function pspell_new_config(int $config): int /** - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $filename The file where words added to the personal list will be stored. - * It should be an absolute filename beginning with '/' because otherwise - * it will be relative to $HOME, which is "/root" for most systems, and - * is probably not what you want. - * @param string $language The language code which consists of the two letter ISO 639 language - * code and an optional two letter ISO 3166 country code after a dash - * or underscore. - * @param string $spelling The requested spelling for languages with more than one spelling such - * as English. Known values are 'american', 'british', and 'canadian'. - * @param string $jargon Extra information to distinguish two different words lists that have - * the same language and spelling parameters. - * @param string $encoding The encoding that words are expected to be in. Valid values are - * utf-8, iso8859-*, - * koi8-r, viscii, - * cp1252, machine unsigned 16, - * machine unsigned 32. - * @param int $mode The mode in which spellchecker will work. There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $filename + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -412,64 +239,12 @@ function pspell_new_personal(string $filename, string $language, string $spellin /** - * pspell_new opens up a new dictionary and - * returns an PSpell\Dictionary instance for use in other pspell - * functions. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -485,12 +260,7 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" /** - * pspell_save_wordlist saves the personal wordlist from - * the current session. The location of files to be saved specified with - * pspell_config_personal and (optionally) - * pspell_config_repl. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -505,20 +275,9 @@ function pspell_save_wordlist(int $dictionary): void /** - * pspell_store_replacement stores a replacement pair for - * a word, so that replacement can be returned by - * pspell_suggest later. In order to be able to take - * advantage of this function, you have to use - * pspell_new_personal to open the dictionary. In order - * to permanently save the replacement pair, you have to - * use pspell_config_personal and - * pspell_config_repl to set the path where to save your - * custom wordlists, and then use pspell_save_wordlist - * for the changes to be written to disk. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $misspelled The misspelled word. - * @param string $correct The fixed spelling for the misspelled word. + * @param int $dictionary + * @param string $misspelled + * @param string $correct * @throws PspellException * */ diff --git a/generated/8.2/readline.php b/generated/8.2/readline.php index e5afc24d..82bb7a1f 100644 --- a/generated/8.2/readline.php +++ b/generated/8.2/readline.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ReadlineException; /** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. + * @param string $prompt * @throws ReadlineException * */ @@ -22,19 +20,8 @@ function readline_add_history(string $prompt): void /** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. + * @param string $prompt + * @param callable $callback * @throws ReadlineException * */ @@ -49,8 +36,6 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** - * This function clears the entire command line history. - * * @throws ReadlineException * */ @@ -65,11 +50,7 @@ function readline_clear_history(): void /** - * This function registers a completion function. This is the same kind of - * functionality you'd get if you hit your tab key while using Bash. - * - * @param callable $callback You must supply the name of an existing function which accepts a - * partial command line and returns an array of possible matches. + * @param callable $callback * @throws ReadlineException * */ @@ -84,9 +65,7 @@ function readline_completion_function(callable $callback): void /** - * This function reads a command history from a file. - * - * @param null|string $filename Path to the filename containing the command history. + * @param null|string $filename * @throws ReadlineException * */ @@ -105,9 +84,7 @@ function readline_read_history(?string $filename = null): void /** - * This function writes the command history to a file. - * - * @param null|string $filename Path to the saved file. + * @param null|string $filename * @throws ReadlineException * */ diff --git a/generated/8.2/rnp.php b/generated/8.2/rnp.php index 2c9f3edd..c38882fc 100644 --- a/generated/8.2/rnp.php +++ b/generated/8.2/rnp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\RnpException; /** - * Private keys used for decryption should be loaded into the FFI object before calling this function. - * If password encryption was used, then password provider should be set by calling - * rnp_ffi_set_pass_provider. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input Encrypted message. - * @return string Decrypted message on success. + * @param \RnpFFI $ffi + * @param string $input + * @return string * @throws RnpException * */ @@ -27,11 +23,9 @@ function rnp_decrypt(\RnpFFI $ffi, string $input): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_JSON_DUMP_* predefined constants. - * @return string JSON string with dump. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -47,11 +41,9 @@ function rnp_dump_packets_to_json(string $input, int $flags): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_DUMP_* predefined constants. - * @return string Text describing packet sequence. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -67,13 +59,9 @@ function rnp_dump_packets(string $input, int $flags): string /** - * - * - * @param string $pub_format the format of the public keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant. - * @param string $sec_format the format of the secret keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant - * @return \RnpFFI Returns RnpFFI object on success. + * @param string $pub_format + * @param string $sec_format + * @return \RnpFFI * @throws RnpException * */ @@ -89,25 +77,8 @@ function rnp_ffi_create(string $pub_format, string $sec_format): \RnpFFI /** - * Sets password provider function. This function can ask for the password on a standard input - * (if PHP script is executed in a command line environment), display GUI dialog or provide - * password in any other possible ways. Requested passwords are used to encrypt or decrypt - * secret keys or perform symmetric encryption/decryption operations. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param callable $password_callback The function that is to be called for every password request. It has the following signature: - * - * boolpassword_callback - * stringkey_fp - * stringpgp_context - * stringpassword - * - * - * $key_fp - The key fingerprint, if any. Can be empty. - * $pgp_context - String describing why the key is being requested. - * $password - Password string reference where provided password should be stored to. - * - * Callback function should return TRUE if password was successfully set or FALSE on failure. + * @param \RnpFFI $ffi + * @param callable $password_callback * @throws RnpException * */ @@ -122,12 +93,10 @@ function rnp_ffi_set_pass_provider(\RnpFFI $ffi, callable $password_callback): v /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* predefined constants. - * @return string JSON string with information about new and updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -143,12 +112,10 @@ function rnp_import_keys(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing signatures to be imported. Can be either binary or ASCII armored. - * @param int $flags Currently must be 0. - * @return string JSON string with information about updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -164,17 +131,12 @@ function rnp_import_signatures(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Primary key fingerprint. - * @param string $subkey_fp Subkey to export. Can be an empty string - * to pick the first suitable subkey. - * @param string $uid User ID to export. Can be an empty string - * if exported key has only one uid. - * @param int $flags Only RNP_KEY_EXPORT_BASE64 is currently supported. Enabling - * it would export base64-encoded key data instead of binary. - * @return string OpenPGP packets of exported key on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param string $subkey_fp + * @param string $uid + * @param int $flags + * @return string * @throws RnpException * */ @@ -190,14 +152,11 @@ function rnp_key_export_autocrypt(\RnpFFI $ffi, string $key_fp, string $subkey_f /** - * Note: to revoke a key you'll need to import this signature into the keystore or use - * rnp_key_revoke function. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint of the primary key to be revoked. - * @param int $flags RNP_KEY_EXPORT_ARMORED or 0. - * @param array $options An associative array with options. - * @return string Exported revocation signature on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options + * @return string * @throws RnpException * */ @@ -217,13 +176,10 @@ function rnp_key_export_revocation(\RnpFFI $ffi, string $key_fp, int $flags, ?ar /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_EXPORT_* predefined constants - * (except RNP_KEY_EXPORT_BASE64). - * @return string OpenPGP packets of exported key (binary or ASCII-armored) on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @return string * @throws RnpException * */ @@ -239,11 +195,9 @@ function rnp_key_export(\RnpFFI $ffi, string $key_fp, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @return array An associative array with information about the key. + * @param \RnpFFI $ffi + * @param string $key_fp + * @return array * @throws RnpException * */ @@ -259,12 +213,9 @@ function rnp_key_get_info(\RnpFFI $ffi, string $key_fp): array /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_REMOVE_* constants. Flag RNP_KEY_REMOVE_SUBKEYS will work only for - * the primary key and will remove all of its subkeys as well. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags * @throws RnpException * */ @@ -279,12 +230,10 @@ function rnp_key_remove(\RnpFFI $ffi, string $key_fp, int $flags): void /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags Currently must be 0. - * @param array $options An associative array with options. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options * @throws RnpException * */ @@ -303,11 +252,9 @@ function rnp_key_revoke(\RnpFFI $ffi, string $key_fp, int $flags, ?array $option /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Key identifier type ("userid", "keyid", "grip", "fingerprint"). - * @return array An associative array where key is an identifier string and value is a PGP key fingerprint. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @return array * @throws RnpException * */ @@ -323,12 +270,10 @@ function rnp_list_keys(\RnpFFI $ffi, string $identifier_type): array /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input_path file or directory containing the keys. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input_path + * @param int $flags * @throws RnpException * */ @@ -343,12 +288,10 @@ function rnp_load_keys_from_path(\RnpFFI $ffi, string $format, string $input_pat /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input + * @param int $flags * @throws RnpException * */ @@ -363,13 +306,10 @@ function rnp_load_keys(\RnpFFI $ffi, string $format, string $input, int $flags): /** - * Note: only valid userids are checked while searching by userid. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Identifier type string: "userid", "keyid", "fingerprint", "grip". - * @param string $identifier PGP User ID (name and email) for "userid" type, hexadecimal string - * that represents key id, fingerprint or key grip correspondingly. - * @return string Returns hexadecimal fingerprint of the key found on success. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @param string $identifier + * @return string * @throws RnpException * */ @@ -385,13 +325,11 @@ function rnp_locate_key(\RnpFFI $ffi, string $identifier_type, string $identifie /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $message Message to be encrypted. - * @param array $recipient_keys_fp Array with fingerprints of recipient's keys. At least one key must be present. - * @param array $options An associative array with options. - * @return string Encrypted data on success. + * @param \RnpFFI $ffi + * @param string $message + * @param array $recipient_keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -411,18 +349,12 @@ function rnp_op_encrypt(\RnpFFI $ffi, string $message, array $recipient_keys_fp, /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $userid PGP User ID - text that is intended to represent - * the name and email address of the key holder. - * @param string $key_alg Primary key algorithm (i.e. 'RSA', 'DSA', etc). - * @param string $sub_alg Subkey algorithm. If not set, subkey will not be generated. - * @param array $options An associative array with options. - * @return string Fingerprint of the generated primary key. This fingerprint can be used - * later to reference the key in sign and encrypt operations. The key data is stored in FFI - * memory context and can be saved using - * rnp_save_keys or rnp_save_keys_to_path. + * @param \RnpFFI $ffi + * @param string $userid + * @param string $key_alg + * @param string $sub_alg + * @param array $options + * @return string * @throws RnpException * */ @@ -444,15 +376,11 @@ function rnp_op_generate_key(\RnpFFI $ffi, string $userid, string $key_alg, ?str /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Cleartext signed message containing source data with - * additional headers and ASCII-armored signature on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -472,14 +400,11 @@ function rnp_op_sign_cleartext(\RnpFFI $ffi, string $data, array $keys_fp, ?arra /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Detached signature(s) data on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -499,14 +424,11 @@ function rnp_op_sign_detached(\RnpFFI $ffi, string $data, array $keys_fp, ?array /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Data with embedded signature(s) on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -526,14 +448,10 @@ function rnp_op_sign(\RnpFFI $ffi, string $data, array $keys_fp, ?array $options /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Source data. - * @param string $signature Detached signature data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @param string $signature + * @return array * @throws RnpException * */ @@ -549,13 +467,9 @@ function rnp_op_verify_detached(\RnpFFI $ffi, string $data, string $signature): /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Signed data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @return array * @throws RnpException * */ @@ -571,12 +485,10 @@ function rnp_op_verify(\RnpFFI $ffi, string $data): array /** - * Saves keys present in the FFI object (loaded or generated) to the specified file or directory. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output_path File or directory path where keys should be saved to. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output_path + * @param int $flags * @throws RnpException * */ @@ -591,12 +503,10 @@ function rnp_save_keys_to_path(\RnpFFI $ffi, string $format, string $output_path /** - * Note that for G10, the output must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output key packets will be saved to the string referenced by output. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output + * @param int $flags * @throws RnpException * */ @@ -611,10 +521,8 @@ function rnp_save_keys(\RnpFFI $ffi, string $format, string &$output, int $flags /** - * Get the JSON formatted string containing array of supported rnp feature values (algorithms, curves, etc) by type. - * - * @param string $type See RNP_FEATURE_* constants for supported values. - * @return string String containing JSON formatted array of supported algorithms, curves, etc. + * @param string $type + * @return string * @throws RnpException * */ diff --git a/generated/8.2/rpminfo.php b/generated/8.2/rpminfo.php index 2cd42fa6..4e620f8a 100644 --- a/generated/8.2/rpminfo.php +++ b/generated/8.2/rpminfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\RpminfoException; /** - * Add an additional retrieved tag in subsequent queries. - * - * @param int $tag One of RPMTAG_* constant, see the rpminfo constants page. + * @param int $tag * @throws RpminfoException * */ diff --git a/generated/8.2/rrd.php b/generated/8.2/rrd.php index a68379af..d8dc2b4c 100644 --- a/generated/8.2/rrd.php +++ b/generated/8.2/rrd.php @@ -5,11 +5,8 @@ use Safe\Exceptions\RrdException; /** - * Creates the rdd database file. - * - * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -24,11 +21,9 @@ function rrd_create(string $filename, array $options): void /** - * Returns the first data sample from the specified RRA of the RRD file. - * - * @param string $file RRD database file name. - * @param int $raaindex The index number of the RRA that is to be examined. Default value is 0. - * @return int Integer number of unix timestamp. + * @param string $file + * @param int $raaindex + * @return int * @throws RrdException * */ @@ -44,15 +39,9 @@ function rrd_first(string $file, int $raaindex = 0): int /** - * Creates image for a particular data from RRD file. - * - * @param string $filename The filename to output the graph to. This will generally end in either - * .png, .svg or - * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all - * possible options. All options (data definitions, variable definitions, etc.) - * are allowed. - * @return array Array with information about generated image is returned. + * @param string $filename + * @param array $options + * @return array * @throws RrdException * */ @@ -68,10 +57,8 @@ function rrd_graph(string $filename, array $options): array /** - * Returns information about particular RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @param string $filename + * @return array * @throws RrdException * */ @@ -87,11 +74,8 @@ function rrd_info(string $filename): array /** - * Gets array of the UNIX timestamp and the values stored for each date in the - * most recent update of the RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @param string $filename + * @return array * @throws RrdException * */ @@ -107,11 +91,9 @@ function rrd_lastupdate(string $filename): array /** - * Restores the RRD file from the XML dump. - * - * @param string $xml_file XML filename with the dump of the original RRD database file. - * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param string $xml_file + * @param string $rrd_file + * @param array $options * @throws RrdException * */ @@ -130,12 +112,8 @@ function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null) /** - * Change some options in the RRD dabase header file. E.g. renames the source for - * the data etc. - * - * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See - * rrd tune man page for details. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -150,12 +128,8 @@ function rrd_tune(string $filename, array $options): void /** - * Updates the RRD database file. The input data is time interpolated according to the - * properties of the RRD database file. - * - * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -170,12 +144,8 @@ function rrd_update(string $filename, array $options): void /** - * Exports the information about RRD database file. This data can be converted - * to XML file via user space PHP script and then restored back as RRD database - * file. - * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param array $options + * @return array * @throws RrdException * */ diff --git a/generated/8.2/sem.php b/generated/8.2/sem.php index 4e09b6f9..949771db 100644 --- a/generated/8.2/sem.php +++ b/generated/8.2/sem.php @@ -5,19 +5,9 @@ use Safe\Exceptions\SemException; /** - * msg_get_queue returns an id that can be used to - * access the System V message queue with the given - * key. The first call creates the message queue with - * the optional permissions. - * A second call to msg_get_queue for the same - * key will return a different message queue - * identifier, but both identifiers access the same underlying message - * queue. - * - * @param int $key Message queue numeric ID - * @param int $permissions Queue permissions. Default to 0666. If the message queue already - * exists, the permissions will be ignored. - * @return \SysvMessageQueue Returns SysvMessageQueue instance that can be used to access the System V message queue. + * @param int $key + * @param int $permissions + * @return \SysvMessageQueue * @throws SemException * */ @@ -33,9 +23,7 @@ function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue /** - * Checks whether the message queue key exists. - * - * @param int $key Queue key. + * @param int $key * @throws SemException * */ @@ -50,73 +38,14 @@ function msg_queue_exists(int $key): void /** - * msg_receive will receive the first message from the - * specified queue of the type specified by - * desired_message_type. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $desired_message_type If desired_message_type is 0, the message from the front - * of the queue is returned. If desired_message_type is - * greater than 0, then the first message of that type is returned. - * If desired_message_type is less than 0, the first - * message on the queue with a type less than or equal to the - * absolute value of desired_message_type will be read. - * If no messages match the criteria, your script will wait until a suitable - * message arrives on the queue. You can prevent the script from blocking - * by specifying MSG_IPC_NOWAIT in the - * flags parameter. - * @param int|null $received_message_type The type of the message that was received will be stored in this - * parameter. - * @param int $max_message_size The maximum size of message to be accepted is specified by the - * max_message_size; if the message in the queue is larger - * than this size the function will fail (unless you set - * flags as described below). - * @param mixed $message The received message will be stored in message, - * unless there were errors receiving the message. - * @param bool $unserialize If set to - * TRUE, the message is treated as though it was serialized using the - * same mechanism as the session module. The message will be unserialized - * and then returned to your script. This allows you to easily receive - * arrays or complex object structures from other PHP scripts, or if you - * are using the WDDX serializer, from any WDDX compatible source. - * - * If unserialize is FALSE, the message will be - * returned as a binary-safe string. - * @param int $flags The optional flags allows you to pass flags to the - * low-level msgrcv system call. It defaults to 0, but you may specify one - * or more of the following values (by adding or ORing them together). - * - * Flag values for msg_receive - * - * - * - * MSG_IPC_NOWAIT - * If there are no messages of the - * desired_message_type, return immediately and do not - * wait. The function will fail and return an integer value - * corresponding to MSG_ENOMSG. - * - * - * - * MSG_EXCEPT - * Using this flag in combination with a - * desired_message_type greater than 0 will cause the - * function to receive the first message that is not equal to - * desired_message_type. - * - * - * MSG_NOERROR - * - * If the message is longer than max_message_size, - * setting this flag will truncate the message to - * max_message_size and will not signal an error. - * - * - * - * - * - * @param int|null $error_code If the function fails, the optional error_code - * will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $desired_message_type + * @param int|null $received_message_type + * @param int $max_message_size + * @param mixed $message + * @param bool $unserialize + * @param int $flags + * @param int|null $error_code * @throws SemException * */ @@ -131,12 +60,7 @@ function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int & /** - * msg_remove_queue destroys the message queue specified - * by the queue. Only use this function when all - * processes have finished working with the message queue and you need to - * release the system resources held by it. - * - * @param \SysvMessageQueue $queue The message queue. + * @param \SysvMessageQueue $queue * @throws SemException * */ @@ -151,35 +75,12 @@ function msg_remove_queue(\SysvMessageQueue $queue): void /** - * msg_send sends a message of type - * message_type (which MUST be greater than 0) to - * the message queue specified by queue. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $message_type The type of the message (MUST be greater than 0) - * @param mixed $message The body of the message. - * - * If serialize set to FALSE is supplied, - * MUST be of type: string, int, float - * or bool. In other case a warning will be issued. - * @param bool $serialize The optional serialize controls how the - * message is sent. serialize - * defaults to TRUE which means that the message is - * serialized using the same mechanism as the session module before being - * sent to the queue. This allows complex arrays and objects to be sent to - * other PHP scripts, or if you are using the WDDX serializer, to any WDDX - * compatible client. - * @param bool $blocking If the message is too large to fit in the queue, your script will wait - * until another process reads messages from the queue and frees enough - * space for your message to be sent. - * This is called blocking; you can prevent blocking by setting the - * optional blocking parameter to FALSE, in which - * case msg_send will immediately return FALSE if the - * message is too big for the queue, and set the optional - * error_code to MSG_EAGAIN, - * indicating that you should try to send your message again a little - * later on. - * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $message_type + * @param mixed $message + * @param bool $serialize + * @param bool $blocking + * @param int|null $error_code * @throws SemException * */ @@ -194,19 +95,8 @@ function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $s /** - * msg_set_queue allows you to change the values of the - * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - * underlying message queue data structure. - * - * Changing the data structure will require that PHP be running as the same - * user that created the queue, owns the queue (as determined by the - * existing msg_perm.xxx fields), or be running with root privileges. - * root privileges are required to raise the msg_qbytes values above the - * system defined limit. - * - * @param \SysvMessageQueue $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys - * that you require in the data array. + * @param \SysvMessageQueue $queue + * @param array $data * @throws SemException * */ @@ -221,85 +111,8 @@ function msg_set_queue(\SysvMessageQueue $queue, array $data): void /** - * msg_stat_queue returns the message queue meta data - * for the message queue specified by the queue. - * This is useful, for example, to determine which process sent the message - * that was just received. - * - * @param \SysvMessageQueue $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following - * meanings: - * - * Array structure for msg_stat_queue - * - * - * - * msg_perm.uid - * - * The uid of the owner of the queue. - * - * - * - * msg_perm.gid - * - * The gid of the owner of the queue. - * - * - * - * msg_perm.mode - * - * The file access mode of the queue. - * - * - * - * msg_stime - * - * The time that the last message was sent to the queue. - * - * - * - * msg_rtime - * - * The time that the last message was received from the queue. - * - * - * - * msg_ctime - * - * The time that the queue was last changed. - * - * - * - * msg_qnum - * - * The number of messages waiting to be read from the queue. - * - * - * - * msg_qbytes - * - * The maximum number of bytes allowed in one message queue. On - * Linux, this value may be read and modified via - * /proc/sys/kernel/msgmnb. - * - * - * - * msg_lspid - * - * The pid of the process that sent the last message to the queue. - * - * - * - * msg_lrpid - * - * The pid of the process that received the last message from the queue. - * - * - * - * - * - * - * Returns FALSE on failure. + * @param \SysvMessageQueue $queue + * @return array * @throws SemException * */ @@ -315,21 +128,8 @@ function msg_stat_queue(\SysvMessageQueue $queue): array /** - * sem_acquire by default blocks (if necessary) until the - * semaphore can be acquired. A process attempting to acquire a semaphore which - * it has already acquired will block forever if acquiring the semaphore would - * cause its maximum number of semaphore to be exceeded. - * - * After processing a request, any semaphores acquired by the process but not - * explicitly released will be released automatically and a warning will be - * generated. - * - * @param \SysvSemaphore $semaphore semaphore is a semaphore - * obtained from sem_get. - * @param bool $non_blocking Specifies if the process shouldn't wait for the semaphore to be acquired. - * If set to true, the call will return - * false immediately if a semaphore cannot be immediately - * acquired. + * @param \SysvSemaphore $semaphore + * @param bool $non_blocking * @throws SemException * */ @@ -344,25 +144,11 @@ function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): voi /** - * sem_get returns an id that can be used to - * access the System V semaphore with the given key. - * - * A second call to sem_get for the same key - * will return a different semaphore identifier, but both - * identifiers access the same underlying semaphore. - * - * If key is 0, a new private semaphore - * is created for each call to sem_get. - * * @param int $key - * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously - * is set to max_acquire. - * @param int $permissions The semaphore permissions. Actually this value is - * set only if the process finds it is the only process currently - * attached to the semaphore. - * @param bool $auto_release Specifies if the semaphore should be automatically released on request - * shutdown. - * @return \SysvSemaphore Returns a positive semaphore identifier on success. + * @param int $max_acquire + * @param int $permissions + * @param bool $auto_release + * @return \SysvSemaphore * @throws SemException * */ @@ -378,15 +164,7 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ /** - * sem_release releases the semaphore if it - * is currently acquired by the calling process, otherwise - * a warning is generated. - * - * After releasing the semaphore, sem_acquire - * may be called to re-acquire it. - * - * @param \SysvSemaphore $semaphore A Semaphore as returned by - * sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -401,12 +179,7 @@ function sem_release(\SysvSemaphore $semaphore): void /** - * sem_remove removes the given semaphore. - * - * After removing the semaphore, it is no longer accessible. - * - * @param \SysvSemaphore $semaphore A semaphore as returned - * by sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -421,24 +194,10 @@ function sem_remove(\SysvSemaphore $semaphore): void /** - * shm_attach returns an id that can be used to access - * the System V shared memory with the given key, the - * first call creates the shared memory segment with - * size and the optional perm-bits - * permissions. - * - * A second call to shm_attach for the same - * key will return a different SysvSharedMemory - * instance, but both instances access the same underlying - * shared memory. size and - * permissions will be ignored. - * - * @param int $key A numeric shared memory segment ID - * @param int|null $size The memory size. If not provided, default to the - * sysvshm.init_mem in the php.ini, otherwise 10000 - * bytes. - * @param int $permissions The optional permission bits. Default to 0666. - * @return \SysvSharedMemory Returns a SysvSharedMemory instance on success. + * @param int $key + * @param int|null $size + * @param int $permissions + * @return \SysvSharedMemory * @throws SemException * */ @@ -460,12 +219,7 @@ function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \Sysv /** - * shm_detach disconnects from the shared memory given - * by the shm created by - * shm_attach. Remember, that shared memory still exist - * in the Unix system and the data is still present. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ @@ -480,21 +234,9 @@ function shm_detach(\SysvSharedMemory $shm): void /** - * shm_put_var inserts or updates the - * value with the given - * key. - * - * Warnings (E_WARNING level) will be issued if - * shm is not a valid SysV shared memory - * index or if there was not enough shared memory remaining to complete your - * request. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. - * @param mixed $value The variable. All variable types - * that serialize supports may be used: generally - * this means all types except for resources and some internal objects - * that cannot be serialized. + * @param \SysvSharedMemory $shm + * @param int $key + * @param mixed $value * @throws SemException * */ @@ -509,11 +251,8 @@ function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void /** - * Removes a variable with a given key - * and frees the occupied memory. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. + * @param \SysvSharedMemory $shm + * @param int $key * @throws SemException * */ @@ -528,10 +267,7 @@ function shm_remove_var(\SysvSharedMemory $shm, int $key): void /** - * shm_remove removes the shared memory - * shm. All data will be destroyed. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ diff --git a/generated/8.2/session.php b/generated/8.2/session.php index 8af9b82e..2628b174 100644 --- a/generated/8.2/session.php +++ b/generated/8.2/session.php @@ -5,9 +5,6 @@ use Safe\Exceptions\SessionException; /** - * session_abort finishes session without saving - * data. Thus the original values in session data are kept. - * * @throws SessionException * */ @@ -22,27 +19,8 @@ function session_abort(): void /** - * session_cache_expire returns the current setting of - * session.cache_expire. - * - * The cache expire is reset to the default value of 180 stored in - * session.cache_expire - * at request startup time. Thus, - * you need to call session_cache_expire for every - * request (and before session_start is called). - * - * @param int|null $value If value is given and not NULL, the current cache - * expire is replaced with value. - * - * - * - * Setting value is of value only, if - * session.cache_limiter is set to a value - * different from nocache. - * - * - * @return int Returns the current setting of session.cache_expire. - * The value returned should be read in minutes, defaults to 180. + * @param int|null $value + * @return int * @throws SessionException * */ @@ -62,34 +40,8 @@ function session_cache_expire(?int $value = null): int /** - * session_cache_limiter returns the name of the - * current cache limiter. - * - * The cache limiter defines which cache control HTTP headers are sent to - * the client. These headers determine the rules by which the page content - * may be cached by the client and intermediate proxies. Setting the cache - * limiter to nocache disallows any client/proxy caching. - * A value of public permits caching by proxies and the - * client, whereas private disallows caching by proxies - * and permits the client to cache the contents. - * - * In private mode, the Expire header sent to the client - * may cause confusion for some browsers, including Mozilla. - * You can avoid this problem by using private_no_expire mode. The - * Expire header is never sent to the client in this mode. - * - * Setting the cache limiter to '' will turn off automatic sending - * of cache headers entirely. - * - * The cache limiter is reset to the default value stored in - * session.cache_limiter - * at request startup time. Thus, you need to call - * session_cache_limiter for every - * request (and before session_start is called). - * - * @param null|string $value If value is specified and not NULL, the name of the - * current cache limiter is changed to the new value. - * @return string Returns the name of the current cache limiter. + * @param null|string $value + * @return string * @throws SessionException * */ @@ -109,27 +61,8 @@ function session_cache_limiter(?string $value = null): string /** - * session_create_id is used to create new - * session id for the current session. It returns collision free - * session id. - * - * If session is not active, collision check is omitted. - * - * Session ID is created according to php.ini settings. - * - * It is important to use the same user ID of your web server for GC - * task script. Otherwise, you may have permission problems especially - * with files save handler. - * - * @param string $prefix If prefix is specified, new session id - * is prefixed by prefix. Not all - * characters are allowed within the session id. Characters in - * the range a-z A-Z 0-9 , (comma) and - - * (minus) are allowed. - * @return string session_create_id returns new collision free - * session id for the current session. If it is used without active - * session, it omits collision check. - * On failure, FALSE is returned. + * @param string $prefix + * @return string * @throws SessionException * */ @@ -145,14 +78,7 @@ function session_create_id(string $prefix = ""): string /** - * session_decode decodes the serialized session data provided in - * $data, and populates the $_SESSION superglobal - * with the result. - * - * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. - * The serialization method can be set using session.serialize_handler. - * - * @param string $data The encoded data to be stored. + * @param string $data * @throws SessionException * */ @@ -167,18 +93,6 @@ function session_decode(string $data): void /** - * In order to kill the session altogether, the - * session ID must also be unset. If a cookie is used to propagate the - * session ID (default behavior), then the session cookie must be deleted. - * setcookie may be used for that. - * - * When session.use_strict_mode - * is enabled. You do not have to remove obsolete session ID cookie because - * session module will not accept session ID cookie when there is no - * data associated to the session ID and set new session ID cookie. - * Enabling session.use_strict_mode - * is recommended for all sites. - * * @throws SessionException * */ @@ -193,13 +107,7 @@ function session_destroy(): void /** - * session_encode returns a serialized string of the - * contents of the current session data stored in the $_SESSION superglobal. - * - * By default, the serialization method used is internal to PHP, and is not the same as serialize. - * The serialization method can be set using session.serialize_handler. - * - * @return string Returns the contents of the current session encoded. + * @return string * @throws SessionException * */ @@ -215,28 +123,7 @@ function session_encode(): string /** - * session_gc is used to perform session data - * GC(garbage collection). PHP does probability based session GC by - * default. - * - * Probability based GC works somewhat but it has few problems. 1) Low - * traffic sites' session data may not be deleted within the preferred - * duration. 2) High traffic sites' GC may be too frequent GC. 3) GC is - * performed on the user's request and the user will experience a GC - * delay. - * - * Therefore, it is recommended to execute GC periodically for - * production systems using, e.g., "cron" for UNIX-like systems. - * Make sure to disable probability based GC by setting - * session.gc_probability - * to 0. - * - * @return int session_gc returns number of deleted session - * data for success. - * - * Old save handlers do not return number of deleted session data, but - * only success/failure flag. If this is the case, number of deleted - * session data became 1 regardless of actually deleted data. + * @return int * @throws SessionException * */ @@ -252,24 +139,8 @@ function session_gc(): int /** - * session_id is used to get or set the session id for - * the current session. - * - * The constant SID can also be used to - * retrieve the current name and session id as a string suitable for - * adding to URLs. See also Session - * handling. - * - * @param null|string $id If id is specified and not NULL, it will replace the current - * session id. session_id needs to be called before - * session_start for that purpose. Depending on the - * session handler, not all characters are allowed within the session id. - * For example, the file session handler only allows characters in the - * range a-z A-Z 0-9 , (comma) and - (minus)! - * @return string session_id returns the session id for the current - * session or the empty string ("") if there is no current - * session (no current session id exists). - * On failure, FALSE is returned. + * @param null|string $id + * @return string * @throws SessionException * */ @@ -289,16 +160,8 @@ function session_id(?string $id = null): string /** - * session_module_name gets the name of the current - * session module, which is also known as - * session.save_handler. - * - * @param null|string $module If module is specified and not NULL, that module will be - * used instead. - * Passing "user" to this parameter is forbidden. Instead - * session_set_save_handler has to be called to set a user - * defined session handler. - * @return string Returns the name of the current session module. + * @param null|string $module + * @return string * @throws SessionException * */ @@ -318,44 +181,8 @@ function session_module_name(?string $module = null): string /** - * session_name returns the name of the current - * session. If name is given, - * session_name will update the session name and return - * the old session name. - * - * If a new session name is - * supplied, session_name modifies the HTTP cookie - * (and output content when session.transid is - * enabled). Once the HTTP cookie is - * sent, session_name raises error. - * session_name must be called - * before session_start for the session to work - * properly. - * - * The session name is reset to the default value stored in - * session.name at request startup time. Thus, you need to - * call session_name for every request (and before - * session_start is called). - * - * @param null|string $name The session name references the name of the session, which is - * used in cookies and URLs (e.g. PHPSESSID). It - * should contain only alphanumeric characters; it should be short and - * descriptive (i.e. for users with enabled cookie warnings). - * If name is specified and not NULL, the name of the current - * session is changed to its value. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * @return non-falsy-string Returns the name of the current session. If name is given - * and function updates the session name, name of the old session - * is returned. + * @param null|string $name + * @return non-falsy-string * @throws SessionException * */ @@ -375,17 +202,7 @@ function session_name(?string $name = null): string /** - * session_regenerate_id will replace the current - * session id with a new one, and keep the current session information. - * - * When session.use_trans_sid - * is enabled, output must be started after session_regenerate_id - * call. Otherwise, old session ID is used. - * - * @param bool $delete_old_session Whether to delete the old associated session file or not. - * You should not delete old session if you need to avoid - * races caused by deletion or detect/avoid session hijack - * attacks. + * @param bool $delete_old_session * @throws SessionException * */ @@ -400,10 +217,6 @@ function session_regenerate_id(bool $delete_old_session = false): void /** - * session_reset reinitializes a session with - * original values stored in session storage. This function requires an active session and - * discards changes in $_SESSION. - * * @throws SessionException * */ @@ -418,25 +231,8 @@ function session_reset(): void /** - * session_save_path returns the path of the current - * directory used to save session data. - * - * @param null|string $path Session data path. If specified and not NULL, the path to which data is saved will - * be changed. session_save_path needs to be called - * before session_start for that purpose. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * @return string Returns the path of the current directory used for data storage. + * @param null|string $path + * @return string * @throws SessionException * */ @@ -456,41 +252,7 @@ function session_save_path(?string $path = null): string /** - * session_start creates a session or resumes the - * current one based on a session identifier passed via a GET or POST - * request, or passed via a cookie. - * - * When session_start is called or when a session auto starts, - * PHP will call the open and read session save handlers. These will either be a built-in - * save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be - * custom handler as defined by session_set_save_handler. - * The read callback will retrieve any existing session data (stored in a special serialized format) - * and will be unserialized and used to automatically populate the $_SESSION superglobal when the - * read callback returns the saved session data back to PHP session handling. - * - * To use a named session, call - * session_name before calling - * session_start. - * - * When session.use_trans_sid - * is enabled, the session_start function will - * register an internal output handler for URL rewriting. - * - * If a user uses ob_gzhandler or similar with - * ob_start, the function order is important for - * proper output. For example, - * ob_gzhandler must be registered before starting the session. - * - * @param array $options If provided, this is an associative array of options that will override - * the currently set - * session configuration directives. - * The keys should not include the session. prefix. - * - * In addition to the normal set of configuration directives, a - * read_and_close option may also be provided. If set to - * TRUE, this will result in the session being closed immediately after - * being read, thereby avoiding unnecessary locking if the session data - * won't be changed. + * @param array $options * @throws SessionException * */ @@ -505,9 +267,6 @@ function session_start(array $options = []): void /** - * The session_unset function frees all session variables - * currently registered. - * * @throws SessionException * */ @@ -522,16 +281,6 @@ function session_unset(): void /** - * End the current session and store session data. - * - * Session data is usually stored after your script terminated without the - * need to call session_write_close, but as session data - * is locked to prevent concurrent writes only one script may operate on a - * session at any time. When using framesets together with sessions you will - * experience the frames loading one by one due to this locking. You can - * reduce the time needed to load all the frames by ending the session as - * soon as all changes to session variables are done. - * * @throws SessionException * */ diff --git a/generated/8.2/shmop.php b/generated/8.2/shmop.php index ef9f9d46..51d385bd 100644 --- a/generated/8.2/shmop.php +++ b/generated/8.2/shmop.php @@ -5,10 +5,7 @@ use Safe\Exceptions\ShmopException; /** - * shmop_delete is used to delete a shared memory block. - * - * @param \Shmop $shmop The shared memory block resource created by - * shmop_open + * @param \Shmop $shmop * @throws ShmopException * */ @@ -23,14 +20,10 @@ function shmop_delete(\Shmop $shmop): void /** - * shmop_read will read a string from shared memory block. - * - * @param \Shmop $shmop The shared memory block identifier created by - * shmop_open - * @param int $offset Offset from which to start reading - * @param int $size The number of bytes to read. - * 0 reads shmop_size($shmid) - $start bytes. - * @return string Returns the data. + * @param \Shmop $shmop + * @param int $offset + * @param int $size + * @return string * @throws ShmopException * */ diff --git a/generated/8.2/sockets.php b/generated/8.2/sockets.php index b6dd838f..10e015c8 100644 --- a/generated/8.2/sockets.php +++ b/generated/8.2/sockets.php @@ -5,32 +5,8 @@ use Safe\Exceptions\SocketsException; /** - * After the socket socket has been created - * using socket_create, bound to a name with - * socket_bind, and told to listen for connections - * with socket_listen, this function will accept - * incoming connections on that socket. Once a successful connection - * is made, a new Socket instance is returned, - * which may be used for communication. If there are multiple connections - * queued on the socket, the first will be used. If there are no pending - * connections, socket_accept will block until - * a connection becomes present. If socket - * has been made non-blocking using - * socket_set_blocking or - * socket_set_nonblock, FALSE will be returned. - * - * The Socket instance returned by - * socket_accept may not be used to accept new - * connections. The original listening socket - * socket, however, remains open and may be - * reused. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @return \Socket Returns a new Socket instance on success. The actual - * error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param \Socket $socket + * @return \Socket * @throws SocketsException * */ @@ -46,11 +22,8 @@ function socket_accept(\Socket $socket): \Socket /** - * Create a Socket instance, and bind it to the provided AddressInfo. The return - * value of this function may be used with socket_listen. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -66,11 +39,8 @@ function socket_addrinfo_bind(\AddressInfo $address): \Socket /** - * Create a Socket instance, and connect it to the provided AddressInfo instance. The return - * value of this function may be used with the rest of the socket functions. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -86,16 +56,10 @@ function socket_addrinfo_connect(\AddressInfo $address): \Socket /** - * Lookup different ways we can connect to host. The returned array contains - * a set of AddressInfo instances that we can bind to using socket_addrinfo_bind. - * - * @param string $host Hostname to search. - * @param mixed $service The service to connect to. If service is a numeric string, it designates the port. - * Otherwise it designates a network service name, which is mapped to a port by the operating system. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the - * hints as defined by getaddrinfo. - * @return \AddressInfo[] Returns an array of AddressInfo instances that can be used with the other socket_addrinfo functions. - * On failure, FALSE is returned. + * @param string $host + * @param mixed $service + * @param array $hints + * @return \AddressInfo[] * @throws SocketsException * */ @@ -117,22 +81,9 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] /** - * Binds the name given in address to the socket - * described by socket. This has to be done before - * a connection is be established using socket_connect - * or socket_listen. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param string $address If the socket is of the AF_INET family, the - * address is an IP in dotted-quad notation - * (e.g. 127.0.0.1). - * - * If the socket is of the AF_UNIX family, the - * address is the path of a - * Unix-domain socket (e.g. /tmp/my.sock). - * @param int $port The port parameter is only used when - * binding an AF_INET socket, and designates - * the port on which to listen for connections. + * @param \Socket $socket + * @param string $address + * @param int $port * @throws SocketsException * */ @@ -147,23 +98,9 @@ function socket_bind(\Socket $socket, string $address, int $port = 0): void /** - * Initiate a connection to address using the Socket instance - * socket, which must be Socket - * instance created with socket_create. - * - * @param \Socket $socket A Socket instance created with - * socket_create. - * @param string $address The address parameter is either an IPv4 address - * in dotted-quad notation (e.g. 127.0.0.1) if - * socket is AF_INET, a valid - * IPv6 address (e.g. ::1) if IPv6 support is enabled and - * socket is AF_INET6 - * or the pathname of a Unix domain socket, if the socket family is - * AF_UNIX. - * @param int|null $port The port parameter is only used and is mandatory - * when connecting to an AF_INET or an - * AF_INET6 socket, and designates - * the port on the remote host to which a connection should be made. + * @param \Socket $socket + * @param string $address + * @param int|null $port * @throws SocketsException * */ @@ -182,24 +119,9 @@ function socket_connect(\Socket $socket, string $address, ?int $port = null): vo /** - * socket_create_listen creates a new Socket instance of - * type AF_INET listening on all - * local interfaces on the given port waiting for new connections. - * - * This function is meant to ease the task of creating a new socket which - * only listens to accept new connections. - * - * @param int $port The port on which to listen on all interfaces. - * @param int $backlog The backlog parameter defines the maximum length - * the queue of pending connections may grow to. - * SOMAXCONN may be passed as - * backlog parameter, see - * socket_listen for more information. - * @return \Socket socket_create_listen returns a new Socket instance - * on success. The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $port + * @param int $backlog + * @return \Socket * @throws SocketsException * */ @@ -215,27 +137,10 @@ function socket_create_listen(int $port, int $backlog = 128): \Socket /** - * socket_create_pair creates two connected and - * indistinguishable sockets, and stores them in pair. - * This function is commonly used in IPC (InterProcess Communication). - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. See socket_create - * for the full list. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the - * full list. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be retrieved by - * name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * - * See socket_create for the full list of supported - * protocols. - * @param \Socket[]|null $pair Reference to an array in which the two Socket instances will be inserted. + * @param int $domain + * @param int $type + * @param int $protocol + * @param \Socket[]|null $pair * @throws SocketsException * */ @@ -250,25 +155,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair /** - * Creates and returns a Socket instance, also referred to as an endpoint - * of communication. A typical network connection is made up of 2 sockets, one - * performing the role of the client, and another performing the role of the server. - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be - * retrieved by name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * @return \Socket socket_create returns a Socket instance on success. The actual error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $domain + * @param int $type + * @param int $protocol + * @return \Socket * @throws SocketsException * */ @@ -284,10 +174,8 @@ function socket_create(int $domain, int $type, int $protocol): \Socket /** - * - * * @param \Socket $socket - * @return resource Return resource. + * @return resource * @throws SocketsException * */ @@ -303,38 +191,10 @@ function socket_export_stream(\Socket $socket) /** - * The socket_get_option function retrieves the value for - * the option specified by the option parameter for the - * specified socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by - * specifying the protocol number of that level. Protocol numbers can be - * found by using the getprotobyname function. - * @param int $option Reports whether the socket lingers on - * socket_close if data is present. By default, - * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, - * socket_close will wait for its peer to - * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the - * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is - * non-zero and l_linger is non-zero, - * socket_close will block until all the data - * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, - * socket_close will fail and return an error. - * @return mixed Returns the value of the given option. + * @param \Socket $socket + * @param int $level + * @param int $option + * @return mixed * @throws SocketsException * */ @@ -350,25 +210,9 @@ function socket_get_option(\Socket $socket, int $level, int $option) /** - * Queries the remote side of the given socket which may either result in - * host/port or in a Unix filesystem path, dependent on its type. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET or - * AF_INET6, socket_getpeername - * will return the peers (remote) IP address in - * appropriate notation (e.g. 127.0.0.1 or - * fe80::1) in the address - * parameter and, if the optional port parameter is - * present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getpeername will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If given, this will hold the port associated to - * address. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -383,22 +227,9 @@ function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = nu /** - * - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET - * or AF_INET6, socket_getsockname - * will return the local IP address in appropriate notation (e.g. - * 127.0.0.1 or fe80::1) in the - * address parameter and, if the optional - * port parameter is present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getsockname will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If provided, this will hold the associated port. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -413,10 +244,8 @@ function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = nu /** - * Imports a stream that encapsulates a socket into a socket extension resource. - * - * @param resource $stream The stream resource to import. - * @return \Socket Returns FALSE on failure. + * @param resource $stream + * @return \Socket * @throws SocketsException * */ @@ -432,30 +261,8 @@ function socket_import_stream($stream): \Socket /** - * After the socket socket has been created - * using socket_create and bound to a name with - * socket_bind, it may be told to listen for incoming - * connections on socket. - * - * socket_listen is applicable only to sockets of - * type SOCK_STREAM or - * SOCK_SEQPACKET. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_addrinfo_bind - * @param int $backlog A maximum of backlog incoming connections will be - * queued for processing. If a connection request arrives with the queue - * full the client may receive an error with an indication of - * ECONNREFUSED, or, if the underlying protocol supports - * retransmission, the request may be ignored so that retries may succeed. - * - * The maximum number passed to the backlog - * parameter highly depends on the underlying platform. On Linux, it is - * silently truncated to SOMAXCONN. On win32, if - * passed SOMAXCONN, the underlying service provider - * responsible for the socket will set the backlog to a maximum - * reasonable value. There is no standard provision to - * find out the actual backlog value on this platform. + * @param \Socket $socket + * @param int $backlog * @throws SocketsException * */ @@ -470,38 +277,10 @@ function socket_listen(\Socket $socket, int $backlog = 0): void /** - * The function socket_read reads from the Socket instance - * socket created by the - * socket_create or - * socket_accept functions. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $length The maximum number of bytes read is specified by the - * length parameter. Otherwise you can use - * \r, \n, - * or \0 to end reading (depending on the mode - * parameter, see below). - * @param int $mode Optional mode parameter is a named constant: - * - * - * - * PHP_BINARY_READ (Default) - use the system - * recv() function. Safe for reading binary data. - * - * - * - * - * PHP_NORMAL_READ - reading stops at - * \n or \r. - * - * - * - * @return string socket_read returns the data as a string on success (including if the remote host has closed the - * connection). The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual representation of - * the error. + * @param \Socket $socket + * @param int $length + * @param int $mode + * @return string * @throws SocketsException * */ @@ -517,52 +296,11 @@ function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): /** - * The function socket_send sends - * length bytes to the socket - * socket from data. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param string $data A buffer containing the data that will be sent to the remote host. - * @param int $length The number of bytes that will be sent to the remote host from - * data. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @return int socket_send returns the number of bytes sent. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @return int * @throws SocketsException * */ @@ -578,12 +316,10 @@ function socket_send(\Socket $socket, string $data, int $length, int $flags): in /** - * - * * @param \Socket $socket * @param array $message * @param int $flags - * @return int Returns the number of bytes sent. + * @return int * @throws SocketsException * */ @@ -599,56 +335,13 @@ function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int /** - * The function socket_sendto sends - * length bytes from data - * through the socket socket to the - * port at the address address. - * - * @param \Socket $socket A Socket instance created using socket_create. - * @param string $data The sent data will be taken from buffer data. - * @param int $length length bytes from data will be - * sent. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @param string $address IP address of the remote host. - * @param int|null $port port is the remote port number at which the data - * will be sent. - * @return int socket_sendto returns the number of bytes sent to the - * remote host. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @param string $address + * @param int|null $port + * @return int * @throws SocketsException * */ @@ -668,16 +361,7 @@ function socket_sendto(\Socket $socket, string $data, int $length, int $flags, s /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the - * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a blocking socket, the script will pause its execution until it receives - * a signal or it can perform the operation. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -692,17 +376,7 @@ function socket_set_block(\Socket $socket): void /** - * The socket_set_nonblock function sets the - * O_NONBLOCK flag on the socket specified by - * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a - * signal or it can perform the operation. Rather, if the operation would result - * in a block, the called function will fail. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -717,24 +391,10 @@ function socket_set_nonblock(\Socket $socket): void /** - * The socket_set_option function sets the option - * specified by the option parameter, at the - * specified protocol level, to the value pointed to - * by the value parameter for the - * socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to set options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the - * getprotobyname function. - * @param int $option The available socket options are the same as those for the - * socket_get_option function. - * @param array|int|string $value The option value. + * @param \Socket $socket + * @param int $level + * @param int $option + * @param array|int|string $value * @throws SocketsException * */ @@ -749,37 +409,8 @@ function socket_set_option(\Socket $socket, int $level, int $option, $value): vo /** - * The socket_shutdown function allows you to stop - * incoming, outgoing or all data (the default) from being sent through the - * socket - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param int $mode The value of mode can be one of the following: - * - * possible values for mode - * - * - * - * 0 - * - * Shutdown socket reading - * - * - * - * 1 - * - * Shutdown socket writing - * - * - * - * 2 - * - * Shutdown socket reading and writing - * - * - * - * - * + * @param \Socket $socket + * @param int $mode * @throws SocketsException * */ @@ -794,13 +425,9 @@ function socket_shutdown(\Socket $socket, int $mode = 2): void /** - * Exports the WSAPROTOCOL_INFO structure into shared memory and returns - * an identifier to be used with socket_wsaprotocol_info_import. The - * exported ID is only valid for the given process_id. - * - * @param \Socket $socket A Socket instance. - * @param int $process_id The ID of the process which will import the socket. - * @return string Returns an identifier to be used for the import + * @param \Socket $socket + * @param int $process_id + * @return string * @throws SocketsException * */ @@ -816,11 +443,8 @@ function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): strin /** - * Imports a socket which has formerly been exported from another process. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. - * @return \Socket Returns a Socket instance on success + * @param string $info_id + * @return \Socket * @throws SocketsException * */ @@ -836,10 +460,7 @@ function socket_wsaprotocol_info_import(string $info_id): \Socket /** - * Releases the shared memory corresponding to the given info_id. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. + * @param string $info_id * @throws SocketsException * */ diff --git a/generated/8.2/sodium.php b/generated/8.2/sodium.php index 5e64d001..3fe1d20c 100644 --- a/generated/8.2/sodium.php +++ b/generated/8.2/sodium.php @@ -5,16 +5,11 @@ use Safe\Exceptions\SodiumException; /** - * Verify then decrypt with AES-256-GCM. - * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aes256gcm_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -30,15 +25,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt with ChaCha20-Poly1305. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -54,14 +45,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string /** - * Encrypt then authenticate with ChaCha20-Poly1305. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -77,17 +65,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad /** - * Verify then decrypt with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -103,16 +85,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st /** - * Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -128,18 +105,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin /** - * Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -155,17 +125,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s /** - * Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -181,15 +145,9 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri /** - * Verify the authentication tag is valid for a given message and key. - * - * Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached), - * any party capable of verifying a message is also capable of authenticating - * their own messages. (Hence, symmetric authentication.) - * - * @param string $mac Authentication tag produced by sodium_crypto_auth - * @param string $message Message - * @param string $key Authentication key + * @param string $mac + * @param string $message + * @param string $key * @throws SodiumException * */ @@ -204,14 +162,10 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v /** - * Decrypt a message using asymmetric (public key) cryptography. - * - * @param string $ciphertext The encrypted message to attempt to decrypt. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key_pair See sodium_crypto_box_keypair_from_secretkey_and_publickey. - * This should include the sender's public key and the recipient's secret key. - * @return string Returns the plaintext message on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -227,11 +181,9 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p /** - * Decrypt a message that was encrypted with sodium_crypto_box_seal - * - * @param string $ciphertext The encrypted message - * @param string $key_pair The keypair of the recipient. Must include the secret key. - * @return string The plaintext on success. + * @param string $ciphertext + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -247,10 +199,8 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri /** - * Appends a message to the internal hash state. - * - * @param non-empty-string $state The return value of sodium_crypto_generichash_init. - * @param string $message Data to append to the hashing state. + * @param non-empty-string $state + * @param string $message * @throws SodiumException * */ @@ -265,14 +215,10 @@ function sodium_crypto_generichash_update(string &$state, string $message): void /** - * Decrypt an encrypted message with a symmetric (shared) key. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_secretbox - * (ciphertext and tag, concatenated). - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string The decrypted string on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -288,11 +234,9 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string /** - * Verify the signature attached to a message and return the message - * - * @param string $signed_message A message signed with sodium_crypto_sign - * @param non-empty-string $public_key An Ed25519 public key - * @return string Returns the original signed message on success. + * @param string $signed_message + * @param non-empty-string $public_key + * @return string * @throws SodiumException * */ @@ -308,11 +252,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st /** - * Verify signature for the message - * - * @param non-empty-string $signature The cryptographic signature obtained from sodium_crypto_sign_detached - * @param string $message The message being verified - * @param non-empty-string $public_key Ed25519 public key + * @param non-empty-string $signature + * @param string $message + * @param non-empty-string $public_key * @throws SodiumException * */ @@ -327,15 +269,11 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message, /** - * The function is similar to sodium_crypto_stream_xchacha20_xor - * but adds the ability to set the initial value of the block counter to a non-zero value. - * This permits direct access to any block without having to compute the previous ones. - * - * @param string $message The message to encrypt. - * @param string $nonce 24-byte nonce. - * @param int $counter The initial value of the block counter. - * @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen. - * @return string Encrypted message. + * @param string $message + * @param string $nonce + * @param int $counter + * @param string $key + * @return string * @throws SodiumException * */ diff --git a/generated/8.2/solr.php b/generated/8.2/solr.php index 0c4260a0..e5e269d0 100644 --- a/generated/8.2/solr.php +++ b/generated/8.2/solr.php @@ -5,9 +5,7 @@ use Safe\Exceptions\SolrException; /** - * This function returns the current version of the extension as a string. - * - * @return string It returns a string on success. + * @return string * @throws SolrException * */ diff --git a/generated/8.2/spl.php b/generated/8.2/spl.php index 704e4319..7c012526 100644 --- a/generated/8.2/spl.php +++ b/generated/8.2/spl.php @@ -5,12 +5,9 @@ use Safe\Exceptions\SplException; /** - * This function returns an array with the names of the interfaces that the - * given object_or_class and its parents implement. - * - * @param object|string $object_or_class An object (class instance) or a string (class or interface name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -26,12 +23,9 @@ function class_implements($object_or_class, bool $autoload = true): array /** - * This function returns an array with the name of the parent classes of - * the given object_or_class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -47,13 +41,9 @@ function class_parents($object_or_class, bool $autoload = true): array /** - * This function returns an array with the names of the traits that the - * given object_or_class uses. This does however not include - * any traits used by a parent class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -69,30 +59,9 @@ function class_uses($object_or_class, bool $autoload = true): array /** - * Register a function with the spl provided __autoload queue. If the queue - * is not yet activated it will be activated. - * - * If your code has an existing __autoload function then - * this function must be explicitly registered on the __autoload queue. This - * is because spl_autoload_register will effectively - * replace the engine cache for the __autoload function - * by either spl_autoload or - * spl_autoload_call. - * - * If there must be multiple autoload functions, spl_autoload_register - * allows for this. It effectively creates a queue of autoload functions, and - * runs through each of them in the order they are defined. By contrast, - * __autoload may only be defined once. - * - * @param callable(string):void|null $callback The autoload function being registered. - * If NULL, 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 callback - * cannot be registered. - * @param bool $prepend If true, spl_autoload_register will prepend - * the autoloader on the autoload queue instead of appending it. + * @param callable(string):void|null $callback + * @param bool $throw + * @param bool $prepend * @throws SplException * */ @@ -115,14 +84,7 @@ function spl_autoload_register(?callable $callback = null, bool $throw = true, b /** - * Removes a function from the autoload queue. If the queue - * is activated and empty after removing the given function then it will - * be deactivated. - * - * When this function results in the queue being deactivated, any - * __autoload function that previously existed will not be reactivated. - * - * @param mixed $callback The autoload function being unregistered. + * @param mixed $callback * @throws SplException * */ diff --git a/generated/8.2/sqlsrv.php b/generated/8.2/sqlsrv.php index fd85b774..2fc4fbfa 100644 --- a/generated/8.2/sqlsrv.php +++ b/generated/8.2/sqlsrv.php @@ -5,16 +5,7 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and commit/roll - * back transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ @@ -29,14 +20,7 @@ function sqlsrv_begin_transaction($conn): void /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been - * consumed. - * - * @param resource $stmt The statement resource to be cancelled. + * @param resource $stmt * @throws SqlsrvException * */ @@ -51,39 +35,8 @@ function sqlsrv_cancel($stmt): void /** - * Returns information about the client and specified connection - * - * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. - * - * Array returned by sqlsrv_client_info - * - * - * - * Key - * Description - * - * - * - * - * DriverDllName - * SQLNCLI10.DLL - * - * - * DriverODBCVer - * ODBC version (xx.yy) - * - * - * DriverVer - * SQL Server Native Client DLL version (10.5.xxx) - * - * - * ExtensionVer - * php_sqlsrv.dll version (2.0.xxx.x) - * - * - * - * + * @param resource $conn + * @return array * @throws SqlsrvException * */ @@ -99,9 +52,7 @@ function sqlsrv_client_info($conn): array /** - * Closes an open connection and releases resourses associated with the connection. - * - * @param resource $conn The connection to be closed. + * @param resource $conn * @throws SqlsrvException * */ @@ -116,16 +67,7 @@ function sqlsrv_close($conn): void /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and commit/roll back - * transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection on which the transaction is to be committed. + * @param resource $conn * @throws SqlsrvException * */ @@ -140,44 +82,8 @@ function sqlsrv_commit($conn): void /** - * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are - * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". - * @param mixed $value The value of the specified setting. The following table shows possible values: - * - * Error and Logging Setting Options - * - * - * - * Setting - * Options - * - * - * - * - * WarningsReturnAsErrors - * 1 (TRUE) or 0 (FALSE) - * - * - * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) - * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * - * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) - * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * @param string $setting + * @param mixed $value * @throws SqlsrvException * */ @@ -192,11 +98,7 @@ function sqlsrv_configure(string $setting, $value): void /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with - * different parameter values. - * - * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @param resource $stmt * @throws SqlsrvException * */ @@ -211,29 +113,11 @@ function sqlsrv_execute($stmt): void /** - * Returns the next available row of data as an associative array, a numeric - * array, or both (the default). - * - * @param resource $stmt A statement resource returned by sqlsrv_query or sqlsrv_prepare. - * @param int $fetchType A predefined constant specifying the type of array to return. Possible - * values are SQLSRV_FETCH_ASSOC, - * SQLSRV_FETCH_NUMERIC, and - * SQLSRV_FETCH_BOTH (the default). - * - * A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a - * result set with multiple columns of the same name. - * @param int $row Specifies the row to access in a result set that uses a scrollable cursor. - * Possible values are SQLSRV_SCROLL_NEXT, - * SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, - * SQLSRV_SCROLL_LAST, SQLSRV_SCROLL_ABSOLUTE and, - * SQLSRV_SCROLL_RELATIVE (the default). When this parameter - * is specified, the fetchType must be explicitly defined. - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return array|null Returns an array on success, NULL if there are no more rows to return, and - * FALSE if an error occurs. + * @param resource $stmt + * @param int $fetchType + * @param int $row + * @param int $offset + * @return array|null * @throws SqlsrvException * */ @@ -257,34 +141,12 @@ function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?in /** - * Retrieves the next row of data in a result set as an instance of the specified - * class with properties that match the row field names and values that correspond - * to the row field values. - * - * @param resource $stmt A statement resource created by sqlsrv_query or - * sqlsrv_execute. - * @param string $className The name of the class to instantiate. If no class name is specified, - * stdClass is instantiated. - * @param array $ctorParams Values passed to the constructor of the specified class. If the constructor - * of the specified class takes parameters, the ctorParams array must be - * supplied. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return null|object Returns an object on success, NULL if there are no more rows to return, - * and FALSE if an error occurs or if the specified class does not exist. + * @param resource $stmt + * @param string $className + * @param array $ctorParams + * @param int $row + * @param int $offset + * @return null|object * @throws SqlsrvException * */ @@ -310,28 +172,10 @@ function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParam /** - * Makes the next row in a result set available for reading. Use - * sqlsrv_get_field to read the fields of the row. - * - * @param resource $stmt A statement resource created by executing sqlsrv_query - * or sqlsrv_execute. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return bool|null Returns TRUE if the next row of a result set was successfully retrieved, - * FALSE if an error occurs, and NULL if there are no more rows in the result set. + * @param resource $stmt + * @param int $row + * @param int $offset + * @return bool|null * @throws SqlsrvException * */ @@ -353,15 +197,7 @@ function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement - * is rolled back. - * - * @param resource $stmt The statement for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be - * called multiple times in a script. + * @param resource $stmt * @throws SqlsrvException * */ @@ -376,20 +212,10 @@ function sqlsrv_free_stmt($stmt): void /** - * Gets field data from the currently selected row. Fields must be accessed in - * order. Field indices start at 0. - * - * @param resource $stmt A statement resource returned by sqlsrv_query or - * sqlsrv_execute. - * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields - * must be accessed in order. i.e. If you access field index 1, then field - * index 0 will not be available. - * @param int $getAsType The PHP data type for the returned field data. If this parameter is not - * set, the field data will be returned as its default PHP data type. - * For information about default PHP data types, see - * Default PHP Data Types - * in the Microsoft SQLSRV documentation. - * @return mixed Returns data from the specified field on success. + * @param resource $stmt + * @param int $fieldIndex + * @param int $getAsType + * @return mixed * @throws SqlsrvException * */ @@ -409,12 +235,8 @@ function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null) /** - * Makes the next result of the specified statement active. Results include result - * sets, row counts, and output parameters. - * - * @param resource $stmt The statement on which the next result is being called. - * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error - * occurred, and NULL if there are no more results to retrieve. + * @param resource $stmt + * @return bool|null * @throws SqlsrvException * */ @@ -430,12 +252,8 @@ function sqlsrv_next_result($stmt): ?bool /** - * Retrieves the number of fields (columns) on a statement. - * - * @param resource $stmt The statement for which the number of fields is returned. - * sqlsrv_num_fields can be called on a statement before - * or after statement execution. - * @return int Returns the number of fields on success. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -451,19 +269,8 @@ function sqlsrv_num_fields($stmt): int /** - * Retrieves the number of rows in a result set. This function requires that the - * statement resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statement resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * @return int Returns the number of rows retrieved on success. - * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -479,23 +286,11 @@ function sqlsrv_num_rows($stmt): int /** - * Prepares a query for execution. This function is ideal for preparing a query - * that will be executed multiple times with different parameter values. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized - * query. Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -517,22 +312,11 @@ function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $optio /** - * Prepares and executes a query. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. - * Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -554,10 +338,7 @@ function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction - * and returns the connection to auto-commit mode. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ diff --git a/generated/8.2/ssdeep.php b/generated/8.2/ssdeep.php index 2c09aea9..8d93d77a 100644 --- a/generated/8.2/ssdeep.php +++ b/generated/8.2/ssdeep.php @@ -5,14 +5,9 @@ use Safe\Exceptions\SsdeepException; /** - * Calculates the match score between signature1 - * and signature2 using - * context-triggered piecewise hashing, and returns the match - * score. - * - * @param string $signature1 The first fuzzy hash signature string. - * @param string $signature2 The second fuzzy hash signature string. - * @return int Returns an integer from 0 to 100 on success. + * @param string $signature1 + * @param string $signature2 + * @return int * @throws SsdeepException * */ @@ -28,13 +23,8 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int /** - * ssdeep_fuzzy_hash_filename calculates the hash - * of the file specified by file_name using - * context-triggered piecewise - * hashing, and returns that hash. - * - * @param string $file_name The filename of the file to hash. - * @return string Returns a string on success. + * @param string $file_name + * @return string * @throws SsdeepException * */ @@ -50,12 +40,8 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string /** - * ssdeep_fuzzy_hash calculates the hash of - * to_hash using - * context-triggered piecewise hashing, and returns that hash. - * - * @param string $to_hash The input string. - * @return string Returns a string on success. + * @param string $to_hash + * @return string * @throws SsdeepException * */ diff --git a/generated/8.2/ssh2.php b/generated/8.2/ssh2.php index 04882b11..c9d72f28 100644 --- a/generated/8.2/ssh2.php +++ b/generated/8.2/ssh2.php @@ -5,11 +5,8 @@ use Safe\Exceptions\Ssh2Exception; /** - * Authenticate over SSH using the ssh agent - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. + * @param resource $session + * @param string $username * @throws Ssh2Exception * */ @@ -24,18 +21,13 @@ function ssh2_auth_agent($session, string $username): void /** - * Authenticate using a public hostkey read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username * @param string $hostname * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. - * @param string $local_username If local_username is omitted, then the value - * for username will be used for it. + * @param string $passphrase + * @param string $local_username * @throws Ssh2Exception * */ @@ -56,13 +48,9 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** - * Authenticate over SSH using a plain password. Since version 0.12 this function - * also supports keyboard_interactive method. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. - * @param string $password Password for username + * @param resource $session + * @param string $username + * @param string $password * @throws Ssh2Exception * */ @@ -77,17 +65,11 @@ function ssh2_auth_password($session, string $username, string $password): void /** - * Authenticate using a public key read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username - * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * - * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. + * @param string $passphrase * @throws Ssh2Exception * */ @@ -106,201 +88,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** - * Establish a connection to a remote SSH server. - * - * Once connected, the client should verify the server's hostkey using - * ssh2_fingerprint, then authenticate using either - * password or public key. - * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters - * as described below. - * - * - * methods may be an associative array - * with any or all of the following parameters. - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * kex - * - * List of key exchange methods to advertise, comma separated - * in order of preference. - * - * - * diffie-hellman-group1-sha1, - * diffie-hellman-group14-sha1, and - * diffie-hellman-group-exchange-sha1 - * - * - * - * hostkey - * - * List of hostkey methods to advertise, comma separated - * in order of preference. - * - * - * ssh-rsa and - * ssh-dss - * - * - * - * client_to_server - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from client to server. - * - * - * - * - * server_to_client - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from server to client. - * - * - * - * - * - * - * - * * - Supported Values are dependent on methods supported by underlying library. - * See libssh2 documentation for additional - * information. - * - * - * - * client_to_server and - * server_to_client may be an associative array - * with any or all of the following parameters. - * - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * crypt - * List of crypto methods to advertise, comma separated - * in order of preference. - * - * rijndael-cbc@lysator.liu.se, - * aes256-cbc, - * aes192-cbc, - * aes128-cbc, - * 3des-cbc, - * blowfish-cbc, - * cast128-cbc, - * arcfour, and - * none** - * - * - * - * comp - * List of compression methods to advertise, comma separated - * in order of preference. - * - * zlib and - * none - * - * - * - * mac - * List of MAC methods to advertise, comma separated - * in order of preference. - * - * hmac-sha1, - * hmac-sha1-96, - * hmac-ripemd160, - * hmac-ripemd160@openssh.com, and - * none** - * - * - * - * - * - * - * - * Crypt and MAC method "none" - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * - * - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any - * or all of the following parameters. - * - * - * Callbacks parameters - * - * - * - * - * Index - * Meaning - * Prototype - * - * - * - * - * ignore - * - * Name of function to call when an - * SSH2_MSG_IGNORE packet is received - * - * void ignore_cb($message) - * - * - * debug - * - * Name of function to call when an - * SSH2_MSG_DEBUG packet is received - * - * void debug_cb($message, $language, $always_display) - * - * - * macerror - * - * Name of function to call when a packet is received but the - * message authentication code failed. If the callback returns - * TRUE, the mismatch will be ignored, otherwise the connection - * will be terminated. - * - * bool macerror_cb($packet) - * - * - * disconnect - * - * Name of function to call when an - * SSH2_MSG_DISCONNECT packet is received - * - * void disconnect_cb($reason, $message, $language) - * - * - * - * - * @return resource Returns a resource on success. + * @param array $methods + * @param array $callbacks + * @return resource * @throws Ssh2Exception * */ @@ -322,10 +114,7 @@ function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?arr /** - * Close a connection to a remote SSH server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @throws Ssh2Exception * */ @@ -340,20 +129,14 @@ function ssh2_disconnect($session): void /** - * Execute a command at the remote end and allocate a channel for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream on success. + * @param array $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ @@ -381,10 +164,8 @@ function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = /** - * Accepts a connection created by a listener. - * - * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen. - * @return resource Returns a stream resource. + * @param resource $listener + * @return resource * @throws Ssh2Exception * */ @@ -400,13 +181,11 @@ function ssh2_forward_accept($listener) /** - * Binds a port on the remote server and listen for connections. - * - * @param resource $session An SSH Session resource, obtained from a call to ssh2_connect. - * @param int $port The port of the remote server. + * @param resource $session + * @param int $port * @param string $host * @param int $max_connections - * @return resource Returns an SSH2 Listener. + * @return resource * @throws Ssh2Exception * */ @@ -428,17 +207,11 @@ function ssh2_forward_listen($session, int $port, ?string $host = null, int $max /** - * - * - * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data - * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. - * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. - * To mark an attribute as mandatory, precede its name with an asterisk. - * If the server is unable to support an attribute marked mandatory, - * it will abort the add process. + * @param resource $pkey + * @param string $algoname + * @param string $blob + * @param bool $overwrite + * @param array $attributes * @throws Ssh2Exception * */ @@ -457,17 +230,8 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** - * Request the Publickey subsystem from an already connected SSH2 server. - * - * The publickey subsystem allows an already connected and authenticated - * client to manage the list of authorized public keys stored on the - * target server in an implementation agnostic manner. - * If the remote server does not support the publickey subsystem, - * the ssh2_publickey_init function will return FALSE. - * * @param resource $session - * @return resource Returns an SSH2 Publickey Subsystem resource for use - * with all other ssh2_publickey_*() methods. + * @return resource * @throws Ssh2Exception * */ @@ -483,11 +247,9 @@ function ssh2_publickey_init($session) /** - * Removes an authorized publickey. - * - * @param resource $pkey Publickey Subsystem Resource - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data + * @param resource $pkey + * @param string $algoname + * @param string $blob * @throws Ssh2Exception * */ @@ -502,12 +264,9 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** - * Copy a file from the remote server to the local filesystem using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $remote_file Path to the remote file. - * @param string $local_file Path to the local file. + * @param resource $session + * @param string $remote_file + * @param string $local_file * @throws Ssh2Exception * */ @@ -522,14 +281,10 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** - * Copy a file from the local filesystem to the remote server using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $local_file Path to the local file. - * @param string $remote_file Path to the remote file. - * @param int $create_mode The file will be created with the mode specified by - * create_mode. + * @param resource $session + * @param string $local_file + * @param string $remote_file + * @param int $create_mode * @throws Ssh2Exception * */ @@ -544,13 +299,7 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** - * Sends an EOF to the stream; this is typically used to close standard input, - * while keeping output and error alive. For example, one can send a remote - * process some data over standard input, close it to start processing, and - * still be able to read out the results without creating additional files. - * - * @param resource $channel An SSH stream; can be acquired through functions like ssh2_fetch_stream - * or ssh2_connect. + * @param resource $channel * @throws Ssh2Exception * */ @@ -565,12 +314,9 @@ function ssh2_send_eof($channel): void /** - * Attempts to change the mode of the specified file to that given in - * mode. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename Path to the file. - * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @param resource $sftp + * @param string $filename + * @param int $mode * @throws Ssh2Exception * */ @@ -585,18 +331,10 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** - * Creates a directory on the remote file server with permissions set to - * mode. - * - * This function is similar to using mkdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname Path of the new directory. - * @param int $mode Permissions on the new directory. - * The actual mode is affected by the current umask. - * @param bool $recursive If recursive is TRUE any parent directories - * required for dirname will be automatically created as well. + * @param resource $sftp + * @param string $dirname + * @param int $mode + * @param bool $recursive * @throws Ssh2Exception * */ @@ -611,11 +349,9 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** - * Renames a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $from The current file that is being renamed. - * @param string $to The new file name that replaces from. + * @param resource $sftp + * @param string $from + * @param string $to * @throws Ssh2Exception * */ @@ -630,12 +366,7 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** - * Removes a directory from the remote file server. - * - * This function is similar to using rmdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $dirname * @throws Ssh2Exception * @@ -651,11 +382,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** - * Creates a symbolic link named link on the remote - * filesystem pointing to target. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $target Target of the symbolic link. + * @param resource $sftp + * @param string $target * @param string $link * @throws Ssh2Exception * @@ -671,9 +399,7 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** - * Deletes a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $filename * @throws Ssh2Exception * @@ -689,13 +415,8 @@ function ssh2_sftp_unlink($sftp, string $filename): void /** - * Request the SFTP subsystem from an already connected SSH2 server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @return resource This method returns an SSH2 SFTP resource for use with - * all other ssh2_sftp_*() methods and the - * ssh2.sftp:// fopen wrapper. + * @param resource $session + * @return resource * @throws Ssh2Exception * */ @@ -711,20 +432,13 @@ function ssh2_sftp($session) /** - * Open a shell at the remote end and allocate a stream for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $termtype termtype should correspond to one of the - * entries in the target system's /etc/termcap file. - * @param array|null $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream resource on success. + * @param resource $session + * @param string $termtype + * @param array|null $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ diff --git a/generated/8.2/stream.php b/generated/8.2/stream.php index a21295cc..86647144 100644 --- a/generated/8.2/stream.php +++ b/generated/8.2/stream.php @@ -5,11 +5,8 @@ use Safe\Exceptions\StreamException; /** - * Sets parameters on the specified context. - * - * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: - * $params['paramname'] = "paramvalue";. + * @param resource $context + * @param array $params * @throws StreamException * */ @@ -24,18 +21,11 @@ function stream_context_set_params($context, array $params): void /** - * Makes a copy of up to length bytes - * of data from the current position (or from the - * offset position, if specified) in - * from to to. If - * length is NULL, all remaining content in - * from will be copied. - * - * @param resource $from The source stream - * @param resource $to The destination stream - * @param int|null $length Maximum bytes to copy. By default all bytes left are copied. - * @param int $offset The offset where to start to copy data - * @return int Returns the total count of bytes copied. + * @param resource $from + * @param resource $to + * @param int|null $length + * @param int $offset + * @return int * @throws StreamException * */ @@ -57,33 +47,11 @@ function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_append will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified - * params to the end of - * the list and will therefore be called last during stream operations. - * To add a filter to the beginning of the list, use - * stream_filter_prepend. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -105,34 +73,11 @@ function stream_filter_append($stream, string $filtername, ?int $read_write = nu /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_prepend will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * See stream_filter_append for an example of - * using this parameter. - * @param mixed $params This filter will be added with the specified params - * to the beginning of the list and will therefore be - * called first during stream operations. To add a filter to the end of the - * list, use stream_filter_append. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -154,20 +99,8 @@ function stream_filter_prepend($stream, string $filtername, ?int $read_write = n /** - * stream_filter_register allows you to implement - * your own filter on any registered stream used with all the other - * filesystem functions (such as fopen, - * fread etc.). - * - * @param string $filter_name The filter name to be registered. - * @param string $class To implement a filter, you need to define a class as an extension of - * php_user_filter with a number of member - * functions. When performing read/write operations on the stream - * to which your filter is attached, PHP will pass the data through your - * filter (and any other filters attached to that stream) so that the - * data may be modified as desired. You must implement the methods - * exactly as described in php_user_filter - doing - * otherwise will lead to undefined behaviour. + * @param string $filter_name + * @param string $class * @throws StreamException * */ @@ -182,13 +115,7 @@ function stream_filter_register(string $filter_name, string $class): void /** - * Removes a stream filter previously added to a stream with - * stream_filter_prepend or - * stream_filter_append. Any data remaining in the - * filter's internal buffer will be flushed through to the next filter before - * removing it. - * - * @param resource $stream_filter The stream filter to be removed. + * @param resource $stream_filter * @throws StreamException * */ @@ -203,18 +130,10 @@ function stream_filter_remove($stream_filter): void /** - * Identical to file_get_contents, except that - * stream_get_contents operates on an already open - * stream resource and returns the remaining contents in a string, up to - * length bytes and starting at the specified - * offset. - * - * @param resource $stream A stream resource (e.g. returned from fopen) - * @param int|null $length The maximum bytes to read. Defaults to NULL (read all the remaining - * buffer). - * @param int $offset Seek to the specified offset before reading. If this number is negative, - * no seeking will occur and reading will start from the current position. - * @return string Returns a string. + * @param resource $stream + * @param int|null $length + * @param int $offset + * @return string * @throws StreamException * */ @@ -236,25 +155,10 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st /** - * Gets a line from the given handle. - * - * Reading ends when length bytes have been read, when - * the non-empty string specified by ending is found (which is - * not included in the return value), or on EOF - * (whichever comes first). - * - * This function is nearly identical to fgets except in - * that it allows end of line delimiters other than the standard \n, \r, and - * \r\n, and does not return the delimiter itself. - * - * @param resource $stream A valid file handle. - * @param int $length The maximum number of bytes to read from the handle. - * Negative values are not supported. - * Zero (0) means the default socket chunk size, - * i.e. 8192 bytes. - * @param string $ending An optional string delimiter. - * @return string Returns a string of up to length bytes read from the file - * pointed to by stream. + * @param resource $stream + * @param int $length + * @param string $ending + * @return string * @throws StreamException * */ @@ -270,9 +174,6 @@ function stream_get_line($stream, int $length, string $ending = ""): string /** - * Determines if stream stream refers to a valid terminal type device. - * This is a more portable version of posix_isatty, since it works on Windows systems too. - * * @param resource $stream * @throws StreamException * @@ -288,10 +189,8 @@ function stream_isatty($stream): void /** - * Resolve filename against the include path according to the same rules as fopen/include. - * - * @param string $filename The filename to resolve. - * @return string Returns a string containing the resolved absolute filename. + * @param string $filename + * @return string * @throws StreamException * */ @@ -307,20 +206,8 @@ function stream_resolve_include_path(string $filename): string /** - * Sets blocking or non-blocking mode on a stream. - * - * This function works for any stream that supports non-blocking mode - * (currently, regular files and socket streams). - * - * @param resource $stream The stream. - * @param bool $enable If enable is FALSE, the given stream - * will be switched to non-blocking mode, and if TRUE, it - * will be switched to blocking mode. This affects calls like - * fgets and fread - * that read from the stream. In non-blocking mode an - * fgets call will always return right away - * while in blocking mode it will wait for data to become available - * on the stream. + * @param resource $stream + * @param bool $enable * @throws StreamException * */ @@ -335,17 +222,9 @@ function stream_set_blocking($stream, bool $enable): void /** - * Sets the timeout value on stream, - * expressed in the sum of seconds and - * microseconds. - * - * When the stream times out, the 'timed_out' key of the array returned by - * stream_get_meta_data is set to TRUE, although no - * error/warning is generated. - * - * @param resource $stream The target stream. - * @param int $seconds The seconds part of the timeout to be set. - * @param int $microseconds The microseconds part of the timeout to be set. + * @param resource $stream + * @param int $seconds + * @param int $microseconds * @throws StreamException * */ @@ -360,19 +239,10 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** - * Accept a connection on a socket previously created by - * stream_socket_server. - * - * @param resource $socket The server socket to accept a connection from. - * @param float|null $timeout Override the default socket accept timeout. Time should be given in - * seconds. By default, default_socket_timeout - * is used. - * @param null|string $peer_name Will be set to the name (address) of the client which connected, if - * included and available from the selected transport. - * - * Can also be determined later using - * stream_socket_get_name. - * @return resource Returns a stream to the accepted socket connection. + * @param resource $socket + * @param float|null $timeout + * @param null|string $peer_name + * @return resource * @throws StreamException * */ @@ -394,52 +264,13 @@ function stream_socket_accept($socket, ?float $timeout = null, ?string &$peer_na /** - * Initiates a stream or datagram connection to the destination specified - * by address. The type of socket created - * is determined by the transport specified using standard URL formatting: - * transport://target. For Internet Domain sockets - * (AF_INET) such as TCP and UDP, the target portion - * of the address parameter should consist of - * a hostname or IP address followed by a colon and a port number. For Unix - * domain sockets, the target portion should point - * to the socket file on the filesystem. - * - * @param string $address Address to the socket to connect to. - * @param int|null $error_code Will be set to the system level error number if connection fails. - * @param null|string $error_message Will be set to the system level error message if the connection fails. - * @param float|null $timeout Number of seconds until the connect() system call - * should timeout. By default, default_socket_timeout - * is used. - * - * - * This parameter only applies when not making asynchronous - * connection attempts. - * - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * @param int-mask $flags Bitmask field which may be set to any combination of connection flags. - * Currently the select of connection flags is limited to - * STREAM_CLIENT_CONNECT (default), - * STREAM_CLIENT_ASYNC_CONNECT and - * STREAM_CLIENT_PERSISTENT. - * @param null|resource $context A valid context resource created with stream_context_create. - * @return resource On success a stream resource is returned which may - * be used together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @param int-mask $flags + * @param null|resource $context + * @return resource * @throws StreamException * */ @@ -463,12 +294,9 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string /** - * Returns the local or remote name of a given socket connection. - * - * @param resource $socket The socket to get the name of. - * @param bool $remote If set to TRUE the remote socket name will be returned, if set - * to FALSE the local socket name will be returned. - * @return string The name of the socket. + * @param resource $socket + * @param bool $remote + * @return string * @throws StreamException * */ @@ -484,25 +312,10 @@ function stream_socket_get_name($socket, bool $remote): string /** - * stream_socket_pair creates a pair of connected, - * indistinguishable socket streams. This function is commonly used in IPC - * (Inter-Process Communication). - * - * @param int $domain The protocol family to be used: STREAM_PF_INET, - * STREAM_PF_INET6 or - * STREAM_PF_UNIX - * @param int $type The type of communication to be used: - * STREAM_SOCK_DGRAM, - * STREAM_SOCK_RAW, - * STREAM_SOCK_RDM, - * STREAM_SOCK_SEQPACKET or - * STREAM_SOCK_STREAM - * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, - * STREAM_IPPROTO_IP, - * STREAM_IPPROTO_RAW, - * STREAM_IPPROTO_TCP or - * STREAM_IPPROTO_UDP - * @return resource[] Returns an array with the two socket resources on success. + * @param int $domain + * @param int $type + * @param int $protocol + * @return resource[] * @throws StreamException * */ @@ -518,38 +331,11 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array /** - * stream_socket_recvfrom accepts - * data from a remote socket up to length bytes. - * - * @param resource $socket The remote socket. - * @param int $length The number of bytes to receive from the socket. - * @param int $flags The value of flags can be any combination - * of the following: - * - * Possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * STREAM_PEEK - * - * Retrieve data from the socket, but do not consume the buffer. - * Subsequent calls to fread or - * stream_socket_recvfrom will see - * the same data. - * - * - * - * - * - * @param null|string $address If address is provided it will be populated with - * the address of the remote socket. - * @return string Returns the read data, as a string. + * @param resource $socket + * @param int $length + * @param int $flags + * @param null|string $address + * @return string * @throws StreamException * */ @@ -565,31 +351,11 @@ function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$ /** - * Sends the specified data through the - * socket. - * - * @param resource $socket The socket to send data to. - * @param string $data The data to be sent. - * @param int $flags The value of flags can be any combination - * of the following: - * - * possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * - * - * @param string $address The address specified when the socket stream was created will be used - * unless an alternate address is specified in address. - * - * If specified, it must be in dotted quad (or [ipv6]) format. - * @return int Returns a result code, as an integer. + * @param resource $socket + * @param string $data + * @param int $flags + * @param string $address + * @return int * @throws StreamException * */ @@ -605,44 +371,12 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** - * Creates a stream or datagram socket on the specified - * address. - * - * This function only creates a socket, to begin accepting connections - * use stream_socket_accept. - * - * @param string $address The type of socket created is determined by the transport specified - * using standard URL formatting: transport://target. - * - * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the - * remote_socket parameter should consist of a - * hostname or IP address followed by a colon and a port number. For - * Unix domain sockets, the target portion should - * point to the socket file on the filesystem. - * - * Depending on the environment, Unix domain sockets may not be available. - * A list of available transports can be retrieved using - * stream_get_transports. See - * for a list of bulitin transports. - * @param int|null $error_code If the optional error_code and error_message - * arguments are present they will be set to indicate the actual system - * level error that occurred in the system-level socket(), - * bind(), and listen() calls. If - * the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. - * Note that the error_code and - * error_message arguments will always be passed by reference. - * @param null|string $error_message See error_code description. - * @param int $flags A bitmask field which may be set to any combination of socket creation - * flags. - * - * For UDP sockets, you must use STREAM_SERVER_BIND as - * the flags parameter. + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param int $flags * @param null|resource $context - * @return resource Returns the created stream. + * @return resource * @throws StreamException * */ @@ -662,15 +396,8 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string /** - * Shutdowns (partially or not) a full-duplex connection. - * - * @param resource $stream An open stream (opened with stream_socket_client, - * for example) - * @param int $mode One of the following constants: STREAM_SHUT_RD - * (disable further receptions), STREAM_SHUT_WR - * (disable further transmissions) or - * STREAM_SHUT_RDWR (disable further receptions and - * transmissions). + * @param resource $stream + * @param int $mode * @throws StreamException * */ @@ -685,10 +412,7 @@ function stream_socket_shutdown($stream, int $mode): void /** - * Tells whether the stream supports locking through - * flock. - * - * @param resource $stream The stream to check. + * @param resource $stream * @throws StreamException * */ @@ -703,16 +427,9 @@ function stream_supports_lock($stream): void /** - * Allows you to implement your own protocol handlers and streams for use - * with all the other filesystem functions (such as fopen, - * fread etc.). - * - * @param string $protocol The wrapper name to be registered. - * Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. - * @param string $class The classname which implements the protocol. - * @param int $flags Should be set to STREAM_IS_URL if - * protocol is a URL protocol. Default is 0, local - * stream. + * @param string $protocol + * @param string $class + * @param int $flags * @throws StreamException * */ @@ -727,9 +444,6 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 /** - * Restores a built-in wrapper previously unregistered with - * stream_wrapper_unregister. - * * @param string $protocol * @throws StreamException * @@ -745,11 +459,6 @@ function stream_wrapper_restore(string $protocol): void /** - * Allows you to disable an already defined stream wrapper. Once the wrapper - * has been disabled you may override it with a user-defined wrapper using - * stream_wrapper_register or reenable it later on with - * stream_wrapper_restore. - * * @param string $protocol * @throws StreamException * diff --git a/generated/8.2/strings.php b/generated/8.2/strings.php index 4b673a75..a9f7e651 100644 --- a/generated/8.2/strings.php +++ b/generated/8.2/strings.php @@ -5,10 +5,8 @@ use Safe\Exceptions\StringsException; /** - * convert_uudecode decodes a uuencoded string. - * - * @param string $string The uuencoded data. - * @return string Returns the decoded data as a string. + * @param string $string + * @return string * @throws StringsException * */ @@ -24,10 +22,8 @@ function convert_uudecode(string $string): string /** - * Decodes a hexadecimally encoded binary string. - * - * @param string $string Hexadecimal representation of data. - * @return string Returns the binary representation of the given data. + * @param string $string + * @return string * @throws StringsException * */ @@ -43,16 +39,9 @@ function hex2bin(string $string): string /** - * Calculates the MD5 hash of the file specified by the - * filename parameter using the - * RSA Data Security, Inc. - * MD5 Message-Digest Algorithm, and returns that hash. - * The hash is a 32-character hexadecimal number. - * - * @param string $filename The filename - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 16. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ @@ -68,15 +57,9 @@ function md5_file(string $filename, bool $binary = false): string /** - * Calculates the sha1 hash of the file specified by - * filename using the - * US Secure Hash Algorithm 1, - * and returns that hash. The hash is a 40-character hexadecimal number. - * - * @param string $filename The filename of the file to hash. - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 20. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ diff --git a/generated/8.2/swoole.php b/generated/8.2/swoole.php index 3e9d4dc5..f9500d37 100644 --- a/generated/8.2/swoole.php +++ b/generated/8.2/swoole.php @@ -5,12 +5,8 @@ use Safe\Exceptions\SwooleException; /** - * - * - * @param string $hostname The host name. - * @param callable $callback The host name. - * - * The IP address. + * @param string $hostname + * @param callable $callback * @throws SwooleException * */ @@ -25,12 +21,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void /** - * - * - * @param string $filename The filename of the file being read. - * @param string $callback The name of the file. - * - * The content read from the file. + * @param string $filename + * @param string $callback * @throws SwooleException * */ @@ -45,11 +37,9 @@ function swoole_async_readfile(string $filename, string $callback): void /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. - * @param int $offset The offset. + * @param string $filename + * @param string $content + * @param int $offset * @param callable $callback * @throws SwooleException * @@ -71,10 +61,8 @@ function swoole_async_write(string $filename, string $content, ?int $offset = nu /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. + * @param string $filename + * @param string $content * @param callable $callback * @param int $flags * @throws SwooleException @@ -97,8 +85,6 @@ function swoole_async_writefile(string $filename, string $content, ?callable $ca /** - * - * * @param callable $callback * @throws SwooleException * @@ -114,8 +100,6 @@ function swoole_event_defer(callable $callback): void /** - * - * * @param int $fd * @throws SwooleException * @@ -131,8 +115,6 @@ function swoole_event_del(int $fd): void /** - * - * * @param int $fd * @param string $data * @throws SwooleException diff --git a/generated/8.2/uodbc.php b/generated/8.2/uodbc.php index 3afbd818..23dd7049 100644 --- a/generated/8.2/uodbc.php +++ b/generated/8.2/uodbc.php @@ -5,22 +5,9 @@ use Safe\Exceptions\UodbcException; /** - * Toggles autocommit behaviour. - * - * By default, auto-commit is on for a connection. Disabling - * auto-commit is equivalent with starting a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param bool $enable If enable is TRUE, auto-commit is enabled, if - * it is FALSE auto-commit is disabled. - * @return mixed Without the enable parameter, this function returns - * auto-commit status for odbc. Non-zero is - * returned if auto-commit is on, 0 if it is off, or FALSE if an error - * occurs. - * - * If enable is set, this function returns TRUE on - * success. + * @param resource $odbc + * @param bool $enable + * @return mixed * @throws UodbcException * */ @@ -36,101 +23,8 @@ function odbc_autocommit($odbc, bool $enable = false) /** - * Controls handling of binary column data. ODBC SQL types affected are - * BINARY, VARBINARY, and - * LONGVARBINARY. - * The default mode can be set using the - * uodbc.defaultbinmode php.ini directive. - * - * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte - * (8 bits) of source data is represented as two ASCII characters. - * These characters are the ASCII character representation of the - * number in its hexadecimal form. For example, a binary - * 00000001 is converted to - * "01" and a binary 11111111 - * is converted to "FF". - * - * While the handling of BINARY and VARBINARY - * columns only depend on the binmode, the handling of LONGVARBINARY - * columns also depends on the longreadlen as well: - * - * LONGVARBINARY handling - * - * - * - * binmode - * longreadlen - * result - * - * - * - * - * ODBC_BINMODE_PASSTHRU - * 0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * 0 - * passthru - * - * - * ODBC_BINMODE_CONVERT - * 0 - * passthru - * - * - * ODBC_BINMODE_PASSTHRU - * >0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * >0 - * return as is - * - * - * ODBC_BINMODE_CONVERT - * >0 - * return as char - * - * - * - * - * - * If odbc_fetch_into is used, passthru means that an - * empty string is returned for these columns. - * If odbc_result is used, passthru means that the data are - * sent directly to the client (i.e. printed). - * - * @param int $statement The result identifier. - * - * If statement is 0, the - * settings apply as default for new results. - * @param int $mode Possible values for mode are: - * - * - * - * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * - * ODBC_BINMODE_RETURN: Return as is - * - * - * - * - * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * - * - * - * Handling of binary long - * columns is also affected by odbc_longreadlen. - * - * + * @param int $statement + * @param int $mode * @throws UodbcException * */ @@ -145,39 +39,12 @@ function odbc_binmode(int $statement, int $mode): void /** - * Lists columns and associated privileges for the given table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * This result identifier can be used to fetch a list of columns and - * associated privileges. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param string $column + * @return resource * @throws UodbcException * */ @@ -193,47 +60,12 @@ function odbc_columnprivileges($odbc, string $catalog, string $schema, string $t /** - * Lists all columns in the requested range. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -259,10 +91,7 @@ function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?s /** - * Commits all pending transactions on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -277,44 +106,11 @@ function odbc_commit($odbc): void /** - * The connection id returned by this functions is needed by other - * ODBC functions. You can have multiple connections open at once as long as - * they either use different db or different credentials. - * - * With some ODBC drivers, executing a complex stored procedure may - * fail with an error similar to: "Cannot open a cursor on a stored - * procedure that has anything other than a single select statement - * in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some - * drivers don't support the optional row_number parameter in - * odbc_fetch_row. SQL_CUR_USE_ODBC might help - * in that case, too. - * - * @param string $dsn The database source name for the connection. Alternatively, a - * DSN-less connection string can be used. - * @param string $user The username. - * @param string $password The password. - * @param int $cursor_option This sets the type of cursor to be used - * for this connection. This parameter is not normally needed, but - * can be useful for working around problems with some ODBC drivers. - * - * - * - * - * SQL_CUR_USE_IF_NEEDED - * - * - * - * - * SQL_CUR_USE_ODBC - * - * - * - * - * SQL_CUR_USE_DRIVER - * - * - * - * @return resource Returns an ODBC connection. + * @param string $dsn + * @param string $user + * @param string $password + * @param int $cursor_option + * @return resource * @throws UodbcException * */ @@ -330,10 +126,8 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o /** - * Gets the cursorname for the given result_id. - * - * @param resource $statement The result identifier. - * @return string Returns the cursor name, as a string. + * @param resource $statement + * @return string * @throws UodbcException * */ @@ -349,17 +143,9 @@ function odbc_cursor($statement): string /** - * This function will return the list of available DSN (after calling it - * several times). - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $fetch_type The fetch_type can be one of two constant types: - * SQL_FETCH_FIRST, SQL_FETCH_NEXT. - * Use SQL_FETCH_FIRST the first time this function is - * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching - * the last available DSN. + * @param resource $odbc + * @param int $fetch_type + * @return array * @throws UodbcException * */ @@ -375,13 +161,9 @@ function odbc_data_source($odbc, int $fetch_type): array /** - * Sends an SQL statement to the database server. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The SQL statement. - * @return resource Returns an ODBC result identifier if the SQL command was executed - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -397,18 +179,8 @@ function odbc_exec($odbc, string $query) /** - * Executes a statement prepared with odbc_prepare. - * - * @param resource $statement The result id resource, from odbc_prepare. - * @param array $params Parameters in params will be - * substituted for placeholders in the prepared statement in order. - * Elements of this array will be converted to strings by calling this - * function. - * - * Any parameters in params which - * start and end with single quotes will be taken as the name of a - * file to read and send to the database server as the data for the - * appropriate placeholder. + * @param resource $statement + * @param array $params * @throws UodbcException * */ @@ -423,16 +195,10 @@ function odbc_execute($statement, array $params = []): void /** - * Fetch one result row into array. - * - * @param resource $statement The result resource. - * @param array|null $array The result array - * that can be of any type since it will be converted to type - * array. The array will contain the column values starting at array - * index 0. - * @param int $row The row number. - * @return int Returns the number of columns in the result; - * FALSE on error. + * @param resource $statement + * @param array|null $array + * @param int $row + * @return int * @throws UodbcException * */ @@ -448,12 +214,9 @@ function odbc_fetch_into($statement, ?array &$array, int $row = 0): int /** - * Gets the length of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field length. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -469,12 +232,9 @@ function odbc_field_len($statement, int $field): int /** - * Gets the name of the field occupying the given column number in the given - * result identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field name as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -490,13 +250,9 @@ function odbc_field_name($statement, int $field): string /** - * Gets the number of the column slot that corresponds to the named field in - * the given result identifier. - * - * @param resource $statement The result identifier. - * @param string $field The field name. - * @return int Returns the field number as a integer. - * Field numbering starts at 1. + * @param resource $statement + * @param string $field + * @return int * @throws UodbcException * */ @@ -512,12 +268,9 @@ function odbc_field_num($statement, string $field): int /** - * Gets the scale of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field scale as a integer. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -533,12 +286,9 @@ function odbc_field_scale($statement, int $field): int /** - * Gets the SQL type of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field type as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -554,38 +304,14 @@ function odbc_field_type($statement, int $field): string /** - * Retrieves a list of foreign keys in the specified table or a list of - * foreign keys in other tables that refer to the primary key in the - * specified table - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. - * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. - * @param string $pk_table The primary key table. - * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_table The foreign key table. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PKTABLE_CAT - * PKTABLE_SCHEM - * PKTABLE_NAME - * PKCOLUMN_NAME - * FKTABLE_CAT - * FKTABLE_SCHEM - * FKTABLE_NAME - * FKCOLUMN_NAME - * KEY_SEQ - * UPDATE_RULE - * DELETE_RULE - * FK_NAME - * PK_NAME - * DEFERRABILITY - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $pk_catalog + * @param string $pk_schema + * @param string $pk_table + * @param string $fk_catalog + * @param string $fk_schema + * @param string $fk_table + * @return resource * @throws UodbcException * */ @@ -601,34 +327,9 @@ function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $ /** - * Retrieves information about data types supported by the data source. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $data_type The data type, which can be used to restrict the information to a - * single data type. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TYPE_NAME - * DATA_TYPE - * PRECISION - * LITERAL_PREFIX - * LITERAL_SUFFIX - * CREATE_PARAMS - * NULLABLE - * CASE_SENSITIVE - * SEARCHABLE - * UNSIGNED_ATTRIBUTE - * MONEY - * AUTO_INCREMENT - * LOCAL_TYPE_NAME - * MINIMUM_SCALE - * MAXIMUM_SCALE - * - * - * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @param resource $odbc + * @param int $data_type + * @return resource * @throws UodbcException * */ @@ -644,14 +345,8 @@ function odbc_gettypeinfo($odbc, int $data_type = 0) /** - * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. - * The default length can be set using the - * uodbc.defaultlrl php.ini directive. - * - * @param resource $statement The result identifier. - * @param int $length The number of bytes returned to PHP is controlled by the parameter - * length. If it is set to 0, long column data is passed through to the - * client (i.e. printed) when retrieved with odbc_result. + * @param resource $statement + * @param int $length * @throws UodbcException * */ @@ -666,10 +361,8 @@ function odbc_longreadlen($statement, int $length): void /** - * Gets the number of fields (columns) in an ODBC result. - * - * @param resource $statement The result identifier returned by odbc_exec. - * @return int Returns the number of fields. + * @param resource $statement + * @return int * @throws UodbcException * */ @@ -685,23 +378,11 @@ function odbc_num_fields($statement): int /** - * Opens a persistent database connection. - * - * This function is much like - * odbc_connect, except that the connection is - * not really closed when the script has finished. Future requests - * for a connection with the same dsn, - * user, password - * combination (via odbc_connect and - * odbc_pconnect) can reuse the persistent - * connection. - * * @param string $dsn * @param string $user * @param string $password * @param int $cursor_option - * @return resource Returns an ODBC connection. - * error. + * @return resource * @throws UodbcException * */ @@ -717,19 +398,9 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ /** - * Prepares a statement for execution. The result identifier can be used - * later to execute the statement with odbc_execute. - * - * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support - * stored procedures that accept parameters of type IN, INOUT, and OUT as - * defined by the ODBC specification. However, the Unified ODBC driver - * currently only supports parameters of type IN to stored procedures. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The query string statement being prepared. - * @return resource Returns an ODBC result identifier if the SQL command was prepared - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -745,26 +416,11 @@ function odbc_prepare($odbc, string $query) /** - * Returns a result identifier that can be used to fetch the column names - * that comprise the primary key for a table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param resource $odbc + * @param string $catalog + * @param string $schema * @param string $table - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * KEY_SEQ - * PK_NAME - * - * Drivers can report additional columns. + * @return resource * @throws UodbcException * */ @@ -780,50 +436,12 @@ function odbc_primarykeys($odbc, string $catalog, string $schema, string $table) /** - * Retrieve information about parameters to procedures. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The proc. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns the list of input and output parameters, as well as the - * columns that make up the result set for the specified procedures. - * Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * COLUMN_NAME - * COLUMN_TYPE - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -849,34 +467,11 @@ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = /** - * Lists all procedures in the requested range. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC - * result identifier containing the information. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * NUM_INPUT_PARAMS - * NUM_OUTPUT_PARAMS - * NUM_RESULT_SETS - * REMARKS - * PROCEDURE_TYPE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @return resource * @throws UodbcException * */ @@ -900,16 +495,9 @@ function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, /** - * Prints all rows from a result identifier produced by - * odbc_exec. The result is printed in HTML table format. - * The data is not escaped. - * - * This function is not supposed to be used in production environments; it is - * merely meant for development purposes, to get a result set quickly rendered. - * - * @param resource $statement The result identifier. - * @param string $format Additional overall table formatting. - * @return int Returns the number of rows in the result. + * @param resource $statement + * @param string $format + * @return int * @throws UodbcException * */ @@ -925,14 +513,9 @@ function odbc_result_all($statement, string $format = ""): int /** - * Get result data - * - * @param resource $statement The ODBC resource. - * @param mixed $field The field name being retrieved. It can either be an integer containing - * the column number of the field you want; or it can be a string - * containing the name of the field. - * @return mixed Returns the string contents of the field, FALSE on error, NULL for - * NULL data, or TRUE for binary data. + * @param resource $statement + * @param mixed $field + * @return mixed * @throws UodbcException * */ @@ -948,10 +531,7 @@ function odbc_result($statement, $field) /** - * Rolls back all pending statements on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -966,32 +546,10 @@ function odbc_rollback($odbc): void /** - * This function allows fiddling with the ODBC options for a - * particular connection or query result. It was written to help - * find work around to problems in quirky ODBC drivers. You should - * probably only use this function if you are an ODBC programmer and - * understand the effects the various options will have. You will - * certainly need a good ODBC reference to explain all the different - * options and values that can be used. Different driver versions - * support different options. - * - * Because the effects may vary depending on the ODBC driver, use of - * this function in scripts to be made publicly available is - * strongly discouraged. Also, some ODBC options are not available - * to this function because they must be set before the connection - * is established or the query is prepared. However, if on a - * particular job it can make PHP work so your boss doesn't tell you - * to use a commercial product, that's all that really - * matters. - * - * @param resource $odbc Is a connection id or result id on which to change the settings. - * For SQLSetConnectOption(), this is a connection id. - * For SQLSetStmtOption(), this is a result id. - * @param int $which Is the ODBC function to use. The value should be - * 1 for SQLSetConnectOption() and - * 2 for SQLSetStmtOption(). - * @param int $option The option to set. - * @param int $value The value for the given option. + * @param resource $odbc + * @param int $which + * @param int $option + * @param int $value * @throws UodbcException * */ @@ -1006,42 +564,14 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void /** - * Retrieves either the optimal set of columns that uniquely identifies a - * row in the table, or columns that are automatically updated when any - * value in the row is updated by a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $type When the type argument is SQL_BEST_ROWID, - * odbc_specialcolumns returns the - * column or columns that uniquely identify each row in the table. - * - * When the type argument is SQL_ROWVER, - * odbc_specialcolumns returns the column or columns in the - * specified table, if any, that are automatically updated by the data source - * when any value in the row is updated by any transaction. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table. - * @param int $scope The scope, which orders the result set. - * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION - * or SQL_SCOPE_SESSION. - * @param int $nullable Determines whether to return special columns that can have a NULL value. - * One of SQL_NO_NULLS or SQL_NULLABLE . - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * SCOPE - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * PSEUDO_COLUMN - * - * Drivers can report additional columns. + * @param resource $odbc + * @param int $type + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $scope + * @param int $nullable + * @return resource * @throws UodbcException * */ @@ -1057,37 +587,13 @@ function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, /** - * Get statistics about a table and its indexes. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table name. - * @param int $unique The type of the index. - * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. - * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. - * The latter requests that the driver retrieve the CARDINALITY and - * PAGES only if they are readily available from the server. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * NON_UNIQUE - * INDEX_QUALIFIER - * INDEX_NAME - * TYPE - * ORDINAL_POSITION - * COLUMN_NAME - * ASC_OR_DESC - * CARDINALITY - * PAGES - * FILTER_CONDITION - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $unique + * @param int $accuracy + * @return resource * @throws UodbcException * */ @@ -1103,33 +609,11 @@ function odbc_statistics($odbc, string $catalog, string $schema, string $table, /** - * Lists tables in the requested range and the privileges associated - * with each table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource An ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @return resource * @throws UodbcException * */ @@ -1145,75 +629,12 @@ function odbc_tableprivileges($odbc, string $catalog, string $schema, string $ta /** - * Lists all tables in the requested range. - * - * To support enumeration of qualifiers, owners, and table types, - * the following special semantics for the - * catalog, schema, - * table, and - * table_type are available: - * - * - * - * If catalog is a single percent - * character (%) and schema and - * table are empty strings, then the result - * set contains a list of valid qualifiers for the data - * source. (All columns except the TABLE_QUALIFIER column contain - * NULLs.) - * - * - * - * - * If schema is a single percent character - * (%) and catalog and - * table are empty strings, then the result - * set contains a list of valid owners for the data source. (All - * columns except the TABLE_OWNER column contain - * NULLs.) - * - * - * - * - * If table_type is a single percent - * character (%) and catalog, - * schema and table - * are empty strings, then the result set contains a list of - * valid table types for the data source. (All columns except the - * TABLE_TYPE column contain NULLs.) - * - * - * - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $types If table_type is not an empty string, it - * must contain a list of comma-separated values for the types of - * interest; each value may be enclosed in single quotes (') or - * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the - * data source does not support a specified table type, - * odbc_tables does not return any results for - * that type. - * @return resource Returns an ODBC result identifier containing the information. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * TABLE_TYPE - * REMARKS - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $types + * @return resource * @throws UodbcException * */ diff --git a/generated/8.2/uopz.php b/generated/8.2/uopz.php index 17d2e760..de1a0dc9 100644 --- a/generated/8.2/uopz.php +++ b/generated/8.2/uopz.php @@ -5,10 +5,8 @@ use Safe\Exceptions\UopzException; /** - * Makes class extend parent - * - * @param string $class The name of the class to extend - * @param string $parent The name of the class to inherit + * @param string $class + * @param string $parent * @throws UopzException * */ @@ -23,8 +21,6 @@ function uopz_extend(string $class, string $parent): void /** - * Makes class implement interface - * * @param string $class * @param string $interface * @throws UopzException diff --git a/generated/8.2/url.php b/generated/8.2/url.php index a6d06093..f65c527b 100644 --- a/generated/8.2/url.php +++ b/generated/8.2/url.php @@ -5,15 +5,9 @@ use Safe\Exceptions\UrlException; /** - * Decodes a base64 encoded string. - * - * @param string $string The encoded data. - * @param bool $strict If the strict parameter is set to TRUE - * then the base64_decode function will return - * FALSE if the input contains character from outside the base64 - * alphabet. Otherwise invalid characters will be silently discarded. - * @return string Returns the decoded data. The returned data may be - * binary. + * @param string $string + * @param bool $strict + * @return string * @throws UrlException * */ @@ -29,17 +23,10 @@ function base64_decode(string $string, bool $strict = false): string /** - * get_headers returns an array with the headers sent - * by the server in response to a HTTP request. - * - * @param string $url The target URL. - * @param bool $associative If the optional associative parameter is set to true, - * get_headers parses the response and sets the - * array's keys. - * @param null|resource $context A valid context resource created with - * stream_context_create, or NULL to use the - * default context. - * @return array Returns an indexed or associative array with the headers. + * @param string $url + * @param bool $associative + * @param null|resource $context + * @return array * @throws UrlException * */ @@ -59,38 +46,9 @@ function get_headers(string $url, bool $associative = false, $context = null): a /** - * Opens filename and parses it line by line for - * <meta> tags in the file. The parsing stops at - * </head>. - * - * @param string $filename The path to the HTML file, as a string. This can be a local file or an - * URL. - * - * - * What get_meta_tags parses - * - * - * - * - * - * - * ]]> - * - * - * @param bool $use_include_path Setting use_include_path to TRUE will result - * in PHP trying to open the file along the standard include path as per - * the include_path directive. - * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. - * - * The value of the name property becomes the key, the value of the content - * property becomes the value of the returned array, so you can easily use - * standard array functions to traverse it or access single values. - * Special characters in the value of the name property are substituted with - * '_', the rest is converted to lower case. If two meta tags have the same - * name, only the last one is returned. - * - * Returns FALSE on failure. + * @param string $filename + * @param bool $use_include_path + * @return array * @throws UrlException * */ @@ -106,90 +64,9 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array /** - * This function parses a URL and returns an associative array containing any - * of the various components of the URL that are present. - * The values of the array elements are not URL decoded. - * - * This function is not meant to validate - * the given URL, it only breaks it up into the parts listed below. Partial and invalid - * URLs are also accepted, parse_url tries its best to - * parse them correctly. - * - * @param string $url The URL to parse. - * @param int $component Specify one of PHP_URL_SCHEME, - * PHP_URL_HOST, PHP_URL_PORT, - * PHP_URL_USER, PHP_URL_PASS, - * PHP_URL_PATH, PHP_URL_QUERY - * or PHP_URL_FRAGMENT to retrieve just a specific - * URL component as a string (except when - * PHP_URL_PORT is given, in which case the return - * value will be an int). - * @return array|int|null|string On seriously malformed URLs, parse_url. - * - * If the component parameter is omitted, an - * associative array is returned. At least one element will be - * present within the array. Potential keys within this array are: - * - * - * - * scheme - e.g. http - * - * - * - * - * host - * - * - * - * - * port - * - * - * - * - * user - * - * - * - * - * pass - * - * - * - * - * path - * - * - * - * - * query - after the question mark ? - * - * - * - * - * fragment - after the hashmark # - * - * - * - * - * If the component parameter is specified, - * parse_url returns a string (or an - * int, in the case of PHP_URL_PORT) - * instead of an array. If the requested component doesn't exist - * within the given URL, NULL will be returned. - * As of PHP 8.0.0, parse_url distinguishes absent and empty - * queries and fragments: - * - * - * - * - * - * - * - * Previously all cases resulted in query and fragment being NULL. - * - * Note that control characters (cf. ctype_cntrl) in the - * components are replaced with underscores (_). + * @param string $url + * @param int $component + * @return array|int|null|string * @throws UrlException * */ diff --git a/generated/8.2/var.php b/generated/8.2/var.php index 70f048df..48e3f889 100644 --- a/generated/8.2/var.php +++ b/generated/8.2/var.php @@ -5,48 +5,8 @@ use Safe\Exceptions\VarException; /** - * Set the type of variable var to - * type. - * - * @param mixed $var The variable being converted. - * @param string $type Possibles values of type are: - * - * - * - * "boolean" or "bool" - * - * - * - * - * "integer" or "int" - * - * - * - * - * "float" or "double" - * - * - * - * - * "string" - * - * - * - * - * "array" - * - * - * - * - * "object" - * - * - * - * - * "null" - * - * - * + * @param mixed $var + * @param string $type * @throws VarException * */ diff --git a/generated/8.2/xdiff.php b/generated/8.2/xdiff.php index dab92fce..4ed412cd 100644 --- a/generated/8.2/xdiff.php +++ b/generated/8.2/xdiff.php @@ -5,14 +5,9 @@ use Safe\Exceptions\XdiffException; /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -27,14 +22,9 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * and xdiff_file_rabdiff functions or their string counterparts. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -49,16 +39,9 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -73,20 +56,11 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest /** - * Makes an unified diff containing differences between old_file and - * new_file and stores it in dest file. The - * resulting file is human-readable. An optional context parameter - * specifies how many lines of context should be added around each change. - * Setting minimal parameter to true will result in outputting the shortest - * patch file possible (can take a long time). - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. - * @param int $context Indicates how many lines of context you want to include in diff - * result. - * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result - * (can take a long time). + * @param string $old_file + * @param string $new_file + * @param string $dest + * @param int $context + * @param bool $minimal * @throws XdiffException * */ @@ -101,16 +75,9 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * or xdiff_file_rabdiff functions or their string counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -125,19 +92,9 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi /** - * Makes a binary diff of two files and stores the result in a patch file. - * The difference between this function and xdiff_file_bdiff is different - * algorithm used which should result in faster execution and smaller diff produced. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff - * website. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -152,13 +109,9 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -174,15 +127,9 @@ function xdiff_string_bpatch(string $str, string $patch): string /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -198,24 +145,11 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. - * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if - * it is provided. - * - * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, - * xdiff_file_diff functions or compatible tools. - * @param int $flags flags can be either - * XDIFF_PATCH_NORMAL (default mode, normal patch) - * or XDIFF_PATCH_REVERSE (reversed patch). - * - * Starting from version 1.5.0, you can also use binary OR to enable - * XDIFF_PATCH_IGNORESPACE flag. - * @param null|string $error If provided then rejected parts are stored inside this variable. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @param int $flags + * @param null|string $error + * @return string * @throws XdiffException * */ diff --git a/generated/8.2/xml.php b/generated/8.2/xml.php index 8b53cf72..72f86934 100644 --- a/generated/8.2/xml.php +++ b/generated/8.2/xml.php @@ -5,9 +5,7 @@ use Safe\Exceptions\XmlException; /** - * Frees the given XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to free. + * @param \XMLParser $parser * @throws XmlException * */ @@ -22,48 +20,8 @@ function xml_parser_free(\XMLParser $parser): void /** - * Sets the character data handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up character data handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * data - * - * - * The second parameter, data, contains - * the character data as a string. - * - * - * - * - * - * Character data handler is called for every piece of a text in the XML - * document. It can be called multiple times inside each fragment (e.g. - * for non-ASCII strings). - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -78,50 +36,8 @@ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): /** - * Sets the default handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up default handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * - * data - * - * - * - * The second parameter, data, contains - * the character data.This may be the XML declaration, - * document type declaration, entities or other data for which - * no other handler exists. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -136,63 +52,9 @@ function xml_set_default_handler(\XMLParser $parser, callable $handler): void /** - * Sets the element handler functions for the XML parser. - * start_handler and - * end_handler are strings containing - * the names of functions that must exist when xml_parse - * is called for parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up start and end element handler functions. - * @param callable $start_handler The function named by start_handler - * must accept three parameters: - * - * start_element_handler - * XMLParserparser - * stringname - * arrayattribs - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * name - * - * - * The second parameter, name, contains the name - * of the element for which this handler is called.If case-folding is in effect for this - * parser, the element name will be in uppercase letters. - * - * - * - * - * attribs - * - * - * The third parameter, attribs, contains an - * associative array with the element's attributes (if any).The keys - * of this array are the attribute names, the values are the attribute - * values.Attribute names are case-folded on the same criteria as - * element names.Attribute values are not - * case-folded. - * - * - * The original order of the attributes can be retrieved by walking - * through attribs the normal way, using - * each.The first key in the array was the first - * attribute, and so on. - * - * - * - * - * @param callable $end_handler The first parameter, parser, is a - * reference to the XML parser calling the handler. + * @param \XMLParser $parser + * @param callable $start_handler + * @param callable $end_handler * @throws XmlException * */ @@ -207,49 +69,8 @@ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, ca /** - * Set a handler to be called when leaving the scope of a namespace - * declaration. This will be called, for each namespace declaration, after - * the handler for the end tag of the element in which the namespace was - * declared. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -264,84 +85,8 @@ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handle /** - * Sets the external entity reference handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up external entity reference handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters, and should return an integer value.If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringopen_entity_names - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * open_entity_names - * - * - * The second parameter, open_entity_names, is a - * space-separated list of the names of the entities that are open for - * the parse of this entity (including the name of the referenced - * entity). - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (system_id) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * The fourth parameter, system_id, is the - * system identifier as specified in the entity declaration. - * - * - * - * - * public_id - * - * - * The fifth parameter, public_id, is the - * public identifier as specified in the entity declaration, or - * an empty string if none was specified; the whitespace in the - * public identifier will have been normalized as required by - * the XML spec. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -356,89 +101,8 @@ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handl /** - * Sets the notation declaration handler function for the XML parser - * parser. - * - * A notation declaration is part of the document's DTD and has the - * following format: - * - * name - * { systemId | publicId?> - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param \XMLParser $parser A reference to the XML parser to set up notation declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters: - * - * handler - * XMLParserparser - * stringnotation_name - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * Currently this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -453,13 +117,8 @@ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): v /** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param \XMLParser $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. + * @param \XMLParser $parser + * @param object $object * @throws XmlException * */ @@ -474,66 +133,8 @@ function xml_set_object(\XMLParser $parser, object $object): void /** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * <?target - * data?> - * - * - * You can put PHP code into such a tag, but be aware of one limitation: in - * an XML PI, the PI end tag (?>) can not be quoted, - * so this character sequence should not appear in the PHP code you embed - * with PIs in XML documents.If it does, the rest of the PHP code, as well - * as the "real" PI end tag, will be treated as character data. - * - * @param \XMLParser $parser A reference to the XML parser to set up processing instruction (PI) handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters: - * - * handler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * target - * - * - * The second parameter, target, contains the PI - * target. - * - * - * - * - * data - * - * - * The third parameter, data, contains the PI - * data. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -548,58 +149,8 @@ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $ha /** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * stringuri - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -614,96 +165,8 @@ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $hand /** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param \XMLParser $parser A reference to the XML parser to set up unparsed entity declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept six - * parameters: - * - * handler - * XMLParserparser - * stringentity_name - * stringbase - * stringsystem_id - * stringpublic_id - * stringnotation_name - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the - * handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * - * - * - * notation_name - * - * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ diff --git a/generated/8.2/xmlrpc.php b/generated/8.2/xmlrpc.php index 3007ab7d..38243a14 100644 --- a/generated/8.2/xmlrpc.php +++ b/generated/8.2/xmlrpc.php @@ -5,10 +5,8 @@ use Safe\Exceptions\XmlrpcException; /** - * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * - * @param \DateTime|string $value Value to set the type - * @param string $type 'base64' or 'datetime' + * @param \DateTime|string $value + * @param string $type * @throws XmlrpcException * */ diff --git a/generated/8.2/yaml.php b/generated/8.2/yaml.php index 0b549947..8e6b196f 100644 --- a/generated/8.2/yaml.php +++ b/generated/8.2/yaml.php @@ -5,21 +5,11 @@ use Safe\Exceptions\YamlException; /** - * Convert all or part of a YAML document stream read from a file to a PHP variable. - * - * @param string $filename Path to the file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $filename + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -39,24 +29,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?a /** - * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * - * @param string $url url should be of the form "scheme://...". PHP - * will search for a protocol handler (also known as a wrapper) for that - * scheme. If no wrappers for that protocol are registered, PHP will emit - * a notice to help you track potential problems in your script and then - * continue as though filename specifies a regular file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is - * -1 an array will be returned with one entry - * for each document found in the stream. + * @param string $url + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -76,21 +53,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $ /** - * Convert all or part of a YAML document stream to a PHP variable. - * - * @param string $input The string to parse as a YAML document stream. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $input + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ diff --git a/generated/8.2/yaz.php b/generated/8.2/yaz.php index ce5dd4d0..1832141f 100644 --- a/generated/8.2/yaz.php +++ b/generated/8.2/yaz.php @@ -5,45 +5,9 @@ use Safe\Exceptions\YazException; /** - * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search - * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf - * prior to this function. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array - * containing the valid RPN query under the key rpn. - * - * Upon failure, three indexes are set in this array to indicate the cause - * of failure: - * - * - * - * errorcode - the CCL error code (integer) - * - * - * - * - * errorstring - the CCL error string - * - * - * - * - * errorpos - approximate position in query of failure - * (integer is character position) - * - * - * - * - * errorcode - the CCL error code (integer) - * - * errorstring - the CCL error string - * - * errorpos - approximate position in query of failure - * (integer is character position) + * @param resource $id + * @param string $query + * @param array|null $result * @throws YazException * */ @@ -58,9 +22,7 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void /** - * Closes the connection given by parameter id. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -75,193 +37,9 @@ function yaz_close($id): void /** - * This function returns a connection resource on success, zero on - * failure. - * - * yaz_connect prepares for a connection to a - * Z39.50 server. - * This function is non-blocking and does not attempt to establish - * a connection - it merely prepares a connect to be performed later when - * yaz_wait is called. - * - * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted - * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication - * string (OpenAuth). - * - * If given as an array, the contents of the array serves as options. - * - * - * user - * - * - * Username for authentication. - * - * - * - * - * group - * - * - * Group for authentication. - * - * - * - * - * password - * - * - * Password for authentication. - * - * - * - * - * cookie - * - * - * Cookie for session (YAZ proxy). - * - * - * - * - * proxy - * - * - * Proxy for connection (YAZ proxy). - * - * - * - * - * persistent - * - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * - * - * - * - * piggyback - * - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * - * - * - * charset - * - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * - * preferredMessageSize - * - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * maximumRecordSize - * - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * - * Username for authentication. - * - * Group for authentication. - * - * Password for authentication. - * - * Cookie for session (YAZ proxy). - * - * Proxy for connection (YAZ proxy). - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * @return mixed A connection resource on success, FALSE on error. + * @param string $zurl + * @param mixed $options + * @return mixed * @throws YazException * */ @@ -281,14 +59,8 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by - * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to - * yaz_connect. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are - * separated by a plus sign +. + * @param resource $id + * @param string $databases * @throws YazException * */ @@ -303,15 +75,8 @@ function yaz_database($id, string $databases): void /** - * This function sets the element set name for retrieval. - * - * Call this function before yaz_search or - * yaz_present to specify the element set name for - * records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $elementset Most servers support F (for full records) and - * B (for brief records). + * @param resource $id + * @param string $elementset * @throws YazException * */ @@ -326,12 +91,7 @@ function yaz_element($id, string $elementset): void /** - * This function prepares for retrieval of records after a successful search. - * - * The yaz_range function should be called prior to this - * function to specify the range of records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -346,32 +106,9 @@ function yaz_present($id): void /** - * yaz_search prepares for a search on the given - * connection. - * - * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when - * yaz_wait is called. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 - * query in prefix query notation. - * @param string $query The RPN query is a textual representation of the Type-1 query as - * defined by the Z39.50 standard. However, in the text representation - * as used by YAZ a prefix notation is used, that is the operator - * precedes the operands. The query string is a sequence of tokens where - * white space is ignored unless surrounded by double quotes. Tokens beginning - * with an at-character (@) are considered operators, - * otherwise they are treated as search terms. - * - * You can find information about attributes at the - * Z39.50 Maintenance Agency - * site. - * - * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and - * yaz_ccl_parse. + * @param resource $id + * @param string $type + * @param string $query * @throws YazException * */ @@ -386,44 +123,8 @@ function yaz_search($id, string $type, string $query): void /** - * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and - * yaz_itemorder. - * - * yaz_wait returns when all servers have either - * completed all requests or aborted (in case of errors). - * - * @param array $options An associative array of options: - * - * - * timeout - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * - * - * - * event - * - * - * A boolean. - * - * - * - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * A boolean. - * @return mixed Returns TRUE on success. - * In event mode, returns resource. + * @param array $options + * @return mixed * @throws YazException * */ diff --git a/generated/8.2/zip.php b/generated/8.2/zip.php index d1a628eb..7cbf1cce 100644 --- a/generated/8.2/zip.php +++ b/generated/8.2/zip.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ZipException; /** - * Closes the specified directory entry. - * - * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @param resource $zip_entry * @throws ZipException * */ @@ -22,10 +20,8 @@ function zip_entry_close($zip_entry): void /** - * Returns the compressed size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The compressed size. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -41,11 +37,8 @@ function zip_entry_compressedsize($zip_entry): int /** - * Returns the compression method of the directory entry specified - * by zip_entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The compression method. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -61,10 +54,8 @@ function zip_entry_compressionmethod($zip_entry): string /** - * Returns the actual size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The size of the directory entry. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -80,10 +71,8 @@ function zip_entry_filesize($zip_entry): int /** - * Returns the name of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The name of the directory entry. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -99,16 +88,9 @@ function zip_entry_name($zip_entry): string /** - * Opens a directory entry in a zip file for reading. - * - * @param resource $zip_dp A valid resource handle returned by zip_open. - * @param resource $zip_entry A directory entry returned by zip_read. - * @param string $mode Any of the modes specified in the documentation of - * fopen. - * - * Currently, mode is ignored and is always - * "rb". This is due to the fact that zip support - * in PHP is read only access. + * @param resource $zip_dp + * @param resource $zip_entry + * @param string $mode * @throws ZipException * */ @@ -123,13 +105,9 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void /** - * Reads from an open directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $len The number of bytes to return. - * - * This should be the uncompressed length you wish to read. - * @return string Returns the data read, empty string on end of a file. + * @param resource $zip_entry + * @param int $len + * @return string * @throws ZipException * */ diff --git a/generated/8.2/zlib.php b/generated/8.2/zlib.php index ea3510e0..38e4f681 100644 --- a/generated/8.2/zlib.php +++ b/generated/8.2/zlib.php @@ -5,20 +5,10 @@ use Safe\Exceptions\ZlibException; /** - * Incrementally deflates data in the specified context. - * - * @param \DeflateContext $context A context created with deflate_init. - * @param string $data A chunk of data to compress. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of compressed data. + * @param \DeflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -34,92 +24,9 @@ function deflate_add(\DeflateContext $context, string $data, int $flush_mode = Z /** - * Initializes an incremental deflate context using the specified - * encoding. - * - * Note that the window option here only sets the window size - * of the algorithm, differently from the zlib filters where the same parameter - * also sets the encoding to use; the encoding must be set with the - * encoding parameter. - * - * Limitation: there is currently no way to set the header information on a GZIP - * compressed stream, which are set as follows: GZIP signature - * (\x1f\x8B); compression method (\x08 - * == DEFLATE); 6 zero bytes; the operating system set to the current system - * (\x00 = Windows, \x03 = Unix, etc.) - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \DeflateContext Returns a deflate context resource (zlib.deflate) on - * success. + * @param int $encoding + * @param array $options + * @return \DeflateContext * @throws ZlibException * */ @@ -135,10 +42,7 @@ function deflate_init(int $encoding, array $options = []): \DeflateContext /** - * Closes the given gz-file pointer. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -153,20 +57,10 @@ function gzclose($stream): void /** - * This function compresses the given string using the ZLIB - * data format. - * - * For details on the ZLIB compression algorithm see the document - * "ZLIB Compressed Data Format - * Specification version 3.3" (RFC 1950). - * - * @param string $data The data to compress. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. - * - * If -1 is used, the default compression of the zlib library is used which is 6. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The compressed string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -182,12 +76,9 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** - * This function returns a decoded version of the input - * data. - * - * @param string $data The data to decode, encoded by gzencode. - * @param int $max_length The maximum length of data to decode. - * @return string The decoded string, or. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -203,19 +94,10 @@ function gzdecode(string $data, int $max_length = 0): string /** - * This function compresses the given string using the DEFLATE - * data format. - * - * For details on the DEFLATE compression algorithm see the document - * "DEFLATE Compressed Data Format - * Specification version 1.3" (RFC 1951). - * - * @param string $data The data to deflate. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The deflated string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -231,25 +113,10 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ /** - * This function returns a compressed version of the input - * data compatible with the output of the - * gzip program. - * - * For more information on the GZIP file format, see the document: - * GZIP file format specification - * version 4.3 (RFC 1952). - * - * @param string $data The data to encode. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default) - * or FORCE_DEFLATE. - * - * FORCE_DEFLATE generates - * RFC 1950 compliant output, consisting of a zlib header, the deflated - * data, and an Adler checksum. - * @return string The encoded string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -265,13 +132,9 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G /** - * This function is identical to readgzfile, except that - * it returns the file in an array. - * - * @param string $filename The file name. - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return list An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @param string $filename + * @param int $use_include_path + * @return list * @throws ZlibException * */ @@ -287,14 +150,9 @@ function gzfile(string $filename, int $use_include_path = 0): array /** - * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a - * newline, or on EOF (whichever comes first). - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int|null $length The length of data to get. - * @return string The uncompressed string. + * @param resource $stream + * @param int|null $length + * @return string * @throws ZlibException * */ @@ -314,15 +172,9 @@ function gzgets($stream, ?int $length = null): string /** - * This function inflates a deflated string. - * - * @param string $data The data compressed by gzdeflate. - * @param int $max_length The maximum length of decoded data. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or, unless max_length is 0, more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -338,28 +190,10 @@ function gzinflate(string $data, int $max_length = 0): string /** - * Opens a gzip (.gz) file for reading or writing. - * - * gzopen can be used to read a file which is - * not in gzip format; in this case gzread will - * directly read from the file without decompression. - * - * @param string $filename The file name. - * @param string $mode As in fopen (rb or - * wb) but can also include a compression level - * (wb9) or a strategy: f for - * filtered data as in wb6f, h for - * Huffman only compression as in wb1h. - * (See the description of deflateInit2 - * in zlib.h for - * more information about the strategy parameter.) - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return resource Returns a file pointer to the file opened, after that, everything you read - * from this file descriptor will be transparently decompressed and what you - * write gets compressed. - * - * If the open fails, the function returns FALSE. + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return resource * @throws ZlibException * */ @@ -375,13 +209,8 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) /** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The number of uncompressed characters read from gz - * and passed through to the input. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -397,15 +226,9 @@ function gzpassthru($stream): int /** - * gzread reads up to length bytes - * from the given gz-file pointer. Reading stops when - * length (uncompressed) bytes have been read - * or EOF is reached, whichever comes first. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int $length The number of bytes to read. - * @return string The data that have been read. + * @param resource $stream + * @param int $length + * @return string * @throws ZlibException * */ @@ -421,11 +244,7 @@ function gzread($stream, int $length): string /** - * Sets the file position indicator of the given gz-file pointer to the - * beginning of the file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -440,12 +259,8 @@ function gzrewind($stream): void /** - * Gets the position of the given file pointer; i.e., its offset into the - * uncompressed file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The position of the file pointer or FALSE if an error occurs. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -461,15 +276,9 @@ function gztell($stream): int /** - * This function uncompress a compressed string. - * - * @param string $data The data compressed by gzcompress. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -485,18 +294,10 @@ function gzuncompress(string $data, int $max_length = 0): string /** - * gzwrite writes the contents of - * data to the given gz-file. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param string $data The string to write. - * @param int|null $length The number of uncompressed bytes to write. If supplied, writing will - * stop after length (uncompressed) bytes have been - * written or the end of data is reached, - * whichever comes first. - * @return int Returns the number of (uncompressed) bytes written to the given gz-file - * stream. + * @param resource $stream + * @param string $data + * @param int|null $length + * @return int * @throws ZlibException * */ @@ -516,10 +317,8 @@ function gzwrite($stream, string $data, ?int $length = null): int /** - * - * * @param \InflateContext $context - * @return int Returns number of bytes read so far. + * @return int * @throws ZlibException * */ @@ -535,10 +334,8 @@ function inflate_get_read_len(\InflateContext $context): int /** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * * @param \InflateContext $context - * @return int Returns decompression status. + * @return int * @throws ZlibException * */ @@ -554,23 +351,10 @@ function inflate_get_status(\InflateContext $context): int /** - * Incrementally inflates encoded data in the specified context. - * - * Limitation: header information from GZIP compressed data are not made - * available. - * - * @param \InflateContext $context A context created with inflate_init. - * @param string $data A chunk of compressed data. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of uncompressed data. + * @param \InflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -586,73 +370,9 @@ function inflate_add(\InflateContext $context, string $data, int $flush_mode = Z /** - * Initialize an incremental inflate context with the specified - * encoding. - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \InflateContext Returns an inflate context resource (zlib.inflate) on - * success. + * @param int $encoding + * @param array $options + * @return \InflateContext * @throws ZlibException * */ @@ -668,17 +388,9 @@ function inflate_init(int $encoding, array $options = []): \InflateContext /** - * Reads a file, decompresses it and writes it to standard output. - * - * readgzfile can be used to read a file which is not in - * gzip format; in this case readgzfile will directly - * read from the file without decompression. - * - * @param string $filename The file name. This file will be opened from the filesystem and its - * contents written to standard output. - * @param $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return 0|positive-int Returns the number of (uncompressed) bytes read from the file on success + * @param string $filename + * @param $use_include_path + * @return 0|positive-int * @throws ZlibException * */ @@ -694,11 +406,9 @@ function readgzfile(string $filename, $use_include_path = 0): int /** - * Uncompress any raw/gzip/zlib encoded data. - * * @param string $data * @param int $max_length - * @return string Returns the uncompressed data. + * @return string * @throws ZlibException * */ diff --git a/generated/8.3/apache.php b/generated/8.3/apache.php index e6fd372c..8f72116c 100644 --- a/generated/8.3/apache.php +++ b/generated/8.3/apache.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ApacheException; /** - * Fetch the Apache version. - * - * @return string Returns the Apache version on success. + * @return string * @throws ApacheException * */ @@ -23,12 +21,9 @@ function apache_get_version(): string /** - * Retrieve an Apache environment variable specified by - * variable. - * - * @param string $variable The Apache environment variable - * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. - * @return string The value of the Apache environment variable on success + * @param string $variable + * @param bool $walk_to_top + * @return string * @throws ApacheException * */ @@ -44,39 +39,8 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string /** - * This performs a partial request for a URI. It goes just far - * enough to obtain all the important information about the given - * resource. - * - * @param string $filename The filename (URI) that's being requested. - * @return object An object of related URI information. The properties of - * this object are: - * - * - * status - * the_request - * status_line - * method - * content_type - * handler - * uri - * filename - * path_info - * args - * boundary - * no_cache - * no_local_copy - * allowed - * send_bodyct - * bytes_sent - * byterange - * clength - * unparsed_uri - * mtime - * request_time - * - * - * Returns FALSE on failure. + * @param string $filename + * @return object * @throws ApacheException * */ @@ -92,10 +56,7 @@ function apache_lookup_uri(string $filename): object /** - * Fetches all HTTP request headers from the current request. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -111,10 +72,7 @@ function apache_request_headers(): array /** - * Fetch all HTTP response headers. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array An array of all Apache response headers on success. + * @return array * @throws ApacheException * */ @@ -130,13 +88,9 @@ function apache_response_headers(): array /** - * apache_setenv sets the value of the Apache - * environment variable specified by - * variable. - * - * @param string $variable The environment variable that's being set. - * @param string $value The new variable value. - * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @param string $variable + * @param string $value + * @param bool $walk_to_top * @throws ApacheException * */ @@ -151,13 +105,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals /** - * Fetches all HTTP headers from the current request. - * - * This function is an alias for apache_request_headers. - * Please read the apache_request_headers - * documentation for more information on how this function works. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * @throws ApacheException * */ @@ -173,19 +121,7 @@ function getallheaders(): array /** - * virtual is an Apache-specific function which - * is similar to <!--#include virtual...--> in - * mod_include. - * It performs an Apache sub-request. It is useful for including - * CGI scripts or .shtml files, or anything else that you would - * parse through Apache. Note that for a CGI script, the script - * must generate valid CGI headers. At the minimum that means it - * must generate a Content-Type header. - * - * To run the sub-request, all buffers are terminated and flushed to the - * browser, pending headers are sent too. - * - * @param string $uri The file that the virtual command will be performed on. + * @param string $uri * @throws ApacheException * */ diff --git a/generated/8.3/apcu.php b/generated/8.3/apcu.php index a8ec70b4..f47fec43 100644 --- a/generated/8.3/apcu.php +++ b/generated/8.3/apcu.php @@ -5,12 +5,8 @@ use Safe\Exceptions\ApcuException; /** - * Retrieves cached information and meta-data from APC's data store. - * - * @param bool $limited If limited is TRUE, the - * return value will exclude the individual list of cache entries. This - * is useful when trying to optimize calls for statistics gathering. - * @return array Array of cached data (and meta-data) + * @param bool $limited + * @return array * @throws ApcuException * */ @@ -26,13 +22,9 @@ function apcu_cache_info(bool $limited = false): array /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value - * with the value of the new parameter. - * - * @param string $key The key of the value being updated. - * @param int $old The old value (the value currently stored). - * @param int $new The new value to update to. + * @param string $key + * @param int $old + * @param int $new * @throws ApcuException * */ @@ -47,14 +39,11 @@ function apcu_cas(string $key, int $old, int $new): void /** - * Decreases a stored integer value. - * - * @param string $key The key of the value being decreased. - * @param int $step The step, or value to decrease. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -70,14 +59,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Increases a stored number. - * - * @param string $key The key of the value being increased. - * @param int $step The step, or value to increase. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -93,11 +79,8 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Retrieves APCu Shared Memory Allocation information. - * - * @param bool $limited When set to FALSE (default) apcu_sma_info will - * return a detailed information about each segment. - * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @param bool $limited + * @return array * @throws ApcuException * */ diff --git a/generated/8.3/array.php b/generated/8.3/array.php index 6c8efa95..328768bd 100644 --- a/generated/8.3/array.php +++ b/generated/8.3/array.php @@ -5,14 +5,9 @@ use Safe\Exceptions\ArrayException; /** - * Creates an array by using the values from the - * keys array as keys and the values from the - * values array as the corresponding values. - * - * @param array $keys Array of keys to be used. Illegal values for key will be - * converted to string. - * @param array $values Array of values to be used - * @return array Returns the combined array. + * @param array $keys + * @param array $values + * @return array * */ function array_combine(array $keys, array $values): array @@ -24,21 +19,8 @@ function array_combine(array $keys, array $values): array /** - * array_flip returns an array in flip - * order, i.e. keys from array become values and values - * from array become keys. - * - * Note that the values of array need to be valid - * keys, i.e. they need to be either int or - * string. A warning will be emitted if a value has the wrong - * type, and the key/value pair in question will not be included - * in the result. - * - * If a value has several occurrences, the latest key will be - * used as its value, and all others will be lost. - * - * @param array $array An array of key/value pairs to be flipped. - * @return array Returns the flipped array. + * @param array $array + * @return array * */ function array_flip(array $array): array @@ -50,27 +32,9 @@ function array_flip(array $array): array /** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second array - * are both arrays, array_replace_recursive will replace - * their respective value recursively. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace_recursive(array $array, array ...$replacements): array @@ -86,22 +50,9 @@ function array_replace_recursive(array $array, array ...$replacements): array /** - * array_replace replaces the values of - * array with values having the same keys in each of the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later arrays overwriting the previous values. - * - * array_replace is not recursive : it will replace - * values in the first array by whatever type is in the second array. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace(array $array, array ...$replacements): array @@ -117,24 +68,9 @@ function array_replace(array $array, array ...$replacements): array /** - * Applies the user-defined callback function to each - * element of the array. This function will recurse - * into deeper arrays. - * - * @param array|object $array The input array. - * @param callable $callback Typically, callback takes on two parameters. - * The array parameter's value being the first, and - * the key/index second. - * - * If callback needs to be working with the - * actual values of the array, specify the first parameter of - * callback as a - * reference. Then, - * any changes made to those elements will be made in the - * original array itself. - * @param mixed $arg If the optional arg parameter is supplied, - * it will be passed as the third parameter to the - * callback. + * @param array|object $array + * @param callable $callback + * @param mixed $arg * @throws ArrayException * */ @@ -153,9 +89,7 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void /** - * This function shuffles (randomizes the order of the elements in) an array. - * - * @param array $array The array. + * @param array $array * @throws ArrayException * */ diff --git a/generated/8.3/bzip2.php b/generated/8.3/bzip2.php index 2ac21619..6205be66 100644 --- a/generated/8.3/bzip2.php +++ b/generated/8.3/bzip2.php @@ -5,10 +5,7 @@ use Safe\Exceptions\Bzip2Exception; /** - * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -23,12 +20,7 @@ function bzclose($bz): void /** - * This function is supposed to force a write of all buffered bzip2 data for the file pointer - * bz, - * but is implemented as null function in libbz2, and as such does nothing. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -43,14 +35,9 @@ function bzflush($bz): void /** - * bzopen opens a bzip2 (.bz2) file for reading or - * writing. - * - * @param resource|string $file The name of the file to open, or an existing stream resource. - * @param string $mode The modes 'r' (read), and 'w' (write) are supported. - * Everything else will cause bzopen to return FALSE. - * @return resource If the open fails, bzopen returns FALSE, otherwise - * it returns a pointer to the newly opened file. + * @param resource|string $file + * @param string $mode + * @return resource * @throws Bzip2Exception * */ @@ -66,17 +53,9 @@ function bzopen($file, string $mode) /** - * bzread reads from the given bzip2 file pointer. - * - * Reading stops when length (uncompressed) bytes have - * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param int $length 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 Returns the uncompressed data. + * @param resource $bz + * @param int $length + * @return string * @throws Bzip2Exception * */ @@ -92,16 +71,10 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file - * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param string $data The written data. - * @param int|null $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of - * data is reached, whichever comes first. - * @return int Returns the number of bytes written. + * @param resource $bz + * @param string $data + * @param int|null $length + * @return int * @throws Bzip2Exception * */ diff --git a/generated/8.3/calendar.php b/generated/8.3/calendar.php index bdbe04db..f426ef08 100644 --- a/generated/8.3/calendar.php +++ b/generated/8.3/calendar.php @@ -5,13 +5,8 @@ use Safe\Exceptions\CalendarException; /** - * Return the Julian Day for a Unix timestamp - * (seconds since 1.1.1970), or for the current day if no - * timestamp is given. Either way, the time is regarded - * as local time (not UTC). - * - * @param int|null $timestamp A unix timestamp to convert. - * @return int A julian day number as integer. + * @param int|null $timestamp + * @return int * @throws CalendarException * */ diff --git a/generated/8.3/classobj.php b/generated/8.3/classobj.php index 06141e26..4f70129b 100644 --- a/generated/8.3/classobj.php +++ b/generated/8.3/classobj.php @@ -5,13 +5,9 @@ use Safe\Exceptions\ClassobjException; /** - * Creates an alias named alias - * based on the user defined class class. - * The aliased class is exactly the same as the original class. - * - * @param string $class The original class. - * @param string $alias The alias name for the class. - * @param bool $autoload Whether to autoload if the original class is not found. + * @param string $class + * @param string $alias + * @param bool $autoload * @throws ClassobjException * */ diff --git a/generated/8.3/com.php b/generated/8.3/com.php index 18313855..81ba5b88 100644 --- a/generated/8.3/com.php +++ b/generated/8.3/com.php @@ -5,12 +5,7 @@ use Safe\Exceptions\ComException; /** - * Generates a Globally Unique Identifier (GUID). - * - * A GUID is generated in the same way as DCE UUID's, except that the - * Microsoft convention is to enclose a GUID in curly braces. - * - * @return string Returns the GUID as a string. + * @return string * @throws ComException * */ @@ -26,24 +21,9 @@ function com_create_guid(): string /** - * Instructs COM to sink events generated by - * variant into the PHP object - * sink_object. - * - * Be careful how you use this feature; if you are doing something similar - * to the example below, then it doesn't really make sense to run it in a - * web server context. - * * @param object $variant - * @param object $sink_object sink_object should be an instance of a class with - * methods named after those of the desired dispinterface; you may use - * com_print_typeinfo to help generate a template class - * for this purpose. - * @param mixed $sink_interface PHP will attempt to use the default dispinterface type specified by - * the typelibrary associated with variant, but - * you may override this choice by setting - * sink_interface to the name of the dispinterface - * that you want to use. + * @param object $sink_object + * @param mixed $sink_interface * @throws ComException * */ @@ -62,54 +42,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = /** - * Loads a type-library and registers its constants in the engine, as though - * they were defined using define. - * - * Note that it is much more efficient to use the com.typelib-file php.ini setting to pre-load and - * register the constants, although not so flexible. - * - * If com.autoregister-typelib is turned on, then - * PHP will attempt to automatically register the constants associated with a - * COM object when you instantiate it. This depends on the interfaces - * provided by the COM object itself, and may not always be possible. - * - * @param string $typelib typelib can be one of the following: - * - * - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * - * - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * - * - * - * PHP will attempt to resolve the type library in this order, as the - * process gets more and more expensive as you progress down the list; - * searching for the type library by name is handled by physically - * enumerating the registry until we find a match. - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * @param bool $case_insensitive The case_insensitive behaves inversely to - * the parameter $case_insensitive in the define - * function. + * @param string $typelib + * @param bool $case_insensitive * @throws ComException * */ @@ -124,17 +58,9 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void /** - * The purpose of this function is to help generate a skeleton class for use - * as an event sink. You may also use it to generate a dump of any COM - * object, provided that it supports enough of the introspection interfaces, - * and that you know the name of the interface you want to display. - * - * @param object $variant variant should be either an instance of a COM - * object, or be the name of a typelibrary (which will be resolved according - * to the rules set out in com_load_typelib). - * @param null|string $dispatch_interface The name of an IDispatch descendant interface that you want to display. - * @param bool $display_sink If set to TRUE, the corresponding sink interface will be displayed - * instead. + * @param object $variant + * @param null|string $dispatch_interface + * @param bool $display_sink * @throws ComException * */ @@ -155,12 +81,8 @@ function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, /** - * Converts variant from a VT_DATE - * (or similar) value into a Unix timestamp. This allows easier - * interopability between the Unix-ish parts of PHP and COM. - * - * @param object $variant The variant. - * @return int Returns a unix timestamp. + * @param object $variant + * @return int * @throws ComException * */ @@ -176,12 +98,9 @@ function variant_date_to_timestamp(object $variant): int /** - * Returns the value of value rounded to - * decimals decimal places. - * - * @param mixed $value The variant. - * @param int $decimals Number of decimal places. - * @return mixed Returns the rounded value. + * @param mixed $value + * @param int $decimals + * @return mixed * @throws ComException * */ diff --git a/generated/8.3/cubrid.php b/generated/8.3/cubrid.php index 423f0cc5..40c5f695 100644 --- a/generated/8.3/cubrid.php +++ b/generated/8.3/cubrid.php @@ -5,122 +5,10 @@ use Safe\Exceptions\CubridException; /** - * The cubrid_bind function is used to bind values to a - * corresponding named or question mark placeholder in the SQL statement that - * was passed to cubrid_prepare. If - * bind_value_type is not given, string will be the - * default. - * - * The following table shows the types of substitute values. - * - * - * CUBRID Bind Date Types - * - * - * - * Support - * Bind Type - * Corresponding SQL Type - * - * - * - * - * Supported - * STRING - * CHAR, VARCHAR - * - * - * - * NCHAR - * NCHAR, NVARCHAR - * - * - * - * BIT - * BIT, VARBIT - * - * - * - * NUMERIC or NUMBER - * SHORT, INT, NUMERIC - * - * - * - * FLOAT - * FLOAT - * - * - * - * DOUBLE - * DOUBLE - * - * - * - * TIME - * TIME - * - * - * - * DATE - * DATE - * - * - * - * TIMESTAMP - * TIMESTAMP - * - * - * - * OBJECT - * OBJECT - * - * - * - * ENUM - * ENUM - * - * - * - * BLOB - * BLOB - * - * - * - * CLOB - * CLOB - * - * - * - * NULL - * NULL - * - * - * Not supported - * SET - * SET - * - * - * - * MULTISET - * MULTISET - * - * - * - * SEQUENCE - * SEQUENCE - * - * - * - * - * - * @param resource $req_identifier Request identifier as a result of - * cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type A type of the value to bind. (It is omitted by default. - * Thus, the system internally uses string by default. However, you need to - * specify the exact type of the value as an argument when they are NCHAR, - * BIT, or BLOB/CLOB). + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -139,14 +27,10 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bin /** - * The cubrid_col_size function is used to get the - * number of elements in a collection type (set, multiset, sequence) - * attribute. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID the instance that you want to work with. - * @param string $attr_name Name of the attribute that you want to work with. - * @return int Number of elements, when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @return int * @throws CubridException * */ @@ -162,11 +46,8 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int /** - * The cubrid_column_names function is used to get the - * column names of the query result by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column names, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -182,11 +63,8 @@ function cubrid_column_names($req_identifier): array /** - * The cubrid_column_types function gets column types of - * query results by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column types, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -202,18 +80,7 @@ function cubrid_column_types($req_identifier): array /** - * The cubrid_commit function is used to execute commit - * on the transaction pointed by conn_identifier, - * currently in progress. Connection to the server is closed after the - * cubrid_commit function is called; However, - * the connection handle is still valid. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction management. - * You can set it by using cubrid_set_autocommit. - * You can get its status by using cubrid_get_autocommit. Before you start a transaction, - * remember to disable the auto-commit mode. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -228,78 +95,11 @@ function cubrid_commit($conn_identifier): void /** - * The cubrid_connect_with_url function is used to - * establish the environment for connecting to your server by using connection - * information passed with an url string argument. If the HA feature is - * enabled in CUBRID, you must specify the connection information of the - * standby server, which is used for failover when failure occurs, in the url - * string argument of this function. If the user name and password is not - * given, then the "PUBLIC" connection will be made by default. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @param bool $new_link If a second call is made to - * cubrid_connect_with_url with the same arguments, - * no new connection will be established, but instead, the connection - * identifier of the already opened connection will be returned. The - * new_link parameter modifies this behavior and - * makes cubrid_connect_with_url always open a new - * connection, even if cubrid_connect_with_url was - * called before with the same parameters. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -323,27 +123,13 @@ function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?stri /** - * The cubrid_connect function is used to establish the - * environment for connecting to your server by using your server address, - * port number, database name, user name, and password. If the user name and - * password is not given, then the "PUBLIC" connection will be made by - * default. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. If not given, the default - * value is "public". - * @param string $passwd User password. If not given, the default value is "". - * @param bool $new_link If a second call is made to - * cubrid_connect with the same arguments, no new - * connection will be established, but instead, the connection identifier - * of the already opened connection will be 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 Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -367,14 +153,8 @@ function cubrid_connect(string $host, int $port, string $dbname, ?string $userid /** - * The cubrid_current_oid function is used to get the - * oid of the current cursor location from the query result. To use - * cubrid_current_oid, the query executed must be a - * updatable query, and the CUBRID_INCLUDE_OID option must be included during - * the query execution. - * - * @param resource $req_identifier Request identifier. - * @return string Oid of current cursor location, when process is successful. + * @param resource $req_identifier + * @return string * @throws CubridException * */ @@ -390,11 +170,7 @@ function cubrid_current_oid($req_identifier): string /** - * The cubrid_disconnect function closes the connection - * handle and disconnects from server. If any request handle is not closed at this point, - * it will be closed. It is similar to the CUBRID MySQL compatible function cubrid_close. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -413,11 +189,8 @@ function cubrid_disconnect($conn_identifier = null): void /** - * The cubrid_drop function is used to delete an - * instance from database by using the oid of the instance. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid Oid of the instance that you want to delete. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -432,12 +205,7 @@ function cubrid_drop($conn_identifier, string $oid): void /** - * This function frees the memory occupied by the result data. It returns - * TRUE on success. Note that it can only frees the - * client fetch buffer now, and if you want free all memory, use function - * cubrid_close_request. - * - * @param resource $req_identifier This is the request identifier. + * @param resource $req_identifier * @throws CubridException * */ @@ -452,12 +220,8 @@ function cubrid_free_result($req_identifier): void /** - * This function returns the current CUBRID connection charset and is similar - * to the CUBRID MySQL compatible function - * cubrid_client_encoding. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID connection charset on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -473,13 +237,9 @@ function cubrid_get_charset($conn_identifier): string /** - * The cubrid_get_class_name function is used to get the - * class name from oid. It doesn't work when selecting data from the system tables, - * for example db_class. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to check the existence. - * @return string Class name when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @return string * @throws CubridException * */ @@ -495,9 +255,7 @@ function cubrid_get_class_name($conn_identifier, string $oid): string /** - * This function returns a string that represents the client library version. - * - * @return string A string that represents the client library version on success. + * @return string * @throws CubridException * */ @@ -513,115 +271,8 @@ function cubrid_get_client_info(): string /** - * This function returns the CUBRID database parameters. - * It returns an associative array with the values for the following parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * PARAM_MAX_STRING_LENGTH - * PARAM_AUTO_COMMIT - * - * - * - * Database parameters - * - * - * - * Parameter - * Description - * - * - * - * - * PARAM_ISOLATION_LEVEL - * The transaction isolation level. - * - * - * LOCK_TIMEOUT - * CUBRID provides the lock timeout feature, which sets the waiting - * time (in seconds) for the lock until the transaction lock setting is - * allowed. The default value of the lock_timeout_in_secs parameter is - * -1, which means the application client will wait indefinitely until - * the transaction lock is allowed. - * - * - * - * PARAM_AUTO_COMMIT - * In CUBRID PHP, auto-commit mode is disabled by default for - * transaction management. It can be set by using - * cubrid_set_autocommit. - * - * - * - * - * - * - * The following table shows the isolation levels from 1 to 6. It consists of - * table schema (row) and isolation level: - * - * Levels of Isolation Supported by CUBRID - * - * - * - * Name - * Description - * - * - * - * - * SERIALIZABLE (6) - * In this isolation level, problems concerning concurrency (e.g. - * dirty read, non-repeatable read, phantom read, etc.) do not - * occur. - * - * - * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience phantom read for the record R that was - * inserted by another transaction T2 when it is repeatedly retrieving a - * specific record. - * - * - * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience R read (non-repeatable read) that was - * updated and committed by another transaction T2 when it is repeatedly - * retrieving the record R. - * - * - * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) - * Default isolation level. Another transaction T2 cannot update - * the schema of table A while transaction T1 is viewing table A. - * Transaction T1 may experience R' read (dirty read) for the record that - * was updated but not committed by another transaction T2. - * - * - * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is viewing table A repeatedly. Transaction T1 may experience - * R' read (non-repeatable read) for the record that was updated and - * committed by another transaction T2 while it is retrieving the record - * R repeatedly. - * - * - * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is repeatedly viewing table A. Transaction T1 may experience - * R' read (dirty read) for the record that was updated but not committed - * by another transaction T2. - * - * - * - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @return array An associative array with CUBRID database parameters; on success. + * @param resource $conn_identifier + * @return array * @throws CubridException * */ @@ -637,11 +288,8 @@ function cubrid_get_db_parameter($conn_identifier): array /** - * The cubrid_get_query_timeout function is used to get - * the query timeout of the request. - * - * @param resource $req_identifier Request identifier. - * @return int Returns the query timeout value in milliseconds of the current request on success. + * @param resource $req_identifier + * @return int * @throws CubridException * */ @@ -657,10 +305,8 @@ function cubrid_get_query_timeout($req_identifier): int /** - * This function returns a string that represents the CUBRID server version. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID server version on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -676,19 +322,8 @@ function cubrid_get_server_info($conn_identifier): string /** - * The cubrid_insert_id function retrieves the ID - * generated for the AUTO_INCREMENT column which is updated by the previous - * INSERT query. It returns 0 if the previous query does not generate new - * rows. - * - * @param resource $conn_identifier The connection identifier previously obtained by a call to - * cubrid_connect. - * @return string A string representing the ID generated for an AUTO_INCREMENT column by the - * previous query, on success. - * - * 0, if the previous query does not generate new rows. - * - * FALSE on failure. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -708,10 +343,7 @@ function cubrid_insert_id($conn_identifier = null): string /** - * cubrid_lob_close is used to close all BLOB/CLOB - * returned from cubrid_lob_get. - * - * @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get. + * @param array $lob_identifier_array * @throws CubridException * */ @@ -726,12 +358,9 @@ function cubrid_lob_close(array $lob_identifier_array): void /** - * cubrid_lob_export is used to get BLOB/CLOB data from CUBRID database, and saves its contents to a file. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. - * @param string $path_name Path name of the file. + * @param resource $conn_identifier + * @param resource $lob_identifier + * @param string $path_name * @throws CubridException * */ @@ -746,15 +375,9 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) /** - * cubrid_lob_get is used to get BLOB/CLOB meta info from CUBRID database, - * CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. - * Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. - * - * Remember to use cubrid_lob_close to release the LOBs if you don't need it any more. - * - * @param resource $conn_identifier Connection identifier. - * @param string $sql SQL statement to be executed. - * @return array Return an array of LOB resources, when process is successful. + * @param resource $conn_identifier + * @param string $sql + * @return array * @throws CubridException * */ @@ -770,11 +393,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array /** - * cubrid_lob_send reads BLOB/CLOB data and passes it straight through to the browser. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. + * @param resource $conn_identifier + * @param resource $lob_identifier * @throws CubridException * */ @@ -789,10 +409,8 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void /** - * cubrid_lob_size is used to get BLOB/CLOB data size. - * - * @param resource $lob_identifier LOB identifier. - * @return string A string representing LOB data size, when process is successful. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -808,17 +426,10 @@ function cubrid_lob_size($lob_identifier): string /** - * The cubrid_lob2_bind function is used to bind BLOB/CLOB datas - * to a corresponding question mark placeholder in the SQL statement that was passed - * to cubrid_prepare. If bind_value_type - * is not given, string will be "BLOB" as the default. But if you use - * cubrid_lob2_new before, bind_value_type - * will be consistent with type in cubrid_lob2_new as the default. - * - * @param resource $req_identifier Request identifier as a result of cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type It must be "BLOB" or "CLOB" and it won't be case-sensitive. If it not be given, the default value is "BLOB". + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -837,10 +448,7 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string /** - * The cubrid_lob2_close function is used to close LOB object - * returned from cubrid_lob2_new or got from the result set. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @param resource $lob_identifier * @throws CubridException * */ @@ -855,15 +463,8 @@ function cubrid_lob2_close($lob_identifier): void /** - * The cubrid_lob2_export function is used to save the - * contents of BLOB/CLOB data to a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID - * database first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to store BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -878,15 +479,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void /** - * The cubrid_lob2_import function is used to save the - * contents of BLOB/CLOB data from a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID database - * first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to import BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -901,14 +495,9 @@ function cubrid_lob2_import($lob_identifier, string $file_name): void /** - * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). - * This function should be used before you bind a lob object. - * - * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, - * the last connection opened by cubrid_connect or - * cubrid_connect_with_url is assumed. - * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". - * @return resource Lob identifier when it is successful. + * @param resource $conn_identifier + * @param string $type + * @return resource * @throws CubridException * */ @@ -930,12 +519,9 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") /** - * The cubrid_lob2_read function reads len bytes from the - * LOB data and returns the bytes read. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $len Length from buffer you want to read from the lob data. - * @return string Returns the contents as a string, FALSE when there is no more data. + * @param resource $lob_identifier + * @param int $len + * @return string * @throws CubridException * */ @@ -951,30 +537,9 @@ function cubrid_lob2_read($lob_identifier, int $len): string /** - * The cubrid_lob2_seek function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move - * backward offset units from the end of LOB object and - * offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param int $offset + * @param int $origin * @throws CubridException * */ @@ -989,31 +554,9 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR /** - * The cubrid_lob2_seek64 function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * If the offset you want to move is larger than an integer - * data can be stored, you can use this function. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move backward - * offset units from the end of LOB object and offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param string $offset + * @param int $origin * @throws CubridException * */ @@ -1028,10 +571,8 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI /** - * The cubrid_lob2_size function is used to get the size of a lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the size of the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1047,13 +588,8 @@ function cubrid_lob2_size($lob_identifier): int /** - * The cubrid_lob2_size64 function is used to get the - * size of a lob object. If the size of a lob object is larger than an - * integer data can be stored, you can use this function and it will return - * the size as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the size of the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1069,10 +605,8 @@ function cubrid_lob2_size64($lob_identifier): string /** - * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the cursor position on the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1088,13 +622,8 @@ function cubrid_lob2_tell($lob_identifier): int /** - * The cubrid_lob2_tell64 function is used to tell the - * cursor position of the LOB object. If the size of a lob object is larger - * than an integer data can be stored, you can use this function and it will - * return the position information as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1110,12 +639,8 @@ function cubrid_lob2_tell64($lob_identifier): string /** - * The cubrid_lob2_write function reads as much as data - * from buf and stores it to the LOB object. Note that - * this function can only append characters now. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $buf Data that need to be written to the lob object. + * @param resource $lob_identifier + * @param string $buf * @throws CubridException * */ @@ -1130,11 +655,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void /** - * The cubrid_lock_read function is used to put read - * lock on the instance pointed by given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put read lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1149,11 +671,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void /** - * The cubrid_lock_write function is used to put write - * lock on the instance pointed by the given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put write lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1168,26 +687,10 @@ function cubrid_lock_write($conn_identifier, string $oid): void /** - * The cubrid_move_cursor function is used to move the - * current cursor location of req_identifier by the - * value set in the offset argument, to the direction - * set in the origin argument. To set the - * origin argument, you can use CUBRID_CURSOR_FIRST - * for the first part of the result, CUBRID_CURSOR_CURRENT for the current - * location of the result, or CUBRID_CURSOR_LAST for the last part of the - * result. If origin argument is not explicitly - * designated, then the function uses CUBRID_CURSOR_CURRENT as its default - * value. - * - * If the value of cursor movement range goes over the valid limit, then the - * cursor moves to the next location after the valid range for the cursor. - * For example, if you move 20 units in the result with the size of 10, then - * the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. - * - * @param resource $req_identifier Request identifier. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. - * @return int Returns TRUE on success. + * @param resource $req_identifier + * @param int $offset + * @param int $origin + * @return int * @throws CubridException * */ @@ -1203,12 +706,7 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C /** - * The cubrid_next_result function is used to get - * results of next query if multiple SQL statements are executed and - * CUBRID_EXEC_QUERY_ALL flag is set upon - * cubrid_execute. - * - * @param resource $result result comes from a call to cubrid_execute + * @param resource $result * @throws CubridException * */ @@ -1223,80 +721,10 @@ function cubrid_next_result($result): void /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect_with_url acts very much like - * cubrid_connect_with_url with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect_with_url). - * - * This type of link is therefore called 'persistent'. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1318,30 +746,12 @@ function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?str /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect acts very much like - * cubrid_connect with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect). - * - * This type of link is therefore called 'persistent'. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1363,20 +773,10 @@ function cubrid_pconnect(string $host, int $port, string $dbname, ?string $useri /** - * The cubrid_prepare function is a sort of API which represents SQL statements - * compiled previously to a given connection handle. This pre-compiled SQL statement will be included - * in the cubrid_prepare. - * - * Accordingly, you can use this statement effectively to execute several times repeatedly or to - * process long data. Only a single statement can be used and a parameter may put a question mark (?) - * to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES - * clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a - * MARK(?) by using the cubrid_bind function only. - * - * @param resource $conn_identifier Connection identifier. - * @param string $prepare_stmt Prepare query. - * @param int $option OID return option CUBRID_INCLUDE_OID. - * @return resource Request identifier, if process is successful. + * @param resource $conn_identifier + * @param string $prepare_stmt + * @param int $option + * @return resource * @throws CubridException * */ @@ -1392,20 +792,10 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) /** - * The cubrid_put function is used to update an - * attribute of the instance of the given oid. - * - * You can update single attribute by using string data type to set - * attr. In such case, you can use integer, - * floating point or string type data for the value - * argument. To update multiple number of attributes, you can disregard the - * attr argument, and set - * value argument with associative array data type. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to update. - * @param string $attr Name of the attribute that you want to update. - * @param mixed $value New value that you want to assign to the attribute. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr + * @param mixed $value * @throws CubridException * */ @@ -1426,15 +816,7 @@ function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value /** - * The cubrid_rollback function executes rollback on the - * transaction pointed by conn_identifier, currently in - * progress. - * - * Connection to server is closed after calling - * cubrid_rollback. Connection handle, however, is - * still valid. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -1449,391 +831,11 @@ function cubrid_rollback($conn_identifier): void /** - * The cubrid_schema function is used to get the - * requested schema information from database. To get information about specific class, - * set the class_name, to get information about specific attribute - * (can be used only with CUBRID_SCH_ATTR_PRIVILEGE), - * set the attr_name. - * - * The result of the cubrid_schema function is returned as a two-dimensional - * array (column (associative array) * row (numeric array)). The following - * tables shows types of schema and the column structure of the result array to - * be returned based on the schema type. - * - * - * Result Composition of Each Type - * - * - * - * Schema - * Column Number - * Column Name - * Value - * - * - * - * - * CUBRID_SCH_CLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_VCLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 1:vclass - * - * - * - * CUBRID_SCH_QUERY_SPEC - * 1 - * QUERY_SPEC - * - * - * - * - * CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE - * 1 - * ATTR_NAME - * - * - * - * - * 2 - * DOMAIN - * - * - * - * - * 3 - * SCALE - * - * - * - * - * 4 - * PRECISION - * - * - * - * - * 5 - * INDEXED - * 1:indexed - * - * - * - * 6 - * NOT NULL - * 1:not null - * - * - * - * 7 - * SHARED - * 1:shared - * - * - * - * 8 - * UNIQUE - * 1:unique - * - * - * - * 9 - * DEFAULT - * - * - * - * - * 10 - * ATTR_ORDER - * base:1 - * - * - * - * 11 - * CLASS_NAME - * - * - * - * - * 12 - * SOURCE_CLASS - * - * - * - * - * 13 - * IS_KEY - * 1:key - * - * - * - * CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD - * 1 - * NAME - * - * - * - * - * 2 - * RET_DOMAIN - * - * - * - * - * 3 - * ARG_DOMAIN - * - * - * - * - * CUBRID_SCH_METHOD_FILE - * 1 - * METHOD_FILE - * - * - * - * - * CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_CONSTRAINT - * 1 - * TYPE - * 0:unique 1:index 2:reverse unique 3:reverse index - * - * - * - * 2 - * NAME - * - * - * - * - * 3 - * ATTR_NAME - * - * - * - * - * 4 - * NUM_PAGES - * - * - * - * - * 5 - * NUM_KEYS - * - * - * - * - * 6 - * PRIMARY_KEY - * 1:primary key - * - * - * - * 7 - * KEY_ORDER - * base:1 - * - * - * - * CUBRID_SCH_TRIGGER - * 1 - * NAME - * - * - * - * - * 2 - * STATUS - * - * - * - * - * 3 - * EVENT - * - * - * - * - * 4 - * TARGET_CLASS - * - * - * - * - * 5 - * TARGET_ATTR - * - * - * - * - * 6 - * ACTION_TIME - * - * - * - * - * 7 - * ACTION - * - * - * - * - * 8 - * PRIORITY - * - * - * - * - * 9 - * CONDITION_TIME - * - * - * - * - * 10 - * CONDITION - * - * - * - * - * CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE - * 1 - * CLASS_NAME / ATTR_NAME - * - * - * - * - * 2 - * PRIVILEGE - * - * - * - * - * 3 - * GRANTABLE - * - * - * - * - * CUBRID_SCH_PRIMARY_KEY - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * ATTR_NAME - * - * - * - * - * 3 - * KEY_SEQ - * base:1 - * - * - * - * 4 - * KEY_NAME - * - * - * - * - * CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE - * 1 - * PKTABLE_NAME - * - * - * - * - * 2 - * PKCOLUMN_NAME - * - * - * - * - * 3 - * FKTABLE_NAME - * base:1 - * - * - * - * 4 - * FKCOLUMN_NAME - * - * - * - * - * 5 - * KEY_SEQ - * base:1 - * - * - * - * 6 - * UPDATE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 7 - * DELETE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 8 - * FK_NAME - * - * - * - * - * 9 - * PK_NAME - * - * - * - * - * - * - * @param resource $conn_identifier Connection identifier. - * @param int $schema_type Schema data that you want to know. - * @param string $class_name Class you want to know the schema of. - * @param string $attr_name Attribute you want to know the schema of. - * @return array Array containing the schema information, when process is successful. + * @param resource $conn_identifier + * @param int $schema_type + * @param string $class_name + * @param string $attr_name + * @return array * @throws CubridException * */ @@ -1855,14 +857,10 @@ function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = /** - * The cubrid_seq_drop function is used to delete an - * element you request from the given sequence type attribute in the - * database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to delete an element from. - * @param int $index Index of the element that you want to delete (1-based). + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index * @throws CubridException * */ @@ -1877,14 +875,11 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ /** - * The cubrid_col_insert function is used to insert an - * element to a sequence type attribute in a requested location. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an instance to. - * @param int $index Location of the element, you want to insert the element to (1-based). - * @param string $seq_element Content of the element that you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1899,14 +894,11 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int /** - * The cubrid_seq_put function is used to update the - * content of the requested element in a sequent type attribute using OID. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to update an element. - * @param int $index Index (1-based) of the element that you want to update. - * @param string $seq_element New content that you want to use for the update. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1921,14 +913,10 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i /** - * The cubrid_set_add function is used to insert a - * single element to a set type attribute (set, multiset, sequence) you - * requested. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an element. - * @param string $set_element Content of the element you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -1943,20 +931,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string /** - * The cubrid_set_autocommit function is used to set the - * CUBRID database auto-commit mode of the current database connection. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction - * management. When auto-commit mode is truned from off to on, any pending work is - * automatically committed. - * - * @param resource $conn_identifier Connection identifier. - * @param bool $mode Auto-commit mode. The following constants can be used: - * - * - * CUBRID_AUTOCOMMIT_FALSE - * CUBRID_AUTOCOMMIT_TRUE - * + * @param resource $conn_identifier + * @param bool $mode * @throws CubridException * */ @@ -1971,19 +947,9 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void /** - * The cubrid_set_db_parameter function is used to set - * the CUBRID database parameters. It can set the following CUBRID database - * parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @param int $param_type Database parameter type. - * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @param resource $conn_identifier + * @param int $param_type + * @param int $param_value * @throws CubridException * */ @@ -1998,14 +964,10 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v /** - * The cubrid_set_drop function is used to delete an - * element that you request from the given set type (set, multiset) attribute - * of the database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to delete an element from. - * @param string $set_element Content of the element you want to delete. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -2020,11 +982,8 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin /** - * The cubrid_set_query_timeout function is used to set - * the timeout time of query execution. - * - * @param resource $req_identifier Request identifier. - * @param int $timeout Timeout time in milliseconds. + * @param resource $req_identifier + * @param int $timeout * @throws CubridException * */ diff --git a/generated/8.3/curl.php b/generated/8.3/curl.php index 80b4d6b5..fa9bb582 100644 --- a/generated/8.3/curl.php +++ b/generated/8.3/curl.php @@ -5,3164 +5,155 @@ use Safe\Exceptions\CurlException; /** - * Copies a cURL handle keeping the same preferences. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return \CurlHandle Returns a new cURL handle. - * @throws CurlException - * - */ -function curl_copy_handle(\CurlHandle $handle): \CurlHandle -{ - error_clear_last(); - $safeResult = \curl_copy_handle($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * This function URL encodes the given string according to RFC 3986. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The string to be encoded. - * @return string Returns escaped string. - * @throws CurlException - * - */ -function curl_escape(\CurlHandle $handle, string $string): string -{ - error_clear_last(); - $safeResult = \curl_escape($handle, $string); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Execute the given cURL session. - * - * This function should be called after initializing a cURL session and all - * the options for the session are set. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return bool|string Returns TRUE on success. However, if the CURLOPT_RETURNTRANSFER - * option is set, it will return - * the result on success. - * @throws CurlException - * - */ -function curl_exec(\CurlHandle $handle) -{ - error_clear_last(); - $safeResult = \curl_exec($handle); - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Gets information about the last transfer. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int|null $option This may be one of the following constants: - * - * - * - * CURLINFO_EFFECTIVE_URL - Last effective URL - * - * - * - * - * CURLINFO_HTTP_CODE - The last response code. - * As of cURL 7.10.8, this is a legacy alias of - * CURLINFO_RESPONSE_CODE - * - * - * - * - * CURLINFO_FILETIME - Remote time of the retrieved document, with the CURLOPT_FILETIME enabled; if -1 is returned the time of the document is unknown - * - * - * - * - * CURLINFO_TOTAL_TIME - Total transaction time in seconds for last transfer - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME - Time in seconds until name resolving was complete - * - * - * - * - * CURLINFO_CONNECT_TIME - Time in seconds it took to establish the connection - * - * - * - * - * CURLINFO_PRETRANSFER_TIME - Time in seconds from start until just before file transfer begins - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME - Time in seconds until the first byte is about to be transferred - * - * - * - * - * CURLINFO_REDIRECT_COUNT - Number of redirects, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_TIME - Time in seconds of all redirection steps before final transaction was started, with the CURLOPT_FOLLOWLOCATION option enabled - * - * - * - * - * CURLINFO_REDIRECT_URL - With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found in the last transaction, that should be requested manually next. With the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The redirect URL in this case is available in CURLINFO_EFFECTIVE_URL - * - * - * - * - * CURLINFO_PRIMARY_IP - IP address of the most recent connection - * - * - * - * - * CURLINFO_PRIMARY_PORT - Destination port of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_IP - Local (source) IP address of the most recent connection - * - * - * - * - * CURLINFO_LOCAL_PORT - Local (source) port of the most recent connection - * - * - * - * - * CURLINFO_SIZE_UPLOAD - Total number of bytes uploaded - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD - Total number of bytes downloaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD - Average download speed - * - * - * - * - * CURLINFO_SPEED_UPLOAD - Average upload speed - * - * - * - * - * CURLINFO_HEADER_SIZE - Total size of all headers received - * - * - * - * - * CURLINFO_HEADER_OUT - The request string sent. For this to - * work, add the CURLINFO_HEADER_OUT option to the handle by calling - * curl_setopt - * - * - * - * - * CURLINFO_REQUEST_SIZE - Total size of issued requests, currently only for HTTP requests - * - * - * - * - * CURLINFO_SSL_VERIFYRESULT - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD - Content length of download, read from Content-Length: field - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD - Specified size of upload - * - * - * - * - * CURLINFO_CONTENT_TYPE - Content-Type: of the requested document. NULL indicates server did not send valid Content-Type: header - * - * - * - * - * CURLINFO_PRIVATE - Private data associated with this cURL handle, previously set with the CURLOPT_PRIVATE option of curl_setopt - * - * - * - * - * CURLINFO_RESPONSE_CODE - The last response code - * - * - * - * - * CURLINFO_HTTP_CONNECTCODE - The CONNECT response code - * - * - * - * - * CURLINFO_HTTPAUTH_AVAIL - Bitmask indicating the authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_PROXYAUTH_AVAIL - Bitmask indicating the proxy authentication method(s) available according to the previous response - * - * - * - * - * CURLINFO_OS_ERRNO - Errno from a connect failure. The number is OS and system specific. - * - * - * - * - * CURLINFO_NUM_CONNECTS - Number of connections curl had to create to achieve the previous transfer - * - * - * - * - * CURLINFO_SSL_ENGINES - OpenSSL crypto-engines supported - * - * - * - * - * CURLINFO_COOKIELIST - All known cookies - * - * - * - * - * CURLINFO_FTP_ENTRY_PATH - Entry path in FTP server - * - * - * - * - * CURLINFO_APPCONNECT_TIME - Time in seconds it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CERTINFO - TLS certificate chain - * - * - * - * - * CURLINFO_CONDITION_UNMET - Info on unmet time conditional - * - * - * - * - * CURLINFO_RTSP_CLIENT_CSEQ - Next RTSP client CSeq - * - * - * - * - * CURLINFO_RTSP_CSEQ_RECV - Recently received CSeq - * - * - * - * - * CURLINFO_RTSP_SERVER_CSEQ - Next RTSP server CSeq - * - * - * - * - * CURLINFO_RTSP_SESSION_ID - RTSP session ID - * - * - * - * - * CURLINFO_CONTENT_LENGTH_DOWNLOAD_T - The content-length of the download. This is the value read from the Content-Type: field. -1 if the size isn't known - * - * - * - * - * CURLINFO_CONTENT_LENGTH_UPLOAD_T - The specified size of the upload. -1 if the size isn't known - * - * - * - * - * CURLINFO_HTTP_VERSION - The version used in the last HTTP connection. The return value will be one of the defined CURL_HTTP_VERSION_* constants or 0 if the version can't be determined - * - * - * - * - * CURLINFO_PROTOCOL - The protocol used in the last HTTP connection. The returned value will be exactly one of the CURLPROTO_* values - * - * - * - * - * CURLINFO_PROXY_SSL_VERIFYRESULT - The result of the certificate verification that was requested (using the CURLOPT_PROXY_SSL_VERIFYPEER option). Only used for HTTPS proxies - * - * - * - * - * CURLINFO_SCHEME - The URL scheme used for the most recent connection - * - * - * - * - * CURLINFO_SIZE_DOWNLOAD_T - Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer - * - * - * - * - * CURLINFO_SIZE_UPLOAD_T - Total number of bytes that were uploaded - * - * - * - * - * CURLINFO_SPEED_DOWNLOAD_T - The average download speed in bytes/second that curl measured for the complete download - * - * - * - * - * CURLINFO_SPEED_UPLOAD_T - The average upload speed in bytes/second that curl measured for the complete upload - * - * - * - * - * CURLINFO_APPCONNECT_TIME_T - Time, in microseconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed - * - * - * - * - * CURLINFO_CONNECT_TIME_T - Total time taken, in microseconds, from the start until the connection to the remote host (or proxy) was completed - * - * - * - * - * CURLINFO_FILETIME_T - Remote time of the retrieved document (as Unix timestamp), an alternative to CURLINFO_FILETIME to allow systems with 32 bit long variables to extract dates outside of the 32bit timestamp range - * - * - * - * - * CURLINFO_NAMELOOKUP_TIME_T - Time in microseconds from the start until the name resolving was completed - * - * - * - * - * CURLINFO_PRETRANSFER_TIME_T - Time taken from the start until the file transfer is just about to begin, in microseconds - * - * - * - * - * CURLINFO_REDIRECT_TIME_T - Total time, in microseconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started - * - * - * - * - * CURLINFO_STARTTRANSFER_TIME_T - Time, in microseconds, it took from the start until the first byte is received - * - * - * - * - * CURLINFO_TOTAL_TIME_T - Total time in microseconds for the previous transfer, including name resolving, TCP connect etc. - * - * - * - * @return mixed If option is given, returns its value. - * Otherwise, returns an associative array with the following elements - * (which correspond to option): - * - * - * - * "url" - * - * - * - * - * "content_type" - * - * - * - * - * "http_code" - * - * - * - * - * "header_size" - * - * - * - * - * "request_size" - * - * - * - * - * "filetime" - * - * - * - * - * "ssl_verify_result" - * - * - * - * - * "redirect_count" - * - * - * - * - * "total_time" - * - * - * - * - * "namelookup_time" - * - * - * - * - * "connect_time" - * - * - * - * - * "pretransfer_time" - * - * - * - * - * "size_upload" - * - * - * - * - * "size_download" - * - * - * - * - * "speed_download" - * - * - * - * - * "speed_upload" - * - * - * - * - * "download_content_length" - * - * - * - * - * "upload_content_length" - * - * - * - * - * "starttransfer_time" - * - * - * - * - * "redirect_time" - * - * - * - * - * "certinfo" - * - * - * - * - * "primary_ip" - * - * - * - * - * "primary_port" - * - * - * - * - * "local_ip" - * - * - * - * - * "local_port" - * - * - * - * - * "redirect_url" - * - * - * - * - * "request_header" (This is only set if the CURLINFO_HEADER_OUT - * is set by a previous call to curl_setopt) - * - * - * - * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. - * @throws CurlException - * - */ -function curl_getinfo(\CurlHandle $handle, ?int $option = null) -{ - error_clear_last(); - if ($option !== null) { - $safeResult = \curl_getinfo($handle, $option); - } else { - $safeResult = \curl_getinfo($handle); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError($handle); - } - return $safeResult; -} - - -/** - * Initializes a new session and return a cURL handle for use with the - * curl_setopt, curl_exec, - * and curl_close functions. - * - * @param null|string $url If provided, the CURLOPT_URL option will be set - * to its value. You can manually set this using the - * curl_setopt function. - * - * The file protocol is disabled by cURL if - * open_basedir is set. - * @return \CurlHandle Returns a cURL handle on success. - * @throws CurlException - * - */ -function curl_init(?string $url = null): \CurlHandle -{ - error_clear_last(); - if ($url !== null) { - $safeResult = \curl_init($url); - } else { - $safeResult = \curl_init(); - } - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * Ask the multi handle if there are any messages or information from the individual transfers. - * Messages may include information such as an error code from the transfer or just the fact - * that a transfer is completed. - * - * Repeated calls to this function will return a new result each time, until a FALSE is returned - * as a signal that there is no more to get at this point. The integer pointed to with - * queued_messages will contain the number of remaining messages after this - * function was called. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int|null $queued_messages Number of messages that are still in the queue - * @return array On success, returns an associative array for the message. - * - * - * Contents of the returned array - * - * - * - * Key: - * Value: - * - * - * - * - * msg - * The CURLMSG_DONE constant. Other return values - * are currently not available. - * - * - * result - * One of the CURLE_* constants. If everything is - * OK, the CURLE_OK will be the result. - * - * - * handle - * Resource of type curl indicates the handle which it concerns. - * - * - * - * - * @throws CurlException - * - */ -function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array -{ - error_clear_last(); - $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } - return $safeResult; -} - - -/** - * Allows the processing of multiple cURL handles asynchronously. - * - * @return \CurlMultiHandle Returns a cURL multi handle on success. - * @throws CurlException - * - */ -function curl_multi_init(): \CurlMultiHandle -{ - error_clear_last(); - $safeResult = \curl_multi_init(); - if ($safeResult === false) { - throw CurlException::createFromPhpError(); - } - return $safeResult; -} - - -/** - * - * - * @param \CurlMultiHandle $multi_handle - * @param int $option One of the CURLMOPT_* constants. - * @param mixed $value The value to be set on option. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLMOPT_PIPELINING - * - * Pass 1 to enable or 0 to disable. Enabling pipelining on a multi - * handle will make it attempt to perform HTTP Pipelining as far as - * possible for transfers using this handle. This means that if you add - * a second request that can use an already existing connection, the - * second request will be "piped" on the same connection. - * As of cURL 7.43.0, the value is a bitmask, and you can also pass 2 to try to multiplex the new - * transfer over an existing HTTP/2 connection if possible. - * Passing 3 instructs cURL to ask for pipelining and multiplexing - * independently of each other. - * As of cURL 7.62.0, setting the pipelining bit has no effect. - * Instead of integer literals, you can also use the CURLPIPE_* - * constants if available. - * - * - * - * CURLMOPT_MAXCONNECTS - * - * Pass a number that will be used as the maximum amount of - * simultaneously open connections that libcurl may cache. - * By default the size will be enlarged to fit four times the number - * of handles added via curl_multi_add_handle. - * When the cache is full, curl closes the oldest one in the cache - * to prevent the number of open connections from increasing. - * - * - * - * CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the chunk length threshold for pipelining - * in bytes. - * - * - * - * CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - * - * Pass a number that specifies the size threshold for pipelining - * penalty in bytes. - * - * - * - * CURLMOPT_MAX_HOST_CONNECTIONS - * - * Pass a number that specifies the maximum number of connections to a - * single host. - * - * - * - * CURLMOPT_MAX_PIPELINE_LENGTH - * - * Pass a number that specifies the maximum number of requests in a - * pipeline. - * - * - * - * CURLMOPT_MAX_TOTAL_CONNECTIONS - * - * Pass a number that specifies the maximum number of simultaneously - * open connections. - * - * - * - * CURLMOPT_PUSHFUNCTION - * - * Pass a callable that will be registered to handle server - * pushes and should have the following signature: - * - * intpushfunction - * resourceparent_ch - * resourcepushed_ch - * arrayheaders - * - * - * - * parent_ch - * - * - * The parent cURL handle (the request the client made). - * - * - * - * - * pushed_ch - * - * - * A new cURL handle for the pushed request. - * - * - * - * - * headers - * - * - * The push promise headers. - * - * - * - * - * The push function is supposed to return either - * CURL_PUSH_OK if it can handle the push, or - * CURL_PUSH_DENY to reject it. - * - * - * - * - * - * - * The parent cURL handle (the request the client made). - * - * A new cURL handle for the pushed request. - * - * The push promise headers. - * @throws CurlException - * - */ -function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void -{ - error_clear_last(); - $safeResult = \curl_multi_setopt($multi_handle, $option, $value); - if ($safeResult === false) { - throw CurlException::createFromPhpError($multi_handle); - } -} - - -/** - * Sets an option on the given cURL session handle. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int $option The CURLOPT_XXX option to set. - * @param mixed $value The value to be set on option. - * - * value should be a bool for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_AUTOREFERER - * - * TRUE to automatically set the Referer: field in - * requests where it follows a Location: redirect. - * - * - * - * - * - * CURLOPT_COOKIESESSION - * - * TRUE to mark this as a new cookie "session". It will force libcurl - * to ignore all cookies it is about to load that are "session cookies" - * from the previous session. By default, libcurl always stores and - * loads all cookies, independent if they are session cookies or not. - * Session cookies are cookies without expiry date and they are meant - * to be alive and existing for this "session" only. - * - * - * - * - * - * CURLOPT_CERTINFO - * - * TRUE to output SSL certification information to STDERR - * on secure transfers. - * - * - * Added in cURL 7.19.1. - * Requires CURLOPT_VERBOSE to be on to have an effect. - * - * - * - * CURLOPT_CONNECT_ONLY - * - * TRUE tells the library to perform all the required proxy authentication - * and connection setup, but no data transfer. This option is implemented for - * HTTP, SMTP and POP3. - * - * - * Added in 7.15.2. - * - * - * - * CURLOPT_CRLF - * - * TRUE to convert Unix newlines to CRLF newlines - * on transfers. - * - * - * - * - * - * CURLOPT_DISALLOW_USERNAME_IN_URL - * - * TRUE to not allow URLs that include a username. Usernames are allowed by default (0). - * - * - * Added in cURL 7.61.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_SHUFFLE_ADDRESSES - * - * TRUE to shuffle the order of all returned addresses so that they will be used - * in a random order, when a name is resolved and more than one IP address is returned. - * This may cause IPv4 to be used before IPv6 or vice versa. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_HAPROXYPROTOCOL - * - * TRUE to send an HAProxy PROXY protocol v1 header at the start of the connection. - * The default action is not to send this header. - * - * - * Added in cURL 7.60.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_SSH_COMPRESSION - * - * TRUE to enable built-in SSH compression. This is a request, not an order; - * the server may or may not do it. - * - * - * Added in cURL 7.56.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_DNS_USE_GLOBAL_CACHE - * - * TRUE to use a global DNS cache. This option is not thread-safe. - * It is conditionally enabled by default if PHP is built for non-threaded use - * (CLI, FCGI, Apache2-Prefork, etc.). - * - * - * - * - * - * CURLOPT_FAILONERROR - * - * TRUE to fail verbosely if the HTTP code returned - * is greater than or equal to 400. The default behavior is to return - * the page normally, ignoring the code. - * - * - * - * - * - * CURLOPT_SSL_FALSESTART - * - * TRUE to enable TLS false start. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_FILETIME - * - * TRUE to attempt to retrieve the modification - * date of the remote document. This value can be retrieved using - * the CURLINFO_FILETIME option with - * curl_getinfo. - * - * - * - * - * - * CURLOPT_FOLLOWLOCATION - * - * TRUE to follow any - * "Location: " header that the server sends as - * part of the HTTP header. - * See also CURLOPT_MAXREDIRS. - * - * - * - * - * - * CURLOPT_FORBID_REUSE - * - * TRUE to force the connection to explicitly - * close when it has finished processing, and not be pooled for reuse. - * - * - * - * - * - * CURLOPT_FRESH_CONNECT - * - * TRUE to force the use of a new connection - * instead of a cached one. - * - * - * - * - * - * CURLOPT_FTP_USE_EPRT - * - * TRUE to use EPRT (and LPRT) when doing active - * FTP downloads. Use FALSE to disable EPRT and LPRT and use PORT - * only. - * - * - * - * - * - * CURLOPT_FTP_USE_EPSV - * - * TRUE to first try an EPSV command for FTP - * transfers before reverting back to PASV. Set to FALSE - * to disable EPSV. - * - * - * - * - * - * CURLOPT_FTP_CREATE_MISSING_DIRS - * - * TRUE to create missing directories when an FTP operation - * encounters a path that currently doesn't exist. - * - * - * - * - * - * CURLOPT_FTPAPPEND - * - * TRUE to append to the remote file instead of - * overwriting it. - * - * - * - * - * - * CURLOPT_TCP_NODELAY - * - * TRUE to disable TCP's Nagle algorithm, which tries to minimize - * the number of small packets on the network. - * - * - * Available for versions compiled with libcurl 7.11.2 or - * greater. - * - * - * - * CURLOPT_FTPASCII - * - * An alias of - * CURLOPT_TRANSFERTEXT. Use that instead. - * - * - * - * - * - * CURLOPT_FTPLISTONLY - * - * TRUE to only list the names of an FTP - * directory. - * - * - * - * - * - * CURLOPT_HEADER - * - * TRUE to include the header in the output. - * - * - * - * - * - * CURLINFO_HEADER_OUT - * - * TRUE to track the handle's request string. - * - * - * The CURLINFO_ - * prefix is intentional. - * - * - * - * CURLOPT_HTTP09_ALLOWED - * - * Whether to allow HTTP/0.9 responses. Defaults to FALSE as of libcurl 7.66.0; - * formerly it defaulted to TRUE. - * - * - * Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0 - * - * - * - * CURLOPT_HTTPGET - * - * TRUE to reset the HTTP request method to GET. - * Since GET is the default, this is only necessary if the request - * method has been changed. - * - * - * - * - * - * CURLOPT_HTTPPROXYTUNNEL - * - * TRUE to tunnel through a given HTTP proxy. - * - * - * - * - * - * CURLOPT_HTTP_CONTENT_DECODING - * - * FALSE to get the raw HTTP response body. - * - * - * Available if built against libcurl >= 7.16.2. - * - * - * - * CURLOPT_KEEP_SENDING_ON_ERROR - * - * TRUE to keep sending the request body if the HTTP code returned is - * equal to or larger than 300. The default action would be to stop sending - * and close the stream or connection. Suitable for manual NTLM authentication. - * Most applications do not need this option. - * - * - * Available as of PHP 7.3.0 if built against libcurl >= 7.51.0. - * - * - * - * CURLOPT_MUTE - * - * TRUE to be completely silent with regards to - * the cURL functions. - * - * - * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead) - * - * - * - * CURLOPT_NETRC - * - * TRUE to scan the ~/.netrc - * file to find a username and password for the remote site that - * a connection is being established with. - * - * - * - * - * - * CURLOPT_NOBODY - * - * TRUE to exclude the body from the output. - * Request method is then set to HEAD. Changing this to FALSE does - * not change it to GET. - * - * - * - * - * - * CURLOPT_NOPROGRESS - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * - * - * - * - * CURLOPT_NOSIGNAL - * - * TRUE to ignore any cURL function that causes a - * signal to be sent to the PHP process. This is turned on by default - * in multi-threaded SAPIs so timeout options can still be used. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_PATH_AS_IS - * - * TRUE to not handle dot dot sequences. - * - * - * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PIPEWAIT - * - * TRUE to wait for pipelining/multiplexing. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POST - * - * TRUE to do a regular HTTP POST. This POST is the - * normal application/x-www-form-urlencoded kind, - * most commonly used by HTML forms. - * - * - * - * - * - * CURLOPT_PUT - * - * TRUE to HTTP PUT a file. The file to PUT must - * be set with CURLOPT_INFILE and - * CURLOPT_INFILESIZE. - * - * - * - * - * - * CURLOPT_RETURNTRANSFER - * - * TRUE to return the transfer as a string of the - * return value of curl_exec instead of outputting - * it directly. - * - * - * - * - * - * CURLOPT_SASL_IR - * - * TRUE to enable sending the initial response in the first packet. - * - * - * Added in cURL 7.31.10. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_ALPN - * - * FALSE to disable ALPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_ENABLE_NPN - * - * FALSE to disable NPN in the SSL handshake (if the SSL backend - * libcurl is built to use supports it), which can be used to - * negotiate http2. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's - * certificate. Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * - * - * TRUE by default as of cURL 7.10. Default bundle installed as of - * cURL 7.10. - * - * - * - * CURLOPT_SSL_VERIFYSTATUS - * - * TRUE to verify the certificate's status. - * - * - * Added in cURL 7.41.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYPEER - * - * FALSE to stop cURL from verifying the peer's certificate. - * Alternate certificates to verify against can be - * specified with the CURLOPT_CAINFO option - * or a certificate directory can be specified with the - * CURLOPT_CAPATH option. - * When set to false, the peer certificate verification succeeds regardless. - * - * - * TRUE by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_SAFE_UPLOAD - * - * Always TRUE, what disables support for the @ prefix for - * uploading files in CURLOPT_POSTFIELDS, which - * means that values starting with @ can be safely - * passed as fields. CURLFile may be used for - * uploads instead. - * - * - * - * - * - * CURLOPT_SUPPRESS_CONNECT_HEADERS - * - * TRUE to suppress proxy CONNECT response headers from the user callback functions - * CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION, - * when CURLOPT_HTTPPROXYTUNNEL is used and a CONNECT request is made. - * - * - * Added in cURL 7.54.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_TCP_FASTOPEN - * - * TRUE to enable TCP Fast Open. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TFTP_NO_OPTIONS - * - * TRUE to not send TFTP options requests. - * - * - * Added in cURL 7.48.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TRANSFERTEXT - * - * TRUE to use ASCII mode for FTP transfers. - * For LDAP, it retrieves data in plain text instead of HTML. On - * Windows systems, it will not set STDOUT to binary - * mode. - * - * - * - * - * - * CURLOPT_UNRESTRICTED_AUTH - * - * TRUE to keep sending the username and password - * when following locations (using - * CURLOPT_FOLLOWLOCATION), even when the - * hostname has changed. - * - * - * - * - * - * CURLOPT_UPLOAD - * - * TRUE to prepare for an upload. - * - * - * - * - * - * CURLOPT_VERBOSE - * - * TRUE to output verbose information. Writes - * output to STDERR, or the file specified using - * CURLOPT_STDERR. - * - * - * - * - * - * - * - * - * TRUE to disable the progress meter for cURL transfers. - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * - * - * PHP automatically sets this option to TRUE, this should only be - * changed for debugging purposes. - * - * value should be an int for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_BUFFERSIZE - * - * The size of the buffer to use for each read. There is no guarantee - * this request will be fulfilled, however. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_CONNECTTIMEOUT - * - * The number of seconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * - * - * - * - * CURLOPT_CONNECTTIMEOUT_MS - * - * The number of milliseconds to wait while trying to connect. Use 0 to - * wait indefinitely. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_DNS_CACHE_TIMEOUT - * - * The number of seconds to keep DNS entries in memory. This - * option is set to 120 (2 minutes) by default. - * - * - * - * - * - * CURLOPT_EXPECT_100_TIMEOUT_MS - * - * The timeout for Expect: 100-continue responses in milliseconds. - * Defaults to 1000 milliseconds. - * - * - * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS - * - * Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts - * to connect to both IPv4 and IPv6 addresses for dual-stack hosts, - * preferring IPv6 first for timeout milliseconds. - * Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_FTPSSLAUTH - * - * The FTP authentication method (when is activated): - * CURLFTPAUTH_SSL (try SSL first), - * CURLFTPAUTH_TLS (try TLS first), or - * CURLFTPAUTH_DEFAULT (let cURL decide). - * - * - * Added in cURL 7.12.2. - * - * - * - * CURLOPT_HEADEROPT - * - * How to deal with headers. One of the following constants: - * - * CURLHEADER_UNIFIED: the headers specified in - * CURLOPT_HTTPHEADER will be used in requests - * both to servers and proxies. With this option enabled, - * CURLOPT_PROXYHEADER will not have any effect. - * - * - * CURLHEADER_SEPARATE: makes - * CURLOPT_HTTPHEADER headers only get sent to - * a server and not to a proxy. Proxy headers must be set with - * CURLOPT_PROXYHEADER to get used. Note that if - * a non-CONNECT request is sent to a proxy, libcurl will send both - * server headers and proxy headers. When doing CONNECT, libcurl will - * send CURLOPT_PROXYHEADER headers only to the - * proxy and then CURLOPT_HTTPHEADER headers - * only to the server. - * - * - * Defaults to CURLHEADER_SEPARATE as of cURL - * 7.42.1, and CURLHEADER_UNIFIED before. - * - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP_VERSION - * - * CURL_HTTP_VERSION_NONE (default, lets CURL - * decide which version to use), - * CURL_HTTP_VERSION_1_0 (forces HTTP/1.0), - * CURL_HTTP_VERSION_1_1 (forces HTTP/1.1), - * CURL_HTTP_VERSION_2_0 (attempts HTTP 2), - * CURL_HTTP_VERSION_2 (alias of CURL_HTTP_VERSION_2_0), - * CURL_HTTP_VERSION_2TLS (attempts HTTP 2 over TLS (HTTPS) only) or - * CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade). - * - * - * - * - * - * CURLOPT_HTTPAUTH - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * - * - * - * - * CURLOPT_INFILESIZE - * - * The expected size, in bytes, of the file when uploading a file to - * a remote site. Note that using this option will not stop libcurl - * from sending more data, as exactly what is sent depends on - * CURLOPT_READFUNCTION. - * - * - * - * - * - * CURLOPT_LOW_SPEED_LIMIT - * - * The transfer speed, in bytes per second, that the transfer should be - * below during the count of CURLOPT_LOW_SPEED_TIME - * seconds before PHP considers the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_LOW_SPEED_TIME - * - * The number of seconds the transfer speed should be below - * CURLOPT_LOW_SPEED_LIMIT before PHP considers - * the transfer too slow and aborts. - * - * - * - * - * - * CURLOPT_MAXCONNECTS - * - * The maximum amount of persistent connections that are allowed. - * When the limit is reached, the oldest one in the cache is closed - * to prevent increasing the number of open connections. - * - * - * - * - * - * CURLOPT_MAXREDIRS - * - * The maximum amount of HTTP redirections to follow. Use this option - * alongside CURLOPT_FOLLOWLOCATION. - * Default value of 20 is set to prevent infinite redirects. - * Setting to -1 allows inifinite redirects, and 0 - * refuses all redirects. - * - * - * - * - * - * CURLOPT_PORT - * - * An alternative port number to connect to. - * - * - * - * - * - * CURLOPT_POSTREDIR - * - * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) - * and 4 (303 See Other) if the HTTP POST method should be maintained - * when CURLOPT_FOLLOWLOCATION is set and a - * specific type of redirect occurs. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PROTOCOLS - * - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_PROXYAUTH - * - * The HTTP authentication method(s) to use for the proxy connection. - * Use the same bitmasks as described in - * CURLOPT_HTTPAUTH. For proxy authentication, - * only CURLAUTH_BASIC and - * CURLAUTH_NTLM are currently supported. - * - * - * Added in cURL 7.10.7. - * - * - * - * CURLOPT_PROXYPORT - * - * The port number of the proxy to connect to. This port number can - * also be set in CURLOPT_PROXY. - * - * - * - * - * - * CURLOPT_PROXYTYPE - * - * Either CURLPROXY_HTTP (default), - * CURLPROXY_SOCKS4, - * CURLPROXY_SOCKS5, - * CURLPROXY_SOCKS4A or - * CURLPROXY_SOCKS5_HOSTNAME. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_REDIR_PROTOCOLS - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in a transfer that it follows to in - * a redirect when CURLOPT_FOLLOWLOCATION is enabled. - * This allows you to limit specific transfers to only be allowed to use a subset - * of protocols in redirections. By default libcurl will allow all protocols - * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions - * which unconditionally would follow to all protocols supported. - * See also CURLOPT_PROTOCOLS for protocol constant values. - * - * - * Added in cURL 7.19.4. - * - * - * - * CURLOPT_RESUME_FROM - * - * The offset, in bytes, to resume a transfer from. - * - * - * - * - * - * CURLOPT_SOCKS5_AUTH - * - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * - * CURLAUTH_BASIC allows username/password authentication. - * - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * - * CURLAUTH_NONE allows no authentication. - * - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * - * - * Available as of 7.3.0 and curl >= 7.55.0. - * - * - * - * CURLOPT_SSL_OPTIONS - * - * Set SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. - * - * - * - * Added in cURL 7.25.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSL_VERIFYHOST - * - * 2 to verify that a Common Name field or a Subject Alternate Name - * field in the SSL peer certificate matches the provided hostname. - * 0 to not check the names. - * 1 should not be used. - * In production environments the value of this option - * should be kept at 2 (default value). - * - * - * Support for value 1 removed in cURL 7.28.1. - * - * - * - * CURLOPT_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT (0), - * CURL_SSLVERSION_TLSv1 (1), - * CURL_SSLVERSION_SSLv2 (2), - * CURL_SSLVERSION_SSLv3 (3), - * CURL_SSLVERSION_TLSv1_0 (4), - * CURL_SSLVERSION_TLSv1_1 (5) or - * CURL_SSLVERSION_TLSv1_2 (6). - * The maximum TLS version can be set by using one of the CURL_SSLVERSION_MAX_* - * constants. It is also possible to OR one of the CURL_SSLVERSION_* - * constants with one of the CURL_SSLVERSION_MAX_* constants. - * CURL_SSLVERSION_MAX_DEFAULT (the maximum version supported by the library), - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, or - * CURL_SSLVERSION_MAX_TLSv1_3. - * - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * - * - * - * - * - * - * CURLOPT_PROXY_SSL_OPTIONS - * - * Set proxy SSL behavior options, which is a bitmask of any of the following constants: - * - * CURLSSLOPT_ALLOW_BEAST: do not attempt to use - * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * - * CURLSSLOPT_NO_REVOKE: disable certificate - * revocation checks for those SSL backends where such behavior is - * present. (curl >= 7.44.0) - * - * - * CURLSSLOPT_NO_PARTIALCHAIN: do not accept "partial" - * certificate chains, which it otherwise does by default. (curl >= 7.68.0) - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_VERIFYHOST - * - * Set to 2 to verify in the HTTPS proxy's certificate name fields against the proxy name. - * When set to 0 the connection succeeds regardless of the names used in the certificate. - * Use that ability with caution! - * 1 treated as a debug option in curl 7.28.0 and earlier. - * From curl 7.28.1 to 7.65.3 CURLE_BAD_FUNCTION_ARGUMENT is returned. - * From curl 7.66.0 onwards 1 and 2 is treated as the same value. - * In production environments the value of this option should be kept at 2 (default value). - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLVERSION - * - * One of CURL_SSLVERSION_DEFAULT, - * CURL_SSLVERSION_TLSv1, - * CURL_SSLVERSION_TLSv1_0, - * CURL_SSLVERSION_TLSv1_1, - * CURL_SSLVERSION_TLSv1_2, - * CURL_SSLVERSION_TLSv1_3, - * CURL_SSLVERSION_MAX_DEFAULT, - * CURL_SSLVERSION_MAX_TLSv1_0, - * CURL_SSLVERSION_MAX_TLSv1_1, - * CURL_SSLVERSION_MAX_TLSv1_2, - * CURL_SSLVERSION_MAX_TLSv1_3 or - * CURL_SSLVERSION_SSLv3. - * - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_STREAM_WEIGHT - * - * Set the numerical stream weight (a number between 1 and 256). - * - * - * Added in cURL 7.46.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_TCP_KEEPALIVE - * - * If set to 1, TCP keepalive probes will be sent. The delay and - * frequency of these probes can be controlled by the CURLOPT_TCP_KEEPIDLE - * and CURLOPT_TCP_KEEPINTVL options, provided the operating system - * supports them. If set to 0 (default) keepalive probes are disabled. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPIDLE - * - * Sets the delay, in seconds, that the operating system will wait while the connection is - * idle before sending keepalive probes, if CURLOPT_TCP_KEEPALIVE is - * enabled. Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TCP_KEEPINTVL - * - * Sets the interval, in seconds, that the operating system will wait between sending - * keepalive probes, if CURLOPT_TCP_KEEPALIVE is enabled. - * Not all operating systems support this option. - * The default is 60. - * - * - * Added in cURL 7.25.0. - * - * - * - * CURLOPT_TIMECONDITION - * - * How CURLOPT_TIMEVALUE is treated. - * Use CURL_TIMECOND_IFMODSINCE to return the - * page only if it has been modified since the time specified in - * CURLOPT_TIMEVALUE. If it hasn't been modified, - * a "304 Not Modified" header will be returned - * assuming CURLOPT_HEADER is TRUE. - * Use CURL_TIMECOND_IFUNMODSINCE for the reverse - * effect. Use CURL_TIMECOND_NONE to ignore - * CURLOPT_TIMEVALUE and always return the page. - * CURL_TIMECOND_NONE is the default. - * - * - * Before cURL 7.46.0 the default was - * CURL_TIMECOND_IFMODSINCE. - * - * - * - * CURLOPT_TIMEOUT - * - * The maximum number of seconds to allow cURL functions to execute. - * - * - * - * - * - * CURLOPT_TIMEOUT_MS - * - * The maximum number of milliseconds to allow cURL functions to - * execute. - * - * If libcurl is built to use the standard system name resolver, that - * portion of the connect will still use full-second resolution for - * timeouts with a minimum timeout allowed of one second. - * - * - * Added in cURL 7.16.2. - * - * - * - * CURLOPT_TIMEVALUE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. - * - * - * - * - * - * CURLOPT_TIMEVALUE_LARGE - * - * The time in seconds since January 1st, 1970. The time will be used - * by CURLOPT_TIMECONDITION. Defaults to zero. - * The difference between this option and CURLOPT_TIMEVALUE - * is the type of the argument. On systems where 'long' is only 32 bit wide, - * this option has to be used to set dates beyond the year 2038. - * - * - * Added in cURL 7.59.0. Available since PHP 7.3.0. - * - * - * - * CURLOPT_MAX_RECV_SPEED_LARGE - * - * If a download exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_MAX_SEND_SPEED_LARGE - * - * If an upload exceeds this speed (counted in bytes per second) on - * cumulative average during the transfer, the transfer will pause to - * keep the average rate less than or equal to the parameter value. - * Defaults to unlimited speed. - * - * - * Added in cURL 7.15.5. - * - * - * - * CURLOPT_SSH_AUTH_TYPES - * - * A bitmask consisting of one or more of - * CURLSSH_AUTH_PUBLICKEY, - * CURLSSH_AUTH_PASSWORD, - * CURLSSH_AUTH_HOST, - * CURLSSH_AUTH_KEYBOARD. Set to - * CURLSSH_AUTH_ANY to let libcurl pick one. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_IPRESOLVE - * - * Allows an application to select what kind of IP addresses to use when - * resolving host names. This is only interesting when using host names that - * resolve addresses using more than one version of IP, possible values are - * CURL_IPRESOLVE_WHATEVER, - * CURL_IPRESOLVE_V4, - * CURL_IPRESOLVE_V6, by default - * CURL_IPRESOLVE_WHATEVER. - * - * - * Added in cURL 7.10.8. - * - * - * - * CURLOPT_FTP_FILEMETHOD - * - * Tell curl which method to use to reach a file on a FTP(S) server. Possible values are - * CURLFTPMETHOD_MULTICWD, - * CURLFTPMETHOD_NOCWD and - * CURLFTPMETHOD_SINGLECWD. - * - * - * Added in cURL 7.15.1. - * - * - * - * - * - * - * The HTTP authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_DIGEST, - * CURLAUTH_GSSNEGOTIATE, - * CURLAUTH_NTLM, - * CURLAUTH_ANY, and - * CURLAUTH_ANYSAFE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_ANY is an alias for - * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * CURLAUTH_ANYSAFE is an alias for - * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * Bitmask of CURLPROTO_* values. If used, this bitmask - * limits what protocols libcurl may use in the transfer. This allows you to have - * a libcurl built to support a wide range of protocols but still limit specific - * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. - * See also CURLOPT_REDIR_PROTOCOLS. - * - * Valid protocol options are: - * CURLPROTO_HTTP, - * CURLPROTO_HTTPS, - * CURLPROTO_FTP, - * CURLPROTO_FTPS, - * CURLPROTO_SCP, - * CURLPROTO_SFTP, - * CURLPROTO_TELNET, - * CURLPROTO_LDAP, - * CURLPROTO_LDAPS, - * CURLPROTO_DICT, - * CURLPROTO_FILE, - * CURLPROTO_TFTP, - * CURLPROTO_ALL - * - * The SOCKS5 authentication method(s) to use. The options are: - * CURLAUTH_BASIC, - * CURLAUTH_GSSAPI, - * CURLAUTH_NONE. - * - * The bitwise | (or) operator can be used to combine - * more than one method. If this is done, cURL will poll the server to see - * what methods it supports and pick the best one. - * - * CURLAUTH_BASIC allows username/password authentication. - * - * CURLAUTH_GSSAPI allows GSS-API authentication. - * - * CURLAUTH_NONE allows no authentication. - * - * Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI. - * Set the actual username and password with the CURLOPT_PROXYUSERPWD option. - * - * Your best bet is to not set this and let it use the default. - * Setting it to 2 or 3 is very dangerous given the known - * vulnerabilities in SSLv2 and SSLv3. - * - * Your best bet is to not set this and let it use the default CURL_SSLVERSION_DEFAULT - * which will attempt to figure out the remote SSL protocol version. - * - * value should be a string for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_ABSTRACT_UNIX_SOCKET - * - * Enables the use of an abstract Unix domain socket instead of - * establishing a TCP connection to a host and sets the path to - * the given string. This option shares the same semantics - * as CURLOPT_UNIX_SOCKET_PATH. These two options - * share the same storage and therefore only one of them can be set - * per handle. - * - * - * Available since PHP 7.3.0 and cURL 7.53.0 - * - * - * - * CURLOPT_CAINFO - * - * The name of a file holding one or more certificates to verify the - * peer with. This only makes sense when used in combination with - * CURLOPT_SSL_VERIFYPEER. - * - * - * Might require an absolute path. - * - * - * - * CURLOPT_CAPATH - * - * A directory that holds multiple CA certificates. Use this option - * alongside CURLOPT_SSL_VERIFYPEER. - * - * - * - * - * - * CURLOPT_COOKIE - * - * The contents of the "Cookie: " header to be - * used in the HTTP request. - * Note that multiple cookies are separated with a semicolon followed - * by a space (e.g., "fruit=apple; colour=red") - * - * - * - * - * - * CURLOPT_COOKIEFILE - * - * The name of the file containing the cookie data. The cookie file can - * be in Netscape format, or just plain HTTP-style headers dumped into - * a file. - * If the name is an empty string, no cookies are loaded, but cookie - * handling is still enabled. - * - * - * - * - * - * CURLOPT_COOKIEJAR - * - * The name of a file to save all internal cookies to when the handle is closed, - * e.g. after a call to curl_close. - * - * - * - * - * - * CURLOPT_COOKIELIST - * - * A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular - * HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store. - * "ALL" erases all cookies held in memory. - * "SESS" erases all session cookies held in memory. - * "FLUSH" writes all known cookies to the file specified by CURLOPT_COOKIEJAR. - * "RELOAD" loads all cookies from the files specified by CURLOPT_COOKIEFILE. - * - * - * Available since cURL 7.14.1. - * - * - * - * CURLOPT_CUSTOMREQUEST - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * - * - * - * - * CURLOPT_DEFAULT_PROTOCOL - * - * The default protocol to use if the URL is missing a scheme name. - * - * - * Added in cURL 7.45.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_INTERFACE - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP4 - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_DNS_LOCAL_IP6 - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_EGDSOCKET - * - * Like CURLOPT_RANDOM_FILE, except a filename - * to an Entropy Gathering Daemon socket. - * - * - * - * - * - * CURLOPT_ENCODING - * - * The contents of the "Accept-Encoding: " header. - * This enables decoding of the response. Supported encodings are - * "identity", "deflate", and - * "gzip". If an empty string, "", - * is set, a header containing all supported encoding types is sent. - * - * - * Added in cURL 7.10. - * - * - * - * CURLOPT_FTPPORT - * - * The value which will be used to get the IP address to use - * for the FTP "PORT" instruction. The "PORT" instruction tells - * the remote server to connect to our specified IP address. The - * string may be a plain IP address, a hostname, a network - * interface name (under Unix), or just a plain '-' to use the - * systems default IP address. - * - * - * - * - * - * CURLOPT_INTERFACE - * - * The name of the outgoing network interface to use. This can be an - * interface name, an IP address or a host name. - * - * - * - * - * - * CURLOPT_KEYPASSWD - * - * The password required to use the CURLOPT_SSLKEY - * or CURLOPT_SSH_PRIVATE_KEYFILE private key. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_KRB4LEVEL - * - * The KRB4 (Kerberos 4) security level. Any of the following values - * (in order from least to most powerful) are valid: - * "clear", - * "safe", - * "confidential", - * "private".. - * If the string does not match one of these, - * "private" is used. Setting this option to NULL - * will disable KRB4 security. Currently KRB4 security only works - * with FTP transactions. - * - * - * - * - * - * CURLOPT_LOGIN_OPTIONS - * - * Can be used to set protocol specific login options, such as the - * preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", - * and should be used in conjunction with the - * CURLOPT_USERNAME option. - * - * - * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_PINNEDPUBLICKEY - * - * Set the pinned public key. - * The string can be the file name of your pinned public key. The file - * format expected is "PEM" or "DER". The string can also be any - * number of base64 encoded sha256 hashes preceded by "sha256//" and - * separated by ";". - * - * - * Added in cURL 7.39.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_POSTFIELDS - * - * - * The full data to post in a HTTP "POST" operation. - * This parameter can either be - * passed as a urlencoded string like 'para1=val1&para2=val2&...' - * or as an array with the field name as key and field data as value. - * If value is an array, the - * Content-Type header will be set to - * multipart/form-data. - * - * - * Files can be sent using CURLFile or CURLStringFile, - * in which case value must be an array. - * - * - * - * - * - * - * CURLOPT_PRIVATE - * - * Any data that should be associated with this cURL handle. This data - * can subsequently be retrieved with the - * CURLINFO_PRIVATE option of - * curl_getinfo. cURL does nothing with this data. - * When using a cURL multi handle, this private data is typically a - * unique key to identify a standard cURL handle. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_PRE_PROXY - * - * Set a string holding the host name or dotted numerical - * IP address to be used as the preproxy that curl connects to before - * it connects to the HTTP(S) proxy specified in the - * CURLOPT_PROXY option for the upcoming request. - * The preproxy can only be a SOCKS proxy and it should be prefixed with - * [scheme]:// to specify which kind of socks is used. - * A numerical IPv6 address must be written within [brackets]. - * Setting the preproxy to an empty string explicitly disables the use of a preproxy. - * To specify port number in this string, append :[port] - * to the end of the host name. The proxy's port number may optionally be - * specified with the separate option CURLOPT_PROXYPORT. - * Defaults to using port 1080 for proxies if a port is not specified. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY - * - * The HTTP proxy to tunnel requests through. - * - * - * - * - * - * CURLOPT_PROXY_SERVICE_NAME - * - * The proxy authentication service name. - * - * - * Added in cURL 7.43.0 for HTTP proxies, and in cURL 7.49.0 for SOCKS5 proxies. - * Available since PHP 7.0.7. - * - * - * - * CURLOPT_PROXY_CAINFO - * - * The path to proxy Certificate Authority (CA) bundle. Set the path as a - * string naming a file holding one or more certificates to - * verify the HTTPS proxy with. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * Defaults set to the system path where libcurl's cacert bundle is assumed - * to be stored. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CAPATH - * - * The directory holding multiple CA certificates to verify the HTTPS proxy with. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_CRLFILE - * - * Set the file name with the concatenation of CRL (Certificate Revocation List) - * in PEM format to use in the certificate validation that occurs during - * the SSL exchange. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_KEYPASSWD - * - * Set the string be used as the password required to use the - * CURLOPT_PROXY_SSLKEY private key. You never needed a - * passphrase to load a certificate but you need one to load your private key. - * This option is for connecting to an HTTPS proxy, not an HTTPS server. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_PINNEDPUBLICKEY - * - * Set the pinned public key for HTTPS proxy. The string can be the file name - * of your pinned public key. The file format expected is "PEM" or "DER". - * The string can also be any number of base64 encoded sha256 hashes preceded by - * "sha256//" and separated by ";" - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERT - * - * The file name of your client certificate used to connect to the HTTPS proxy. - * The default format is "P12" on Secure Transport and "PEM" on other engines, - * and can be changed with CURLOPT_PROXY_SSLCERTTYPE. - * With NSS or Secure Transport, this can also be the nickname of the certificate - * you wish to authenticate with as it is named in the security database. - * If you want to use a file from the current directory, please precede it with - * "./" prefix, in order to avoid confusion with a nickname. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSLCERTTYPE - * - * The format of your client certificate used when connecting to an HTTPS proxy. - * Supported formats are "PEM" and "DER", except with Secure Transport. - * OpenSSL (versions 0.9.3 and later) and Secure Transport - * (on iOS 5 or later, or OS X 10.7 or later) also support "P12" for - * PKCS#12-encoded files. Defaults to "PEM". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_SSL_CIPHER_LIST - * - * The list of ciphers to use for the connection to the HTTPS proxy. - * The list must be syntactically correct, it consists of one or more cipher - * strings separated by colons. Commas or spaces are also acceptable separators - * but colons are normally used, !, - and + can be used as operators. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection to a proxy. - * The list must be syntactically correct, it consists of one or more - * cipher suite strings separated by colons. This option is currently used - * only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_PROXY_SSLKEY - * - * The file name of your private key used for connecting to the HTTPS proxy. - * The default format is "PEM" and can be changed with - * CURLOPT_PROXY_SSLKEYTYPE. - * (iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled. - * - * - * - * CURLOPT_PROXY_SSLKEYTYPE - * - * The format of your private key. Supported formats are "PEM", "DER" and "ENG". - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_PASSWORD - * - * The password to use for the TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_USERNAME option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_TYPE - * - * The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP". - * - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXY_TLSAUTH_USERNAME - * - * The username to use for the HTTPS proxy TLS authentication method specified with the - * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the - * CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. - * - * - * - * CURLOPT_PROXYUSERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection to the proxy. - * - * - * - * - * - * CURLOPT_RANDOM_FILE - * - * A filename to be used to seed the random number generator for SSL. - * - * - * - * - * - * CURLOPT_RANGE - * - * Range(s) of data to retrieve in the format - * "X-Y" where X or Y are optional. HTTP transfers - * also support several intervals, separated with commas in the format - * "X-Y,N-M". - * - * - * - * - * - * CURLOPT_REFERER - * - * The contents of the "Referer: " header to be used - * in a HTTP request. - * - * - * - * - * - * CURLOPT_SERVICE_NAME - * - * The authentication service name. - * - * - * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 - * - * A string containing 32 hexadecimal digits. The string should be the - * MD5 checksum of the remote host's public key, and libcurl will reject - * the connection to the host unless the md5sums match. - * This option is only for SCP and SFTP transfers. - * - * - * Added in cURL 7.17.1. - * - * - * - * CURLOPT_SSH_PUBLIC_KEYFILE - * - * The file name for your public key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, - * and just "id_dsa.pub" in the current directory if HOME is not set. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSH_PRIVATE_KEYFILE - * - * The file name for your private key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa if the HOME environment variable is set, - * and just "id_dsa" in the current directory if HOME is not set. - * If the file is password-protected, set the password with - * CURLOPT_KEYPASSWD. - * - * - * Added in cURL 7.16.1. - * - * - * - * CURLOPT_SSL_CIPHER_LIST - * - * A list of ciphers to use for SSL. For example, - * RC4-SHA and TLSv1 are valid - * cipher lists. - * - * - * - * - * - * CURLOPT_SSLCERT - * - * The name of a file containing a PEM formatted certificate. - * - * - * - * - * - * CURLOPT_SSLCERTPASSWD - * - * The password required to use the - * CURLOPT_SSLCERT certificate. - * - * - * - * - * - * CURLOPT_SSLCERTTYPE - * - * The format of the certificate. Supported formats are - * "PEM" (default), "DER", - * and "ENG". - * As of OpenSSL 0.9.3, "P12" (for PKCS#12-encoded files) - * is also supported. - * - * - * Added in cURL 7.9.3. - * - * - * - * CURLOPT_SSLENGINE - * - * The identifier for the crypto engine of the private SSL key - * specified in CURLOPT_SSLKEY. - * - * - * - * - * - * CURLOPT_SSLENGINE_DEFAULT - * - * The identifier for the crypto engine used for asymmetric crypto - * operations. - * - * - * - * - * - * CURLOPT_SSLKEY - * - * The name of a file containing a private SSL key. - * - * - * - * - * - * CURLOPT_SSLKEYPASSWD - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * - * - * - * - * CURLOPT_SSLKEYTYPE - * - * The key type of the private SSL key specified in - * CURLOPT_SSLKEY. Supported key types are - * "PEM" (default), "DER", - * and "ENG". - * - * - * - * - * - * CURLOPT_TLS13_CIPHERS - * - * The list of cipher suites to use for the TLS 1.3 connection. The list must be - * syntactically correct, it consists of one or more cipher suite strings separated by colons. - * This option is currently used only when curl is built to use OpenSSL 1.1.1 or later. - * If you are using a different SSL backend you can try setting - * TLS 1.3 cipher suites by using the CURLOPT_SSL_CIPHER_LIST option. - * - * - * Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1. - * - * - * - * CURLOPT_UNIX_SOCKET_PATH - * - * Enables the use of Unix domain sockets as connection endpoint and - * sets the path to the given string. - * - * - * Added in cURL 7.40.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_URL - * - * The URL to fetch. This can also be set when initializing a - * session with curl_init. - * - * - * - * - * - * CURLOPT_USERAGENT - * - * The contents of the "User-Agent: " header to be - * used in a HTTP request. - * - * - * - * - * - * CURLOPT_USERNAME - * - * The user name to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_PASSWORD - * - * The password to use in authentication. - * - * - * Added in cURL 7.19.1. - * - * - * - * CURLOPT_USERPWD - * - * A username and password formatted as - * "[username]:[password]" to use for the - * connection. - * - * - * - * - * - * CURLOPT_XOAUTH2_BEARER - * - * Specifies the OAuth 2.0 access token. - * - * - * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * - * - * - * A custom request method to use instead of - * "GET" or "HEAD" when doing - * a HTTP request. This is useful for doing - * "DELETE" or other, more obscure HTTP requests. - * Valid values are things like "GET", - * "POST", "CONNECT" and so on; - * i.e. Do not enter a whole HTTP request line here. For instance, - * entering "GET /index.html HTTP/1.0\r\n\r\n" - * would be incorrect. - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * - * - * Don't do this without making sure the server supports the custom - * request method first. - * - * The default protocol to use if the URL is missing a scheme name. - * - * Set the name of the network interface that the DNS resolver should bind to. - * This must be an interface name (not an address). - * - * Set the local IPv4 address that the resolver should bind to. The argument - * should contain a single numerical IPv4 address as a string. - * - * Set the local IPv6 address that the resolver should bind to. The argument - * should contain a single numerical IPv6 address as a string. - * - * Secure Remote Password (SRP) authentication for TLS provides mutual authentication - * if both sides have a shared secret. To use TLS-SRP, you must also set the - * CURLOPT_PROXY_TLSAUTH_USERNAME and - * CURLOPT_PROXY_TLSAUTH_PASSWORD options. - * - * The secret password needed to use the private SSL key specified in - * CURLOPT_SSLKEY. - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * - * - * Since this option contains a sensitive password, remember to keep - * the PHP script it is contained within safe. - * - * value should be an array for the - * following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_CONNECT_TO - * - * Connect to a specific host and port instead of the URL's host and port. - * Accepts an array of strings with the format - * HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT. - * - * - * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_HTTP200ALIASES - * - * An array of HTTP 200 responses that will be treated as valid - * responses and not as errors. - * - * - * Added in cURL 7.10.3. - * - * - * - * CURLOPT_HTTPHEADER - * - * An array of HTTP header fields to set, in the format - * - * array('Content-type: text/plain', 'Content-length: 100') - * - * - * - * - * - * - * CURLOPT_POSTQUOTE - * - * An array of FTP commands to execute on the server after the FTP - * request has been performed. - * - * - * - * - * - * CURLOPT_PROXYHEADER - * - * An array of custom HTTP headers to pass to proxies. - * - * - * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * - * CURLOPT_QUOTE - * - * An array of FTP commands to execute on the server prior to the FTP - * request. - * - * - * - * - * - * CURLOPT_RESOLVE - * - * Provide a custom address for a specific host and port pair. An array - * of hostname, port, and IP address strings, each element separated by - * a colon. In the format: - * - * array("example.com:80:127.0.0.1") - * - * - * - * Added in cURL 7.21.3. - * - * - * - * - * - * - * value should be a stream resource (using - * fopen, for example) for the following values of the - * option parameter: - * - * - * - * - * Option - * Set value to - * - * - * - * - * CURLOPT_FILE - * - * The file that the transfer should be written to. The default - * is STDOUT (the browser window). - * - * - * - * CURLOPT_INFILE - * - * The file that the transfer should be read from when uploading. - * - * - * - * CURLOPT_STDERR - * - * An alternative location to output errors to instead of - * STDERR. - * - * - * - * CURLOPT_WRITEHEADER - * - * The file that the header part of the transfer is written to. - * - * - * - * - * - * - * value should be the name of a valid function or a Closure - * for the following values of the option parameter: - * - * - * - * - * Option - * Set value to - * Notes - * - * - * - * - * CURLOPT_HEADERFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, the second is a - * string with the header data to be written. The header data must - * be written by this callback. Return the number of - * bytes written. - * - * - * - * - * CURLOPT_PASSWDFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * string containing a password prompt, and the third is the maximum - * password length. Return the string containing the password. - * - * Removed as of PHP 7.3.0. - * - * - * CURLOPT_PROGRESSFUNCTION - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * - * - * - * - * CURLOPT_READFUNCTION - * - * A callback accepting three parameters. - * The first is the cURL resource, the second is a - * stream resource provided to cURL through the option - * CURLOPT_INFILE, and the third is the maximum - * amount of data to be read. The callback must return a string - * with a length equal or smaller than the amount of data requested, - * typically by reading it from the passed stream resource. It should - * return an empty string to signal EOF. - * - * - * - * - * CURLOPT_WRITEFUNCTION - * - * A callback accepting two parameters. - * The first is the cURL resource, and the second is a - * string with the data to be written. The data must be saved by - * this callback. It must return the exact number of bytes written - * or the transfer will be aborted with an error. - * - * - * - * - * CURLOPT_XFERINFOFUNCTION - * - * A callback accepting two parameters. - * Has a similar purpose as CURLOPT_PROGRESSFUNCTION but is more modern - * and the preferred option from cURL. - * - * - * Added in 7.32.0. Available as of PHP 8.2.0. - * - * - * - * - * - * - * A callback accepting five parameters. - * The first is the cURL resource, the second is the total number of - * bytes expected to be downloaded in this transfer, the third is - * the number of bytes downloaded so far, the fourth is the total - * number of bytes expected to be uploaded in this transfer, and the - * fifth is the number of bytes uploaded so far. - * - * The callback is only called when the CURLOPT_NOPROGRESS - * option is set to FALSE. - * - * Return a non-zero value to abort the transfer. In which case, the - * transfer will set a CURLE_ABORTED_BY_CALLBACK - * error. - * - * Other values: - * - * - * - * - * Option - * Set value to - * - * + * @param \CurlHandle $handle + * @return \CurlHandle + * @throws CurlException * + */ +function curl_copy_handle(\CurlHandle $handle): \CurlHandle +{ + error_clear_last(); + $safeResult = \curl_copy_handle($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param string $string + * @return string + * @throws CurlException * - * CURLOPT_SHARE + */ +function curl_escape(\CurlHandle $handle, string $string): string +{ + error_clear_last(); + $safeResult = \curl_escape($handle, $string); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @return bool|string + * @throws CurlException * - * A result of curl_share_init. Makes the cURL - * handle to use the data from the shared handle. + */ +function curl_exec(\CurlHandle $handle) +{ + error_clear_last(); + $safeResult = \curl_exec($handle); + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param \CurlHandle $handle + * @param int|null $option + * @return mixed + * @throws CurlException * + */ +function curl_getinfo(\CurlHandle $handle, ?int $option = null) +{ + error_clear_last(); + if ($option !== null) { + $safeResult = \curl_getinfo($handle, $option); + } else { + $safeResult = \curl_getinfo($handle); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError($handle); + } + return $safeResult; +} + + +/** + * @param null|string $url + * @return \CurlHandle + * @throws CurlException * + */ +function curl_init(?string $url = null): \CurlHandle +{ + error_clear_last(); + if ($url !== null) { + $safeResult = \curl_init($url); + } else { + $safeResult = \curl_init(); + } + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int|null $queued_messages + * @return array + * @throws CurlException * + */ +function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array +{ + error_clear_last(); + $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } + return $safeResult; +} + + +/** + * @return \CurlMultiHandle + * @throws CurlException * + */ +function curl_multi_init(): \CurlMultiHandle +{ + error_clear_last(); + $safeResult = \curl_multi_init(); + if ($safeResult === false) { + throw CurlException::createFromPhpError(); + } + return $safeResult; +} + + +/** + * @param \CurlMultiHandle $multi_handle + * @param int $option + * @param mixed $value + * @throws CurlException * + */ +function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void +{ + error_clear_last(); + $safeResult = \curl_multi_setopt($multi_handle, $option, $value); + if ($safeResult === false) { + throw CurlException::createFromPhpError($multi_handle); + } +} + + +/** + * @param \CurlHandle $handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -3177,11 +168,8 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void /** - * Return an integer containing the last share curl error number. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @return int Returns an integer containing the last share curl error number. + * @param \CurlShareHandle $share_handle + * @return int * @throws CurlException * */ @@ -3197,68 +185,9 @@ function curl_share_errno(\CurlShareHandle $share_handle): int /** - * Sets an option on the given cURL share handle. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. + * @param \CurlShareHandle $share_handle * @param int $option - * - * - * - * Option - * Description - * - * - * - * - * CURLSHOPT_SHARE - * - * Specifies a type of data that should be shared. - * - * - * - * CURLSHOPT_UNSHARE - * - * Specifies a type of data that will be no longer shared. - * - * - * - * - * * @param mixed $value - * - * - * - * Value - * Description - * - * - * - * - * CURL_LOCK_DATA_COOKIE - * - * Shares cookie data. - * - * - * - * CURL_LOCK_DATA_DNS - * - * Shares DNS cache. Note that when you use cURL multi handles, - * all handles added to the same multi handle will share DNS cache - * by default. - * - * - * - * CURL_LOCK_DATA_SSL_SESSION - * - * 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 within the same handle by default. - * - * - * - * - * * @throws CurlException * */ @@ -3273,12 +202,9 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): /** - * This function decodes the given URL encoded string. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The URL encoded string to be decoded. - * @return string Returns decoded string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -3294,18 +220,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string /** - * Available if built against libcurl >= 7.62.0. - * - * Some protocols have "connection upkeep" mechanisms. - * These mechanisms usually send some traffic on existing connections in order to keep them alive; - * this can prevent connections from being closed due to overzealous firewalls, for example. - * - * Connection upkeep is currently available only for HTTP/2 connections. - * A small amount of traffic is usually sent to keep a connection alive. - * HTTP/2 maintains its connection by sending a HTTP/2 PING frame. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. + * @param \CurlHandle $handle * @throws CurlException * */ diff --git a/generated/8.3/datetime.php b/generated/8.3/datetime.php index b4f26c55..3af3bb43 100644 --- a/generated/8.3/datetime.php +++ b/generated/8.3/datetime.php @@ -5,17 +5,9 @@ use Safe\Exceptions\DatetimeException; /** - * This is the procedural version of - * DateTime::__construct. - * - * Unlike the DateTime constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param null|string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTime Returns a new DateTime instance. - * Procedural style returns FALSE on failure. + * @return \DateTime * @throws DatetimeException * */ @@ -35,44 +27,9 @@ function date_create(?string $datetime = "now", ?\DateTimeZone $timezone = null) /** - * Returns associative array with detailed info about given date/time. - * - * @param string $format Documentation on how the format is used, please - * refer to the documentation of - * DateTimeImmutable::createFromFormat. The same - * rules apply. - * @param string $datetime String representing the date/time. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. An example - * below shows such a warning. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. An example - * below shows such an error. + * @param string $format + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -88,63 +45,8 @@ function date_parse_from_format(string $format, string $datetime): ?array /** - * date_parse parses the given - * datetime string according to the same rules as - * strtotime and - * DateTimeImmutable::__construct. Instead of returning a - * Unix timestamp (with strtotime) or a - * DateTimeImmutable object (with - * DateTimeImmutable::__construct), it returns an - * associative array with the information that it could detect in the given - * datetime string. - * - * If no information about a certain group of elements can be found, these - * array elements will be set to FALSE or are missing. If needed for - * constructing a timestamp or DateTimeImmutable object from - * the same datetime string, more fields can be set to - * a non-FALSE value. See the examples for cases where that happens. - * - * @param string $datetime Date/time in format accepted by - * DateTimeImmutable::__construct. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time - * on success. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * If relative time elements are present in the - * datetime string such as +3 days, - * the then returned array includes a nested array with the key - * relative. This array then contains the keys - * year, month, day, - * hour, minute, - * second, and if necessary weekday, and - * weekdays, depending on the string that was passed in. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -160,99 +62,10 @@ function date_parse(string $datetime): ?array /** - * - * - * @param int $timestamp Unix timestamp. - * @param float $latitude Latitude in degrees. - * @param float $longitude Longitude in degrees. - * @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} Returns array on success. - * 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. - * - * - * - * - * - * The values of the array elements are either UNIX timestamps, 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. + * @param int $timestamp + * @param float $latitude + * @param float $longitude + * @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} * @throws DatetimeException * */ @@ -268,84 +81,13 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array /** - * date_sunrise returns the sunrise time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunrise - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunrise_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunrise: the point where the sun becomes visible. - * - * - * 96° - * Civil twilight: conventionally used to signify the start of dawn. - * - * - * 102° - * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunrise time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not rise at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -371,84 +113,13 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ? /** - * date_sunset returns the sunset time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunset - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunset_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunset: the point where the sun becomes invisible. - * - * - * 96° - * Civil twilight: conventionally used to signify the end of dusk. - * - * - * 102° - * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunset time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not set at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -474,19 +145,9 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f /** - * Returns a string formatted according to the given format string using the - * given integer timestamp (Unix timestamp) or the current time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * @param string $format Format accepted by DateTimeInterface::format. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns a formatted date string. If a non-numeric value is used for - * timestamp, FALSE is returned and an - * E_WARNING level error is emitted. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -506,34 +167,13 @@ function date(string $format, ?int $timestamp = null): string /** - * Identical to mktime except the passed parameters represents a - * GMT date. gmmktime internally uses mktime - * so only times valid in derived local time can be used. - * - * Like mktime, arguments may be left out in order - * from right to left, with any omitted arguments being set to the - * current corresponding GMT value. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year The year - * @return int Returns a int Unix timestamp on success. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -561,23 +201,9 @@ function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $mon /** - * Behaves the same as strftime except that the - * time returned is Greenwich Mean Time (GMT). For example, when run - * in Eastern Standard Time (GMT -0500), the first line below prints - * "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 - * 01:00:00". - * - * @param string $format See description in strftime. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * On failure, FALSE is returned. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -597,118 +223,9 @@ function gmstrftime(string $format, ?int $timestamp = null): string /** - * Returns a number formatted according to the given format string using the - * given integer timestamp or the current local time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * Unlike the function date, idate - * accepts just one char in the format parameter. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format character - * Description - * - * - * - * - * B - * Swatch Beat/Internet Time - * - * - * d - * Day of the month - * - * - * h - * Hour (12 hour format) - * - * - * H - * Hour (24 hour format) - * - * - * i - * Minutes - * - * - * I (uppercase i) - * returns 1 if DST is activated, - * 0 otherwise - * - * - * L (uppercase l) - * returns 1 for leap year, - * 0 otherwise - * - * - * m - * Month number - * - * - * N - * ISO-8601 day of the week (1 for Monday - * through 7 for Sunday) - * - * - * o - * ISO-8601 year (4 digits) - * - * - * s - * Seconds - * - * - * t - * Days in current month - * - * - * U - * Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - - * this is the same as time - * - * - * w - * Day of the week (0 on Sunday) - * - * - * W - * ISO-8601 week number of year, weeks starting on - * Monday - * - * - * y - * Year (1 or 2 digits - check note below) - * - * - * Y - * Year (4 digits) - * - * - * z - * Day of the year - * - * - * Z - * Timezone offset in seconds - * - * - * - * - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return int Returns an int on success. - * - * As idate always returns an int and - * as they can't start with a "0", idate may return - * fewer digits than you would expect. See the example below. + * @param int|null $timestamp + * @return int * @throws DatetimeException * */ @@ -728,40 +245,13 @@ function idate(string $format, ?int $timestamp = null): int /** - * Returns the Unix timestamp corresponding to the arguments - * given. This timestamp is a long integer containing the number of - * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time - * specified. - * - * Any - * arguments omitted or NULL will be set to the current value according - * to the local date and time. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year 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 - * is somewhere between 1901 and 2038. - * @return int mktime returns the Unix timestamp of the arguments - * given. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -789,305 +279,9 @@ function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month /** - * Format the time and/or date according to locale settings. Month and weekday - * names and other language-dependent strings respect the current locale set - * with setlocale. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format - * Description - * Example returned values - * - * - * - * - * Day - * --- - * --- - * - * - * %a - * An abbreviated textual representation of the day - * Sun through Sat - * - * - * %A - * A full textual representation of the day - * Sunday through Saturday - * - * - * %d - * Two-digit day of the month (with leading zeros) - * 01 to 31 - * - * - * %e - * - * Day of the month, with a space preceding single digits. Not - * implemented as described on Windows. See below for more information. - * - * 1 to 31 - * - * - * %j - * Day of the year, 3 digits with leading zeros - * 001 to 366 - * - * - * %u - * ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * - * %w - * Numeric representation of the day of the week - * 0 (for Sunday) through 6 (for Saturday) - * - * - * Week - * --- - * --- - * - * - * %U - * Week number of the given year, starting with the first - * Sunday as the first week - * 13 (for the 13th full week of the year) - * - * - * %V - * ISO-8601:1988 week number of the given year, starting with - * the first week of the year with at least 4 weekdays, with Monday - * being the start of the week - * 01 through 53 (where 53 - * accounts for an overlapping week) - * - * - * %W - * A numeric representation of the week of the year, starting - * with the first Monday as the first week - * 46 (for the 46th week of the year beginning - * with a Monday) - * - * - * Month - * --- - * --- - * - * - * %b - * Abbreviated month name, based on the locale - * Jan through Dec - * - * - * %B - * Full month name, based on the locale - * January through December - * - * - * %h - * Abbreviated month name, based on the locale (an alias of %b) - * Jan through Dec - * - * - * %m - * Two digit representation of the month - * 01 (for January) through 12 (for December) - * - * - * Year - * --- - * --- - * - * - * %C - * Two digit representation of the century (year divided by 100, truncated to an integer) - * 19 for the 20th Century - * - * - * %g - * Two digit representation of the year going by ISO-8601:1988 standards (see %V) - * Example: 09 for the week of January 6, 2009 - * - * - * %G - * The full four-digit version of %g - * Example: 2008 for the week of January 3, 2009 - * - * - * %y - * Two digit representation of the year - * Example: 09 for 2009, 79 for 1979 - * - * - * %Y - * Four digit representation for the year - * Example: 2038 - * - * - * Time - * --- - * --- - * - * - * %H - * Two digit representation of the hour in 24-hour format - * 00 through 23 - * - * - * %k - * Hour in 24-hour format, with a space preceding single digits - * 0 through 23 - * - * - * %I - * Two digit representation of the hour in 12-hour format - * 01 through 12 - * - * - * %l (lower-case 'L') - * Hour in 12-hour format, with a space preceding single digits - * 1 through 12 - * - * - * %M - * Two digit representation of the minute - * 00 through 59 - * - * - * %p - * UPPER-CASE 'AM' or 'PM' based on the given time - * Example: AM for 00:31, - * PM for 22:23. The exact result depends on the - * Operating System, and they can also return lower-case variants, or - * variants with dots (such as a.m.). - * - * - * %P - * lower-case 'am' or 'pm' based on the given time - * Example: am for 00:31, - * pm for 22:23. Not supported by all Operating - * Systems. - * - * - * %r - * Same as "%I:%M:%S %p" - * Example: 09:34:17 PM for 21:34:17 - * - * - * %R - * Same as "%H:%M" - * Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM - * - * - * %S - * Two digit representation of the second - * 00 through 59 - * - * - * %T - * Same as "%H:%M:%S" - * Example: 21:34:17 for 09:34:17 PM - * - * - * %X - * Preferred time representation based on locale, without the date - * Example: 03:59:16 or 15:59:16 - * - * - * %z - * The time zone offset. Not implemented as described on - * Windows. See below for more information. - * Example: -0500 for US Eastern Time - * - * - * %Z - * The time zone abbreviation. Not implemented as described on - * Windows. See below for more information. - * Example: EST for Eastern Time - * - * - * Time and Date Stamps - * --- - * --- - * - * - * %c - * Preferred date and time stamp based on locale - * Example: Tue Feb 5 00:45:10 2009 for - * February 5, 2009 at 12:45:10 AM - * - * - * %D - * Same as "%m/%d/%y" - * Example: 02/05/09 for February 5, 2009 - * - * - * %F - * Same as "%Y-%m-%d" (commonly used in database datestamps) - * Example: 2009-02-05 for February 5, 2009 - * - * - * %s - * Unix Epoch Time timestamp (same as the time - * function) - * Example: 305815200 for September 10, 1979 08:40:00 AM - * - * - * %x - * Preferred date representation based on locale, without the time - * Example: 02/05/09 for February 5, 2009 - * - * - * Miscellaneous - * --- - * --- - * - * - * %n - * A newline character ("\n") - * --- - * - * - * %t - * A Tab character ("\t") - * --- - * - * - * %% - * A literal percentage character ("%") - * --- - * - * - * - * - * - * Windows only: - * - * The %e modifier is not supported in the Windows - * implementation of this function. To achieve this value, the - * %#d modifier can be used instead. The example below - * illustrates how to write a cross platform compatible function. - * - * The %z and %Z modifiers both - * return the time zone name instead of the offset or abbreviation. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * The function returns FALSE if format is empty, contains unsupported - * conversion specifiers, or if the length of the returned string would be greater than - * 4095. + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -1107,74 +301,9 @@ function strftime(string $format, ?int $timestamp = null): string /** - * strptime returns an array with the - * timestamp parsed. - * - * Month and weekday names and other language dependent strings respect the - * current locale set with setlocale (LC_TIME). - * - * @param string $timestamp The string to parse (e.g. returned from strftime). - * @param string $format The format used in timestamp (e.g. the same as - * used in strftime). Note that some of the format - * options available to strftime may not have any - * effect within strptime; the exact subset that are - * supported will vary based on the operating system and C library in - * use. - * - * For more information about the format options, read the - * strftime page. - * @return array Returns an array. - * - * - * The following parameters are returned in the array - * - * - * - * parameters - * Description - * - * - * - * - * "tm_sec" - * Seconds after the minute (0-61) - * - * - * "tm_min" - * Minutes after the hour (0-59) - * - * - * "tm_hour" - * Hour since midnight (0-23) - * - * - * "tm_mday" - * Day of the month (1-31) - * - * - * "tm_mon" - * Months since January (0-11) - * - * - * "tm_year" - * Years since 1900 - * - * - * "tm_wday" - * Days since Sunday (0-6) - * - * - * "tm_yday" - * Days since January 1 (0-365) - * - * - * "unparsed" - * the timestamp part which was not - * recognized using the specified format - * - * - * - * + * @param string $timestamp + * @param string $format + * @return array * @throws DatetimeException * */ @@ -1190,16 +319,9 @@ function strptime(string $timestamp, string $format): array /** - * Each parameter of this function uses the default time zone unless a - * time zone is specified in that parameter. Be careful not to use - * different time zones in each parameter unless that is intended. - * See date_default_timezone_get on the various - * ways to define the default time zone. - * - * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. - * @param int|null $baseTimestamp The timestamp which is used as a base for the calculation of relative - * dates. - * @return int Returns a timestamp on success. + * @param string $datetime + * @param int|null $baseTimestamp + * @return int * @throws DatetimeException * */ @@ -1219,23 +341,10 @@ function strtotime(string $datetime, ?int $baseTimestamp = null): int /** - * - * - * @param string $abbr Time zone abbreviation. - * @param int $utcOffset 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 Daylight saving time indicator. Defaults to -1, which means that - * whether the time zone has daylight saving or not is not taken into - * consideration when searching. If this is set to 1, then the - * utcOffset is assumed to be an offset with - * daylight saving in effect; if 0, then utcOffset - * is assumed to be an offset without daylight saving in effect. If - * abbr doesn't exist then the time zone is - * searched solely by the utcOffset and - * isDST. - * @return string Returns time zone name on success. + * @param string $abbr + * @param int $utcOffset + * @param int $isDST + * @return string * @throws DatetimeException * */ diff --git a/generated/8.3/dir.php b/generated/8.3/dir.php index 03a68274..a9c1288a 100644 --- a/generated/8.3/dir.php +++ b/generated/8.3/dir.php @@ -5,10 +5,7 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to - * directory. - * - * @param string $directory The new current directory + * @param string $directory * @throws DirException * */ @@ -23,18 +20,7 @@ function chdir(string $directory): void /** - * Changes the root directory of the current process to - * directory, and changes the current - * working directory to "/". - * - * This function is only available to GNU and BSD systems, and - * only when using the CLI, CGI or Embed SAPI. Also, this function - * requires root privileges. - * - * Calling this function does not change the values of the __DIR__ - * and __FILE__ magic constants. - * - * @param string $directory The path to change the root directory to. + * @param string $directory * @throws DirException * */ @@ -49,13 +35,9 @@ function chroot(string $directory): void /** - * A pseudo-object-oriented mechanism for reading a directory. The - * given directory is opened. - * - * @param string $directory Directory to open - * @param null|resource $context A context stream - * resource. - * @return \Directory Returns an instance of Directory, or FALSE in case of error. + * @param string $directory + * @param null|resource $context + * @return \Directory * @throws DirException * */ @@ -75,15 +57,7 @@ function dir(string $directory, $context = null): \Directory /** - * Gets the current working directory. - * - * @return non-empty-string Returns the current working directory on success. - * - * On some Unix variants, getcwd will return - * FALSE if any one of the parent directories does not have the - * readable or search mode set, even if the current directory - * does. See chmod for more information on - * modes and permissions. + * @return non-empty-string * @throws DirException * */ @@ -99,15 +73,9 @@ function getcwd(): string /** - * Opens up a directory handle to be used in subsequent - * closedir, readdir, and - * rewinddir calls. - * - * @param string $directory The directory path that is to be opened - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return resource Returns a directory handle resource on success + * @param string $directory + * @param null|resource $context + * @return resource * @throws DirException * */ @@ -127,21 +95,10 @@ function opendir(string $directory, $context = null) /** - * Returns an array of files and directories from the - * directory. - * - * @param string $directory The directory that will be scanned. - * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order By default, the sorted order is alphabetical in ascending order. If - * the optional sorting_order is set to - * SCANDIR_SORT_DESCENDING, then the sort order is - * alphabetical in descending order. If it is set to - * SCANDIR_SORT_NONE then the result is unsorted. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return list Returns an array of filenames on success. If directory is not a directory, then - * boolean FALSE is returned, and an error of level - * E_WARNING is generated. + * @param string $directory + * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order + * @param null|resource $context + * @return list * @throws DirException * */ diff --git a/generated/8.3/eio.php b/generated/8.3/eio.php index de2f742e..4fd10a55 100644 --- a/generated/8.3/eio.php +++ b/generated/8.3/eio.php @@ -5,17 +5,11 @@ use Safe\Exceptions\EioException; /** - * eio_busy artificially increases load taking - * delay seconds to execute. May be used for debugging, - * or benchmarking. - * - * @param int $delay Delay in seconds - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. - * @param callable|null $callback This callback is called when all the group requests are done. - * @param mixed $data Arbitrary variable passed to callback. - * @return resource eio_busy returns request resource on success. + * @param int $delay + * @param int $pri + * @param callable|null $callback + * @param mixed $data + * @return resource * @throws EioException * */ @@ -31,43 +25,12 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = /** - * eio_chmod changes file, or directory permissions. The - * new permissions are specified by mode. - * - * @param string $path Path to the target file or directory - * Avoid relative - * paths - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -83,43 +46,13 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * Changes file, or directory permissions. - * - * @param string $path Path to file or directory. - * Avoid relative - * paths - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chown returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -135,40 +68,11 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** - * eio_close closes file specified by - * fd. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_close returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -184,50 +88,11 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_custom executes custom function specified by - * execute processing it just like any other eio_* call. - * - * @param callable $execute Specifies the request function that should match the following prototype: - * - * - * callback is event completion callback that should match the following - * prototype: - * - * - * data is the data passed to - * execute via data argument - * without modifications - * result value returned by execute - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param callable $execute + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_custom returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -243,40 +108,12 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul /** - * eio_dup2 duplicates file descriptor. - * - * @param mixed $fd Source stream, Socket resource, or numeric file descriptor - * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param mixed $fd2 + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_dup2 returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -292,8 +129,6 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = n /** - * eio_event_loop polls libeio until all requests proceeded. - * * @throws EioException * */ @@ -308,47 +143,14 @@ function eio_event_loop(): void /** - * eio_fallocate allows the caller to directly manipulate the allocated disk space for the - * file specified by fd file descriptor for the byte - * range starting at offset and continuing for - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode Currently only one flag is supported for mode: - * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant - * FALLOC_FL_KEEP_SIZE). - * @param int $offset Specifies start of the byte range. - * @param int $length Specifies length the byte range. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fallocate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -364,41 +166,12 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** - * eio_fchmod changes permissions for the file specified - * by fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fchmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -414,42 +187,13 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callb /** - * eio_fchown changes ownership of the file specified by - * fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -465,39 +209,11 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?c /** - * eio_fdatasync synchronizes a file's in-core state with storage device. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fdatasync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -513,40 +229,11 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = nu /** - * eio_fstat returns file status information in - * result argument of callback - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -566,40 +253,11 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** - * eio_fstatvfs returns file system statistics in - * result of callback. - * - * @param mixed $fd A file descriptor of a file within the mounted file system. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fstatvfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -619,39 +277,11 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** - * Synchronize a file's in-core state with storage device - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fsync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -667,42 +297,12 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_ftruncate causes a regular file referenced by - * fd file descriptor to be truncated to precisely - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $offset Offset from beginning of the file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_ftruncate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -718,42 +318,13 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callab /** - * eio_futime changes file last access and modification - * times. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_futime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -769,35 +340,9 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** - * eio_grp creates a request group. - * * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_grp returns request group resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -813,40 +358,11 @@ function eio_grp(callable $callback, ?string $data = null) /** - * eio_lstat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_lstat returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -862,41 +378,12 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) /** - * eio_mkdir creates directory with specified access - * mode. - * - * @param string $path Path for the new directory. - * @param int $mode Access mode, e.g. 0755 - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mkdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -912,57 +399,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * eio_mknod creates ordinary or special(often) file. - * - * @param string $path Path for the new node(file). - * @param int $mode Specifies both the permissions to use and the type of node to be - * created. It should be a combination (using bitwise OR) of one of the - * file types listed below and the permissions for the new node(e.g. 0640). - * - * Possible file types are: EIO_S_IFREG(regular file), - * EIO_S_IFCHR(character file), - * EIO_S_IFBLK(block special file), - * EIO_S_IFIFO(FIFO - named pipe) and - * EIO_S_IFSOCK(UNIX domain socket). - * - * To specify permissions EIO_S_I* constants could be - * used. - * @param int $dev If the file type is EIO_S_IFCHR or - * EIO_S_IFBLK then dev specifies the major and minor - * numbers of the newly created device special file. Otherwise - * dev ignored. See mknod(2) man page for - * details. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $dev + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mknod returns request resource on success. - * @throws EioException + * @param mixed $data + * @return resource + * @throws EioException * */ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null) @@ -977,39 +421,10 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** - * eio_nop does nothing, except go through the whole - * request cycle. Could be useful in debugging. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_nop returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1025,42 +440,13 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = /** - * eio_readahead populates the page cache with data from a file so that subsequent reads from - * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $length Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_readahead returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1076,295 +462,12 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT /** - * Reads through a whole directory(via the opendir, readdir and - * closedir system calls) and returns either the names or an array in - * result argument of callback - * function, depending on the flags argument. - * - * @param string $path Directory path. - * @param int $flags Combination of EIO_READDIR_* constants. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $flags + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readdir returns request resource on success. - * Sets result argument of - * callback function according to - * flags: - * - * - * - * - * - * - * EIO_READDIR_DENTS - * (int) - * - * - * - * eio_readdir flag. If specified, the result argument of the callback - * becomes an array with the following keys: - * 'names' - array of directory names - * 'dents' - array of struct - * eio_dirent-like arrays having the following keys each: - * 'name' - the directory name; - * 'type' - one of EIO_DT_* - * constants; - * 'inode' - the inode number, if available, otherwise - * unspecified; - * - * - * - * - * - * EIO_READDIR_DIRS_FIRST - * (int) - * - * - * - * When this flag is specified, the names will be returned in an order - * where likely directories come first, in optimal stat order. - * - * - * - * - * - * EIO_READDIR_STAT_ORDER - * (int) - * - * - * - * When this flag is specified, then the names will be returned in an order - * suitable for stat'ing each one. When planning to - * stat all files in the given directory, the - * returned order will likely be - * fastest. - * - * - * - * - * - * EIO_READDIR_FOUND_UNKNOWN - * (int) - * - * - * - * - * - * - * - * - * - * - * - * Node types: - * - * - * - * - * - * EIO_DT_UNKNOWN - * (int) - * - * - * - * Unknown node type(very common). Further stat needed. - * - * - * - * - * - * EIO_DT_FIFO - * (int) - * - * - * - * FIFO node type - * - * - * - * - * - * EIO_DT_CHR - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPC - * (int) - * - * - * - * Multiplexed char device (v7+coherent) node type - * - * - * - * - * - * EIO_DT_DIR - * (int) - * - * - * - * Directory node type - * - * - * - * - * - * EIO_DT_NAM - * (int) - * - * - * - * Xenix special named file node type - * - * - * - * - * - * EIO_DT_BLK - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPB - * (int) - * - * - * - * Multiplexed block device (v7+coherent) - * - * - * - * - * - * EIO_DT_REG - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_NWK - * (int) - * - * - * - * - * - * - * - * - * EIO_DT_CMP - * (int) - * - * - * - * HP-UX network special node type - * - * - * - * - * - * EIO_DT_LNK - * (int) - * - * - * - * Link node type - * - * - * - * - * - * EIO_DT_SOCK - * (int) - * - * - * - * Socket node type - * - * - * - * - * - * EIO_DT_DOOR - * (int) - * - * - * - * Solaris door node type - * - * - * - * - * - * EIO_DT_WHT - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MAX - * (int) - * - * - * - * Highest node type value - * - * - * - * - * - * - * + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1380,39 +483,11 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?st /** - * - * - * @param string $path Source symbolic link path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readlink returns request resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1428,40 +503,12 @@ function eio_readlink(string $path, int $pri, callable $callback, ?string $data /** - * eio_rename renames or moves a file to new location. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rename returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1477,39 +524,11 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_rmdir removes a directory. - * - * @param string $path Directory path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rmdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1525,47 +544,13 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback /** - * eio_seek repositions the offset of the open file associated with - * stream, Socket resource, or file descriptor specified by fd to the argument offset according to the directive whence as follows: - * - * EIO_SEEK_SET - Set position equal to offset bytes. - * EIO_SEEK_CUR - Set position to current location plus offset. - * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $whence Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $whence + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_seek returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1581,43 +566,14 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?ca /** - * eio_sendfile copies data between one file descriptor - * and another. See SENDFILE(2) man page for details. - * - * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. - * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. - * @param int $offset Offset within the source file. - * @param int $length Number of bytes to copy. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $out_fd + * @param mixed $in_fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param string $data is custom data passed to the request. - * @return resource eio_sendfile returns request resource on success. + * @param string $data + * @return resource * @throws EioException * */ @@ -1641,41 +597,11 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = nul /** - * eio_stat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_stat returns request resource on success. On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1691,42 +617,11 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null) /** - * eio_statvfs returns file system statistics information in - * result argument of callback - * - * @param string $path Pathname of any file within the mounted file system - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_statvfs returns request resource on success. - * On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1746,41 +641,12 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** - * eio_symlink creates a symbolic link - * new_path to path. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_symlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1796,50 +662,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file - * descriptor fd with disk. - * - * @param mixed $fd File descriptor - * @param int $offset The starting byte of the file range to be synchronized - * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If - * nbytes is zero, then all bytes from offset through - * to the end of file are synchronized. - * @param int $flags A bit-mask. Can include any of the following values: - * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, - * EIO_SYNC_FILE_RANGE_WRITE, - * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have - * the same meaning as their SYNC_FILE_RANGE_* - * counterparts(see SYNC_FILE_RANGE(2) man page). - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $nbytes + * @param int $flags + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_sync_file_range returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1855,12 +685,10 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * * @param int $pri * @param callable|null $callback * @param mixed $data - * @return resource eio_sync returns request resource on success. + * @return resource * @throws EioException * */ @@ -1876,39 +704,11 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data /** - * - * - * @param mixed $fd File descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_syncfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1924,41 +724,12 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_truncate causes the regular file named by path to be truncated to - * a size of precisely length bytes - * - * @param string $path File path - * @param int $offset Offset from beginning of the file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1974,39 +745,11 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** - * eio_unlink deletes a name from the file system. - * - * @param string $path Path to file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_unlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2022,41 +765,13 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callbac /** - * - * - * @param string $path Path to the file. - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_utime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2072,44 +787,14 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ /** - * eio_write writes up to length - * bytes from str at offset - * offset from the beginning of the file. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param string $str Source string - * @param int $length Maximum number of bytes to write. - * @param int $offset Offset from the beginning of file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param string $str + * @param int $length + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_write returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ diff --git a/generated/8.3/errorfunc.php b/generated/8.3/errorfunc.php index 671fe69c..2e0c2df9 100644 --- a/generated/8.3/errorfunc.php +++ b/generated/8.3/errorfunc.php @@ -5,64 +5,10 @@ use Safe\Exceptions\ErrorfuncException; /** - * Sends an error message to the web server's error log or to a file. - * - * @param string $message The error message that should be logged. - * @param 0|1|2|3|4 $message_type Says where the error should go. The possible message types are as - * follows: - * - * - * error_log log types - * - * - * - * 0 - * - * message is sent to PHP's system logger, using - * the Operating System's system logging mechanism or a file, depending - * on what the error_log - * configuration directive is set to. This is the default option. - * - * - * - * 1 - * - * message is sent by email to the address in - * the destination parameter. This is the only - * message type where the fourth parameter, - * additional_headers is used. - * - * - * - * 2 - * - * No longer an option. - * - * - * - * 3 - * - * message is appended to the file - * destination. A newline is not automatically - * added to the end of the message string. - * - * - * - * 4 - * - * message is sent directly to the SAPI logging - * handler. - * - * - * - * - * - * @param null|string $destination The destination. Its meaning depends on the - * message_type parameter as described above. - * @param null|string $additional_headers The extra headers. It's used when the message_type - * parameter is set to 1. - * This message type uses the same internal function as - * mail does. + * @param string $message + * @param 0|1|2|3|4 $message_type + * @param null|string $destination + * @param null|string $additional_headers * @throws ErrorfuncException * */ diff --git a/generated/8.3/exec.php b/generated/8.3/exec.php index 7e35d71b..534f7a89 100644 --- a/generated/8.3/exec.php +++ b/generated/8.3/exec.php @@ -5,30 +5,10 @@ use Safe\Exceptions\ExecException; /** - * exec executes the given - * command. - * - * @param string $command The command that will be executed. - * @param array|null $output If the output argument is present, then the - * specified array will be filled with every line of output from the - * command. Trailing whitespace, such as \n, is not - * included in this array. Note that if the array already contains some - * elements, exec will append to the end of the array. - * If you do not want the function to append elements, call - * unset on the array before passing it to - * exec. - * @param int|null $result_code If the result_code argument is present - * along with the output argument, then the - * return status of the executed command will be written to this - * variable. - * @return string The last line from the result of the command. If you need to execute a - * command and have all the data from the command passed directly back without - * any interference, use the passthru function. - * - * Returns FALSE on failure. - * - * To get the output of the executed command, be sure to set and use the - * output parameter. + * @param string $command + * @param array|null $output + * @param int|null $result_code + * @return string * @throws ExecException * */ @@ -44,18 +24,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null /** - * proc_close is similar to pclose - * except that it only works on processes opened by - * proc_open. - * proc_close waits for the process to terminate, and - * returns its exit code. Open pipes to that process are closed - * when this function is called, in - * order to avoid a deadlock - the child process may not be able to exit - * while the pipes are open. - * - * @param resource $process The proc_open resource that will - * be closed. - * @return int Returns the termination status of the process that was run. + * @param resource $process + * @return int * @throws ExecException * */ @@ -71,22 +41,7 @@ function proc_close($process): int /** - * proc_nice changes the priority of the current - * process by the amount specified in priority. A - * positive priority will lower the priority of the - * current process, whereas a negative priority - * will raise the priority. - * - * proc_nice is not related to - * proc_open and its associated functions in any way. - * - * @param int $priority The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority - * whereas positive values have a lower priority. - * - * For Windows the priority parameter has the - * following meaning: + * @param int $priority * @throws ExecException * */ @@ -101,81 +56,13 @@ function proc_nice(int $priority): void /** - * proc_open is similar to popen - * but provides a much greater degree of control over the program execution. - * - * @param string $command The commandline to execute as string. Special characters have to be properly escaped, - * and proper quoting has to be applied. - * - * As of PHP 7.4.0, command may be passed as array of command parameters. - * In this case the process will be opened directly (without going through a shell) - * and PHP will take care of any necessary argument escaping. - * - * On Windows, the argument escaping of the array elements assumes that the - * command line parsing of the executed command is compatible with the parsing - * of command line arguments done by the VC runtime. - * @param array $descriptor_spec An indexed array where the key represents the descriptor number and the - * value represents how PHP will pass that descriptor to the child - * process. 0 is stdin, 1 is stdout, while 2 is stderr. - * - * Each element can be: - * - * An array describing the pipe to pass to the process. The first - * element is the descriptor type and the second element is an option for - * the given type. Valid types are pipe (the second - * element is either r to pass the read end of the pipe - * to the process, or w to pass the write end) and - * file (the second element is a filename). - * Note that anything else than w is treated like r. - * - * - * A stream resource representing a real file descriptor (e.g. opened file, - * a socket, STDIN). - * - * - * - * The file descriptor numbers are not limited to 0, 1 and 2 - you may - * specify any valid file descriptor number and it will be passed to the - * child process. This allows your script to interoperate with other - * scripts that run as "co-processes". In particular, this is useful for - * passing passphrases to programs like PGP, GPG and openssl in a more - * secure manner. It is also useful for reading status information - * provided by those programs on auxiliary file descriptors. - * @param null|resource[] $pipes Will be set to an indexed array of file pointers that correspond to - * PHP's end of any pipes that are created. - * @param null|string $cwd The initial working dir for the command. This must be an - * absolute directory path, or NULL - * if you want to use the default value (the working dir of the current - * PHP process) - * @param array|null $env_vars An array with the environment variables for the command that will be - * run, or NULL to use the same environment as the current PHP process - * @param array|null $options Allows you to specify additional options. Currently supported options - * include: - * - * - * suppress_errors (windows only): suppresses errors - * generated by this function when it's set to TRUE - * - * - * bypass_shell (windows only): bypass - * cmd.exe shell when set to TRUE - * - * - * blocking_pipes (windows only): force - * blocking pipes when set to TRUE - * - * - * create_process_group (windows only): allow the - * child process to handle CTRL events when set to TRUE - * - * - * create_new_console (windows only): the new process - * has a new console, instead of inheriting its parent's console - * - * - * @return resource Returns a resource representing the process, which should be freed using - * proc_close when you are finished with it. On failure - * returns FALSE. + * @param string $command + * @param array $descriptor_spec + * @param null|resource[] $pipes + * @param null|string $cwd + * @param array|null $env_vars + * @param array|null $options + * @return resource * @throws ExecException * */ @@ -199,10 +86,8 @@ function proc_open(string $command, array $descriptor_spec, ?array &$pipes, ?str /** - * This function is identical to the backtick operator. - * - * @param string $command The command that will be executed. - * @return null|string A string containing the output from the executed command or NULL if an error occurs or the command produces no output. + * @param string $command + * @return null|string * @throws ExecException * */ @@ -218,23 +103,9 @@ function shell_exec(string $command): ?string /** - * system is just like the C version of the - * function in that it executes the given - * command and outputs the result. - * - * The system call also tries to automatically - * flush the web server's output buffer after each line of output if - * PHP is running as a server module. - * - * If you need to execute a command and have all the data from the - * command passed directly back without any interference, use the - * passthru function. - * - * @param string $command The command that will be executed. - * @param int|null $result_code If the result_code argument is present, then the - * return status of the executed command will be written to this - * variable. - * @return string Returns the last line of the command output on success. + * @param string $command + * @param int|null $result_code + * @return string * @throws ExecException * */ diff --git a/generated/8.3/fileinfo.php b/generated/8.3/fileinfo.php index e82e617f..2e832a4e 100644 --- a/generated/8.3/fileinfo.php +++ b/generated/8.3/fileinfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\FileinfoException; /** - * This function closes the instance opened by finfo_open. - * - * @param \finfo $finfo An finfo instance, returned by finfo_open. + * @param \finfo $finfo * @throws FileinfoException * */ @@ -22,24 +20,9 @@ function finfo_close(\finfo $finfo): void /** - * Procedural style - * - * Object-oriented style (constructor): - * - * This function opens a magic database and returns its instance. - * - * @param int $flags One or disjunction of more Fileinfo - * constants. - * @param null|string $magic_database Name of a magic database file, usually something like - * /path/to/magic.mime. If not specified, the - * MAGIC environment variable is used. If the - * environment variable isn't set, then PHP's bundled magic database will - * be used. - * - * Passing NULL or an empty string will be equivalent to the default - * value. - * @return \finfo (Procedural style only) - * Returns an finfo instance on success. + * @param int $flags + * @param null|string $magic_database + * @return \finfo * @throws FileinfoException * */ @@ -59,12 +42,8 @@ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): /** - * Returns the MIME content type for a file as determined by using - * information from the magic.mime file. - * - * @param resource|string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like - * text/plain or application/octet-stream. + * @param resource|string $filename + * @return string * @throws FileinfoException * */ diff --git a/generated/8.3/filesystem.php b/generated/8.3/filesystem.php index 677241be..a3c6ea4a 100644 --- a/generated/8.3/filesystem.php +++ b/generated/8.3/filesystem.php @@ -5,14 +5,8 @@ use Safe\Exceptions\FilesystemException; /** - * Attempts to change the group of the file filename - * to group. - * - * Only the superuser may change the group of a file arbitrarily; other users - * may change the group of a file to any group of which that user is a member. - * - * @param string $filename Path to the file. - * @param int|string $group A group name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -27,35 +21,9 @@ function chgrp(string $filename, $group): void /** - * Attempts to change the mode of the specified file to that given in - * permissions. - * - * @param string $filename Path to the file. - * @param int $permissions Note that permissions is not automatically - * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix permissions with a zero (0). - * Strings such as "g+w" will not work properly. - * - * - * - * - * ]]> - * - * - * - * The permissions parameter consists of three octal - * number components specifying access restrictions for the owner, - * the user group in which the owner is in, and to everybody else in - * this order. One component can be computed by adding up the needed - * permissions for that target user base. Number 1 means that you - * grant execute rights, number 2 means that you make the file - * writeable, number 4 means that you make the file readable. Add - * up these numbers to specify needed rights. You can also read more - * about modes on Unix systems with 'man 1 chmod' - * and 'man 2 chmod'. - * - * - * + * @param string $filename + * @param int $permissions + * @throws FilesystemException * */ function chmod(string $filename, int $permissions): void @@ -69,12 +37,8 @@ function chmod(string $filename, int $permissions): void /** - * Attempts to change the owner of the file filename - * to user user. Only the superuser may change the - * owner of a file. - * - * @param string $filename Path to the file. - * @param int|string $user A user name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -89,19 +53,9 @@ function chown(string $filename, $user): void /** - * Makes a copy of the file from to - * to. - * - * If you wish to move a file, use the rename function. - * - * @param string $from Path to the source file. - * @param string $to The destination path. If to is a URL, the - * copy operation may fail if the wrapper does not support overwriting of - * existing files. - * - * If the destination file already exists, it will be overwritten. - * @param null|resource $context A valid context resource created with - * stream_context_create. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -120,16 +74,8 @@ function copy(string $from, string $to, $context = null): void /** - * Given a string containing a directory, this function will return the - * number of bytes available on the corresponding filesystem or disk - * partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * - * Given a file name instead of a directory, the behaviour of the - * function is unspecified and may differ between operating systems and - * PHP versions. - * @return float Returns the number of available bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -145,11 +91,8 @@ function disk_free_space(string $directory): float /** - * Given a string containing a directory, this function will return the total - * number of bytes on the corresponding filesystem or disk partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * @return float Returns the total number of bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -165,10 +108,7 @@ function disk_total_space(string $directory): float /** - * The file pointed to by stream is closed. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or fsockopen. + * @param resource $stream * @throws FilesystemException * */ @@ -183,15 +123,7 @@ function fclose($stream): void /** - * This function synchronizes stream contents to storage media, just like fsync does, - * but it does not synchronize file meta-data. - * Note that this function is only effectively different in POSIX systems. - * In Windows, this function is aliased to fsync. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -206,13 +138,7 @@ function fdatasync($stream): void /** - * This function forces a write of all buffered output to the resource - * pointed to by the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -227,36 +153,12 @@ function fflush($stream): void /** - * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to length bytes. On failure, - * file_get_contents will return FALSE. - * - * file_get_contents is the preferred way to read the - * contents of a file into a string. It will use memory mapping techniques if - * supported by your OS to enhance performance. - * - * @param string $filename Name of the file to read. - * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used - * to trigger include path - * search. - * This is not possible if strict typing - * is enabled, since FILE_USE_INCLUDE_PATH is an - * int. Use TRUE instead. - * @param null|resource $context A valid context resource created with - * stream_context_create. If you don't need to use a - * custom context, you can skip this parameter by NULL. - * @param int $offset The offset where the reading starts on the original stream. - * Negative offsets count from the end of the stream. - * - * Seeking (offset) is not supported with remote files. - * Attempting to seek on non-local files may work with small offsets, but this - * is unpredictable because it works on the buffered stream. - * @param 0|null|positive-int $length Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the - * stream processed by the filters. - * @return string The function returns the read data. + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @param int $offset + * @param 0|null|positive-int $length + * @return string * @throws FilesystemException * */ @@ -280,76 +182,11 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * This function is identical to calling fopen, - * fwrite and fclose successively - * to write data to a file. - * - * If filename does not exist, the file is created. - * Otherwise, the existing file is overwritten, unless the - * FILE_APPEND flag is set. - * - * @param string $filename Path to the file where to write the data. - * @param mixed $data The data to write. Can be either a string, an - * array or a stream resource. - * - * If data is a stream resource, the - * remaining buffer of that stream will be copied to the specified file. - * This is similar with using stream_copy_to_stream. - * - * You can also specify the data parameter as a single - * dimension array. This is equivalent to - * file_put_contents($filename, implode('', $array)). - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * - * Available flags - * - * - * - * Flag - * Description - * - * - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * Search for filename in the include directory. - * See include_path for more - * information. - * - * - * - * - * FILE_APPEND - * - * - * If file filename already exists, append - * the data to the file instead of overwriting it. - * - * - * - * - * LOCK_EX - * - * - * Acquire an exclusive lock on the file while proceeding to the - * writing. In other words, a flock call happens - * between the fopen call and the - * fwrite call. This is not identical to an - * fopen call with mode "x". - * - * - * - * - * - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return 0|positive-int This function returns the number of bytes that were written to the file. + * @param string $filename + * @param mixed $data + * @param int $flags + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -369,47 +206,10 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n /** - * Reads an entire file into an array. - * - * @param string $filename Path to the file. - * @param int-mask $flags The optional parameter flags can be one, or - * more, of the following constants: - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * - * Search for the file in the include_path. - * - * - * - * - * - * FILE_IGNORE_NEW_LINES - * - * - * - * Omit newline at the end of each array element - * - * - * - * - * - * FILE_SKIP_EMPTY_LINES - * - * - * - * Skip empty lines - * - * - * - * - * @param null|resource $context Search for the file in the include_path. - * @return list Returns the file in an array. Each element of the array corresponds to a - * line in the file, with the newline still attached. Upon failure, - * file returns FALSE. + * @param string $filename + * @param int-mask $flags + * @param null|resource $context + * @return list * @throws FilesystemException * */ @@ -429,11 +229,8 @@ function file(string $filename, int $flags = 0, $context = null): array /** - * Gets the last access time of the given file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last accessed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -449,11 +246,8 @@ function fileatime(string $filename): int /** - * Gets the inode change time of a file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last changed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -469,10 +263,8 @@ function filectime(string $filename): int /** - * Gets the file inode. - * - * @param string $filename Path to the file. - * @return int Returns the inode number of the file. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -488,13 +280,8 @@ function fileinode(string $filename): int /** - * This function returns the time when the data blocks of a file were being - * written to, that is, the time when the content of the file was changed. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last modified. - * The time is returned as a Unix timestamp, which is - * suitable for the date function. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -510,12 +297,8 @@ function filemtime(string $filename): int /** - * Gets the file owner. - * - * @param string $filename Path to the file. - * @return int Returns the user ID of the owner of the file. - * The user ID is returned in numerical format, use - * posix_getpwuid to resolve it to a username. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -531,24 +314,8 @@ function fileowner(string $filename): int /** - * Gets permissions for the given file. - * - * @param string $filename Path to the file. - * @return int Returns the file's permissions as a numeric mode. Lower bits of this mode - * are the same as the permissions expected by chmod, - * however on most platforms the return value will also include information on - * the type of file given as filename. The examples - * below demonstrate how to test the return value for specific permissions and - * file types on POSIX systems, including Linux and macOS. - * - * For local files, the specific return value is that of the - * st_mode member of the structure returned by the C - * library's stat function. Exactly which bits are set - * can vary from platform to platform, and looking up your specific platform's - * documentation is recommended if parsing the non-permission bits of the - * return value is required. - * - * Returns FALSE on failure. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -564,11 +331,8 @@ function fileperms(string $filename): int /** - * Gets the size for the given file. - * - * @param string $filename Path to the file. - * @return 0|positive-int Returns the size of the file in bytes, or FALSE (and generates an error - * of level E_WARNING) in case of an error. + * @param string $filename + * @return 0|positive-int * @throws FilesystemException * */ @@ -584,15 +348,8 @@ function filesize(string $filename): int /** - * Returns the type of the given file. - * - * @param string $filename Path to the file. - * @return string Returns the type of the file. Possible values are fifo, char, - * dir, block, link, file, socket and unknown. - * - * Returns FALSE if an error occurs. filetype will also - * produce an E_NOTICE message if the stat call fails - * or if the file type is unknown. + * @param string $filename + * @return string * @throws FilesystemException * */ @@ -608,44 +365,9 @@ function filetype(string $filename): string /** - * flock allows you to perform a simple reader/writer - * model which can be used on virtually every platform (including most Unix - * derivatives and even Windows). - * - * The lock is released also by fclose, - * or when stream is garbage collected. - * - * PHP supports a portable way of locking complete files in an advisory way - * (which means all accessing programs have to use the same way of locking - * or it will not work). By default, this function will block until the - * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param int-mask $operation operation is one of the following: - * - * - * - * LOCK_SH to acquire a shared lock (reader). - * - * - * - * - * LOCK_EX to acquire an exclusive lock (writer). - * - * - * - * - * LOCK_UN to release a lock (shared or exclusive). - * - * - * - * - * It is also possible to add LOCK_NB as a bitmask to one - * of the above operations, if flock should not - * block during the locking attempt. - * @param 0|1|null $would_block The optional third argument is set to 1 if the lock would block - * (EWOULDBLOCK errno condition). + * @param resource $stream + * @param int-mask $operation + * @param 0|1|null $would_block * @throws FilesystemException * */ @@ -660,201 +382,11 @@ function flock($stream, int $operation, ?int &$would_block = null): void /** - * fopen binds a named resource, specified by - * filename, to a stream. - * - * @param string $filename If filename is of the form "scheme://...", it - * is assumed to be a URL and PHP will search for a protocol handler - * (also known as a wrapper) for that scheme. If no wrappers for that - * protocol are registered, PHP will emit a notice to help you track - * potential problems in your script and then continue as though - * filename specifies a regular file. - * - * If PHP has decided that filename specifies - * a local file, then it will try to open a stream on that file. - * The file must be accessible to PHP, so you need to ensure that - * the file access permissions allow this access. - * If you have enabled - * open_basedir further - * restrictions may apply. - * - * If PHP has decided that filename specifies - * a registered protocol, and that protocol is registered as a - * network URL, PHP will check to make sure that - * allow_url_fopen is - * enabled. If it is switched off, PHP will emit a warning and - * the fopen call will fail. - * - * The list of supported protocols can be found in . Some protocols (also referred to as - * wrappers) support context - * and/or php.ini options. Refer to the specific page for the - * protocol in use for a list of options which can be set. (e.g. - * php.ini value user_agent used by the - * http wrapper). - * - * On the Windows platform, be careful to escape any backslashes - * used in the path to the file, or use forward slashes. - * - * - * - * ]]> - * - * - * @param string $mode The mode parameter specifies the type of access - * you require to the stream. It may be any of the following: - * - * - * A list of possible modes for fopen - * using mode - * - * - * - * - * mode - * Description - * - * - * - * - * 'r' - * - * Open for reading only; place the file pointer at the - * beginning of the file. - * - * - * - * 'r+' - * - * Open for reading and writing; place the file pointer at - * the beginning of the file. - * - * - * - * 'w' - * - * Open for writing only; place the file pointer at the - * beginning of the file and truncate the file to zero length. - * If the file does not exist, attempt to create it. - * - * - * - * 'w+' - * - * Open for reading and writing; otherwise it has the - * same behavior as 'w'. - * - * - * - * 'a' - * - * Open for writing only; place the file pointer at the end of - * the file. If the file does not exist, attempt to create it. - * In this mode, fseek has no effect, writes are always appended. - * - * - * - * 'a+' - * - * Open for reading and writing; place the file pointer at - * the end of the file. If the file does not exist, attempt to - * create it. In this mode, fseek only affects - * the reading position, writes are always appended. - * - * - * - * 'x' - * - * Create and open for writing only; place the file pointer at the - * beginning of the file. If the file already exists, the - * fopen call will fail by returning FALSE and - * generating an error of level E_WARNING. If - * the file does not exist, attempt to create it. This is equivalent - * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * - * 'x+' - * - * Create and open for reading and writing; otherwise it has the - * same behavior as 'x'. - * - * - * - * 'c' - * - * Open the file for writing only. If the file does not exist, it is - * created. If it exists, it is neither truncated (as opposed to - * 'w'), nor the call to this function fails (as is - * the case with 'x'). The file pointer is - * positioned on the beginning of the file. This may be useful if it's - * desired to get an advisory lock (see flock) - * before attempting to modify the file, as using - * 'w' could truncate the file before the lock - * was obtained (if truncation is desired, - * ftruncate can be used after the lock is - * requested). - * - * - * - * 'c+' - * - * Open the file for reading and writing; otherwise it has the same - * behavior as 'c'. - * - * - * - * 'e' - * - * Set close-on-exec flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conform systems. - * - * - * - * - * - * - * Different operating system families have different line-ending - * conventions. When you write a text file and want to insert a line - * break, you need to use the correct line-ending character(s) for your - * operating system. Unix based systems use \n as the - * line ending character, Windows based systems use \r\n - * as the line ending characters and Macintosh based systems (Mac OS Classic) used - * \r as the line ending character. - * - * If you use the wrong line ending characters when writing your files, you - * might find that other applications that open those files will "look - * funny". - * - * Windows offers a text-mode translation flag ('t') - * which will transparently translate \n to - * \r\n when working with the file. In contrast, you - * can also use 'b' to force binary mode, which will not - * translate your data. To use these flags, specify either - * 'b' or 't' as the last character - * of the mode parameter. - * - * The default translation mode is 'b'. - * You can use the 't' - * mode if you are working with plain-text files and you use - * \n to delimit your line endings in your script, but - * expect your files to be readable with applications such as old versions of notepad. You - * should use the 'b' in all other cases. - * - * If you specify the 't' flag when working with binary files, you - * may experience strange problems with your data, including broken image - * files and strange problems with \r\n characters. - * - * For portability, it is also strongly recommended that - * you re-write code that uses or relies upon the 't' - * mode so that it uses the correct line endings and - * 'b' mode instead. - * @param bool $use_include_path The optional third use_include_path parameter - * can be set to '1' or TRUE if you want to search for the file in the - * include_path, too. - * @param null|resource $context A context stream - * resource. - * @return resource Returns a file pointer resource on success + * @param string $filename + * @param string $mode + * @param bool $use_include_path + * @param null|resource $context + * @return resource * @throws FilesystemException * */ @@ -874,41 +406,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ /** - * fread reads up to - * length bytes from the file pointer - * referenced by stream. Reading stops as soon as one - * of the following conditions is met: - * - * - * - * length bytes have been read - * - * - * - * - * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the - * socket timeout occurs (for network streams) - * - * - * - * - * if the stream is read buffered and it does not represent a plain file, at - * most one read of up to a number of bytes equal to the chunk size (usually - * 8192) is made; depending on the previously buffered data, the size of the - * returned data may be larger than the chunk size. - * - * - * - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param positive-int $length Up to length number of bytes read. - * @return string Returns the read string. + * @param resource $stream + * @param positive-int $length + * @return string * @throws FilesystemException * */ @@ -924,16 +424,8 @@ function fread($stream, int $length): string /** - * Gathers the statistics of the file opened by the file - * pointer stream. This function is similar to the - * stat function except that it operates - * on an open file pointer instead of a filename. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @return array Returns an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * Returns FALSE on failure. + * @param resource $stream + * @return array * @throws FilesystemException * */ @@ -949,13 +441,7 @@ function fstat($stream): array /** - * This function synchronizes changes to the file, including its meta-data. This is similar to fflush, - * but it also instructs the operating system to write to the storage media. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -970,16 +456,8 @@ function fsync($stream): void /** - * Returns the position of the file pointer referenced by stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or popen. - * ftell gives undefined results for append-only streams - * (opened with "a" flag). - * @return int Returns the position of the file pointer referenced by - * stream as an integer; i.e., its offset into the file stream. - * - * If an error occurs, returns FALSE. + * @param resource $stream + * @return int * @throws FilesystemException * */ @@ -995,19 +473,8 @@ function ftell($stream): int /** - * Takes the filepointer, stream, and truncates the file to - * length, size. - * - * @param resource $stream The file pointer. - * - * The stream must be open for writing. - * @param 0|positive-int $size The size to truncate to. - * - * If size is larger than the file then the file - * is extended with null bytes. - * - * If size is smaller than the file then the file - * is truncated to that size. + * @param resource $stream + * @param 0|positive-int $size * @throws FilesystemException * */ @@ -1022,18 +489,10 @@ function ftruncate($stream, int $size): void /** - * fwrite writes the contents of - * data to the file stream pointed to by - * stream. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param string $data The string that is to be written. - * @param 0|null|positive-int $length If length is an integer, writing will stop - * after length bytes have been written or the - * end of data is reached, whichever comes first. - * @return 0|positive-int fwrite returns the number of bytes - * written. + * @param resource $stream + * @param string $data + * @param 0|null|positive-int $length + * @return 0|positive-int * @throws FilesystemException * */ @@ -1053,92 +512,9 @@ function fwrite($stream, string $data, ?int $length = null): int /** - * The glob function searches for all the pathnames - * matching pattern according to the rules used by - * the libc glob() function, which is similar to the rules used by common - * shells. - * - * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. - * - * Special characters: - * - * - * - * * - Matches zero or more characters. - * - * - * - * - * ? - Matches exactly one character (any character). - * - * - * - * - * [...] - Matches one character from a group of - * characters. If the first character is !, - * matches any character not in the group. - * - * - * - * - * \ - Escapes the following character, - * except when the GLOB_NOESCAPE flag is used. - * - * - * - * @param int $flags Valid flags: - * - * - * - * GLOB_MARK - Adds a slash (a backslash on Windows) to each directory returned - * - * - * - * - * GLOB_NOSORT - Return files as they appear in the - * directory (no sorting). When this flag is not used, the pathnames are - * sorted alphabetically - * - * - * - * - * GLOB_NOCHECK - Return the search pattern if no - * files matching it were found - * - * - * - * - * GLOB_NOESCAPE - Backslashes do not quote - * metacharacters - * - * - * - * - * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', - * or 'c' - * - * - * - * - * GLOB_ONLYDIR - Return only directory entries - * which match the pattern - * - * - * - * - * GLOB_ERR - Stop on read errors (like unreadable - * directories), by default errors are ignored. - * - * - * - * - * - * The GLOB_BRACE flag is not available on some non GNU - * systems, like Solaris or Alpine Linux. - * - * - * @return list Returns an array containing the matched files/directories, an empty array - * if no file matched. + * @param string $pattern + * @param int $flags + * @return list * @throws FilesystemException * */ @@ -1154,15 +530,8 @@ function glob(string $pattern, int $flags = 0): array /** - * Attempts to change the group of the symlink filename - * to group. - * - * Only the superuser may change the group of a symlink arbitrarily; other - * users may change the group of a symlink to any group of which that user is - * a member. - * - * @param string $filename Path to the symlink. - * @param int|string $group The group specified by name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -1177,13 +546,8 @@ function lchgrp(string $filename, $group): void /** - * Attempts to change the owner of the symlink filename - * to user user. - * - * Only the superuser may change the owner of a symlink. - * - * @param string $filename Path to the file. - * @param int|string $user User name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -1198,10 +562,8 @@ function lchown(string $filename, $user): void /** - * link creates a hard link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1216,18 +578,8 @@ function link(string $target, string $link): void /** - * Gathers the statistics of the file or symbolic link named by - * filename. - * - * @param string $filename Path to a file or a symbolic link. - * @return array See the manual page for stat for information on - * the structure of the array that lstat returns. - * This function is identical to the stat function - * except that if the filename parameter is a symbolic - * link, the status of the symbolic link is returned, not the status of the - * file pointed to by the symbolic link. - * - * On failure, FALSE is returned. + * @param string $filename + * @return array * @throws FilesystemException * */ @@ -1243,30 +595,10 @@ function lstat(string $filename): array /** - * Attempts to create the directory specified by directory. - * - * @param string $directory The directory path. - * A URL can be used as a - * filename with this function if the fopen wrappers have been enabled. - * See fopen for more details on how to specify the - * filename. See the for links to information - * about what abilities the various wrappers have, notes on their usage, - * and information on any predefined variables they may - * provide. - * @param int $permissions The permissions are 0777 by default, which means the widest possible - * access. For more information on permissions, read the details - * on the chmod page. - * - * permissions is ignored on Windows. - * - * Note that you probably want to specify the permissions as an octal number, - * which means it should have a leading zero. The permissions is also modified - * by the current umask, which you can change using - * umask. - * @param bool $recursive If TRUE, then any parent directories to the directory specified will - * also be created, with the same permissions. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param int $permissions + * @param bool $recursive + * @param null|resource $context * @throws FilesystemException * */ @@ -1285,31 +617,10 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal /** - * parse_ini_file loads in the - * ini file specified in filename, - * and returns the settings in it in an associative array. - * - * The structure of the ini file is the same as the php.ini's. - * - * @param string $filename The filename of the ini file being parsed. If a relative path is used, - * it is evaluated relative to the current working directory, then the - * include_path. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $filename + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1325,28 +636,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s /** - * parse_ini_string returns the settings in string - * ini_string in an associative array. - * - * The structure of the ini string is the same as the php.ini's. - * - * @param string $ini_string The contents of the ini file being parsed. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $ini_string + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1362,11 +655,8 @@ function parse_ini_string(string $ini_string, bool $process_sections = false, in /** - * Closes a file pointer to a pipe opened by popen. - * - * @param resource $handle The file pointer must be valid, and must have been returned by a - * successful call to popen. - * @return int Returns the termination status of the process that was run. + * @param resource $handle + * @return int * @throws FilesystemException * */ @@ -1382,28 +672,9 @@ function pclose($handle): int /** - * Opens a pipe to a process executed by forking the command given - * by command. - * - * @param string $command The command - * @param string $mode The mode. Either 'r' for reading, or 'w' - * for writing. - * - * On Windows, popen defaults to text mode, i.e. any \n - * characters written to or read from the pipe will be translated to \r\n. - * If this is not desired, binary mode can be enforced by setting mode - * to 'rb' and 'wb', respectively. - * @return resource Returns a file pointer identical to that returned by - * fopen, except that it is unidirectional (may - * only be used for reading or writing) and must be closed with - * pclose. This pointer may be used with - * fgets, fgetss, and - * fwrite. When the mode is 'r', the returned - * file pointer equals to the STDOUT of the command, when the mode - * is 'w', the returned file pointer equals to the STDIN of the - * command. - * - * If an error occurs, returns FALSE. + * @param string $command + * @param string $mode + * @return resource * @throws FilesystemException * */ @@ -1419,14 +690,10 @@ function popen(string $command, string $mode) /** - * Reads a file and writes it to the output buffer. - * - * @param string $filename The filename being read. - * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if - * you want to search for the file in the include_path, too. - * @param null|resource $context A context stream - * resource. - * @return 0|positive-int Returns the number of bytes read from the file on success + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -1446,10 +713,8 @@ function readfile(string $filename, bool $use_include_path = false, $context = n /** - * readlink does the same as the readlink C function. - * - * @param string $path The symbolic link path. - * @return string Returns the contents of the symbolic link path. + * @param string $path + * @return string * @throws FilesystemException * */ @@ -1465,27 +730,8 @@ function readlink(string $path): string /** - * realpath expands all symbolic links and - * resolves references to /./, /../ and extra / characters in - * the input path and returns the canonicalized - * absolute pathname. - * - * @param string $path The path being checked. - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * @return non-empty-string Returns the canonicalized absolute pathname on success. The resulting path - * will have no symbolic link, /./ or /../ components. Trailing delimiters, - * such as \ and /, are also removed. - * - * realpath returns FALSE on failure, e.g. if - * the file does not exist. + * @param string $path + * @return non-empty-string * @throws FilesystemException * */ @@ -1501,27 +747,9 @@ function realpath(string $path): string /** - * Attempts to rename from to - * to, moving it between directories if necessary. - * If renaming a file and to exists, - * it will be overwritten. If renaming a directory and - * to exists, - * this function will emit a warning. - * - * @param string $from The old name. - * - * The wrapper used in from - * must match the wrapper used in - * to. - * @param string $to The new name. - * - * - * On Windows, if to already exists, it must be writable. - * Otherwise rename fails and issues E_WARNING. - * - * - * @param null|resource $context A context stream - * resource. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -1540,11 +768,7 @@ function rename(string $from, string $to, $context = null): void /** - * Sets the file position indicator for stream - * to the beginning of the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file - * successfully opened by fopen. + * @param resource $stream * @throws FilesystemException * */ @@ -1559,13 +783,8 @@ function rewind($stream): void /** - * Attempts to remove the directory named by directory. - * The directory must be empty, and the relevant permissions must permit this. - * A E_WARNING level error will be generated on failure. - * - * @param string $directory Path to the directory. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param null|resource $context * @throws FilesystemException * */ @@ -1584,12 +803,8 @@ function rmdir(string $directory, $context = null): void /** - * symlink creates a symbolic link to the existing - * target with the specified name - * link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1604,14 +819,9 @@ function symlink(string $target, string $link): void /** - * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. - * If the directory does not exist or is not writable, tempnam may - * generate a file in the system's temporary directory, and return - * the full path to that file, including its name. - * - * @param string $directory The directory where the temporary filename will be created. - * @param string $prefix The prefix of the generated temporary filename. - * @return non-falsy-string Returns the new temporary filename (with path). + * @param string $directory + * @param string $prefix + * @return non-falsy-string * @throws FilesystemException * */ @@ -1627,16 +837,7 @@ function tempnam(string $directory, string $prefix): string /** - * Creates a temporary file with a unique name in read-write (w+) mode and - * returns a file handle. - * - * The file is automatically removed when closed (for example, by calling - * fclose, or when there are no remaining references to - * the file handle returned by tmpfile), or when the - * script ends. - * - * @return resource Returns a file handle, similar to the one returned by - * fopen, for the new file. + * @return resource * @throws FilesystemException * */ @@ -1652,21 +853,9 @@ function tmpfile() /** - * Attempts to set the access and modification times of the file named in the - * filename parameter to the value given in - * mtime. - * Note that the access time is always modified, regardless of the number - * of parameters. - * - * If the file does not exist, it will be created. - * - * @param string $filename The name of the file being touched. - * @param int|null $mtime The touch time. If mtime is NULL, - * the current system time is used. - * @param int|null $atime If not NULL, the access time of the given filename is set to - * the value of atime. Otherwise, it is set to - * the value passed to the mtime parameter. - * If both are NULL, the current system time is used. + * @param string $filename + * @param int|null $mtime + * @param int|null $atime * @throws FilesystemException * */ @@ -1687,16 +876,8 @@ function touch(string $filename, ?int $mtime = null, ?int $atime = null): void /** - * Deletes filename. Similar to the Unix C unlink() - * function. An E_WARNING level error will be generated on - * failure. - * - * @param string $filename Path to the file. - * - * If the file is a symlink, the symlink will be deleted. On Windows, to delete - * a symlink to a directory, rmdir has to be used instead. - * @param null|resource $context A context stream - * resource. + * @param string $filename + * @param null|resource $context * @throws FilesystemException * */ diff --git a/generated/8.3/filter.php b/generated/8.3/filter.php index bac10fe8..0f05571c 100644 --- a/generated/8.3/filter.php +++ b/generated/8.3/filter.php @@ -5,34 +5,10 @@ use Safe\Exceptions\FilterException; /** - * This function is useful for retrieving many values without - * repetitively calling filter_input. - * - * @param int $type One of INPUT_GET, INPUT_POST, - * INPUT_COOKIE, INPUT_SERVER, or - * INPUT_ENV. - * @param array|int $options 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 - * array, valid keys are filter which specifies the - * filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. - * If the input array designated by type is not populated, - * the function returns NULL if the FILTER_NULL_ON_FAILURE - * flag is not given, or FALSE otherwise. For other failures, FALSE is returned. - * - * 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. If the add_empty parameter is FALSE, no array - * element will be added for unset variables. + * @param int $type + * @param array|int $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ @@ -48,25 +24,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt /** - * This function is useful for retrieving many values without - * repetitively calling filter_var. - * - * @param array $array An array with string keys containing the data to filter. - * @param mixed $options 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 array, valid keys are filter - * which specifies the filter type, - * flags which specifies any flags that apply to the - * filter, and options which specifies any options that - * apply to the filter. See the example below for a better understanding. - * - * This parameter can be also an integer holding a filter constant. Then all values in the - * input array are filtered by this filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if - * the variable is not set. + * @param array $array + * @param mixed $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ diff --git a/generated/8.3/fpm.php b/generated/8.3/fpm.php index c25d951e..73840e0d 100644 --- a/generated/8.3/fpm.php +++ b/generated/8.3/fpm.php @@ -5,10 +5,6 @@ use Safe\Exceptions\FpmException; /** - * 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. - * * @throws FpmException * */ @@ -23,14 +19,7 @@ function fastcgi_finish_request(): void /** - * This function returns the full current FPM pool status as an associative array. It always - * returns the full status, including per-process status information. See the - * FPM status page guide for further - * details. - * - * Note that this function will only be defined if FPM is being used to serve the script. - * - * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} Associative array containing the full FPM pool status. + * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} * @throws FpmException * */ diff --git a/generated/8.3/ftp.php b/generated/8.3/ftp.php index ead4b0a7..cadf5a86 100644 --- a/generated/8.3/ftp.php +++ b/generated/8.3/ftp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to - * allocate space for a file to be uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $size The number of bytes to allocate. - * @param null|string $response A textual representation of the servers response will be returned by - * reference in response if a variable is provided. + * @param \FTP\Connection $ftp + * @param int $size + * @param null|string $response * @throws FtpException * */ @@ -26,9 +22,7 @@ function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @param string $remote_filename * @param string $local_filename * @param FTP_ASCII|FTP_BINARY $mode @@ -46,9 +40,7 @@ function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local /** - * Changes to the parent directory. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -63,10 +55,8 @@ function ftp_cdup(\FTP\Connection $ftp): void /** - * Changes the current directory to the specified one. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The target directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -81,13 +71,10 @@ function ftp_chdir(\FTP\Connection $ftp, string $directory): void /** - * Sets the permissions on the specified remote file to - * permissions. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $permissions The new permissions, given as an octal value. - * @param string $filename The remote file. - * @return int Returns the new file permissions on success. + * @param \FTP\Connection $ftp + * @param int $permissions + * @param string $filename + * @return int * @throws FtpException * */ @@ -103,10 +90,7 @@ function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): in /** - * ftp_close closes the given link identifier - * and releases the resource. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -121,18 +105,10 @@ function ftp_close(\FTP\Connection $ftp): void /** - * ftp_connect opens an FTP connection to the - * specified hostname. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -148,11 +124,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\ /** - * ftp_delete deletes the file specified by - * filename from the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The file to delete. + * @param \FTP\Connection $ftp + * @param string $filename * @throws FtpException * */ @@ -167,15 +140,11 @@ function ftp_delete(\FTP\Connection $ftp, string $filename): void /** - * ftp_fget retrieves remote_filename - * from the FTP server, and writes it to the given file pointer. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param resource $stream An open file pointer in which we store the data. - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param resource $stream + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -190,15 +159,11 @@ function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $m /** - * ftp_fput uploads the data from a file pointer - * to a remote file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param resource $stream An open file pointer on the local file. Reading stops at end of file. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param resource $stream + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -213,15 +178,11 @@ function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $m /** - * ftp_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -236,11 +197,9 @@ function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_fi /** - * Logs in to the given FTP connection. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $username The username (USER). - * @param string $password The password (PASS). + * @param \FTP\Connection $ftp + * @param string $username + * @param string $password * @throws FtpException * */ @@ -255,11 +214,9 @@ function ftp_login(\FTP\Connection $ftp, string $username, string $password): vo /** - * Creates the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The name of the directory that will be created. - * @return string Returns the newly created directory name on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return string * @throws FtpException * */ @@ -275,11 +232,9 @@ function ftp_mkdir(\FTP\Connection $ftp, string $directory): string /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. - * @return array Returns an array of arrays with file infos from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -295,20 +250,12 @@ function ftp_mlsd(\FTP\Connection $ftp, string $directory): array /** - * ftp_nb_put stores a local file on the FTP server. - * - * The difference between this function and the ftp_put - * is that this function uploads the file asynchronously, so your program can - * perform other operations while the file is being uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -324,14 +271,9 @@ function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. This parameter can also include arguments, eg. - * ftp_nlist($ftp, "-la /your/dir");. - * Note that this parameter isn't escaped so there may be some issues with - * filenames containing spaces and other characters. - * @return array Returns an array of filenames from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -347,16 +289,8 @@ function ftp_nlist(\FTP\Connection $ftp, string $directory): array /** - * ftp_pasv turns on or off passive mode. In - * passive mode, data connections are initiated by the client, - * rather than by the server. - * It may be needed if the client is behind firewall. - * - * Please note that ftp_pasv can only be called after a - * successful login or otherwise it will fail. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off. + * @param \FTP\Connection $ftp + * @param bool $enable * @throws FtpException * */ @@ -371,14 +305,11 @@ function ftp_pasv(\FTP\Connection $ftp, bool $enable): void /** - * ftp_put stores a local file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -393,10 +324,8 @@ function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_fi /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the current directory name. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ @@ -412,12 +341,9 @@ function ftp_pwd(\FTP\Connection $ftp): string /** - * ftp_rename renames a file or a directory on the FTP - * server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $from The old file/directory name. - * @param string $to The new name. + * @param \FTP\Connection $ftp + * @param string $from + * @param string $to * @throws FtpException * */ @@ -432,11 +358,8 @@ function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void /** - * Removes the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to delete. This must be either an absolute or relative - * path to an empty directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -451,16 +374,8 @@ function ftp_rmdir(\FTP\Connection $ftp, string $directory): void /** - * ftp_site sends the given SITE - * command to the FTP server. - * - * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and - * group membership. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $command The SITE command. Note that this parameter isn't escaped so there may - * be some issues with filenames containing spaces and other characters. + * @param \FTP\Connection $ftp + * @param string $command * @throws FtpException * */ @@ -475,12 +390,9 @@ function ftp_site(\FTP\Connection $ftp, string $command): void /** - * ftp_size returns the size of the given file in - * bytes. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The remote file. - * @return int Returns the file size on success. + * @param \FTP\Connection $ftp + * @param string $filename + * @return int * @throws FtpException * */ @@ -496,23 +408,10 @@ function ftp_size(\FTP\Connection $ftp, string $filename): int /** - * ftp_ssl_connect opens an explicit SSL-FTP connection to the - * specified hostname. That implies that - * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP, or its certificate is invalid. Only when - * ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail in - * the mentioned cases. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -528,10 +427,8 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \ /** - * Returns the system type identifier of the remote FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the remote system type. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ diff --git a/generated/8.3/funchand.php b/generated/8.3/funchand.php index 2c04487a..c691f7ea 100644 --- a/generated/8.3/funchand.php +++ b/generated/8.3/funchand.php @@ -5,10 +5,7 @@ use Safe\Exceptions\FunchandException; /** - * Registers the given callback to be executed when a - * tick is called. - * - * @param callable(): void $callback The function to register. + * @param callable(): void $callback * @param mixed $args * @throws FunchandException * diff --git a/generated/8.3/gettext.php b/generated/8.3/gettext.php index 5abd6cb6..b75b30d4 100644 --- a/generated/8.3/gettext.php +++ b/generated/8.3/gettext.php @@ -5,14 +5,9 @@ use Safe\Exceptions\GettextException; /** - * The bindtextdomain function sets or gets the path - * for a domain. - * - * @param string $domain The domain. - * @param string $directory The directory path. - * An empty string means the current directory. - * If NULL, the currently set directory is returned. - * @return string The full pathname for the domain currently being set. + * @param string $domain + * @param string $directory + * @return string * @throws GettextException * */ diff --git a/generated/8.3/gmp.php b/generated/8.3/gmp.php index 9017ed2c..09d70b37 100644 --- a/generated/8.3/gmp.php +++ b/generated/8.3/gmp.php @@ -5,17 +5,7 @@ use Safe\Exceptions\GmpException; /** - * - * - * @param \GMP|int|string $seed The seed to be set for the gmp_random, - * gmp_random_bits, and - * gmp_random_range functions. - * - * - * A GMP object, an integer, - * or a string that can be interpreted as a number following the same logic - * as if the string was used in gmp_init with automatic - * base detection (i.e. when base is equal to 0). + * @param \GMP|int|string $seed * */ function gmp_random_seed($seed): void diff --git a/generated/8.3/gnupg.php b/generated/8.3/gnupg.php index 83784522..0c16e88c 100644 --- a/generated/8.3/gnupg.php +++ b/generated/8.3/gnupg.php @@ -5,12 +5,9 @@ use Safe\Exceptions\GnupgException; /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -25,11 +22,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. + * @param resource $identifier + * @param string $fingerprint * @throws GnupgException * */ @@ -44,12 +38,9 @@ function gnupg_addencryptkey($identifier, string $fingerprint): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -68,10 +59,7 @@ function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -86,10 +74,7 @@ function gnupg_cleardecryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -104,10 +89,7 @@ function gnupg_clearencryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -122,12 +104,9 @@ function gnupg_clearsignkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $key The key to delete. - * @param bool $allow_secret It specifies whether to delete secret keys as well. + * @param resource $identifier + * @param string $key + * @param bool $allow_secret * @throws GnupgException * */ @@ -142,13 +121,8 @@ function gnupg_deletekey($identifier, string $key, bool $allow_secret): void /** - * Toggle the armored output. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $armor Pass a non-zero integer-value to this function to enable armored-output - * (default). - * Pass 0 to disable armored output. + * @param resource $identifier + * @param int $armor * @throws GnupgException * */ @@ -163,18 +137,8 @@ function gnupg_setarmor($identifier, int $armor): void /** - * Sets the mode for signing. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $signmode The mode for signing. - * - * signmode takes a constant indicating what type of - * signature should be produced. The possible values are - * GNUPG_SIG_MODE_NORMAL, - * GNUPG_SIG_MODE_DETACH and - * GNUPG_SIG_MODE_CLEAR. - * By default GNUPG_SIG_MODE_CLEAR is used. + * @param resource $identifier + * @param int $signmode * @throws GnupgException * */ diff --git a/generated/8.3/hash.php b/generated/8.3/hash.php index 6a62b104..b9d39c78 100644 --- a/generated/8.3/hash.php +++ b/generated/8.3/hash.php @@ -5,29 +5,12 @@ use Safe\Exceptions\HashException; /** - * - * - * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..) - * See hash_algos for a list of supported algorithms. - * - * - * Non-cryptographic hash functions are not allowed. - * - * - * - * Non-cryptographic hash functions are not allowed. - * @param string $key Input keying material (raw binary). Cannot be empty. - * @param int $length 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. - * @param string $info Application/context-specific info string. - * @param string $salt Salt to use during derivation. - * - * While optional, adding random salt significantly improves the strength of HKDF. - * @return false|non-falsy-string Returns a string containing a raw binary representation of the derived key - * (also known as output keying material - OKM). + * @param string $algo + * @param string $key + * @param int $length + * @param string $info + * @param string $salt + * @return false|non-falsy-string * */ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = "") @@ -39,11 +22,9 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "" /** - * - * - * @param \HashContext $context Hashing context returned by hash_init. - * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. - * @param \HashContext|null $stream_context Stream context as returned by stream_context_create. + * @param \HashContext $context + * @param string $filename + * @param \HashContext|null $stream_context * @throws HashException * */ diff --git a/generated/8.3/ibase.php b/generated/8.3/ibase.php index aca3c032..3eb08b46 100644 --- a/generated/8.3/ibase.php +++ b/generated/8.3/ibase.php @@ -5,10 +5,7 @@ use Safe\Exceptions\IbaseException; /** - * This function will discard a BLOB if it has not yet been closed by - * fbird_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -23,14 +20,12 @@ function fbird_blob_cancel($blob_handle): void /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the new database user. - * @param string $password The password of the new user. - * @param string $first_name The first name of the new database user. - * @param string $middle_name The middle name of the new database user. - * @param string $last_name The last name of the new database user. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -53,29 +48,12 @@ function ibase_add_user($service_handle, string $user_name, string $password, ?s /** - * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. - * @param string $dest_file The path to the backup file on the database server. - * @param int $options Additional options to pass to the database server for backup. - * The options parameter can be a combination - * of the following constants: - * IBASE_BKP_IGNORE_CHECKSUMS, - * IBASE_BKP_IGNORE_LIMBO, - * IBASE_BKP_METADATA_ONLY, - * IBASE_BKP_NO_GARBAGE_COLLECT, - * IBASE_BKP_OLD_DESCRIPTIONS, - * IBASE_BKP_NON_TRANSPORTABLE or - * IBASE_BKP_CONVERT. - * Read the section about for further information. - * @param bool $verbose Since the backup process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the backup process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_db + * @param string $dest_file + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -91,10 +69,7 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int /** - * This function will discard a BLOB if it has not yet been closed by - * ibase_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -109,13 +84,8 @@ function ibase_blob_cancel($blob_handle): void /** - * ibase_blob_create creates a new BLOB for filling with - * data. - * - * @param null|resource $link_identifier An InterBase link identifier. If omitted, the last opened link is - * assumed. - * @return resource Returns a BLOB handle for later use with - * ibase_blob_add. + * @param null|resource $link_identifier + * @return resource * @throws IbaseException * */ @@ -135,12 +105,9 @@ function ibase_blob_create($link_identifier = null) /** - * This function returns at most len bytes from a BLOB - * that has been opened for reading by ibase_blob_open. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. - * @param int $len Size of returned data. - * @return string Returns at most len bytes from the BLOB. + * @param resource $blob_handle + * @param int $len + * @return string * @throws IbaseException * */ @@ -156,14 +123,7 @@ function ibase_blob_get($blob_handle, int $len): string /** - * Closes the link to an InterBase database that's associated with - * a connection id returned from ibase_connect. - * Default transaction on link is committed, other transactions are - * rolled back. - * - * @param null|resource $connection_id An InterBase link identifier returned from - * ibase_connect. If omitted, the last opened link - * is assumed. + * @param null|resource $connection_id * @throws IbaseException * */ @@ -182,15 +142,7 @@ function ibase_close($connection_id = null): void /** - * Commits a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -209,13 +161,7 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** - * Commits a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -234,35 +180,15 @@ function ibase_commit($link_or_trans_identifier = null): void /** - * Establishes a connection to an Firebird/InterBase server. - * - * In case a second call is made to ibase_connect with - * the same arguments, no new link will be established, but instead, the link - * identifier of the already opened link will be returned. The link to the - * server will be closed as soon as the execution of the script ends, unless - * it's closed earlier by explicitly calling ibase_close. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' - * (TCP/IP with interbase server on custom TCP port), '//hostname/' - * (NetBEUI), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an Firebird/InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -296,10 +222,8 @@ function ibase_connect(?string $database = null, ?string $username = null, ?stri /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the user you want to delete from the database. + * @param resource $service_handle + * @param string $user_name * @throws IbaseException * */ @@ -314,11 +238,7 @@ function ibase_delete_user($service_handle, string $user_name): void /** - * This functions drops a database that was opened by either ibase_connect - * or ibase_pconnect. The database is closed and deleted from the server. - * - * @param null|resource $connection An InterBase link identifier. If omitted, the last opened link is - * assumed. + * @param null|resource $connection * @throws IbaseException * */ @@ -337,12 +257,7 @@ function ibase_drop_db($connection = null): void /** - * This function causes the registered event handler specified by - * event to be cancelled. The callback function will - * no longer be called for the events it was registered to handle. - * - * @param resource $event An event resource, created by - * ibase_set_event_handler. + * @param resource $event * @throws IbaseException * */ @@ -357,9 +272,7 @@ function ibase_free_event_handler($event): void /** - * Frees a prepared query. - * - * @param resource $query A query prepared with ibase_prepare. + * @param resource $query * @throws IbaseException * */ @@ -374,10 +287,7 @@ function ibase_free_query($query): void /** - * Frees a result set. - * - * @param resource $result_identifier A result set created by ibase_query or - * ibase_execute. + * @param resource $result_identifier * @throws IbaseException * */ @@ -392,8 +302,6 @@ function ibase_free_result($result_identifier): void /** - * - * * @param resource $service_handle * @param string $db * @param int $action @@ -412,14 +320,12 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the database user to modify. - * @param string $password The user's new password. - * @param string $first_name The user's new first name. - * @param string $middle_name The user's new middle name. - * @param string $last_name The user's new last name. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -442,11 +348,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** - * This function assigns a name to a result set. This name can be used later in - * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * - * @param resource $result An InterBase result set. - * @param string $name The name to be assigned. + * @param resource $result + * @param string $name * @throws IbaseException * */ @@ -461,42 +364,15 @@ function ibase_name_result($result, string $name): void /** - * Opens a persistent connection to an InterBase database. - * - * ibase_pconnect acts very much like - * ibase_connect with two major differences. - * - * First, when connecting, the function will first try to find a (persistent) - * link that's already opened with the same parameters. If one is found, an - * identifier for it will be returned instead of opening a new connection. - * - * Second, the connection to the InterBase server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (ibase_close will not close links - * established by ibase_pconnect). This type of link is - * therefore called 'persistent'. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' - * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. Functional only with InterBase 6 - * and up. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -530,32 +406,12 @@ function ibase_pconnect(?string $database = null, ?string $username = null, ?str /** - * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_file The absolute path on the server where the backup file is located. - * @param string $dest_db The path to create the new database on the server. You can also use database alias. - * @param int $options Additional options to pass to the database server for restore. - * The options parameter can be a combination - * of the following constants: - * IBASE_RES_DEACTIVATE_IDX, - * IBASE_RES_NO_SHADOW, - * IBASE_RES_NO_VALIDITY, - * IBASE_RES_ONE_AT_A_TIME, - * IBASE_RES_REPLACE, - * IBASE_RES_CREATE, - * IBASE_RES_USE_ALL_SPACE, - * IBASE_PRP_PAGE_BUFFERS, - * IBASE_PRP_SWEEP_INTERVAL, - * IBASE_RES_CREATE. - * Read the section about for further information. - * @param bool $verbose Since the restore process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the restore process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_file + * @param string $dest_db + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -571,15 +427,7 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in /** - * Rolls back a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -598,13 +446,7 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** - * Rolls back a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -623,13 +465,10 @@ function ibase_rollback($link_or_trans_identifier = null): void /** - * - * - * @param string $host The name or ip address of the database host. You can define the port by adding - * '/' and port number. If no port is specified, port 3050 will be used. - * @param string $dba_username The name of any valid user. - * @param string $dba_password The user's password. - * @return resource Returns a Interbase / Firebird link identifier on success. + * @param string $host + * @param string $dba_username + * @param string $dba_password + * @return resource * @throws IbaseException * */ @@ -645,9 +484,7 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa /** - * - * - * @param resource $service_handle A previously created connection to the database server. + * @param resource $service_handle * @throws IbaseException * */ diff --git a/generated/8.3/ibmDb2.php b/generated/8.3/ibmDb2.php index 3915371e..a4dcb243 100644 --- a/generated/8.3/ibmDb2.php +++ b/generated/8.3/ibmDb2.php @@ -5,44 +5,9 @@ use Safe\Exceptions\IbmDb2Exception; /** - * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. - * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value One of the following constants: - * - * - * DB2_AUTOCOMMIT_OFF - * - * - * Turns AUTOCOMMIT off. - * - * - * - * - * DB2_AUTOCOMMIT_ON - * - * - * Turns AUTOCOMMIT on. - * - * - * - * - * - * Turns AUTOCOMMIT off. - * - * Turns AUTOCOMMIT on. - * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool When 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 - * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, while a value of DB2_AUTOCOMMIT_ON indicates that - * AUTOCOMMIT is on. - * - * When db2_autocommit receives both the - * connection parameter and - * autocommit parameter, it attempts to set the - * AUTOCOMMIT state of the requested connection to the corresponding state. - * Returns TRUE on success. + * @param resource $connection + * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value + * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool * @throws IbmDb2Exception * */ @@ -62,37 +27,13 @@ function db2_autocommit($connection, $value = null) /** - * Binds a PHP variable to an SQL statement parameter in a statement resource - * returned by db2_prepare. This function gives you more - * control over the parameter type, data type, precision, and scale for the - * parameter than simply passing the variable as part of the optional input - * array to db2_execute. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared - * statement. - * @param string $variable_name A string specifying the name of the PHP variable to bind to the - * parameter specified by parameter_number. - * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the - * SQL parameter as an input parameter (DB2_PARAM_IN), - * an output parameter (DB2_PARAM_OUT), or as a - * parameter that accepts input and returns output - * (DB2_PARAM_INOUT). To avoid memory overhead, you can - * also specify DB2_PARAM_FILE to bind the PHP variable - * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) - * data. - * @param int $data_type A constant specifying the SQL data type that the PHP variable should be - * bound as: one of DB2_BINARY, - * DB2_CHAR, DB2_DOUBLE, or - * DB2_LONG . - * @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 - * output value from the stored procedure. - * @param int $scale Specifies the scale with which the variable should be bound to the - * database. + * @param resource $stmt + * @param int $parameter_number + * @param string $variable_name + * @param int $parameter_type + * @param int $data_type + * @param int $precision + * @param int $scale * @throws IbmDb2Exception * */ @@ -117,111 +58,8 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, ?in /** - * This function returns an object with read-only properties that return - * information about the DB2 database client. The following table lists - * the DB2 client properties: - * - * DB2 client properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * APPL_CODEPAGE - * int - * The application code page. - * - * - * CONN_CODEPAGE - * int - * The code page for the current connection. - * - * - * DATA_SOURCE_NAME - * string - * The data source name (DSN) used to create the current connection - * to the database. - * - * - * DRIVER_NAME - * string - * The name of the library that implements the DB2 Call - * Level Interface (CLI) specification. - * - * - * DRIVER_ODBC_VER - * string - * The version of ODBC that the DB2 client supports. This returns a - * string "MM.mm" where MM is the major version and - * mm is the minor version. The DB2 client always - * returns "03.51". - * - * - * - * DRIVER_VER - * string - * The version of the client, in the form of a string "MM.mm.uuuu" where - * MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * ODBC_SQL_CONFORMANCE - * string - * - * The level of ODBC SQL grammar supported by the client: - * - * - * MINIMUM - * - * - * Supports the minimum ODBC SQL grammar. - * - * - * - * - * CORE - * - * - * Supports the core ODBC SQL grammar. - * - * - * - * - * EXTENDED - * - * - * Supports extended ODBC SQL grammar. - * - * - * - * - * - * - * - * - * ODBC_VER - * string - * The version of ODBC that the ODBC driver manager supports. This - * returns a string "MM.mm.rrrr" where MM is the major - * version, mm is the minor version, and - * rrrr is the release. The DB2 client always returns - * "03.01.0000". - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -237,15 +75,7 @@ function db2_client_info($connection): \stdClass /** - * This function closes a DB2 client connection created with - * db2_connect and returns the corresponding - * resources to the database server. - * - * If you attempt to close a persistent DB2 client connection created with - * db2_pconnect, the close request is ignored and the - * persistent DB2 client connection remains available for the next caller. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -260,13 +90,7 @@ function db2_close($connection): void /** - * Commits an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_commit is not necessary unless AUTOCOMMIT - * has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -281,26 +105,8 @@ function db2_commit($connection): void /** - * db2_execute executes an SQL statement that was - * prepared by db2_prepare. - * - * If the SQL statement returns a result set, for example, a SELECT statement - * or a CALL to a stored procedure that returns one or more result sets, you - * can retrieve a row as an array from the stmt resource - * using db2_fetch_assoc, - * db2_fetch_both, or - * db2_fetch_array. Alternatively, you can use - * db2_fetch_row to move the result set pointer to the - * next row and fetch a column at a time from that row with - * db2_result. - * - * Refer to db2_prepare for a brief discussion of the - * advantages of using db2_prepare and - * db2_execute rather than db2_exec. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param array $parameters An array of input parameters matching any parameter markers contained - * in the prepared statement. + * @param resource $stmt + * @param array $parameters * @throws IbmDb2Exception * */ @@ -319,12 +125,7 @@ function db2_execute($stmt, ?array $parameters = null): void /** - * Frees the system and database resources that are associated with a result - * set. These resources are freed implicitly when a script finishes, but you - * can call db2_free_result to explicitly free the result - * set resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -339,12 +140,7 @@ function db2_free_result($stmt): void /** - * Frees the system and database resources that are associated with a statement - * resource. These resources are freed implicitly when a script finishes, but - * you can call db2_free_stmt to explicitly free the - * statement resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -359,152 +155,9 @@ function db2_free_stmt($stmt): void /** - * Retrieves the value of a specified option value for a statement resource - * or a connection resource. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * 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 - * that can be set during execution with db2_get_option. - * - * - * 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 - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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 - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success. + * @param resource $resource + * @param string $option + * @return string * @throws IbmDb2Exception * */ @@ -520,24 +173,7 @@ function db2_get_option($resource, string $option): string /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system - * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for - * a long period of time. - * - * @param resource $resource Specifies an active DB2 client connection. + * @param resource $resource * @throws IbmDb2Exception * */ @@ -552,13 +188,7 @@ function db2_pclose($resource): void /** - * Rolls back an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_rollback normally has no effect unless - * AUTOCOMMIT has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -573,253 +203,8 @@ function db2_rollback($connection): void /** - * This function returns an object with read-only properties that return - * information about the IBM DB2, Cloudscape, or Apache Derby database server. - * The following table lists the database server properties: - * - * Database server properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * DBMS_NAME - * string - * The name of the database server to which you are - * connected. For DB2 servers this is a combination of - * DB2 followed by the operating system on which - * the database server is running. - * - * - * DBMS_VER - * string - * The version of the database server, in the form of a string - * "MM.mm.uuuu" where MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * DB_CODEPAGE - * int - * The code page of the database to which you are connected. - * - * - * DB_NAME - * string - * The name of the database to which you are connected. - * - * - * DFT_ISOLATION - * string - * - * The default transaction isolation level supported by the - * server: - * - * - * UR - * - * - * Uncommitted read: changes are immediately visible by all - * concurrent transactions. - * - * - * - * - * CS - * - * - * Cursor stability: a row read by one transaction can be altered and - * committed by a second concurrent transaction. - * - * - * - * - * RS - * - * - * Read stability: a transaction can add or remove rows matching a - * search condition or a pending transaction. - * - * - * - * - * RR - * - * - * Repeatable read: data affected by pending transaction is not - * available to other transactions. - * - * - * - * - * NC - * - * - * No commit: any changes are visible at the end of a successful - * operation. Explicit commits and rollbacks are not allowed. - * - * - * - * - * - * - * - * - * IDENTIFIER_QUOTE_CHAR - * string - * The character used to delimit an identifier. - * - * - * INST_NAME - * string - * The instance on the database server that contains the - * database. - * - * - * ISOLATION_OPTION - * array - * An array of the isolation options supported by the - * database server. The isolation options are described in - * the DFT_ISOLATION property. - * - * - * KEYWORDS - * array - * An array of the keywords reserved by the database - * server. - * - * - * LIKE_ESCAPE_CLAUSE - * bool - * TRUE if the database server supports the - * use of % and _ wildcard - * characters. FALSE if the database server does not - * support these wildcard characters. - * - * - * MAX_COL_NAME_LEN - * int - * Maximum length of a column name supported by the database - * server, expressed in bytes. - * - * - * MAX_IDENTIFIER_LEN - * int - * Maximum length of an SQL identifier supported by the database - * server, expressed in characters. - * - * - * MAX_INDEX_SIZE - * int - * Maximum size of columns combined in an index supported by the - * database server, expressed in bytes. - * - * - * MAX_PROC_NAME_LEN - * int - * Maximum length of a procedure name supported by the database - * server, expressed in bytes. - * - * - * MAX_ROW_SIZE - * int - * Maximum length of a row in a base table supported by the - * database server, expressed in bytes. - * - * - * MAX_SCHEMA_NAME_LEN - * int - * Maximum length of a schema name supported by the database - * server, expressed in bytes. - * - * - * MAX_STATEMENT_LEN - * int - * Maximum length of an SQL statement supported by the database - * server, expressed in bytes. - * - * - * MAX_TABLE_NAME_LEN - * int - * Maximum length of a table name supported by the database - * server, expressed in bytes. - * - * - * NON_NULLABLE_COLUMNS - * bool - * TRUE if the database server supports columns that can be - * defined as NOT NULL, FALSE if the database server does not support - * columns defined as NOT NULL. - * - * - * PROCEDURES - * bool - * TRUE if the database server supports the use of the CALL - * statement to call stored procedures, FALSE if the database - * server does not support the CALL statement. - * - * - * SPECIAL_CHARS - * string - * A string containing all of the characters other than - * a-Z, 0-9, and underscore that can be used in an identifier name. - * - * - * SQL_CONFORMANCE - * string - * - * The level of conformance to the ANSI/ISO SQL-92 specification - * offered by the database server: - * - * - * ENTRY - * - * - * Entry-level SQL-92 compliance. - * - * - * - * - * FIPS127 - * - * - * FIPS-127-2 transitional compliance. - * - * - * - * - * FULL - * - * - * Full level SQL-92 compliance. - * - * - * - * - * INTERMEDIATE - * - * - * Intermediate level SQL-92 compliance. - * - * - * - * - * - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call. Returns FALSE on failure. + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -835,379 +220,9 @@ function db2_server_info($connection): \stdClass /** - * Sets options for a statement resource or a connection resource. You - * cannot set options for result set resources. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * db2_pconnect. - * @param array $options An associative array containing valid statement or connection - * options. This parameter can be used to change autocommit values, - * cursor types (scrollable or forward), and to specify the case of - * the column names (lower, upper, or natural) that will appear in a - * result set. - * - * - * autocommit - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * - * - * - * cursor - * - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * - * - * - * binmode - * - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * - * - * - * db2_attr_case - * - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * - * - * - * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * - * - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 - * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * - * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * - * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * - * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * - * - * - * trusted_password - * - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during - * execution with db2_get_option. - * - * - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @param int $type Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. + * @param resource $resource + * @param array $options + * @param int $type * @throws IbmDb2Exception * */ diff --git a/generated/8.3/iconv.php b/generated/8.3/iconv.php index c74a5ef4..0df05789 100644 --- a/generated/8.3/iconv.php +++ b/generated/8.3/iconv.php @@ -5,21 +5,8 @@ use Safe\Exceptions\IconvException; /** - * Retrieve internal configuration variables of iconv extension. - * - * @param string $type The value of the optional type can be: - * - * all - * input_encoding - * output_encoding - * internal_encoding - * - * @return mixed Returns the current value of the internal configuration variable if - * successful. - * - * If type is omitted or set to "all", - * iconv_get_encoding returns an array that - * stores all these variables. + * @param string $type + * @return mixed * @throws IconvException * */ @@ -35,53 +22,10 @@ function iconv_get_encoding(string $type = "all") /** - * Decodes a MIME header field. - * - * @param string $string The encoded header, as a string. - * @param int $mode mode determines the behaviour in the event - * iconv_mime_decode encounters a malformed - * MIME header field. You can specify any combination - * of the following bitmasks. - * - * Bitmasks acceptable to iconv_mime_decode - * - * - * - * Value - * Constant - * Description - * - * - * - * - * 1 - * ICONV_MIME_DECODE_STRICT - * - * If set, the given header is decoded in full conformance with the - * standards defined in RFC2047. - * This option is disabled by default because there are a lot of - * broken mail user agents that don't follow the specification and don't - * produce correct MIME headers. - * - * - * - * 2 - * ICONV_MIME_DECODE_CONTINUE_ON_ERROR - * - * If set, iconv_mime_decode_headers - * attempts to ignore any grammatical errors and continue to process - * a given header. - * - * - * - * - * - * @param null|string $encoding The optional encoding parameter specifies the - * character set to represent the result by. If omitted or NULL, - * iconv.internal_encoding - * will be used. - * @return string Returns a decoded MIME field on success, - * or FALSE if an error occurs during the decoding. + * @param string $string + * @param int $mode + * @param null|string $encoding + * @return string * @throws IconvException * */ @@ -101,108 +45,10 @@ function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = nu /** - * Composes and returns a string that represents a valid MIME - * header field, which looks like the following: - * - * - * - * In the above example, "Subject" is the field name and the portion that - * begins with "=?ISO-8859-1?..." is the field value. - * - * @param string $field_name The field name. - * @param string $field_value The field value. - * @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 options. - * The items supported by iconv_mime_encode are - * listed below. Note that item names are treated case-sensitive. - * - * Configuration items supported by iconv_mime_encode - * - * - * - * Item - * Type - * Description - * Default value - * Example - * - * - * - * - * scheme - * string - * - * Specifies the method to encode a field value by. The value of - * this item may be either "B" or "Q", where "B" stands for - * base64 encoding scheme and "Q" stands for - * quoted-printable encoding scheme. - * - * B - * B - * - * - * input-charset - * string - * - * Specifies the character set in which the first parameter - * field_name and the second parameter - * field_value are presented. If not given, - * iconv_mime_encode assumes those parameters - * are presented to it in the - * iconv.internal_encoding - * ini setting. - * - * - * iconv.internal_encoding - * - * ISO-8859-1 - * - * - * output-charset - * string - * - * Specifies the character set to use to compose the - * MIME header. - * - * - * iconv.internal_encoding - * - * UTF-8 - * - * - * line-length - * int - * - * Specifies the maximum length of the header lines. The resulting - * header is "folded" to a set of multiple lines in case - * the resulting header field would be longer than the value of this - * parameter, according to - * RFC2822 - Internet Message Format. - * If not given, the length will be limited to 76 characters. - * - * 76 - * 996 - * - * - * line-break-chars - * string - * - * Specifies the sequence of characters to append to each line - * as an end-of-line sign when "folding" is performed on a long header - * field. If not given, this defaults to "\r\n" - * (CR LF). Note that - * this parameter is always treated as an ASCII string regardless - * of the value of input-charset. - * - * \r\n - * \n - * - * - * - * - * @return string Returns an encoded MIME field on success, - * or FALSE if an error occurs during the encoding. + * @param string $field_name + * @param string $field_value + * @param array $options + * @return string * @throws IconvException * */ @@ -218,16 +64,8 @@ function iconv_mime_encode(string $field_name, string $field_value, array $optio /** - * Changes the value of the internal configuration variable specified by - * type to encoding. - * - * @param string $type The value of type can be any one of these: - * - * input_encoding - * output_encoding - * internal_encoding - * - * @param string $encoding The character set. + * @param string $type + * @param string $encoding * @throws IconvException * */ @@ -242,18 +80,9 @@ function iconv_set_encoding(string $type, string $encoding): void /** - * In contrast to strlen, - * iconv_strlen counts the occurrences of characters - * in the given byte sequence string on the basis of - * the specified character set, the result of which is not necessarily - * identical to the length of the string in byte. - * - * @param string $string The string. - * @param null|string $encoding If encoding parameter is omitted or NULL, - * string is assumed to be encoded in - * iconv.internal_encoding. - * @return 0|positive-int Returns the character count of string, as an integer, - * or FALSE if an error occurs during the encoding. + * @param string $string + * @param null|string $encoding + * @return 0|positive-int * @throws IconvException * */ @@ -273,28 +102,10 @@ function iconv_strlen(string $string, ?string $encoding = null): int /** - * Converts string from from_encoding - * to to_encoding. - * - * @param string $from_encoding The current encoding used to interpret string. - * @param string $to_encoding The desired encoding of the result. - * - * If the string //TRANSLIT is appended to - * to_encoding, then transliteration is activated. This - * means that when a character can't be represented in the target charset, - * it may be approximated through one or several similarly looking - * characters. If the string //IGNORE is appended, - * characters that cannot be represented in the target charset are silently - * discarded. Otherwise, E_NOTICE is generated and the function - * will return FALSE. - * - * If and how //TRANSLIT works exactly depends on the - * system's iconv() implementation (cf. ICONV_IMPL). - * Some implementations are known to ignore //TRANSLIT, - * so the conversion is likely to fail for characters which are illegal for - * the to_encoding. - * @param string $string The string to be converted. - * @return string Returns the converted string. + * @param string $from_encoding + * @param string $to_encoding + * @param string $string + * @return string * @throws IconvException * */ diff --git a/generated/8.3/image.php b/generated/8.3/image.php index b24c6519..98d9f7ec 100644 --- a/generated/8.3/image.php +++ b/generated/8.3/image.php @@ -5,64 +5,9 @@ use Safe\Exceptions\ImageException; /** - * The getimagesize function will determine the - * size of any supported given image file and return the dimensions along with - * the file type and a height/width text string to be used inside a - * normal HTML IMG tag and the - * correspondent HTTP content type. - * - * getimagesize can also return some more information - * in image_info parameter. - * - * @param string $filename This parameter specifies the file you wish to retrieve information - * about. It can reference a local file or (configuration permitting) a - * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended - * information from the image file. Currently, this will return the - * different JPG APP markers as an associative array. - * Some programs use these APP markers to embed text information in - * images. A very common one is to embed - * IPTC information in the APP13 marker. - * You can use the iptcparse function to parse the - * binary APP13 marker into something readable. - * - * The image_info only supports - * JFIF files. - * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null Returns an array with up to 7 elements. Not all image types will include - * the channels and bits elements. - * - * Index 0 and 1 contains respectively the width and the height of the image. - * - * Index 2 is one of the IMAGETYPE_XXX constants indicating - * the type of the image. - * - * Index 3 is a text string with the correct - * height="yyy" width="xxx" string that can be used - * directly in an IMG tag. - * - * mime is the correspondant MIME type of the image. - * This information can be used to deliver images with the correct HTTP - * Content-type header: - * - * getimagesize and MIME types - * - * - * ]]> - * - * - * - * channels will be 3 for RGB pictures and 4 for CMYK - * pictures. - * - * bits is the number of bits for each color. - * - * For some image types, the presence of channels and - * bits values can be a bit - * confusing. As an example, GIF always uses 3 channels - * per pixel, but the number of bits per pixel cannot be calculated for an - * animated GIF with a global color table. - * - * On failure, FALSE is returned. + * @param string $filename + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null * @throws ImageException * */ @@ -78,12 +23,9 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array /** - * Returns the extension for the given IMAGETYPE_XXX - * constant. - * - * @param int $image_type One of the IMAGETYPE_XXX constant. - * @param bool $include_dot Whether to prepend a dot to the extension or not. Default to TRUE. - * @return string A string with the extension corresponding to the given image type. + * @param int $image_type + * @param bool $include_dot + * @return string * @throws ImageException * */ @@ -99,13 +41,10 @@ function image_type_to_extension(int $image_type, bool $include_dot = true): str /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array|null $clip Array with keys "x", "y", "width" and "height"; or NULL. - * @return \GdImage Return affined image object on success. + * @param \GdImage $image + * @param array $affine + * @param array|null $clip + * @return \GdImage * @throws ImageException * */ @@ -125,16 +64,9 @@ function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdIm /** - * Returns the concatenation of two affine transformation matrices, - * what is useful if multiple transformations should be applied to the same - * image in one go. - * - * @param array $matrix1 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param array $matrix1 + * @param array $matrix2 + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -150,19 +82,9 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array /** - * Returns an affine transformation matrix. - * - * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE - * or IMG_AFFINE_SCALE, - * options has to be an array with keys x - * and y, both having float values. - * - * If type is IMG_AFFINE_ROTATE, - * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, - * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param int $type + * @param array|float $options + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -178,21 +100,8 @@ function imageaffinematrixget(int $type, $options): array /** - * imagealphablending allows for two different - * modes of drawing on truecolor images. In blending mode, the - * alpha channel component of the color supplied to all drawing function, - * such as imagesetpixel determines how much of the - * underlying color should be allowed to shine through. As a result, gd - * automatically blends the existing color at that point with the drawing color, - * and stores the result in the image. The resulting pixel is opaque. In - * non-blending mode, the drawing color is copied literally with its alpha channel - * information, replacing the destination pixel. Blending mode is not available - * when drawing on palette images. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable the blending mode or not. On true color images - * the default value is TRUE otherwise the default value is FALSE + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -207,20 +116,8 @@ function imagealphablending(\GdImage $image, bool $enable): void /** - * Activate the fast drawing antialiased methods for lines and wired polygons. - * It does not support alpha components. It works using a direct blend - * operation. It works only with truecolor images. - * - * Thickness and styled are not supported. - * - * Using antialiased primitives with transparent background color can end with - * some unexpected results. The blend method uses the background color as any - * other colors. The lack of alpha component support does not allow an alpha - * based antialiasing method. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable antialiasing or not. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -235,20 +132,14 @@ function imageantialias(\GdImage $image, bool $enable): void /** - * imagearc draws an arc of circle centered at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color * @throws ImageException * */ @@ -263,17 +154,10 @@ function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int /** - * Outputs or saves a AVIF Raster image from the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) - * to 100 (best quality, larger file). - * If -1 is provided, the default value 30 is used. - * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) - * to 10 (fast, larger file). - * If -1 is provided, the default value 6 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $speed * @throws ImageException * */ @@ -296,15 +180,9 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed /** - * Outputs or saves a BMP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the compressed arguments is - * not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @param \GdImage $image + * @param null|resource|string $file + * @param bool $compressed * @throws ImageException * */ @@ -325,21 +203,12 @@ function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void /** - * imagechar draws the first character of - * char in the image identified by - * image with its upper-left at - * x,y (top left is 0, - * 0) with the color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -354,18 +223,12 @@ function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int /** - * Draws the character char vertically at the specified - * coordinate on the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -380,19 +243,10 @@ function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, i /** - * Returns the index of the color of the pixel at the - * specified location in the image specified by image. - * - * If the image is a - * truecolor image, this function returns the RGB value of that pixel as - * integer. Use bitshifting and masking to access the distinct red, green and blue - * component values: - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of the point. - * @param int $y y-coordinate of the point. - * @return int Returns the index of the color. + * @param \GdImage $image + * @param int $x + * @param int $y + * @return int * @throws ImageException * */ @@ -408,13 +262,8 @@ function imagecolorat(\GdImage $image, int $x, int $y): int /** - * De-allocates a color previously allocated with - * imagecolorallocate or - * imagecolorallocatealpha. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color identifier. + * @param \GdImage $image + * @param int $color * @throws ImageException * */ @@ -429,11 +278,8 @@ function imagecolordeallocate(\GdImage $image, int $color): void /** - * Makes the colors of the palette version of an image more closely match the true color version. - * - * @param \GdImage $image1 A truecolor image object. - * @param \GdImage $image2 A palette image object pointing to an image that has the same - * size as image1. + * @param \GdImage $image1 + * @param \GdImage $image2 * @throws ImageException * */ @@ -448,18 +294,12 @@ function imagecolormatch(\GdImage $image1, \GdImage $image2): void /** - * This sets the specified index in the palette to the specified - * color. This is useful for creating flood-fill-like effects in - * palleted images without the overhead of performing the actual - * flood-fill. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color An index in the palette. - * @param int $red Value of red component. - * @param int $green Value of green component. - * @param int $blue Value of blue component. - * @param int $alpha Value of alpha component. + * @param \GdImage $image + * @param int $color + * @param int $red + * @param int $green + * @param int $blue + * @param int $alpha * @throws ImageException * */ @@ -474,13 +314,9 @@ function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $b /** - * Gets the color for a specified index. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color index. - * @return array{red: int, green: int, blue: int, alpha: int} Returns an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index. + * @param \GdImage $image + * @param int $color + * @return array{red: int, green: int, blue: int, alpha: int} * */ function imagecolorsforindex(\GdImage $image, int $color): array @@ -492,14 +328,10 @@ function imagecolorsforindex(\GdImage $image, int $color): array /** - * Applies a convolution matrix on the image, using the given coefficient and - * offset. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. - * @param float $divisor The divisor of the result of the convolution, used for normalization. - * @param float $offset Color offset. + * @param \GdImage $image + * @param array $matrix + * @param float $divisor + * @param float $offset * @throws ImageException * */ @@ -514,22 +346,14 @@ function imageconvolution(\GdImage $image, array $matrix, float $divisor, float /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -544,28 +368,15 @@ function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $ds /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, except for - * ignoring alpha components, while it implements alpha transparency - * for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -580,32 +391,15 @@ function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, in /** - * imagecopymergegray copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * This function is identical to imagecopymerge except - * that when merging it preserves the hue of the source by converting - * the destination pixels to gray scale before the copy operation. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The src_image will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, except for - * ignoring alpha components, while - * it implements alpha transparency for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -620,37 +414,16 @@ function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresampled copies a rectangular - * portion of one image to another image, smoothly interpolating pixel - * values so that, in particular, reducing the size of an image still - * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -665,37 +438,16 @@ function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresized copies a rectangular - * portion of one image to another image. - * dst_image is the destination image, - * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -710,20 +462,9 @@ function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, /** - * imagecreate returns an image identifier - * representing a blank image of specified size. - * - * In general, we recommend the use of - * imagecreatetruecolor instead of - * imagecreate so that image processing occurs on the - * highest quality image possible. If you want to output a palette image, then - * imagetruecolortopalette should be called immediately - * before saving the image with imagepng or - * imagegif. - * - * @param int $width The image width. - * @param int $height The image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -739,11 +480,8 @@ function imagecreate(int $width, int $height): \GdImage /** - * imagecreatefromavif returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the AVIF raster image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -759,11 +497,8 @@ function imagecreatefromavif(string $filename): \GdImage /** - * imagecreatefrombmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the BMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -779,10 +514,8 @@ function imagecreatefrombmp(string $filename): \GdImage /** - * Create a new image from GD file or URL. - * - * @param string $filename Path to the GD file. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -798,10 +531,8 @@ function imagecreatefromgd(string $filename): \GdImage /** - * Create a new image from GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -817,14 +548,12 @@ function imagecreatefromgd2(string $filename): \GdImage /** - * Create a new image from a given part of GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @param int $x x-coordinate of source point. - * @param int $y y-coordinate of source point. - * @param int $width Source width. - * @param int $height Source height. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -840,11 +569,8 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in /** - * imagecreatefromgif returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the GIF image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -860,11 +586,8 @@ function imagecreatefromgif(string $filename): \GdImage /** - * imagecreatefromjpeg returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the JPEG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -880,11 +603,8 @@ function imagecreatefromjpeg(string $filename): \GdImage /** - * imagecreatefrompng returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the PNG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -900,15 +620,8 @@ function imagecreatefrompng(string $filename): \GdImage /** - * imagecreatefromstring returns an image identifier - * representing the image obtained from the given data. - * These types will be automatically detected if your build of PHP supports - * them: JPEG, PNG, GIF, BMP, WBMP, GD2, and WEBP. - * - * @param string $data A string containing the image data. - * @return \GdImage An image object will be returned on success. FALSE is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. + * @param string $data + * @return \GdImage * @throws ImageException * */ @@ -924,11 +637,8 @@ function imagecreatefromstring(string $data): \GdImage /** - * imagecreatefromtga returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the Truevision TGA image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -944,11 +654,8 @@ function imagecreatefromtga(string $filename): \GdImage /** - * imagecreatefromwbmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WBMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -964,12 +671,8 @@ function imagecreatefromwbmp(string $filename): \GdImage /** - * imagecreatefromwebp returns an image identifier - * representing the image obtained from the given filename. - * Note that animated WebP files cannot be read. - * - * @param string $filename Path to the WebP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -985,11 +688,8 @@ function imagecreatefromwebp(string $filename): \GdImage /** - * imagecreatefromxbm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XBM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1005,11 +705,8 @@ function imagecreatefromxbm(string $filename): \GdImage /** - * imagecreatefromxpm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XPM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1025,12 +722,9 @@ function imagecreatefromxpm(string $filename): \GdImage /** - * imagecreatetruecolor returns an image object - * representing a black image of the specified size. - * - * @param int $width Image width. - * @param int $height Image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -1046,15 +740,9 @@ function imagecreatetruecolor(int $width, int $height): \GdImage /** - * Crops an image to the given rectangular area and returns the resulting image. - * The given image is not modified. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys - * x, y, width and - * height. - * @return \GdImage Return cropped image object on success. + * @param \GdImage $image + * @param array $rectangle + * @return \GdImage * @throws ImageException * */ @@ -1070,18 +758,11 @@ function imagecrop(\GdImage $image, array $rectangle): \GdImage /** - * Automatically crops an image according to the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode One of the following constants: - * @param float $threshold Same as IMG_CROP_TRANSPARENT. - * Before PHP 7.4.0, the bundled libgd fell back to IMG_CROP_SIDES, - * if the image had no transparent color. - * @param int $color Crops out a transparent background. - * @return \GdImage Returns a cropped image object on success. - * If the complete image was cropped, imagecrop returns FALSE. + * @param \GdImage $image + * @param int $mode + * @param float $threshold + * @param int $color + * @return \GdImage * @throws ImageException * */ @@ -1097,17 +778,12 @@ function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $thr /** - * This function is deprecated. Use combination of - * imagesetstyle and imageline - * instead. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1122,11 +798,7 @@ function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, in /** - * Prior to PHP 8.0.0, imagedestroy freed any memory associated - * with image image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. + * @param \GdImage $image * @throws ImageException * */ @@ -1141,15 +813,12 @@ function imagedestroy(\GdImage $image): void /** - * Draws an ellipse centered at the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1164,15 +833,10 @@ function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, /** - * Performs a flood fill starting at the given coordinate (top left is 0, 0) - * with the given color in the - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start point. - * @param int $y y-coordinate of start point. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -1187,36 +851,15 @@ function imagefill(\GdImage $image, int $x, int $y, int $color): void /** - * Draws a partial arc centered at the specified coordinate in the - * given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. - * @param int $style A bitwise OR of the following possibilities: - * - * IMG_ARC_PIE - * IMG_ARC_CHORD - * IMG_ARC_NOFILL - * IMG_ARC_EDGED - * - * IMG_ARC_PIE and IMG_ARC_CHORD are - * mutually exclusive; IMG_ARC_CHORD just - * connects the starting and ending angles with a straight line, while - * IMG_ARC_PIE produces a rounded edge. - * IMG_ARC_NOFILL indicates that the arc - * or chord should be outlined, not filled. IMG_ARC_EDGED, - * used together with IMG_ARC_NOFILL, indicates that the - * beginning and ending angles should be connected to the center - this is a - * good way to outline (rather than fill) a 'pie slice'. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color + * @param int $style * @throws ImageException * */ @@ -1231,16 +874,12 @@ function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $widt /** - * Draws an ellipse centered at the specified coordinate on the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1255,17 +894,12 @@ function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $ /** - * Creates a rectangle filled with color in the given - * image starting at point 1 and ending at point 2. - * 0, 0 is the top left corner of the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for point 1. - * @param int $y1 y-coordinate for point 1. - * @param int $x2 x-coordinate for point 2. - * @param int $y2 y-coordinate for point 2. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1280,18 +914,11 @@ function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y /** - * imagefilltoborder performs a flood fill - * whose border color is defined by border_color. - * The starting point for the fill is x, - * y (top left is 0, 0) and the region is - * filled with color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start. - * @param int $y y-coordinate of start. - * @param int $border_color The border color. A color identifier created with imagecolorallocate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $border_color + * @param int $color * @throws ImageException * */ @@ -1306,138 +933,9 @@ function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, i /** - * imagefilter applies the given filter - * filter on the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $filter filter can be one of the following: - * - * - * - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * - * - * - * - * IMG_FILTER_GRAYSCALE: Converts the image into - * grayscale by changing the red, green and blue components to their - * weighted sum using the same coefficients as the REC.601 luma (Y') - * calculation. The alpha components are retained. For palette images the - * result may differ due to palette limitations. - * - * - * - * - * IMG_FILTER_BRIGHTNESS: Changes the brightness - * of the image. Use args to set the level of - * brightness. The range for the brightness is -255 to 255. - * - * - * - * - * IMG_FILTER_CONTRAST: Changes the contrast of - * the image. Use args to set the level of - * contrast. - * - * - * - * - * IMG_FILTER_COLORIZE: Like - * IMG_FILTER_GRAYSCALE, except you can specify the - * color. Use args, arg2 and - * arg3 in the form of - * red, green, - * blue and arg4 for the - * alpha channel. The range for each color is 0 to 255. - * - * - * - * - * IMG_FILTER_EDGEDETECT: Uses edge detection to - * highlight the edges in the image. - * - * - * - * - * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * - * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using - * the Gaussian method. - * - * - * - * - * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * - * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to - * achieve a "sketchy" effect. - * - * - * - * - * IMG_FILTER_SMOOTH: Makes the image smoother. - * Use args to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use args to set the block size - * and arg2 to set the pixelation effect mode. - * - * - * - * - * IMG_FILTER_SCATTER: Applies scatter effect - * to the image, use args and - * arg2 to define the effect strength and - * additionally arg3 to only apply the - * on select pixel colors. - * - * - * + * @param \GdImage $image + * @param int $filter * @param int $args - * - * - * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * - * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * - * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * - * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * - * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * - * IMG_FILTER_SCATTER: Effect substraction level. - * This must not be higher or equal to the addition level set with - * arg2. - * - * - * * @throws ImageException * */ @@ -1456,43 +954,8 @@ function imagefilter(\GdImage $image, int $filter, int ...$args): void /** - * Flips the image image using the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * - * Constant - * Meaning - * - * - * - * - * IMG_FLIP_HORIZONTAL - * - * Flips the image horizontally. - * - * - * - * IMG_FLIP_VERTICAL - * - * Flips the image vertically. - * - * - * - * IMG_FLIP_BOTH - * - * Flips the image both horizontally and vertically. - * - * - * - * - * + * @param \GdImage $image + * @param int $mode * @throws ImageException * */ @@ -1507,83 +970,12 @@ function imageflip(\GdImage $image, int $mode): void /** - * This function calculates and returns the bounding box in pixels - * for a FreeType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be - * measured. - * @param string $font_filename The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1599,100 +991,16 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size to use in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The index of the desired color for the text, see - * imagecolorexact. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * font_filename does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * @param string $text Text to be inserted into image. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * - * - * - * - * 0 - * lower left x-coordinate - * - * - * 1 - * lower left y-coordinate - * - * - * 2 - * lower right x-coordinate - * - * - * 3 - * lower right y-coordinate - * - * - * 4 - * upper right x-coordinate - * - * - * 5 - * upper right y-coordinate - * - * - * 6 - * upper left x-coordinate - * - * - * 7 - * upper left y-coordinate - * - * - * - * - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1708,13 +1016,9 @@ function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, /** - * Applies gamma correction to the given gd image - * given an input and an output gamma. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $input_gamma The input gamma. - * @param float $output_gamma The output gamma. + * @param \GdImage $image + * @param float $input_gamma + * @param float $output_gamma * @throws ImageException * */ @@ -1729,11 +1033,8 @@ function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_ga /** - * Outputs a GD image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1752,15 +1053,10 @@ function imagegd(\GdImage $image, $file = null): void /** - * Outputs a GD2 image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $chunk_size Chunk size. - * @param int $mode Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $chunk_size + * @param int $mode * @throws ImageException * */ @@ -1783,20 +1079,8 @@ function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mod /** - * imagegif creates the GIF - * file in file from the image image. The - * image argument is the return from the - * imagecreate or imagecreatefrom* - * function. - * - * The image format will be GIF87a unless the - * image has been made transparent with - * imagecolortransparent, in which case the - * image format will be GIF89a. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1815,9 +1099,7 @@ function imagegif(\GdImage $image, $file = null): void /** - * Grabs a screenshot of the whole screen. - * - * @return \GdImage Returns an image object on success. + * @return \GdImage * @throws ImageException * */ @@ -1833,11 +1115,9 @@ function imagegrabscreen(): \GdImage /** - * Grabs a window or its client area using a windows handle (HWND property in COM instance) - * - * @param int $handle The HWND window ID. - * @param bool $client_area Include the client area of the application window. - * @return \GdImage Returns an image object on success. + * @param int $handle + * @param bool $client_area + * @return \GdImage * @throws ImageException * */ @@ -1853,15 +1133,9 @@ function imagegrabwindow(int $handle, bool $client_area = false): \GdImage /** - * imagejpeg creates a JPEG file from - * the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default (-1) uses the default IJG quality value (about 75). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -1882,57 +1156,8 @@ function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void /** - * Set the alpha blending flag to use layering effects. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $effect One of the following constants: - * - * - * IMG_EFFECT_REPLACE - * - * - * Use pixel replacement (equivalent of passing TRUE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_ALPHABLEND - * - * - * Use normal pixel blending (equivalent of passing FALSE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_NORMAL - * - * - * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * - * IMG_EFFECT_OVERLAY - * - * - * Overlay has the effect that black background pixels will remain - * black, white background pixels will remain white, but grey - * background pixels will take the colour of the foreground pixel. - * - * - * - * - * IMG_EFFECT_MULTIPLY - * - * - * Overlays with a multiply effect. - * - * - * - * + * @param \GdImage $image + * @param int $effect * @throws ImageException * */ @@ -1947,15 +1172,12 @@ function imagelayereffect(\GdImage $image, int $effect): void /** - * Draws a line between the two given points. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for first point. - * @param int $y1 y-coordinate for first point. - * @param int $x2 x-coordinate for second point. - * @param int $y2 y-coordinate for second point. - * @param int $color The line color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1970,58 +1192,8 @@ function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $col /** - * imageloadfont loads a user-defined bitmap and returns - * its identifier. - * - * @param string $filename The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * - * - * Font file format - * - * - * - * byte position - * C data type - * description - * - * - * - * - * byte 0-3 - * int - * number of characters in the font - * - * - * byte 4-7 - * int - * - * value of first character in the font (often 32 for space) - * - * - * - * byte 8-11 - * int - * pixel width of each character - * - * - * byte 12-15 - * int - * pixel height of each character - * - * - * byte 16- - * char - * - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * - * @return int Returns an GdFont instance. + * @param string $filename + * @return int * @throws ImageException * */ @@ -2037,24 +1209,10 @@ function imageloadfont(string $filename): int /** - * Outputs or saves a PNG image from the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the quality and - * filters arguments are not used. - * @param int $quality Compression level: from 0 (no compression) to 9. - * The default (-1) uses the zlib compression default. - * For more information see the zlib manual. - * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_XXX - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * The default value (-1) disables filtering. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $filters * @throws ImageException * */ @@ -2077,17 +1235,12 @@ function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters /** - * imagerectangle creates a rectangle starting at - * the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate - * 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -2102,27 +1255,10 @@ function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int /** - * imageresolution allows to set and get the resolution of - * an image in DPI (dots per inch). If the optional parameters are NULL, - * the current resolution is returned as an indexed array. If only - * resolution_x is not NULL, the horizontal and vertical resolution - * are set to this value. If none of the optional parameters are NULL, the horizontal - * and vertical resolution are set to these values, respectively. - * - * The resolution is only used as meta information when images are read from and - * written to formats supporting this kind of information (curently PNG and - * JPEG). It does not affect any drawing operations. The default resolution - * for new images is 96 DPI. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int|null $resolution_x The horizontal resolution in DPI. - * @param int|null $resolution_y The vertical resolution in DPI. - * @return mixed When used as getter, - * it returns an indexed array of the horizontal and vertical resolution on - * success. - * When used as setter, it returns - * TRUE on success. + * @param \GdImage $image + * @param int|null $resolution_x + * @param int|null $resolution_y + * @return mixed * @throws ImageException * */ @@ -2144,19 +1280,11 @@ function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resol /** - * Rotates the image image using the given - * angle in degrees. - * - * The center of rotation is the center of the image, and the rotated - * image may have different dimensions than the original image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the - * number of degrees to rotate the image anticlockwise. - * @param int $background_color Specifies the color of the uncovered zone after the rotation - * @param bool $ignore_transparent This parameter is unused. - * @return \GdImage Returns an image object for the rotated image. + * @param \GdImage $image + * @param float $angle + * @param int $background_color + * @param bool $ignore_transparent + * @return \GdImage * @throws ImageException * */ @@ -2172,16 +1300,8 @@ function imagerotate(\GdImage $image, float $angle, int $background_color, bool /** - * imagesavealpha sets the flag which determines whether to retain - * full alpha channel information (as opposed to single-color transparency) - * when saving PNG images. - * - * Alphablending has to be disabled (imagealphablending($im, false)) - * to retain the alpha-channel in the first place. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -2196,25 +1316,11 @@ function imagesavealpha(\GdImage $image, bool $enable): void /** - * imagescale scales an image using the given - * interpolation algorithm. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $width The width to scale the image to. - * @param int $height The height to scale the image to. If omitted or negative, the aspect - * ratio will be preserved. - * @param int $mode One of IMG_NEAREST_NEIGHBOUR, - * IMG_BILINEAR_FIXED, - * IMG_BICUBIC, - * IMG_BICUBIC_FIXED or anything else (will use two - * pass). - * - * - * IMG_WEIGHTED4 is not yet supported. - * - * - * @return \GdImage Return the scaled image object on success. + * @param \GdImage $image + * @param int $width + * @param int $height + * @param int $mode + * @return \GdImage * @throws ImageException * */ @@ -2230,15 +1336,8 @@ function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = I /** - * imagesetbrush sets the brush image to be - * used by all line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * colors IMG_COLOR_BRUSHED or - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $brush An image object. + * @param \GdImage $image + * @param \GdImage $brush * @throws ImageException * */ @@ -2253,15 +1352,11 @@ function imagesetbrush(\GdImage $image, \GdImage $brush): void /** - * imagesetclip sets the current clipping rectangle, i.e. - * the area beyond which no pixels will be drawn. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 * @throws ImageException * */ @@ -2276,119 +1371,8 @@ function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void /** - * Sets the interpolation method, setting an interpolation method affects the rendering - * of various functions in GD, such as the imagerotate function. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $method The interpolation method, which can be one of the following: - * - * - * - * IMG_BELL: Bell filter. - * - * - * - * - * IMG_BESSEL: Bessel filter. - * - * - * - * - * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * - * IMG_BLACKMAN: Blackman window function. - * - * - * - * - * IMG_BOX: Box blur filter. - * - * - * - * - * IMG_BSPLINE: Spline interpolation. - * - * - * - * - * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * - * IMG_GAUSSIAN: Gaussian function. - * - * - * - * - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * - * IMG_HERMITE: Hermite interpolation. - * - * - * - * - * IMG_HAMMING: Hamming filter. - * - * - * - * - * IMG_HANNING: Hanning filter. - * - * - * - * - * IMG_MITCHELL: Mitchell filter. - * - * - * - * - * IMG_POWER: Power interpolation. - * - * - * - * - * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * - * IMG_SINC: Sinc function. - * - * - * - * - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * - * IMG_WEIGHTED4: Weighting filter. - * - * - * - * - * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * @param \GdImage $image + * @param int $method * @throws ImageException * */ @@ -2403,14 +1387,10 @@ function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED /** - * imagesetpixel draws a pixel at the specified - * coordinate. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate. - * @param int $y y-coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -2425,18 +1405,8 @@ function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void /** - * imagesetstyle sets the style to be used by all - * line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * color IMG_COLOR_STYLED or lines of images with color - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * Note that style must not be an empty array. + * @param \GdImage $image + * @param array $style * @throws ImageException * */ @@ -2451,13 +1421,8 @@ function imagesetstyle(\GdImage $image, array $style): void /** - * imagesetthickness sets the thickness of the lines - * drawn when drawing rectangles, polygons, arcs etc. to - * thickness pixels. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $thickness Thickness, in pixels. + * @param \GdImage $image + * @param int $thickness * @throws ImageException * */ @@ -2472,19 +1437,8 @@ function imagesetthickness(\GdImage $image, int $thickness): void /** - * imagesettile sets the tile image to be - * used by all region filling functions (such as imagefill - * and imagefilledpolygon) when filling with the special - * color IMG_COLOR_TILED. - * - * A tile is an image used to fill an area with a repeated pattern. Any - * GD image can be used as a tile, and by setting the transparent color index of the tile - * image with imagecolortransparent, a tile allows certain parts - * of the underlying area to shine through can be created. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $tile The image object to be used as a tile. + * @param \GdImage $image + * @param \GdImage $tile * @throws ImageException * */ @@ -2499,17 +1453,12 @@ function imagesettile(\GdImage $image, \GdImage $tile): void /** - * Draws a string at the given coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the upper left corner. - * @param int $y y-coordinate of the upper left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2524,18 +1473,12 @@ function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, /** - * Draws a string vertically at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the bottom left corner. - * @param int $y y-coordinate of the bottom left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2550,11 +1493,8 @@ function imagestringup(\GdImage $image, int $font, int $x, int $y, string $strin /** - * Returns the width of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the width of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2570,11 +1510,8 @@ function imagesx(\GdImage $image): int /** - * Returns the height of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the height of the images. + * @param \GdImage $image + * @return int * @throws ImageException * */ @@ -2590,21 +1527,9 @@ function imagesy(\GdImage $image): int /** - * imagetruecolortopalette converts a truecolor image - * to a palette image. The code for this function was originally drawn from - * the Independent JPEG Group library code, which is excellent. The code - * has been modified to preserve as much alpha channel information as - * possible in the resulting palette, in addition to preserving colors as - * well as possible. This does not work as well as might be hoped. It is - * usually best to simply produce a truecolor output image instead, which - * guarantees the highest output quality. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $dither Indicates if the image should be dithered - if it is TRUE then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * @param int $num_colors Sets the maximum number of colors that should be retained in the palette. + * @param \GdImage $image + * @param bool $dither + * @param int $num_colors * @throws ImageException * */ @@ -2619,87 +1544,12 @@ function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) /** - * This function calculates and returns the bounding box in pixels - * for a TrueType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be measured. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * @return array imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and FALSE on error. - * - * - * - * - * key - * contents - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. + * @return array * @throws ImageException * */ @@ -2715,68 +1565,16 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ /** - * Writes the given text into the image using TrueType - * fonts. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $text The text string in UTF-8 encoding. - * - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings. - * - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * @return array Returns an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. + * @return array * @throws ImageException * */ @@ -2792,15 +1590,9 @@ function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y /** - * imagewbmp outputs or save a WBMP - * version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. + * @param \GdImage $image + * @param null|resource|string $file + * @param int|null $foreground_color * @throws ImageException * */ @@ -2821,13 +1613,9 @@ function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) /** - * Outputs or saves a WebP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -2848,22 +1636,9 @@ function imagewebp(\GdImage $image, $file = null, int $quality = -1): void /** - * Outputs or save an XBM version of the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. - * - * The filename (without the .xbm extension) is also - * used for the C identifiers of the XBM, whereby non - * alphanumeric characters of the current locale are substituted by - * underscores. If filename is set to NULL, - * image is used to build the C identifiers. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. All other colors are treated as - * background. + * @param \GdImage $image + * @param null|resource|string $filename + * @param int|null $foreground_color * @throws ImageException * */ @@ -2882,13 +1657,10 @@ function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): vo /** - * Embeds binary IPTC data into a JPEG image. - * - * @param string $iptc_data The data to be written. - * @param string $filename Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be - * returned as a string. Otherwise the JPEG will be printed to STDOUT. - * @return bool|string If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @param string $iptc_data + * @param string $filename + * @param int $spool + * @return bool|string * @throws ImageException * */ @@ -2904,11 +1676,8 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) /** - * Parses an IPTC block into its single tags. - * - * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the - * value. It returns FALSE on error or if no IPTC data was found. + * @param string $iptc_block + * @return array * @throws ImageException * */ diff --git a/generated/8.3/imap.php b/generated/8.3/imap.php index f020a981..f718bd4b 100644 --- a/generated/8.3/imap.php +++ b/generated/8.3/imap.php @@ -5,11 +5,8 @@ use Safe\Exceptions\ImapException; /** - * Convert an 8bit string to a quoted-printable string (according to - * RFC2045, section 6.7). - * - * @param string $string The 8bit string to convert - * @return string Returns a quoted-printable string. + * @param string $string + * @return string * @throws ImapException * */ @@ -25,19 +22,11 @@ function imap_8bit(string $string): string /** - * Appends a string message to the specified folder. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $folder The mailbox name, see imap_open for more - * information - * @param string $message The message to be append, as a string - * - * When talking to the Cyrus IMAP server, you must use "\r\n" as - * your end-of-line terminator instead of "\n" or the operation will - * fail - * @param null|string $options If provided, the options will also be written - * to the folder - * @param null|string $internal_date 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. + * @param \IMAP\Connection $imap + * @param string $folder + * @param string $message + * @param null|string $options + * @param null|string $internal_date * @throws ImapException * */ @@ -58,10 +47,8 @@ function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?s /** - * Decodes the given BASE-64 encoded string. - * - * @param string $string The encoded text - * @return string Returns the decoded message as a string. + * @param string $string + * @return string * @throws ImapException * */ @@ -77,10 +64,8 @@ function imap_base64(string $string): string /** - * Convert an 8bit string to a base64 string according to RFC2045, Section 6.8. - * - * @param string $string The 8bit string - * @return string Returns a base64 encoded string. + * @param string $string + * @return string * @throws ImapException * */ @@ -96,39 +81,10 @@ function imap_binary(string $string): string /** - * imap_body returns the body of the message, - * numbered message_num in the current - * mailbox. - * - * imap_body will only return a verbatim copy of the - * message body. To extract single parts of a multipart MIME-encoded - * message you have to use imap_fetchstructure to - * analyze its structure and imap_fetchbody to - * extract a copy of a single body component. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The optional flags are a bit mask - * with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if not already set - * - * - * - * - * FT_INTERNAL - The return string is in internal format, will - * not canonicalize to CRLF. - * - * - * - * @return string Returns the body of the specified message, as a string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -144,15 +100,10 @@ function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): st /** - * Read the structure of a specified body section of a specific message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param string $section The body section to read - * @return \stdClass Returns the information in an object. - * For a detailed description - * of the object structure and properties see - * imap_fetchstructure. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @return \stdClass * @throws ImapException * */ @@ -168,40 +119,8 @@ function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $secti /** - * Checks information about the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns 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 - * - * - * - * - * Mailbox - the mailbox name - * - * - * - * - * Nmsgs - number of messages in the mailbox - * - * - * - * - * Recent - number of recent messages in the mailbox - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -217,26 +136,10 @@ function imap_check(\IMAP\Connection $imap): \stdClass /** - * This function causes a store to delete the specified - * flag to the flags set for the - * messages in the specified sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", - * "\\Deleted", and "\\Draft" (as defined by RFC2060) - * @param int $options options are a bit mask and may contain - * the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -251,13 +154,8 @@ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $f /** - * Closes the imap stream. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags 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 + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -272,12 +170,8 @@ function imap_close(\IMAP\Connection $imap, int $flags = 0): void /** - * Creates a new mailbox specified by mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information. Names containing international characters should be - * encoded by imap_utf7_encode + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -292,11 +186,8 @@ function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void /** - * Deletes the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -311,108 +202,10 @@ function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void /** - * This function fetches mail headers for the given - * sequence and returns an overview of their - * contents. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A message sequence description. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param int $flags sequence will contain a sequence of message - * indices or UIDs, if this parameter is set to - * FT_UID. - * @return array Returns an array of objects describing one message header each. - * The object will only define a property if it exists. The possible - * properties are: - * - * - * - * subject - the messages subject - * - * - * - * - * from - who sent it - * - * - * - * - * to - recipient - * - * - * - * - * date - when was it sent - * - * - * - * - * message_id - Message-ID - * - * - * - * - * references - is a reference to this message id - * - * - * - * - * in_reply_to - is a reply to this message id - * - * - * - * - * size - size in bytes - * - * - * - * - * uid - UID the message has in the mailbox - * - * - * - * - * msgno - message sequence number in the mailbox - * - * - * - * - * recent - this message is flagged as recent - * - * - * - * - * flagged - this message is flagged - * - * - * - * - * answered - this message is flagged as answered - * - * - * - * - * deleted - this message is flagged for deletion - * - * - * - * - * seen - this message is flagged as already read - * - * - * - * - * draft - this message is flagged as being a draft - * - * - * - * - * udate - the UNIX timestamp of the arrival date - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param int $flags + * @return array * @throws ImapException * */ @@ -428,35 +221,11 @@ function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flag /** - * Fetch of a particular section of the body of the specified messages. - * Body parts are not decoded by this function. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -472,36 +241,10 @@ function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $sectio /** - * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified - * message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The possible flags are: - * - * - * - * FT_UID - The message_num - * argument is a UID - * - * - * - * - * FT_INTERNAL - The return string - * is in "internal" format, without any attempt to - * canonicalize to CRLF newlines - * - * - * - * - * FT_PREFETCHTEXT - The RFC822.TEXT - * should be pre-fetched at the same time. This avoids an - * extra RTT on an IMAP connection if a full message text is - * desired (e.g. in a "save to local file" operation) - * - * - * - * @return string Returns the header of the specified message as a text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -517,34 +260,11 @@ function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = /** - * Fetch the MIME headers of a particular section of the body of the specified messages. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns the MIME headers of a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -560,138 +280,10 @@ function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $sectio /** - * Fetches all the structured information for a given message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags This optional parameter only has a single option, - * FT_UID, which tells the function to treat the - * message_num argument as a - * UID. - * @return \stdClass Returns an object with properties listed in the table below. - * - * - * - * Returned Object for imap_fetchstructure - * - * - * - * - * type - * Primary body type - * - * - * encoding - * Body transfer encoding - * - * - * ifsubtype - * TRUE if there is a subtype string - * - * - * subtype - * MIME subtype - * - * - * ifdescription - * TRUE if there is a description string - * - * - * description - * Content description string - * - * - * ifid - * TRUE if there is an identification string - * - * - * id - * Identification string - * - * - * lines - * Number of lines - * - * - * bytes - * Number of bytes - * - * - * ifdisposition - * TRUE if there is a disposition string - * - * - * disposition - * Disposition string - * - * - * ifdparameters - * TRUE if the dparameters array exists - * - * - * dparameters - * An array of objects where each object has an - * "attribute" and a "value" - * property corresponding to the parameters on the - * Content-disposition MIME - * header. - * - * - * ifparameters - * TRUE if the parameters array exists - * - * - * parameters - * An array of objects where each object has an - * "attribute" and a "value" - * property. - * - * - * parts - * An array of objects identical in structure to the top-level - * object, each of which corresponds to a MIME body - * part. - * - * - * - * - * - * - * Primary body type (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 0textTYPETEXT - * 1multipartTYPEMULTIPART - * 2messageTYPEMESSAGE - * 3applicationTYPEAPPLICATION - * 4audioTYPEAUDIO - * 5imageTYPEIMAGE - * 6videoTYPEVIDEO - * 7modelTYPEMODEL - * 8otherTYPEOTHER - * - * - * - * - * - * Transfer encodings (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 07bitENC7BIT - * 18bitENC8BIT - * 2BinaryENCBINARY - * 3Base64ENCBASE64 - * 4Quoted-PrintableENCQUOTEDPRINTABLE - * 5otherENCOTHER - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -707,14 +299,8 @@ function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flag /** - * Purges the cache of entries of a specific type. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), - * IMAP_GC_ENV (envelope and bodies), - * IMAP_GC_TEXTS (texts). + * @param \IMAP\Connection $imap + * @param int $flags * @throws ImapException * */ @@ -729,12 +315,9 @@ function imap_gc(\IMAP\Connection $imap, int $flags): void /** - * Gets the ACL for a given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @return array * @throws ImapException * */ @@ -750,78 +333,11 @@ function imap_getacl(\IMAP\Connection $imap, string $mailbox): array /** - * Gets information on the mailboxes. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox not contains, and may not contain any - * "children" (there are no mailboxes below this one). Calling - * imap_createmailbox will not work on this mailbox. - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. This means that it may - * contain new messages since the last time it was checked. Not provided by all IMAP - * servers. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked, does not contain new - * messages. If either MARKED or UNMARKED is - * provided, you can assume the IMAP server supports this feature for this mailbox. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. - * @throws ImapException + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array + * @throws ImapException * */ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array @@ -836,77 +352,10 @@ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pa /** - * Gets information about the subscribed mailboxes. - * - * Identical to imap_getmailboxes, except that it only - * returns mailboxes that the user is subscribed to. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox has no - * "children" (there are no mailboxes below this one). - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -922,216 +371,11 @@ function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $p /** - * Gets information about the given message number by reading its headers. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $from_length Number of characters for the fetchfrom property. - * Must be greater than or equal to zero. - * @param int $subject_length Number of characters for the fetchsubject property - * Must be greater than or equal to zero. - * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * - * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * - * reply_to - an array of objects from the Reply-To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * - * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and - * host - * - * - * - * - * remail - - * - * - * - * - * date - The message date as found in its headers - * - * - * - * - * Date - Same as date - * - * - * - * - * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * - * Recent - R if recent and seen, N - * if recent and not seen, ' ' if not recent. - * - * - * - * - * Unseen - U if not seen AND not recent, ' ' if seen - * OR not seen and recent - * - * - * - * - * Flagged - F if flagged, ' ' if not flagged - * - * - * - * - * Answered - A if answered, ' ' if unanswered - * - * - * - * - * Deleted - D if deleted, ' ' if not deleted - * - * - * - * - * Draft - X if draft, ' ' if not draft - * - * - * - * - * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * - * Size - The message size - * - * - * - * - * udate - mail message date in Unix time - * - * - * - * - * fetchfrom - from line formatted to fit from_length - * characters - * - * - * - * - * fetchsubject - subject line formatted to fit - * subject_length characters - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $from_length + * @param int $subject_length + * @return \stdClass * @throws ImapException * */ @@ -1147,12 +391,8 @@ function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_len /** - * Returns headers for all messages in a mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One - * element per mail message. - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return array * @throws ImapException * */ @@ -1168,33 +408,11 @@ function imap_headers(\IMAP\Connection $imap): array /** - * Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. - * - * This function is similar to imap_listmailbox, - * but it will additionally check for the presence of the string - * content inside the mailbox data. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @param string $content + * @return array * @throws ImapException * */ @@ -1210,26 +428,10 @@ function imap_listscan(\IMAP\Connection $imap, string $reference, string $patter /** - * Gets an array of all the mailboxes that you have subscribed. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -1245,109 +447,9 @@ function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): /** - * Create a MIME message based on the given envelope - * and bodies sections. - * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", - * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", - * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. - * To set additional headers, the key "custom_headers" is supported, which expects - * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; - * only if it has a type of TYPEMULTIPART, further bodies - * are processed; these bodies constitute the bodies of the parts. - * - * - * Body Array Structure - * - * - * - * Key - * Type - * Description - * - * - * - * - * type - * int - * - * The MIME type. - * One of TYPETEXT (default), TYPEMULTIPART, - * TYPEMESSAGE, TYPEAPPLICATION, - * TYPEAUDIO, TYPEIMAGE, - * TYPEMODEL or TYPEOTHER. - * - * - * - * encoding - * int - * - * The Content-Transfer-Encoding. - * One of ENC7BIT (default), ENC8BIT, - * ENCBINARY, ENCBASE64, - * ENCQUOTEDPRINTABLE or ENCOTHER. - * - * - * - * charset - * string - * The charset parameter of the MIME type. - * - * - * type.parameters - * array - * An associative array of Content-Type parameter names and their values. - * - * - * subtype - * string - * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. - * - * - * id - * string - * The Content-ID. - * - * - * description - * string - * The Content-Description. - * - * - * disposition.type - * string - * The Content-Disposition, e.g. 'attachment'. - * - * - * disposition - * array - * An associative array of Content-Disposition parameter names and values. - * - * - * contents.data - * string - * The payload. - * - * - * lines - * int - * The size of the payload in lines. - * - * - * bytes - * int - * The size of the payload in bytes. - * - * - * md5 - * string - * The MD5 checksum of the payload. - * - * - * - * - * @return string Returns the MIME message as string. + * @param array $envelope + * @param array $bodies + * @return string * @throws ImapException * */ @@ -1363,29 +465,10 @@ function imap_mail_compose(array $envelope, array $bodies): string /** - * Copies mail messages specified by message_nums - * to specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message - * numbers (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask of one or more of - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * - * - * CP_MOVE - Delete the messages from - * the current mailbox after copying. If this flag is set, the function - * behaves identically to imap_mail_move. - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1400,25 +483,10 @@ function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $ma /** - * Moves mail messages specified by message_nums to the - * specified mailbox. - * Note that the mail messages are actually copied to the - * mailbox, and the original messages are flagged for deletion. - * That implies that the messages in mailbox are assigned new UIDs. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message numbers - * (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask and may contain the single option: - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1432,23 +500,14 @@ function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $ma } -/** - * This function allows sending of emails with correct handling of - * Cc and Bcc receivers. - * - * The parameters to, cc - * and bcc are all strings and are all parsed - * as RFC822 address lists. - * - * @param string $to The receiver - * @param string $subject The mail subject - * @param string $message The mail body, see imap_mail_compose - * @param null|string $additional_headers As string with additional headers to be set on the mail +/** + * @param string $to + * @param string $subject + * @param string $message + * @param null|string $additional_headers * @param null|string $cc - * @param null|string $bcc The receivers specified in bcc will get the - * mail, but are excluded from the headers. - * @param null|string $return_path Use this parameter to specify return path upon mail delivery failure. - * This is useful when using PHP as a mail client for multiple users. + * @param null|string $bcc + * @param null|string $return_path * @throws ImapException * */ @@ -1473,54 +532,8 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi /** - * Checks the current mailbox status on the server. It is similar to - * imap_status, but will additionally sum up the size of - * all messages in the mailbox, which will take some additional time to - * execute. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns the information in an object with following properties: - * - * Mailbox properties - * - * - * - * Date - * date of last change (current datetime) - * - * - * Driver - * driver - * - * - * Mailbox - * name of the mailbox - * - * - * Nmsgs - * number of messages - * - * - * Recent - * number of recent messages - * - * - * Unread - * number of unread messages - * - * - * Deleted - * number of deleted messages - * - * - * Size - * mailbox size - * - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -1536,18 +549,8 @@ function imap_mailboxmsginfo(\IMAP\Connection $imap): \stdClass /** - * Decodes MIME message header extensions that are non ASCII text (see RFC2047). - * - * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each - * object has two properties, charset and - * text. - * - * If the element hasn't been encoded, and in other words is in - * plain US-ASCII, the charset property of that element is - * set to default. - * - * The function returns FALSE on failure. + * @param string $string + * @return array * @throws ImapException * */ @@ -1563,10 +566,8 @@ function imap_mime_header_decode(string $string): array /** - * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * - * @param string $string A string encoded in modified UTF-7. - * @return string Returns string converted to UTF-8. + * @param string $string + * @return string * @throws ImapException * */ @@ -1582,10 +583,8 @@ function imap_mutf7_to_utf8(string $string): string /** - * Gets the number of messages in the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return int Return the number of messages in the current mailbox, as an integer. + * @param \IMAP\Connection $imap + * @return int * @throws ImapException * */ @@ -1601,206 +600,13 @@ function imap_num_msg(\IMAP\Connection $imap): int /** - * Opens an IMAP stream to a mailbox. - * - * This function can also be used to open streams to POP3 and - * NNTP servers, but some functions and features are only - * available on IMAP servers. - * - * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. - * The special name INBOX stands for the current users - * personal mailbox. Mailbox names that contain international characters - * besides those in the printable ASCII space have to be encoded with - * imap_utf7_encode. - * - * The server part, which is enclosed in '{' and '}', consists of the servers - * name or ip address, an optional port (prefixed by ':'), and an optional - * protocol specification (prefixed by '/'). - * - * The server part is mandatory in all mailbox - * 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. - * - * - * - * - * port - optional TCP port number, default is the - * default port for that service - * - * - * - * - * flags - optional flags, see following table. - * - * - * - * - * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * - * Optional flags for names - * - * - * - * Flag - * Description - * - * - * - * - * /service=service - * mailbox access service, default is "imap" - * - * - * /user=user - * remote user name for login on the server - * - * - * /authuser=user - * remote authentication user; if specified this is the user name - * whose password is used (e.g. administrator) - * - * - * /anonymous - * remote access as anonymous user - * - * - * /debug - * record protocol telemetry in application's debug log - * - * - * /secure - * do not transmit a plaintext password over the network - * - * - * /imap, /imap2, - * /imap2bis, /imap4, - * /imap4rev1 - * equivalent to /service=imap - * - * - * /pop3 - * equivalent to /service=pop3 - * - * - * /nntp - * equivalent to /service=nntp - * - * - * /norsh - * do not use rsh or ssh to establish a preauthenticated IMAP - * session - * - * - * /ssl - * use the Secure Socket Layer to encrypt the session - * - * - * /validate-cert - * validate certificates from TLS/SSL server (this is the default - * behavior) - * - * - * /novalidate-cert - * do not validate certificates from TLS/SSL server, needed if - * server uses self-signed certificates - * - * - * /tls - * force use of start-TLS to encrypt the session, and reject - * connection to servers that do not support it - * - * - * /notls - * do not do start-TLS to encrypt the session, even with servers - * that support it - * - * - * /readonly - * request read-only mailbox open (IMAP only; ignored on NNTP, and - * an error with SMTP and POP3) - * - * - * - * - * @param string $user The user name - * @param string $password The password associated with the user - * @param int $flags The flags are a bit mask with one or more of - * the following: - * - * - * - * OP_READONLY - Open mailbox read-only - * - * - * - * - * OP_ANONYMOUS - Don't use or update a - * .newsrc for news (NNTP only) - * - * - * - * - * OP_HALFOPEN - For IMAP - * and NNTP names, open a connection but - * don't open a mailbox. - * - * - * - * - * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close - * (see also imap_delete and - * imap_expunge) - * - * - * - * - * OP_DEBUG - Debug protocol negotiations - * - * - * - * - * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * - * OP_SILENT - Don't pass up events (internal use) - * - * - * - * - * OP_PROTOTYPE - Return driver prototype - * - * - * - * - * OP_SECURE - Don't do non-secure authentication - * - * - * - * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used - * to set one or more connection parameters: - * - * - * - * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * - * @return \IMAP\Connection Returns an IMAP\Connection instance on success. + * @param string $mailbox + * @param string $user + * @param string $password + * @param int $flags + * @param int $retries + * @param array $options + * @return \IMAP\Connection * @throws ImapException * */ @@ -1816,10 +622,8 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = /** - * Convert a quoted-printable string to an 8 bit string according to RFC2045, section 6.7. - * - * @param string $string A quoted-printable string - * @return string Returns an 8 bits string. + * @param string $string + * @return string * @throws ImapException * */ @@ -1835,15 +639,9 @@ function imap_qprint(string $string): string /** - * This function renames on old mailbox to new mailbox (see - * imap_open for the format of - * mbox names). - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $from The old mailbox name, see imap_open for more - * information - * @param string $to The new mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $from + * @param string $to * @throws ImapException * */ @@ -1858,13 +656,10 @@ function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): v /** - * Returns a properly formatted email address as defined in RFC2822 given the needed information. - * - * @param null|string $mailbox The mailbox name, see imap_open for more - * information - * @param null|string $hostname The email host part - * @param null|string $personal The name of the account owner - * @return string Returns a string properly formatted email address as defined in RFC2822. + * @param null|string $mailbox + * @param null|string $hostname + * @param null|string $personal + * @return string * @throws ImapException * */ @@ -1880,34 +675,11 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string /** - * Saves a part or the whole body of the specified message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int|resource|string $file The path to the saved file as a string, or a valid file descriptor - * returned by fopen. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * + * @param \IMAP\Connection $imap + * @param int|resource|string $file + * @param int $message_num + * @param string $section + * @param int $flags * @throws ImapException * */ @@ -1922,12 +694,9 @@ function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $ /** - * Sets an upper limit quota on a per mailbox basis. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard - * format for a mailbox: user.name. - * @param int $mailbox_size The maximum size (in KB) for the quota_root + * @param \IMAP\Connection $imap + * @param string $quota_root + * @param int $mailbox_size * @throws ImapException * */ @@ -1942,14 +711,10 @@ function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox /** - * Sets the ACL for a giving mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param string $user_id The user to give the rights to. - * @param string $rights The rights to give to the user. Passing an empty string will delete - * acl. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param string $user_id + * @param string $rights * @throws ImapException * */ @@ -1964,27 +729,10 @@ function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, s /** - * Causes a store to add the specified flag to the - * flags set for the messages in the specified - * sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, - * \Answered, \Flagged, - * \Deleted, and \Draft as - * defined by RFC2060. - * @param int $options A bit mask that may contain the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options * @throws ImapException * */ @@ -1999,67 +747,13 @@ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $fla /** - * Gets and sorts message numbers by the given parameters. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $criteria Criteria can be one (and only one) of the following: - * - * - * - * SORTDATE - message Date - * - * - * - * - * SORTARRIVAL - arrival date - * - * - * - * - * SORTFROM - mailbox in first From address - * - * - * - * - * SORTSUBJECT - message subject - * - * - * - * - * SORTTO - mailbox in first To address - * - * - * - * - * SORTCC - mailbox in first cc address - * - * - * - * - * SORTSIZE - size of message in octets - * - * - * - * @param int $reverse Whether to sort in reverse order. - * @param int $flags The flags are a bitmask of one or more of the - * following: - * - * - * - * SE_UID - Return UIDs instead of sequence numbers - * - * - * - * - * SE_NOPREFETCH - Don't prefetch searched messages - * - * - * - * @param null|string $search_criteria IMAP2-format search criteria string. For details see - * imap_search. - * @param null|string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given - * parameters. + * @param \IMAP\Connection $imap + * @param int $criteria + * @param int $reverse + * @param int $flags + * @param null|string $search_criteria + * @param null|string $charset + * @return array * @throws ImapException * */ @@ -2081,57 +775,10 @@ function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $fla /** - * Gets status information about the given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags Valid flags are: - * - * - * - * SA_MESSAGES - set $status->messages to the - * number of messages in the mailbox - * - * - * - * - * SA_RECENT - set $status->recent to the number - * of recent messages in the mailbox - * - * - * - * - * SA_UNSEEN - set $status->unseen to the number - * of unseen (new) messages in the mailbox - * - * - * - * - * SA_UIDNEXT - set $status->uidnext to the next - * uid to be used in the mailbox - * - * - * - * - * SA_UIDVALIDITY - set $status->uidvalidity to a - * constant that changes when uids for the mailbox may no longer be - * valid - * - * - * - * - * SA_ALL - set all of the above - * - * - * - * @return \stdClass This function returns an object containing status information. - * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. - * - * flags is also set, which contains a bitmask which can - * be checked against any of the above constants. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -2147,11 +794,8 @@ function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdC /** - * Subscribe to a new mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2166,26 +810,9 @@ function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Gets a tree of a threaded message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. + * @param \IMAP\Connection $imap * @param int $flags - * @return array imap_thread returns an associative array containing - * a tree of messages threaded by REFERENCES. - * - * Every message in the current mailbox will be represented by three entries - * in the resulting array: - * - * - * $thread["XX.num"] - current message number - * - * - * $thread["XX.next"] - * - * - * $thread["XX.branch"] - * - * + * @return array * @throws ImapException * */ @@ -2201,20 +828,9 @@ function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array /** - * Sets or fetches the imap timeout. - * - * @param int $timeout_type One of the following: - * IMAP_OPENTIMEOUT, - * IMAP_READTIMEOUT, - * IMAP_WRITETIMEOUT, or - * IMAP_CLOSETIMEOUT. - * @param int $timeout The timeout, in seconds. - * @return mixed If the timeout parameter is set, this function - * returns TRUE on success. - * - * If timeout is not provided or evaluates to -1, - * the current timeout value of timeout_type is - * returned as an integer. + * @param int $timeout_type + * @param int $timeout + * @return mixed * @throws ImapException * */ @@ -2230,13 +846,8 @@ function imap_timeout(int $timeout_type, int $timeout = -1) /** - * Removes the deletion flag for a specified message, which is set by - * imap_delete or imap_mail_move. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums A string representing one or more messages in IMAP4-style sequence format - * ("n", "n:m", or combination of these - * delimited by commas). + * @param \IMAP\Connection $imap + * @param string $message_nums * @param int $flags * @throws ImapException * @@ -2252,11 +863,8 @@ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags /** - * Unsubscribe from the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2271,10 +879,8 @@ function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * - * @param string $string A UTF-8 encoded string. - * @return string Returns string converted to modified UTF-7. + * @param string $string + * @return string * @throws ImapException * */ diff --git a/generated/8.3/info.php b/generated/8.3/info.php index 284a36fa..e318b57f 100644 --- a/generated/8.3/info.php +++ b/generated/8.3/info.php @@ -5,104 +5,9 @@ use Safe\Exceptions\InfoException; /** - * Set the various assert control options or just query - * their current settings. - * * @param int $what - * Assert Options - * - * - * - * Option - * INI Setting - * Default value - * Description - * - * - * - * - * ASSERT_ACTIVE - * assert.active - * 1 - * enable assert evaluation - * - * - * ASSERT_WARNING - * assert.warning - * 1 - * issue a PHP warning for each failed assertion - * - * - * ASSERT_BAIL - * assert.bail - * 0 - * terminate execution on failed assertions - * - * - * ASSERT_QUIET_EVAL - * assert.quiet_eval - * 0 - * - * disable error_reporting during assertion expression - * evaluation - * - * - * - * ASSERT_CALLBACK - * assert.callback - * (NULL) - * Callback to call on failed assertions - * - * - * - * - * @param mixed $value An optional new value for the option. - * - * The callback function set via ASSERT_CALLBACK or assert.callback should - * have the following signature: - * - * voidassert_callback - * stringfile - * intline - * stringassertion - * stringdescription - * - * - * - * file - * - * - * The file where assert has been called. - * - * - * - * - * line - * - * - * The line where assert has been called. - * - * - * - * - * assertion - * - * - * The assertion that has been passed to assert, - * converted to a string. - * - * - * - * - * description - * - * - * The description that has been passed to assert. - * - * - * - * - * @return mixed Returns the original setting of any options. + * @param mixed $value + * @return mixed * @throws InfoException * */ @@ -122,11 +27,7 @@ function assert_options(int $what, $value = null) /** - * Sets the process title visible in tools such as top and - * ps. This function is available only in - * CLI mode. - * - * @param string $title The new title. + * @param string $title * @throws InfoException * */ @@ -141,56 +42,7 @@ function cli_set_process_title(string $title): void /** - * Loads the PHP extension given by the parameter - * extension_filename. - * - * Use extension_loaded to test whether a given - * extension is already available or not. This works on both built-in - * extensions and dynamically loaded ones (either through php.ini or - * dl). - * - * @param string $extension_filename This parameter is only the filename of the - * extension to load which also depends on your platform. For example, - * the sockets extension (if compiled - * as a shared module, not the default!) would be called - * sockets.so on Unix platforms whereas it is called - * php_sockets.dll on the Windows platform. - * - * The directory where the extension is loaded from depends on your - * platform: - * - * Windows - If not explicitly set in the php.ini, the extension is - * loaded from C:\php5\ by default. - * - * Unix - If not explicitly set in the php.ini, the default extension - * directory depends on - * - * - * - * whether PHP has been built with --enable-debug - * or not - * - * - * - * - * whether PHP has been built with ZTS (Zend Thread Safety) - * support or not - * - * - * - * - * the current internal ZEND_MODULE_API_NO (Zend - * internal module API number, which is basically the date on which a - * major module API change happened, e.g. 20010901) - * - * - * - * Taking into account the above, the directory then defaults to - * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, - * e.g. - * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 - * or - * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @param string $extension_filename * @throws InfoException * */ @@ -205,18 +57,8 @@ function dl(string $extension_filename): void /** - * Gets the value of a PHP configuration option. - * - * This function will not return configuration information set when the PHP - * was compiled, or read from an Apache configuration file. - * - * To check whether the system is using a configuration file, try retrieving the - * value of the cfg_file_path configuration setting. If this is available, a - * configuration file is being used. - * - * @param string $option The configuration option name. - * @return mixed Returns the current value of the PHP configuration variable specified by - * option, or FALSE if an error occurs. + * @param string $option + * @return mixed * @throws InfoException * */ @@ -232,10 +74,7 @@ function get_cfg_var(string $option) /** - * Gets the current include_path - * configuration option value. - * - * @return string Returns the path, as a string. + * @return string * @throws InfoException * */ @@ -251,14 +90,7 @@ function get_include_path(): string /** - * Gets the time of the last modification of the main script of execution. - * - * If you're interested in getting the last modification time - * of a different file, consider using filemtime. - * - * @return int Returns the time of the last modification of the current - * page. The value returned is a Unix timestamp, suitable for - * feeding to date. + * @return int * @throws InfoException * */ @@ -274,9 +106,7 @@ function getlastmod(): int /** - * Gets the group ID of the current script. - * - * @return int Returns the group ID of the current script. + * @return int * @throws InfoException * */ @@ -292,9 +122,7 @@ function getmygid(): int /** - * Gets the inode of the current script. - * - * @return int Returns the current script's inode as an integer. + * @return int * @throws InfoException * */ @@ -310,9 +138,7 @@ function getmyinode(): int /** - * Gets the current PHP process ID. - * - * @return int Returns the current PHP process ID. + * @return int * @throws InfoException * */ @@ -328,9 +154,7 @@ function getmypid(): int /** - * Gets the user ID of the current script. - * - * @return int Returns the user ID of the current script. + * @return int * @throws InfoException * */ @@ -346,25 +170,10 @@ function getmyuid(): int /** - * Parses options passed to the script. - * - * @param string $short_options Each character in this string will be used as option characters and - * matched against options passed to the script starting with a single - * hyphen (-). - * - * For example, an option string "x" recognizes an - * option -x. - * - * Only a-z, A-Z and 0-9 are allowed. - * @param array $long_options An array of options. Each element in this array will be used as option - * strings and matched against options passed to the script starting with - * two hyphens (--). - * - * For example, an longopts element "opt" recognizes an - * option --opt. - * @param int|null $rest_index If the rest_index parameter is present, then the - * index where argument parsing stopped will be written to this variable. - * @return array|array|array This function will return an array of option / argument pairs. + * @param string $short_options + * @param array $long_options + * @param int|null $rest_index + * @return array|array|array * @throws InfoException * */ @@ -380,14 +189,8 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind /** - * This is an interface to getrusage(2). It gets data returned - * from the system call. - * - * @param int $mode If mode is 1, getrusage will be called with - * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system - * call. All entries are accessible by using their documented field names. - * Returns FALSE on failure. + * @param int $mode + * @return array * @throws InfoException * */ @@ -403,12 +206,8 @@ function getrusage(int $mode = 0): array /** - * Returns the value of the configuration option on success. - * - * @param string $option The configuration option name. - * @return string Returns the value of the configuration option as a string on success, or an - * empty string for null values. Returns FALSE if the - * configuration option doesn't exist. + * @param string $option + * @return string * @throws InfoException * */ @@ -424,15 +223,9 @@ function ini_get(string $option): string /** - * Sets the value of the given configuration option. The configuration option - * will keep this new value during the script's execution, and will be restored - * at the script's ending. - * - * @param string $option Not all the available options can be changed using - * ini_set. There is a list of all available options - * in the appendix. - * @param bool|float|int|null|string $value The new value for the option. - * @return string Returns the old value on success. + * @param string $option + * @param bool|float|int|null|string $value + * @return string * @throws InfoException * */ @@ -448,22 +241,7 @@ function ini_set(string $option, $value): string /** - * Returns a lowercase string that describes the type of interface - * (the Server API, SAPI) that PHP is using. For example, in CLI PHP this - * string will be "cli" whereas with Apache it may have several different - * values depending on the exact SAPI used. Possible values are listed - * below. - * - * @return non-empty-string Returns the interface type, as a lowercase string. - * - * Although not exhaustive, the possible return values include - * apache, - * apache2handler, - * cgi (until PHP 5.3), - * cgi-fcgi, cli, cli-server, - * embed, fpm-fcgi, - * litespeed, - * phpdbg. + * @return non-empty-string * @throws InfoException * */ @@ -479,71 +257,7 @@ function php_sapi_name(): string /** - * This function prints out the credits listing the PHP developers, - * modules, etc. It generates the appropriate HTML codes to insert - * the information in a page. - * - * @param int $flags To generate a custom credits page, you may want to use the - * flags parameter. - * - * - * Pre-defined phpcredits flags - * - * - * - * name - * description - * - * - * - * - * CREDITS_ALL - * - * All the credits, equivalent to using: CREDITS_DOCS + - * CREDITS_GENERAL + CREDITS_GROUP + - * CREDITS_MODULES + CREDITS_FULLPAGE. - * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * - * CREDITS_DOCS - * The credits for the documentation team - * - * - * CREDITS_FULLPAGE - * - * Usually used in combination with the other flags. Indicates - * that a complete stand-alone HTML page needs to be - * printed including the information indicated by the other - * flags. - * - * - * - * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors - * and SAPI module. - * - * - * - * CREDITS_GROUP - * A list of the core developers - * - * - * CREDITS_MODULES - * - * A list of the extension modules for PHP, and their authors - * - * - * - * CREDITS_SAPI - * - * A list of the server API modules for PHP, and their authors - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -558,102 +272,7 @@ function phpcredits(int $flags = CREDITS_ALL): void /** - * Outputs a large amount of information about the current state of PHP. - * This includes information about PHP compilation options and extensions, - * the PHP version, server information and environment (if compiled as a - * module), the PHP environment, OS version information, paths, master and - * local values of configuration options, HTTP headers, and the PHP License. - * - * Because every system is setup differently, phpinfo is - * commonly used to check configuration settings and for available - * predefined variables - * on a given system. - * - * phpinfo is also a valuable debugging tool as it - * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * - * @param int $flags The output may be customized by passing one or more of the - * following constants bitwise values summed - * together in the optional flags parameter. - * One can also combine the respective constants or bitwise values - * together with the bitwise or operator. - * - * - * phpinfo options - * - * - * - * Name (constant) - * Value - * Description - * - * - * - * - * INFO_GENERAL - * 1 - * - * The configuration line, php.ini location, build date, Web - * Server, System and more. - * - * - * - * INFO_CREDITS - * 2 - * - * PHP Credits. See also phpcredits. - * - * - * - * INFO_CONFIGURATION - * 4 - * - * Current Local and Master values for PHP directives. See - * also ini_get. - * - * - * - * INFO_MODULES - * 8 - * - * Loaded modules and their respective settings. See also - * get_loaded_extensions. - * - * - * - * INFO_ENVIRONMENT - * 16 - * - * Environment Variable information that's also available in - * $_ENV. - * - * - * - * INFO_VARIABLES - * 32 - * - * Shows all - * predefined variables from EGPCS (Environment, GET, - * POST, Cookie, Server). - * - * - * - * INFO_LICENSE - * 64 - * - * PHP License information. See also the license FAQ. - * - * - * - * INFO_ALL - * -1 - * - * Shows all of the above. - * - * - * - * - * + * @param int $flags * @throws InfoException * */ @@ -668,12 +287,7 @@ function phpinfo(int $flags = INFO_ALL): void /** - * Adds assignment to the server environment. The - * environment variable will only exist for the duration of the current - * request. At the end of the request the environment is restored to its - * original state. - * - * @param string $assignment The setting, like "FOO=BAR" + * @param string $assignment * @throws InfoException * */ @@ -688,12 +302,8 @@ function putenv(string $assignment): void /** - * Sets the include_path - * configuration option for the duration of the script. - * - * @param string $include_path The new value for the include_path - * @return string Returns the old include_path on - * success. + * @param string $include_path + * @return string * @throws InfoException * */ @@ -709,19 +319,7 @@ function set_include_path(string $include_path): string /** - * Set the number of seconds a script is allowed to run. If this is reached, - * the script returns a fatal error. The default limit is 30 seconds or, if - * it exists, the max_execution_time value defined in the - * php.ini. - * - * When called, set_time_limit restarts the timeout - * counter from zero. In other words, if the timeout is the default 30 - * seconds, and 25 seconds into script execution a call such as - * set_time_limit(20) is made, the script will run for a - * total of 45 seconds before timing out. - * - * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit - * is imposed. + * @param int $seconds * @throws InfoException * */ diff --git a/generated/8.3/inotify.php b/generated/8.3/inotify.php index e5e632b1..8820dde6 100644 --- a/generated/8.3/inotify.php +++ b/generated/8.3/inotify.php @@ -5,10 +5,7 @@ use Safe\Exceptions\InotifyException; /** - * Initialize an inotify instance for use with - * inotify_add_watch - * - * @return resource A stream resource. + * @return resource * @throws InotifyException * */ @@ -24,13 +21,8 @@ function inotify_init() /** - * inotify_rm_watch removes the watch - * watch_descriptor from the inotify instance - * inotify_instance. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param int $watch_descriptor Watch to remove from the instance + * @param resource $inotify_instance + * @param int $watch_descriptor * @throws InotifyException * */ diff --git a/generated/8.3/json.php b/generated/8.3/json.php index 2518fa1e..cafc2923 100644 --- a/generated/8.3/json.php +++ b/generated/8.3/json.php @@ -5,45 +5,10 @@ use Safe\Exceptions\JsonException; /** - * Returns a string containing the JSON representation of the supplied - * value. If the parameter is an array or object, - * it will be serialized recursively. - * - * If a value to be serialized is an object, then by default only publicly visible - * properties will be included. Alternatively, a class may implement JsonSerializable - * to control how its values are serialized to JSON. - * - * The encoding is affected by the supplied flags - * and additionally the encoding of float values depends on the value of - * serialize_precision. - * - * @param mixed $value The value being encoded. Can be any type except - * a resource. - * - * All string data must be UTF-8 encoded. - * - * PHP implements a superset of JSON as specified in the original - * RFC 7159. - * @param int $flags Bitmask consisting of - * JSON_FORCE_OBJECT, - * JSON_HEX_QUOT, - * JSON_HEX_TAG, - * JSON_HEX_AMP, - * JSON_HEX_APOS, - * JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, - * JSON_NUMERIC_CHECK, - * JSON_PARTIAL_OUTPUT_ON_ERROR, - * JSON_PRESERVE_ZERO_FRACTION, - * JSON_PRETTY_PRINT, - * JSON_UNESCAPED_LINE_TERMINATORS, - * JSON_UNESCAPED_SLASHES, - * JSON_UNESCAPED_UNICODE, - * JSON_THROW_ON_ERROR. - * The behaviour of these constants is described on the - * JSON constants page. - * @param positive-int $depth Set the maximum depth. Must be greater than zero. - * @return non-empty-string Returns a JSON encoded string on success. + * @param mixed $value + * @param int $flags + * @param positive-int $depth + * @return non-empty-string * @throws JsonException * */ diff --git a/generated/8.3/ldap.php b/generated/8.3/ldap.php index 9c1b80ef..fbc69ab6 100644 --- a/generated/8.3/ldap.php +++ b/generated/8.3/ldap.php @@ -5,15 +5,8 @@ use Safe\Exceptions\LdapException; /** - * Translate ISO-8859 characters to t61 - * characters. - * - * This function is useful if you have to talk to a legacy - * LDAPv2 server. - * - * @param string $value The text to be translated. - * @return string Return the t61 translation of - * value. + * @param string $value + * @return string * @throws LdapException * */ @@ -29,21 +22,10 @@ function ldap_8859_to_t61(string $value): string /** - * Add entries in the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * - * - * ]]> - * - * - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -62,9 +44,7 @@ function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $cont /** - * Binds to the LDAP directory with specified RDN and password. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password * @throws LdapException @@ -87,16 +67,12 @@ function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password /** - * Compare value of attribute - * with value of same attribute in an LDAP directory entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $attribute The attribute name. - * @param string $value The compared value. - * @param array|null $controls Array of LDAP Controls to send with the request. - * @return bool Returns TRUE if value matches otherwise returns - * FALSE. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $attribute + * @param string $value + * @param array|null $controls + * @return bool * @throws LdapException * */ @@ -116,12 +92,10 @@ function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, str /** - * Retrieve the pagination information send by the server. - * - * @param resource $link An LDAP resource, returned by ldap_connect. + * @param resource $link * @param resource $result - * @param null|string $cookie An opaque structure sent by the server. - * @param int|null $estimated The estimated number of entries to retrieve. + * @param null|string $cookie + * @param int|null $estimated * @throws LdapException * */ @@ -136,15 +110,10 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n /** - * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * - * @param resource $link An LDAP resource, returned by ldap_connect. - * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. - * If true and if the server doesn't support pagination, the search - * will return no result. - * @param string $cookie An opaque structure sent by the server - * (ldap_control_paged_result_response). + * @param resource $link + * @param int $pagesize + * @param bool $iscritical + * @param string $cookie * @throws LdapException * */ @@ -159,12 +128,9 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** - * Returns the number of entries stored in the result of previous search - * operations. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return int Returns number of entries in the result. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return int * @throws LdapException * */ @@ -180,11 +146,9 @@ function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int /** - * Deletes a particular entry in LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array|null $controls * @throws LdapException * */ @@ -203,11 +167,8 @@ function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null /** - * Turns the specified dn, into a more user-friendly - * form, stripping off type names. - * - * @param string $dn The distinguished name of an LDAP entity. - * @return string Returns the user friendly name. + * @param string $dn + * @return string * @throws LdapException * */ @@ -223,17 +184,12 @@ function ldap_dn2ufn(string $dn): string /** - * Performs a PASSWD extended operation. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $user dn of the user to change the password of. - * @param string $old_password The old password of this user. May be ommited depending of server configuration. - * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @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. - * @return bool|string Returns the generated password if new_password is empty or omitted. - * Otherwise returns TRUE on success. + * @param \LDAP\Connection $ldap + * @param string $user + * @param string $old_password + * @param string $new_password + * @param array|null $controls + * @return bool|string * @throws LdapException * */ @@ -249,10 +205,8 @@ function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old /** - * Performs a WHOAMI extended operation and returns the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @return bool|string The data returned by the server. + * @param \LDAP\Connection $ldap + * @return bool|string * @throws LdapException * */ @@ -268,20 +222,13 @@ function ldap_exop_whoami(\LDAP\Connection $ldap) /** - * Performs an extended operation on the specified ldap with - * request_oid the OID of the operation and - * request_data the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, 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 null|string $request_data 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 Array of LDAP Controls to send with the request. - * @param null|string $response_data 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 null|string $response_oid Will be filled with the response OID if provided, usually equal to the request OID. - * @return bool|resource When used with response_data, returns TRUE on success. - * When used without response_data, returns a result identifier. + * @param \LDAP\Connection $ldap + * @param string $request_oid + * @param null|string $request_data + * @param array|null $controls + * @param null|string $response_data + * @param null|string $response_oid + * @return bool|resource * @throws LdapException * */ @@ -307,19 +254,9 @@ function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request /** - * Splits the DN returned by ldap_get_dn and breaks it - * up into its component parts. Each part is known as Relative Distinguished - * Name, or RDN. - * - * @param string $dn The distinguished name of an LDAP entity. - * @param int $with_attrib Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - * @return array Returns an array of all DN components. - * The first element in the array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. + * @param string $dn + * @param int $with_attrib + * @return array * @throws LdapException * */ @@ -335,16 +272,9 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** - * Gets the first attribute in the given entry. Remaining attributes are - * retrieved by calling ldap_next_attribute successively. - * - * Similar to reading entries, attributes are also read one by one from a - * particular entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the first attribute in the entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -360,17 +290,9 @@ function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Returns the entry identifier for first entry in the result. This entry - * identifier is then supplied to ldap_next_entry - * routine to get successive entries from the result. - * - * Entries in the LDAP result are read sequentially using the - * ldap_first_entry and - * ldap_next_entry functions. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return \LDAP\ResultEntry Returns an LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return \LDAP\ResultEntry * @throws LdapException * */ @@ -386,15 +308,7 @@ function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\R /** - * Frees up the memory allocated internally to store the result. All result - * memory will be automatically freed when the script terminates. - * - * Typically all the memory allocated for the LDAP result gets freed at the - * end of the script. In case the script is making successive searches which - * return large result sets, ldap_free_result could be - * called to keep the runtime memory usage by the script low. - * - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. + * @param \LDAP\Result $result * @throws LdapException * */ @@ -409,24 +323,9 @@ function ldap_free_result(\LDAP\Result $result): void /** - * Reads attributes and values from an entry in the search result. - * - * Having located a specific entry in the directory, you can find out what - * information is held for that entry by using this call. You would use this - * call for an application which "browses" directory entries and/or where you - * do not know the structure of the directory entries. In many applications - * you will be searching for a specific attribute such as an email address or - * a surname, and won't care what other data is held. - * - * - * - * - * - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array - * on success and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return array * @throws LdapException * */ @@ -442,11 +341,9 @@ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Finds out the DN of an entry in the result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the DN of the result entry and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -462,23 +359,9 @@ function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string /** - * Reads multiple entries from the given result, and then reading the - * attributes and multiple values. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on - * success. - * - * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - * - * - * - * - * + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return array * @throws LdapException * */ @@ -494,184 +377,9 @@ function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array /** - * Sets value to the value of the specified option. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_REFERRALS - * int - * - * - * - * LDAP_OPT_RESTART - * int - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_NONE - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_PEER - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_ALL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PACKAGE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * - * - * - * - * - * @param mixed $value This will be set to the option value. + * @param \LDAP\Connection $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -686,18 +394,10 @@ function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): v /** - * Reads all the values of the attribute in the entry in the result. - * - * This function is used exactly like ldap_get_values - * except that it handles binary data and not string data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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. + * @return array * @throws LdapException * */ @@ -713,35 +413,10 @@ function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, s /** - * Reads all the values of the attribute in the entry in the result. - * - * This call needs a entry, - * so needs to be preceded by one of the ldap search calls and one - * of the calls to get an individual entry. - * - * You application will either be hard coded to look for certain - * attributes (such as "surname" or "mail") or you will have to use - * the ldap_get_attributes call to work out - * what attributes exist for a given entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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 - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - * - * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * - * - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - * - * + * @return array * @throws LdapException * */ @@ -757,13 +432,10 @@ function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, strin /** - * Adds one or more attribute values to the specified dn. - * To add a whole new object see ldap_add function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -782,14 +454,10 @@ function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Removes one or more attribute values from the specified dn. - * Object deletions are done by the - * ldap_delete function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. + * @param \LDAP\Connection $ldap + * @param string $dn * @param array $entry - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param array|null $controls * @throws LdapException * */ @@ -808,13 +476,10 @@ function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Replaces one or more attributes from the specified dn. - * It may also add or remove attributes. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -833,87 +498,10 @@ function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?arr /** - * Modifies an existing entry in the LDAP directory. Allows detailed - * specification of the modifications to perform. - * - * @param \LDAP\Connection $ldap An LDAP resource, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An 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, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - * - * Possible values for modtype include: - * - * - * LDAP_MODIFY_BATCH_ADD - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE - * - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * - * - * - * LDAP_MODIFY_BATCH_REPLACE - * - * - * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - * - * - * - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * 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|null $controls Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $modifications_info + * @param array|null $controls * @throws LdapException * */ @@ -932,15 +520,9 @@ function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modificati /** - * Retrieves the attributes in an entry. The first call to - * ldap_next_attribute is made with the - * entry returned from - * ldap_first_attribute. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the next attribute in an entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -956,12 +538,10 @@ function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Parse LDAP extended operation data from result object result - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param null|string $response_data Will be filled by the response data. - * @param null|string $response_oid Will be filled by the response OID. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param null|string $response_data + * @param null|string $response_oid * @throws LdapException * */ @@ -976,20 +556,13 @@ function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string & /** - * Parses an LDAP search result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param int|null $error_code A reference to a variable that will be set to the LDAP error code in - * the result, or 0 if no error occurred. - * @param null|string $matched_dn A reference to a variable that will be set to a matched DN if one was - * recognised within the request, otherwise it will be set to NULL. - * @param null|string $error_message A reference to a variable that will be set to the LDAP error message in - * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set - * to all of the referral strings in the result, or an empty array if no - * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param int|null $error_code + * @param null|string $matched_dn + * @param null|string $error_message + * @param array|null $referrals + * @param array|null $controls * @throws LdapException * */ @@ -1004,15 +577,12 @@ function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$ /** - * The entry specified by dn is renamed/moved. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $new_rdn The new RDN. - * @param string $new_parent The new parent/superior entry. - * @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|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $new_rdn + * @param string $new_parent + * @param bool $delete_old_rdn + * @param array|null $controls * @throws LdapException * */ @@ -1031,8 +601,6 @@ function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string /** - * - * * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password @@ -1071,180 +639,9 @@ function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $pas /** - * Sets the value of the specified option to be value. - * - * @param null|resource $ldap Either an LDAP\Connection instance, returned by - * ldap_connect, to set the option for that connection, - * or NULL to set the option globally. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * Available since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - * @param mixed $value The new value for the specified option. + * @param null|resource $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -1259,9 +656,7 @@ function ldap_set_option($ldap, int $option, $value): void /** - * Unbinds from the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @throws LdapException * */ diff --git a/generated/8.3/libxml.php b/generated/8.3/libxml.php index 481d5776..aa6180a3 100644 --- a/generated/8.3/libxml.php +++ b/generated/8.3/libxml.php @@ -5,47 +5,7 @@ use Safe\Exceptions\LibxmlException; /** - * Changes the default external entity loader. - * This can be used to suppress the expansion of arbitrary external entities to avoid XXE attacks, - * even when LIBXML_NOENT has been set for the respective operation, - * and is usually preferable over calling libxml_disable_entity_loader. - * - * @param callable $resolver_function A callable with the following signature: - * - * resourcestringnullresolver - * stringpublic_id - * stringsystem_id - * arraycontext - * - * - * - * public_id - * - * - * The public ID. - * - * - * - * - * system_id - * - * - * The system ID. - * - * - * - * - * context - * - * - * An array with the four elements "directory", "intSubName", - * "extSubURI" and "extSubSystem". - * - * - * - * - * This callable should return a resource, a string from which a resource can be - * opened. If NULL is returned, the entity reference resolution will fail. + * @param callable $resolver_function * @throws LibxmlException * */ diff --git a/generated/8.3/lzf.php b/generated/8.3/lzf.php index 7ea98c4d..0e90111e 100644 --- a/generated/8.3/lzf.php +++ b/generated/8.3/lzf.php @@ -5,11 +5,8 @@ use Safe\Exceptions\LzfException; /** - * lzf_compress compresses the given - * data string using LZF encoding. - * - * @param string $data The string to compress. - * @return string Returns the compressed data. + * @param string $data + * @return string * @throws LzfException * */ @@ -25,11 +22,8 @@ function lzf_compress(string $data): string /** - * lzf_compress decompresses the given - * data string containing lzf encoded data. - * - * @param string $data The compressed string. - * @return string Returns the decompressed data. + * @param string $data + * @return string * @throws LzfException * */ diff --git a/generated/8.3/mailparse.php b/generated/8.3/mailparse.php index 82c75d63..66b6d383 100644 --- a/generated/8.3/mailparse.php +++ b/generated/8.3/mailparse.php @@ -5,24 +5,10 @@ use Safe\Exceptions\MailparseException; /** - * 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. - * - * @param resource $mimemail A valid MIME resource, created with - * mailparse_msg_create. - * @param mixed $filename Can be a file name or a valid stream resource. - * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the - * extracted section, or NULL to make this function return the - * extracted section. - * - * If not specified, the contents will be sent to "stdout". - * @return string If callbackfunc is not NULL returns TRUE on - * success. - * - * If callbackfunc is set to NULL, returns the - * extracted section as a string. + * @param resource $mimemail + * @param mixed $filename + * @param callable $callbackfunc + * @return string * @throws MailparseException * */ @@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba /** - * Frees a MIME resource. - * - * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or - * mailparse_msg_parse_file. + * @param resource $mimemail * @throws MailparseException * */ @@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void /** - * Parses a file. - * This is the optimal way of parsing a mail file that you have on disk. - * - * @param string $filename Path to the file holding the message. - * The file is opened and streamed through the parser. - * - * The message contained in filename is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. - * @return resource Returns a MIME resource representing the structure. + * @param string $filename + * @return resource * @throws MailparseException * */ @@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename) /** - * Incrementally parse data into the supplied mime mail resource. - * - * This function allow you to stream portions of a file at a time, rather - * than read and parse the whole thing. - * - * @param resource $mimemail A valid MIME resource. - * @param string $data The final chunk of data is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. + * @param resource $mimemail + * @param string $data * @throws MailparseException * */ @@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void /** - * Streams data from the source file pointer, apply - * encoding and write to the destination file pointer. - * - * @param resource $sourcefp A valid file handle. The file is streamed through the parser. - * @param resource $destfp The destination file handle in which the encoded data will be written. - * @param string $encoding One of the character encodings supported by the - * mbstring module. + * @param resource $sourcefp + * @param resource $destfp + * @param string $encoding * @throws MailparseException * */ diff --git a/generated/8.3/mbstring.php b/generated/8.3/mbstring.php index c51b6831..1861c94c 100644 --- a/generated/8.3/mbstring.php +++ b/generated/8.3/mbstring.php @@ -5,17 +5,9 @@ use Safe\Exceptions\MbstringException; /** - * Returns a string containing the character specified by the Unicode code point value, - * encoded in the specified encoding. - * - * This function complements mb_ord. - * - * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return string A string containing the requested character, if it can be represented in the specified - * encoding. + * @param int $codepoint + * @param null|string $encoding + * @return string * @throws MbstringException * */ @@ -35,26 +27,10 @@ function mb_chr(int $codepoint, ?string $encoding = null): string /** - * Converts string from from_encoding, - * or the current internal encoding, to to_encoding. - * If string is an array, all its string values will be - * converted recursively. - * - * @param array|string $string The string or array to be converted. - * @param string $to_encoding The desired encoding of the result. - * @param mixed $from_encoding The current encoding used to interpret string. - * Multiple encodings may be specified as an array or comma separated - * list, in which case the correct encoding will be guessed using the - * same algorithm as mb_detect_encoding. - * - * If from_encoding is NULL or not specified, the - * mbstring.internal_encoding setting - * will be used if set, otherwise the default_charset setting. - * - * See supported encodings - * for valid values of to_encoding - * and from_encoding. - * @return array|string The encoded string or array on success. + * @param array|string $string + * @param string $to_encoding + * @param mixed $from_encoding + * @return array|string * @throws MbstringException * */ @@ -74,27 +50,11 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null /** - * Converts - * character encoding of variables var and vars in - * encoding from_encoding to encoding - * to_encoding. - * - * mb_convert_variables join strings in Array - * or Object to detect encoding, since encoding detection tends to - * fail for short strings. Therefore, it is impossible to mix - * encoding in single array or object. - * - * @param string $to_encoding The encoding that the string is being converted to. - * @param array|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 - * is omitted, detect_order is used. - * @param array|object|string $var var is the reference to the - * variable being converted. String, Array and Object are accepted. - * mb_convert_variables assumes all parameters - * have the same encoding. - * @param array|object|string $vars Additional vars. - * @return string The character encoding before conversion for success. + * @param string $to_encoding + * @param array|string $from_encoding + * @param array|object|string $var + * @param array|object|string $vars + * @return string * @throws MbstringException * */ @@ -110,31 +70,8 @@ function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$va /** - * Sets the automatic character - * encoding detection order to encoding. - * - * @param non-empty-list|non-falsy-string|null $encoding encoding is an array or - * comma separated list of character encoding. See supported encodings. - * - * If encoding is omitted or NULL, it returns - * the current character encoding detection order as array. - * - * This setting affects mb_detect_encoding and - * mb_send_mail. - * - * mbstring currently implements the following - * encoding detection filters. If there is an invalid byte sequence - * for the following encodings, encoding detection will fail. - * - * For ISO-8859-*, mbstring - * always detects as ISO-8859-*. - * - * For UTF-16, UTF-32, - * UCS2 and UCS4, encoding - * detection will fail always. - * @return bool|list When setting the encoding detection order, TRUE is returned on success. - * - * When getting the encoding detection order, an ordered array of the encodings is returned. + * @param non-empty-list|non-falsy-string|null $encoding + * @return bool|list * @throws MbstringException * */ @@ -154,10 +91,8 @@ function mb_detect_order($encoding = null) /** - * Returns an array of aliases for a known encoding type. - * - * @param string $encoding The encoding type being checked, for aliases. - * @return list Returns a numerically indexed array of encoding aliases on success + * @param string $encoding + * @return list * @throws MbstringException * */ @@ -173,36 +108,11 @@ function mb_encoding_aliases(string $encoding): array /** - * Scans string for matches to - * pattern, then replaces the matched text - * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, - * except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. - * - * You'll often need the callback function - * for a mb_ereg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * mb_ereg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param callable(array):string $callback + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -222,19 +132,11 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param string $replacement The replacement text. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -254,17 +156,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, ? /** - * Retrieve the result from the last multibyte regular expression match - * - * @return array An array - * including the sub-string of matched part by last - * mb_ereg_search, - * mb_ereg_search_pos, - * mb_ereg_search_regs. If there are some - * matches, the first element will have the matched 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. + * @return array * @throws MbstringException * */ @@ -280,16 +172,9 @@ function mb_ereg_search_getregs(): array /** - * mb_ereg_search_init sets - * string and pattern - * for a multibyte regular expression. These values are used for - * mb_ereg_search, - * mb_ereg_search_pos, and - * mb_ereg_search_regs. - * - * @param string $string The search string. - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. + * @param string $string + * @param null|string $pattern + * @param null|string $options * @throws MbstringException * */ @@ -310,16 +195,9 @@ function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $o /** - * Returns the matched part of a multibyte regular expression. - * - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return array mb_ereg_search_regs executes the multibyte - * regular expression match, and if there are some matched part, it - * 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. + * @param null|string $pattern + * @param null|string $options + * @return array * @throws MbstringException * */ @@ -341,10 +219,7 @@ function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): /** - * mb_ereg_search_setpos sets the starting - * point of a match for mb_ereg_search. - * - * @param int $offset The position to set. If it is negative, it counts from the end of the string. + * @param int $offset * @throws MbstringException * */ @@ -359,17 +234,11 @@ function mb_ereg_search_setpos(int $offset): void /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement. - * - * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. - * @param string $replacement The replacement text. - * @param string $string The searched string. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return string The resultant string. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return string * @throws MbstringException * */ @@ -389,29 +258,8 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, /** - * mb_get_info returns the internal setting parameters of mbstring. - * - * @param string $type If type is not specified or is specified as "all", - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * and "strict_detection" - * will be returned. - * - * If type is specified as - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * or "strict_detection" - * the specified setting parameter will be returned. - * @return mixed An array of type information if type - * is not specified, otherwise a specific type. + * @param string $type + * @return mixed * @throws MbstringException * */ @@ -427,20 +275,8 @@ function mb_get_info(string $type = "all") /** - * Set/Get the HTTP output character encoding. - * Output after this function is called will be converted from the set internal encoding to encoding. - * - * @param null|string $encoding If encoding is set, - * mb_http_output sets the HTTP output character - * encoding to encoding. - * - * If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. - * @return bool|string If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. Otherwise, - * Returns TRUE on success. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -460,18 +296,8 @@ function mb_http_output(?string $encoding = null) /** - * Set/Get the internal character encoding - * - * @param null|string $encoding 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. - * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then - * the current character encoding name is returned. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -491,15 +317,9 @@ function mb_internal_encoding(?string $encoding = null) /** - * Returns the Unicode code point value of the given character. - * - * This function complements mb_chr. - * - * @param string $string A string - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return int The Unicode code point for the first character of string. + * @param string $string + * @param null|string $encoding + * @return int * @throws MbstringException * */ @@ -519,15 +339,8 @@ function mb_ord(string $string, ?string $encoding = null): int /** - * Parses GET/POST/COOKIE data and - * sets global variables. Since PHP does not provide raw POST/COOKIE - * data, it can only be used for GET data for now. It parses URL - * encoded data, detects encoding, converts coding to internal - * encoding and set values to the result array or - * global variables. - * - * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param string $string + * @param array|null $result * @throws MbstringException * */ @@ -542,16 +355,8 @@ function mb_parse_str(string $string, ?array &$result): void /** - * Set/Get character encoding for a multibyte regex. - * - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * 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. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -571,59 +376,11 @@ function mb_regex_encoding(?string $encoding = null) /** - * Sends email. Headers and messages are converted and encoded according - * to the mb_language setting. It's a wrapper function - * for mail, so see also mail for details. - * - * @param string $to The mail addresses being sent to. Multiple - * recipients may be specified by putting a comma between each - * address in to. - * This parameter is not automatically encoded. - * @param string $subject The subject of the mail. - * @param string $message The message of the mail. - * @param array|null|string $additional_headers String or array to be inserted at the end of the email header. - * - * This is typically used to add extra headers (From, Cc, and Bcc). - * Multiple extra headers should be separated with a CRLF (\r\n). - * Validate parameter not to be injected unwanted headers by attackers. - * - * If an array is passed, its keys are the header names and its - * values are the respective header values. - * - * When sending mail, the mail must contain - * a From header. This can be set with the - * additional_headers parameter, or a default - * can be set in php.ini. - * - * Failing to do this will result in an error - * message similar to Warning: mail(): "sendmail_from" not - * set in php.ini or custom "From:" header missing. - * The From header sets also - * Return-Path under Windows. - * - * If messages are not received, try using a LF (\n) only. - * Some Unix mail transfer agents (most notably - * qmail) replace LF by CRLF - * automatically (which leads to doubling CR if CRLF is used). - * This should be a last resort, as it does not comply with - * RFC 2822. - * @param null|string $additional_params additional_params is a MTA command line - * parameter. It is useful when setting the correct Return-Path - * header when using sendmail. - * - * This parameter is escaped by escapeshellcmd internally - * to prevent command execution. escapeshellcmd prevents - * command execution, but allows to add additional parameters. For security reason, - * this parameter should be validated. - * - * Since escapeshellcmd is applied automatically, some characters - * that are allowed as email addresses by internet RFCs cannot be used. Programs - * that are required to use these characters mail cannot be used. - * - * The user that the webserver runs as should be added as a trusted user to the - * sendmail configuration to prevent a 'X-Warning' header from being added - * to the message when the envelope sender (-f) is set using this method. - * For sendmail users, this file is /etc/mail/trusted-users. + * @param string $to + * @param string $subject + * @param string $message + * @param array|null|string $additional_headers + * @param null|string $additional_params * @throws MbstringException * */ @@ -642,17 +399,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ /** - * Split a multibyte - * string using regular expression - * pattern and returns the result as an - * array. - * - * @param string $pattern The regular expression pattern. - * @param string $string The string being split. - * @param int $limit If optional parameter limit is specified, - * it will be split in limit elements as - * maximum. - * @return list The result as an array. + * @param string $pattern + * @param string $string + * @param int $limit + * @return list * @throws MbstringException * */ diff --git a/generated/8.3/misc.php b/generated/8.3/misc.php index 5bbab456..5a8b5453 100644 --- a/generated/8.3/misc.php +++ b/generated/8.3/misc.php @@ -5,26 +5,9 @@ use Safe\Exceptions\MiscException; /** - * Defines a named constant at runtime. - * - * @param string $constant_name The name of the constant. - * - * It is possible to define constants with reserved or - * even invalid names, whose value can (only) be retrieved with - * constant. However, doing so is not recommended. - * @param mixed $value The value of the constant. In PHP 5, value must - * be a scalar value (int, - * float, string, bool, or - * NULL). In PHP 7, array values are also accepted. - * - * While it is possible to define resource constants, it is - * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive 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. - * - * Case-insensitive constants are stored as lower-case. + * @param string $constant_name + * @param mixed $value + * @param bool $case_insensitive * @throws MiscException * */ @@ -39,22 +22,9 @@ function define(string $constant_name, $value, bool $case_insensitive = false): /** - * Prints out or returns a syntax highlighted version of the code contained - * in filename using the colors defined in the - * built-in syntax highlighter for PHP. - * - * Many servers are configured to automatically highlight files - * with a phps extension. For example, - * example.phps when viewed will show the - * syntax highlighted source of the file. To enable this, add this - * line to the httpd.conf: - * - * @param string $filename Path to the PHP file to be highlighted. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $filename + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -70,15 +40,9 @@ function highlight_file(string $filename, bool $return = false) /** - * Outputs or returns html markup for a syntax highlighted version of the given PHP code - * using the colors defined in the built-in syntax highlighter for PHP. - * - * @param string $string The PHP code to be highlighted. This should include the opening tag. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $string + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -94,16 +58,8 @@ function highlight_string(string $string, bool $return = false) /** - * Returns the system's high resolution time, counted from an arbitrary point in time. - * The delivered timestamp is monotonic and can not be adjusted. - * - * @param bool $as_number Whether the high resolution time should be returned as array - * or number. - * @return array{0:int,1:int}|float|int Returns an array of integers in the form [seconds, nanoseconds], if the - * parameter as_number is false. Otherwise the nanoseconds - * are returned as int (64bit platforms) or float - * (32bit platforms). - * Returns FALSE on failure. + * @param bool $as_number + * @return array{0:int,1:int}|float|int * @throws MiscException * */ @@ -119,156 +75,9 @@ function hrtime(bool $as_number = false) /** - * Pack given arguments into a binary string according to - * format. - * - * The idea for this function was taken from Perl and all formatting codes - * work the same as in Perl. However, there are some formatting codes that are - * missing such as Perl's "u" format code. - * - * Note that the distinction between signed and unsigned values only - * affects the function unpack, where as - * function pack gives the same result for - * signed and unsigned format codes. - * - * @param string $format The format string consists of format codes - * followed by an optional repeater argument. The repeater argument can - * be either an integer value or * for repeating to - * the end of the input data. For a, A, h, H the repeat count specifies - * how many characters of one data argument are taken, for @ it is the - * absolute position where to put the next data, for everything else the - * repeat count specifies how many data arguments are consumed and packed - * into the resulting binary string. - * - * Currently implemented formats are: - * - * pack format characters - * - * - * - * Code - * Description - * - * - * - * - * a - * NUL-padded string - * - * - * A - * SPACE-padded string - * - * h - * Hex string, low nibble first - * - * H - * Hex string, high nibble first - * csigned char - * - * C - * unsigned char - * - * s - * signed short (always 16 bit, machine byte order) - * - * - * S - * unsigned short (always 16 bit, machine byte order) - * - * - * n - * unsigned short (always 16 bit, big endian byte order) - * - * - * v - * unsigned short (always 16 bit, little endian byte order) - * - * - * i - * signed integer (machine dependent size and byte order) - * - * - * I - * unsigned integer (machine dependent size and byte order) - * - * - * l - * signed long (always 32 bit, machine byte order) - * - * - * L - * unsigned long (always 32 bit, machine byte order) - * - * - * N - * unsigned long (always 32 bit, big endian byte order) - * - * - * V - * unsigned long (always 32 bit, little endian byte order) - * - * - * q - * signed long long (always 64 bit, machine byte order) - * - * - * Q - * unsigned long long (always 64 bit, machine byte order) - * - * - * J - * unsigned long long (always 64 bit, big endian byte order) - * - * - * P - * unsigned long long (always 64 bit, little endian byte order) - * - * - * f - * float (machine dependent size and representation) - * - * - * g - * float (machine dependent size, little endian byte order) - * - * - * G - * float (machine dependent size, big endian byte order) - * - * - * d - * double (machine dependent size and representation) - * - * - * e - * double (machine dependent size, little endian byte order) - * - * - * E - * double (machine dependent size, big endian byte order) - * - * - * x - * NUL byte - * - * - * X - * Back up one byte - * - * - * Z - * NUL-padded string - * - * - * @ - * NUL-fill to absolute position - * - * - * - * + * @param string $format * @param mixed $values - * @return string Returns a binary string containing data. + * @return string * @throws MiscException * */ @@ -288,15 +97,10 @@ function pack(string $format, ...$values): string /** - * Convert string from one codepage to another. - * - * @param int|string $in_codepage The codepage of the subject string. - * Either the codepage name or identifier. - * @param int|string $out_codepage The codepage to convert the subject string to. - * Either the codepage name or identifier. - * @param string $subject The string to convert. - * @return string The subject string converted to - * out_codepage. + * @param int|string $in_codepage + * @param int|string $out_codepage + * @param string $subject + * @return string * @throws MiscException * */ @@ -312,9 +116,7 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str /** - * Set the codepage of the current process. - * - * @param int $codepage A codepage identifier. + * @param int $codepage * @throws MiscException * */ @@ -329,13 +131,8 @@ function sapi_windows_cp_set(int $codepage): void /** - * Sends a CTRL event to another process in the same process group. - * - * @param int $event The CTRL even to send; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * @param int $pid The ID of the process to which to send the event to. If 0 - * is given, the event is sent to all processes of the process group. + * @param int $event + * @param int $pid * @throws MiscException * */ @@ -350,35 +147,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void /** - * Sets or removes a CTRL event handler, which allows Windows - * CLI processes to intercept or ignore CTRL+C and - * CTRL+BREAK events. Note that in multithreaded environments, - * this is only possible when called from the main thread. - * - * @param callable|null $handler A callback function to set or remove. If set, this function will be called - * whenever a CTRL+C or CTRL+BREAK event - * occurs. The function is supposed to have the following signature: - * - * voidhandler - * intevent - * - * - * - * event - * - * - * The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * - * - * - * - * Setting a NULL handler causes the process to ignore - * CTRL+C events, but not CTRL+BREAK events. - * @param bool $add The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param callable|null $handler + * @param bool $add * @throws MiscException * */ @@ -393,18 +163,8 @@ function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): vo /** - * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled. - * - * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. - * If the feature has been successfully enabled (or disabled). - * - * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * - * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. - * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. - * - * @param resource $stream The stream on which the function will operate. - * @param bool|null $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @param resource $stream + * @param bool|null $enable * @throws MiscException * */ @@ -423,18 +183,8 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): void /** - * Delays the program execution for the given number of - * seconds. - * - * @param int $seconds Halt time in seconds (must be greater than or equal to 0). - * @return false|int Returns zero on success. - * - * If the call was interrupted by a signal, sleep returns - * a non-zero value. On Windows, this value will always be - * 192 (the value of the - * WAIT_IO_COMPLETION constant within the Windows API). - * On other platforms, the return value will be the number of seconds left to - * sleep. + * @param int $seconds + * @return false|int * */ function sleep(int $seconds) @@ -446,29 +196,9 @@ function sleep(int $seconds) /** - * Delays program execution for the given number of - * seconds and nanoseconds. - * - * @param int $seconds Must be a non-negative integer. - * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool Returns TRUE on success. - * - * If the delay was interrupted by a signal, an associative array will be - * returned with the components: - * - * - * - * seconds - number of seconds remaining in - * the delay - * - * - * - * - * nanoseconds - number of nanoseconds - * remaining in the delay - * - * - * + * @param int $seconds + * @param int $nanoseconds + * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool * @throws MiscException * */ @@ -484,10 +214,7 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** - * Makes the script sleep until the specified - * timestamp. - * - * @param float $timestamp The timestamp when the script should wake. + * @param float $timestamp * @throws MiscException * */ @@ -502,35 +229,10 @@ function time_sleep_until(float $timestamp): void /** - * Unpacks from a binary string into an array according to the given - * format. - * - * The unpacked data is stored in an associative array. To - * accomplish this you have to name the different format codes and - * separate them by a slash /. If a repeater argument is present, - * then each of the array keys will have a sequence number behind - * the given name. - * - * Changes were made to bring this function into line with Perl: - * - * - * The "a" code now retains trailing NULL bytes. - * - * - * The "A" code now strips all trailing ASCII whitespace (spaces, tabs, - * newlines, carriage returns, and NULL bytes). - * - * - * The "Z" code was added for NULL-padded strings, and removes trailing - * NULL bytes. - * - * - * - * @param string $format See pack for an explanation of the format codes. - * @param string $string The packed data. - * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary - * string. + * @param string $format + * @param string $string + * @param int $offset + * @return array * @throws MiscException * */ diff --git a/generated/8.3/mysql.php b/generated/8.3/mysql.php index 559a8190..f96eb641 100644 --- a/generated/8.3/mysql.php +++ b/generated/8.3/mysql.php @@ -5,24 +5,7 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened - * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see - * freeing resources - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no connection is found or - * established, an E_WARNING level error is - * generated. + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -37,39 +20,12 @@ function mysql_close($link_identifier = null): void /** - * Opens or reuses a connection to a MySQL server. - * - * @param string $server 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 SQL safe mode, this parameter is ignored - * and value 'localhost:3306' is always used. - * @param string $username The username. Default value is defined by mysql.default_user. In - * SQL safe mode, this parameter is ignored and the name of the user that - * owns the server process is used. - * @param string $password The password. Default value is defined by mysql.default_password. In - * SQL safe mode, this parameter is ignored and empty password is used. - * @param bool $new_link If a second call is made to mysql_connect - * with the same arguments, no new link will be established, but - * instead, the link identifier of the already opened link will be - * returned. The new_link parameter modifies this - * behavior and makes mysql_connect always open - * a new link, even if mysql_connect was called - * before with the same parameters. - * In SQL safe mode, this parameter is ignored. - * @param int $client_flags The client_flags parameter can be a combination - * of the following constants: - * 128 (enable LOAD DATA LOCAL handling), - * MYSQL_CLIENT_SSL, - * MYSQL_CLIENT_COMPRESS, - * MYSQL_CLIENT_IGNORE_SPACE or - * MYSQL_CLIENT_INTERACTIVE. - * Read the section about for further information. - * In SQL safe mode, this parameter is ignored. - * @return resource Returns a MySQL link identifier on success. + * @param string $server + * @param string $username + * @param string $password + * @param bool $new_link + * @param int $client_flags + * @return resource * @throws MysqlException * */ @@ -97,17 +53,8 @@ function mysql_connect(?string $server = null, ?string $username = null, ?string /** - * mysql_create_db attempts to create a new - * database on the server associated with the specified link - * identifier. - * - * @param string $database_name The name of the database being created. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -122,23 +69,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void /** - * mysql_data_seek moves the internal row - * pointer of the MySQL result associated with the specified result - * identifier to point to the specified row number. The next call - * to a MySQL fetch function, such as mysql_fetch_assoc, - * would return that row. - * - * row_number starts at 0. The - * row_number should be a value in the range from 0 to - * mysql_num_rows - 1. However if the result set - * is empty (mysql_num_rows == 0), a seek to 0 will - * fail with an E_WARNING and - * mysql_data_seek will return FALSE. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row_number The desired row number of the new result pointer. + * @param resource $result + * @param int $row_number * @throws MysqlException * */ @@ -153,15 +85,10 @@ function mysql_data_seek($result, int $row_number): void /** - * Retrieve the database name from a call to - * mysql_list_dbs. - * - * @param resource $result The result pointer from a call to mysql_list_dbs. - * @param int $row The index into the result set. - * @param mixed $field The field name. - * @return string Returns the database name on success. If FALSE - * is returned, use mysql_error to determine the nature - * of the error. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -177,22 +104,10 @@ function mysql_db_name($result, int $row, $field = null): string /** - * mysql_db_query selects a database, and executes a - * query on it. - * - * @param string $database The name of the database that will be selected. - * @param string $query The MySQL query. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for - * INSERT/UPDATE/DELETE - * queries to indicate success/failure. + * @param string $database + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -208,19 +123,8 @@ function mysql_db_query(string $database, string $query, $link_identifier = null /** - * mysql_drop_db attempts to drop (remove) an - * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql - * DROP DATABASE statement instead. - * - * @param string $database_name The name of the database that will be deleted. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -235,21 +139,8 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void /** - * Returns an array that corresponds to the lengths of each field - * in the last row fetched by MySQL. - * - * mysql_fetch_lengths stores the lengths of - * each result column in the last row returned by - * mysql_fetch_row, - * mysql_fetch_assoc, - * mysql_fetch_array, and - * mysql_fetch_object in an array, starting at - * offset 0. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return array An array of lengths on success. + * @param resource $result + * @return array * @throws MysqlException * */ @@ -265,27 +156,9 @@ function mysql_fetch_lengths($result): array /** - * mysql_field_flags returns the field flags of - * the specified field. The flags are reported as a single word - * per flag separated by a single space, so that you can split the - * returned value using explode. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string Returns a string of flags associated with the result. - * - * 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", - * "unsigned", "zerofill", - * "binary", "enum", - * "auto_increment" and "timestamp". + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -301,17 +174,9 @@ function mysql_field_flags($result, int $field_offset): string /** - * mysql_field_len returns the length of the - * specified field. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return int The length of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return int * @throws MysqlException * */ @@ -327,17 +192,9 @@ function mysql_field_len($result, int $field_offset): int /** - * mysql_field_name returns the name of the - * specified field index. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string The name of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -353,18 +210,8 @@ function mysql_field_name($result, int $field_offset): string /** - * Seeks to the specified field offset. If the next call to - * mysql_fetch_field doesn't include a field - * offset, the field offset specified in - * mysql_field_seek will be returned. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. + * @param resource $result + * @param int $field_offset * @throws MysqlException * */ @@ -379,17 +226,7 @@ function mysql_field_seek($result, int $field_offset): void /** - * mysql_free_result will free all memory - * associated with the result identifier result. - * - * mysql_free_result only needs to be called if - * you are concerned about how much memory is being used for queries - * that return large result sets. All associated result memory is - * automatically freed at the end of the script's execution. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. + * @param resource $result * @throws MysqlException * */ @@ -404,17 +241,8 @@ function mysql_free_result($result): void /** - * Describes the type of connection in use for the connection, including the - * server host name. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns a string describing the type of MySQL connection in use for the - * connection. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -430,15 +258,8 @@ function mysql_get_host_info($link_identifier = null): string /** - * Retrieves the MySQL protocol. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int Returns the MySQL protocol on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -454,15 +275,8 @@ function mysql_get_proto_info($link_identifier = null): int /** - * Retrieves the MySQL server version. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the MySQL server version on success. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -478,17 +292,8 @@ function mysql_get_server_info($link_identifier = null): string /** - * Returns detailed information about the last query. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns information about the statement on success. See the example below for which statements provide information, - * and what the returned value may look like. Statements that are not listed - * will return FALSE. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -504,18 +309,8 @@ function mysql_info($link_identifier = null): string /** - * Returns a result pointer containing the databases available from the - * current mysql daemon. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse - * this result pointer, or any function for result tables, such as - * mysql_fetch_array. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -531,26 +326,10 @@ function mysql_list_dbs($link_identifier = null) /** - * Retrieves information about the given table name. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW COLUMNS FROM - * table [LIKE 'name'] statement instead. - * - * @param string $database_name The name of the database that's being queried. - * @param string $table_name The name of the table that's being queried. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * The returned result can be used with mysql_field_flags, - * mysql_field_len, - * mysql_field_name and - * mysql_field_type. + * @param string $database_name + * @param string $table_name + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -566,15 +345,8 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden /** - * Retrieves the current MySQL server threads. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -590,24 +362,9 @@ function mysql_list_processes($link_identifier = null) /** - * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param string $database The name of the database - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param string $database + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -623,13 +380,8 @@ function mysql_list_tables(string $database, $link_identifier = null) /** - * Retrieves the number of fields from a query. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int Returns the number of fields in the result set resource on - * success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -645,15 +397,8 @@ function mysql_num_fields($result): int /** - * Retrieves the number of rows from a result set. This command is only valid - * for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or - * DELETE query, use mysql_affected_rows. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int The number of rows in a result set on success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -669,41 +414,9 @@ function mysql_num_rows($result): int /** - * mysql_query sends a unique query (multiple queries - * are not supported) to the currently - * active database on the server that's associated with the - * specified link_identifier. - * - * @param string $query An SQL query - * - * The query string should not end with a semicolon. - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, - * mysql_query - * returns a resource on success. - * - * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, - * mysql_query returns TRUE on success. - * - * The returned result resource should be passed to - * mysql_fetch_array, and other - * functions for dealing with result tables, to access the returned data. - * - * Use mysql_num_rows to find out how many rows - * were returned for a SELECT statement or - * mysql_affected_rows to find out how many - * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - * statement. - * - * mysql_query will also fail and return FALSE - * if the user does not have permission to access the table(s) referenced by - * the query. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -719,28 +432,9 @@ function mysql_query(string $query, $link_identifier = null) /** - * Escapes special characters in the unescaped_string, - * taking into account the current character set of the connection so that it - * is safe to place it in a mysql_query. If binary data - * is to be inserted, this function must be used. - * - * mysql_real_escape_string calls MySQL's library function - * mysql_real_escape_string, which prepends backslashes to the following characters: - * \x00, \n, - * \r, \, ', - * " and \x1a. - * - * This function must always (with few exceptions) be used to make data - * safe before sending a query to MySQL. - * - * @param string $unescaped_string The string that is to be escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the escaped string. + * @param string $unescaped_string + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -756,28 +450,10 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n /** - * Retrieves the contents of one cell from a MySQL result set. - * - * When working on large result sets, you should consider using one - * of the functions that fetch an entire row (specified below). As - * these functions return the contents of multiple cells in one - * function call, they're MUCH quicker than - * mysql_result. Also, note that specifying a - * numeric offset for the field argument is much quicker than - * specifying a fieldname or tablename.fieldname argument. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row The row number from the result that's being retrieved. Row numbers - * start at 0. - * @param mixed $field 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 - * dot field name (tablename.fieldname). If the column name has been - * 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. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -793,17 +469,8 @@ function mysql_result($result, int $row, $field = 0): string /** - * Sets the current active database on the server that's associated with the - * specified link identifier. Every subsequent call to - * mysql_query will be made on the active database. - * - * @param string $database_name The name of the database that is to be selected. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -818,15 +485,8 @@ function mysql_select_db(string $database_name, $link_identifier = null): void /** - * Sets the default character set for the current connection. - * - * @param string $charset A valid character set name. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $charset + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -841,20 +501,9 @@ function mysql_set_charset(string $charset, $link_identifier = null): void /** - * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from - * mysql_list_tables. - * @param int $i The integer index (row/table number) - * @return string The name of the table on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param resource $result + * @param int $i + * @return string * @throws MysqlException * */ @@ -870,17 +519,8 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will - * change. This means only retrieve the thread ID when needed. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int The thread ID on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -896,34 +536,9 @@ function mysql_thread_id($link_identifier = null): int /** - * mysql_unbuffered_query sends the SQL query - * query to MySQL without automatically - * fetching and buffering the result rows as - * mysql_query does. This saves a considerable - * amount of memory with SQL queries that produce large result sets, - * and you can start working on the result set immediately after the - * first row has been retrieved as you don't have to wait until the - * complete SQL query has been performed. To use - * mysql_unbuffered_query while multiple database - * connections are open, you must specify the optional parameter - * link_identifier to identify which connection - * you want to use. - * - * @param string $query The SQL query to execute. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query - * returns a resource on success. - * - * For other type of SQL statements, UPDATE, DELETE, DROP, etc, - * mysql_unbuffered_query returns TRUE on success. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ diff --git a/generated/8.3/mysqli.php b/generated/8.3/mysqli.php index 8eb49159..b6c6660f 100644 --- a/generated/8.3/mysqli.php +++ b/generated/8.3/mysqli.php @@ -5,9 +5,7 @@ use Safe\Exceptions\MysqliException; /** - * Returns client per-process statistics. - * - * @return array|false Returns an array with client stats. + * @return array|false * */ function mysqli_get_client_stats() diff --git a/generated/8.3/network.php b/generated/8.3/network.php index d52ae368..e2d37215 100644 --- a/generated/8.3/network.php +++ b/generated/8.3/network.php @@ -5,9 +5,6 @@ use Safe\Exceptions\NetworkException; /** - * closelog closes the descriptor being used to write to - * the system logger. The use of closelog is optional. - * * @throws NetworkException * */ @@ -22,227 +19,12 @@ function closelog(): void /** - * Fetch DNS Resource Records associated with the given - * hostname. - * - * @param string $hostname hostname should be a valid DNS hostname such - * as "www.example.com". Reverse lookups can be generated - * using in-addr.arpa notation, but - * gethostbyaddr is more suitable for - * the majority of reverse lookups. - * - * Per DNS standards, email addresses are given in user.host format (for - * example: hostmaster.example.com as opposed to hostmaster@example.com), - * be sure to check this value and modify if necessary before using it - * with a functions such as mail. - * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. - * To limit the query, specify the optional type - * parameter. May be any one of the following: - * DNS_A, DNS_CNAME, - * DNS_HINFO, DNS_CAA, - * DNS_MX, DNS_NS, - * DNS_PTR, DNS_SOA, - * DNS_TXT, DNS_AAAA, - * DNS_SRV, DNS_NAPTR, - * DNS_A6, DNS_ALL - * or DNS_ANY. - * - * Because of eccentricities in the performance of libresolv - * between platforms, DNS_ANY will not - * always return every record, the slower DNS_ALL - * will collect all records more reliably. - * - * Windows: DNS_CAA is not supported. - * Support for DNS_A6 is not implemented. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource - * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any - * Additional Records. - * @param bool $raw The type will be interpreted as a raw DNS type ID - * (the DNS_* constants cannot be used). - * The return value will contain a data key, which needs - * to be manually parsed. - * @return list This function returns an array of associative arrays. Each associative array contains - * at minimum the following keys: - * - * Basic DNS attributes - * - * - * - * Attribute - * Meaning - * - * - * - * - * host - * - * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * - * class - * - * dns_get_record only returns Internet class records and as - * such this parameter will always return IN. - * - * - * - * type - * - * String containing the record type. Additional attributes will also be contained - * in the resulting array dependant on the value of type. See table below. - * - * - * - * ttl - * - * "Time To Live" remaining for this record. This will not equal - * the record's original ttl, but will rather equal the original ttl minus whatever - * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * - * Other keys in associative arrays dependant on 'type' - * - * - * - * Type - * Extra Columns - * - * - * - * - * A - * - * ip: An IPv4 addresses in dotted decimal notation. - * - * - * - * MX - * - * pri: Priority of mail exchanger. - * Lower numbers indicate greater priority. - * target: FQDN of the mail exchanger. - * See also dns_get_mx. - * - * - * - * CNAME - * - * target: FQDN of location in DNS namespace to which - * the record is aliased. - * - * - * - * NS - * - * target: FQDN of the name server which is authoritative - * for this hostname. - * - * - * - * PTR - * - * target: Location within the DNS namespace to which - * this record points. - * - * - * - * TXT - * - * txt: Arbitrary string data associated with this record. - * - * - * - * HINFO - * - * cpu: IANA number designating the CPU of the machine - * referenced by this record. - * os: IANA number designating the Operating System on - * the machine referenced by this record. - * See IANA's Operating System - * Names for the meaning of these values. - * - * - * - * CAA - * - * flags: A one-byte bitfield; currently only bit 0 is defined, - * meaning 'critical'; other bits are reserved and should be ignored. - * tag: The CAA tag name (alphanumeric ASCII string). - * value: The CAA tag value (binary string, may use subformats). - * For additional information see: RFC 6844 - * - * - * - * SOA - * - * mname: FQDN of the machine from which the resource - * records originated. - * rname: Email address of the administrative contact - * for this domain. - * serial: Serial # of this revision of the requested - * domain. - * refresh: Refresh interval (seconds) secondary name - * servers should use when updating remote copies of this domain. - * retry: Length of time (seconds) to wait after a - * failed refresh before making a second attempt. - * expire: Maximum length of time (seconds) a secondary - * DNS server should retain remote copies of the zone data without a - * successful refresh before discarding. - * minimum-ttl: Minimum length of time (seconds) a - * client can continue to use a DNS resolution before it should request - * a new resolution from the server. Can be overridden by individual - * resource records. - * - * - * - * AAAA - * - * ipv6: IPv6 address - * - * - * - * A6 - * - * masklen: Length (in bits) to inherit from the target - * specified by chain. - * ipv6: Address for this specific record to merge with - * chain. - * chain: Parent record to merge with - * ipv6 data. - * - * - * - * SRV - * - * pri: (Priority) lowest priorities should be used first. - * weight: Ranking to weight which of commonly prioritized - * targets should be chosen at random. - * target and port: hostname and port - * where the requested service can be found. - * For additional information see: RFC 2782 - * - * - * - * NAPTR - * - * order and pref: Equivalent to - * pri and weight above. - * flags, services, regex, - * and replacement: Parameters as defined by - * RFC 2915. - * - * - * - * - * + * @param string $hostname + * @param int $type + * @param array|null $authoritative_name_servers + * @param array|null $additional_records + * @param bool $raw + * @return list * @throws NetworkException * */ @@ -258,51 +40,12 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authorit /** - * Initiates a socket connection to the resource specified by - * hostname. - * - * PHP supports targets in the Internet and Unix domains as described in - * . A list of supported transports can also be - * retrieved using stream_get_transports. - * - * The socket will by default be opened in blocking mode. You can - * switch it to non-blocking mode by using - * stream_set_blocking. - * - * The function stream_socket_client is similar but - * provides a richer set of options, including non-blocking connection and the - * ability to provide a stream context. - * - * @param string $hostname If OpenSSL support is - * installed, you may prefix the hostname - * with either ssl:// or tls:// to - * use an SSL or TLS client connection over TCP/IP to connect to the - * remote host. - * @param int $port The port number. This can be omitted and skipped with - * -1 for transports that do not use ports, such as - * unix://. - * @param int|null $error_code If provided, holds the system level error number that occurred in the - * system-level connect() call. - * - * If the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the - * connect() call. This is most likely due to a - * problem initializing the socket. - * @param null|string $error_message The error message as a string. - * @param float|null $timeout The connection timeout, in seconds. When NULL, the - * default_socket_timeout php.ini setting is used. - * - * If you need to set a timeout for reading/writing data over the - * socket, use stream_set_timeout, as the - * timeout parameter to - * fsockopen only applies while connecting the - * socket. - * @return resource fsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). If the call fails, it will return FALSE + * @param string $hostname + * @param int $port + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @return resource * @throws NetworkException * */ @@ -322,11 +65,7 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? /** - * gethostname gets the standard host name for - * the local machine. - * - * @return string Returns a string with the hostname on success, otherwise FALSE is - * returned. + * @return string * @throws NetworkException * */ @@ -342,12 +81,8 @@ function gethostname(): string /** - * getprotobyname returns the protocol number - * associated with the protocol protocol as per - * /etc/protocols. - * - * @param string $protocol The protocol name. - * @return int Returns the protocol number. + * @param string $protocol + * @return int * @throws NetworkException * */ @@ -363,12 +98,8 @@ function getprotobyname(string $protocol): int /** - * getprotobynumber returns the protocol name - * associated with protocol protocol as per - * /etc/protocols. - * - * @param int $protocol The protocol number. - * @return string Returns the protocol name as a string. + * @param int $protocol + * @return string * @throws NetworkException * */ @@ -384,14 +115,9 @@ function getprotobynumber(int $protocol): string /** - * getservbyport returns the Internet service - * associated with port for the specified - * protocol as per /etc/services. - * - * @param int $port The port number. - * @param string $protocol protocol is either "tcp" - * or "udp" (in lowercase). - * @return string Returns the Internet service name as a string. + * @param int $port + * @param string $protocol + * @return string * @throws NetworkException * */ @@ -407,14 +133,7 @@ function getservbyport(int $port, string $protocol): string /** - * Registers a function that will be called when PHP starts sending output. - * - * The callback is executed just after PHP prepares all - * headers to be sent, and before any other output is sent, creating a window - * to manipulate the outgoing headers before being sent. - * - * @param callable $callback Function called just before the headers are sent. It gets no parameters - * and the return value is ignored. + * @param callable $callback * @throws NetworkException * */ @@ -429,12 +148,8 @@ function header_register_callback(callable $callback): void /** - * This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * string representation. - * - * @param string $ip A 32bit IPv4, or 128bit IPv6 address. - * @return string Returns a string representation of the address. + * @param string $ip + * @return string * @throws NetworkException * */ @@ -450,15 +165,8 @@ function inet_ntop(string $ip): string /** - * This function converts a human readable IPv4 or IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * 32bit or 128bit binary structure. - * - * @param string $ip A human readable IPv4 or IPv6 address. - * @return string Returns the in_addr representation of the given - * ip, or FALSE if a syntactically invalid - * ip is given (for example, an IPv4 address - * without dots or an IPv6 address without colons). + * @param string $ip + * @return string * @throws NetworkException * */ @@ -474,12 +182,8 @@ function inet_pton(string $ip): string /** - * The function long2ip generates an Internet address - * in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer - * representation. - * - * @param int $ip A proper address representation in long integer. - * @return string Returns the Internet IP address as a string. + * @param int $ip + * @return string * @throws NetworkException * */ @@ -495,96 +199,7 @@ function long2ip(int $ip): string /** - * Returns an enumeration of network interfaces (adapters) on the local machine. - * - * @return array Returns an associative array where the key is the name of the interface and - * the value an associative array of interface attributes. - * - * Each interface associative array contains: - * - * Interface attributes - * - * - * - * Name - * Description - * - * - * - * - * description - * - * Optional string value for description of the interface. - * Windows only. - * - * - * - * mac - * - * Optional string value for MAC address of the interface. - * Windows only. - * - * - * - * mtu - * - * Integer value for Maximum transmission unit (MTU) of the interface. - * Windows only. - * - * - * - * unicast - * - * Array of associative arrays, see Unicast attributes below. - * - * - * - * up - * - * Boolean status (on/off) for interface. - * - * - * - * - * - * - * - * Unicast attributes - * - * - * - * Name - * Description - * - * - * - * - * flags - * - * Integer value. - * - * - * - * family - * - * Integer value. - * - * - * - * address - * - * String value for address in either IPv4 or IPv6. - * - * - * - * netmask - * - * String value for netmask in either IPv4 or IPv6. - * - * - * - * - * + * @return array * @throws NetworkException * */ @@ -600,134 +215,9 @@ function net_get_interfaces(): array /** - * openlog opens a connection to the system - * logger for a program. - * - * The use of openlog is optional. It - * will automatically be called by syslog if - * necessary, in which case prefix will default - * to FALSE. - * - * @param string $prefix The string prefix is added to each message. - * @param int $flags The flags argument is used to indicate - * what logging options will be used when generating a log message. - * - * openlog Options - * - * - * - * Constant - * Description - * - * - * - * - * LOG_CONS - * - * if there is an error while sending data to the system logger, - * write directly to the system console - * - * - * - * LOG_NDELAY - * - * open the connection to the logger immediately - * - * - * - * LOG_ODELAY - * - * (default) delay opening the connection until the first - * message is logged - * - * - * - * LOG_PERROR - * print log message also to standard error - * - * - * LOG_PID - * include PID with each message - * - * - * - * - * You can use one or more of these options. When using multiple options - * you need to OR them, i.e. to open the connection - * immediately, write to the console and include the PID in each message, - * you will use: LOG_CONS | LOG_NDELAY | LOG_PID - * @param int $facility The facility argument is used to specify what - * type of program is logging the message. This allows you to specify - * (in your machine's syslog configuration) how messages coming from - * different facilities will be handled. - * - * openlog Facilities - * - * - * - * Constant - * Description - * - * - * - * - * LOG_AUTH - * - * security/authorization messages (use - * LOG_AUTHPRIV instead - * in systems where that constant is defined) - * - * - * - * LOG_AUTHPRIV - * security/authorization messages (private) - * - * - * LOG_CRON - * clock daemon (cron and at) - * - * - * LOG_DAEMON - * other system daemons - * - * - * LOG_KERN - * kernel messages - * - * - * LOG_LOCAL0 ... LOG_LOCAL7 - * reserved for local use, these are not available in Windows - * - * - * LOG_LPR - * line printer subsystem - * - * - * LOG_MAIL - * mail subsystem - * - * - * LOG_NEWS - * USENET news subsystem - * - * - * LOG_SYSLOG - * messages generated internally by syslogd - * - * - * LOG_USER - * generic user-level messages - * - * - * LOG_UUCP - * UUCP subsystem - * - * - * - * - * - * LOG_USER is the only valid log type under Windows - * operating systems + * @param string $prefix + * @param int $flags + * @param int $facility * @throws NetworkException * */ @@ -742,20 +232,12 @@ function openlog(string $prefix, int $flags, int $facility): void /** - * This function behaves exactly as fsockopen with the - * difference that the connection is not closed after the script finishes. - * It is the persistent version of fsockopen. - * * @param string $hostname * @param int $port * @param int|null $error_code * @param null|string $error_message * @param float|null $timeout - * @return resource pfsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @return resource * @throws NetworkException * */ @@ -775,64 +257,8 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, /** - * syslog generates a log message that will be - * distributed by the system logger. - * - * For information on setting up a user defined log handler, see the - * syslog.conf - * 5 Unix manual page. More - * information on the syslog facilities and option can be found in the man - * pages for syslog - * 3 on Unix machines. - * - * @param int $priority priority is a combination of the facility and - * the level. Possible values are: - * - * syslog Priorities (in descending order) - * - * - * - * Constant - * Description - * - * - * - * - * LOG_EMERG - * system is unusable - * - * - * LOG_ALERT - * action must be taken immediately - * - * - * LOG_CRIT - * critical conditions - * - * - * LOG_ERR - * error conditions - * - * - * LOG_WARNING - * warning conditions - * - * - * LOG_NOTICE - * normal, but significant, condition - * - * - * LOG_INFO - * informational message - * - * - * LOG_DEBUG - * debug-level message - * - * - * - * - * @param string $message The message to send. + * @param int $priority + * @param string $message * @throws NetworkException * */ diff --git a/generated/8.3/oci8.php b/generated/8.3/oci8.php index 85acf026..e1235f27 100644 --- a/generated/8.3/oci8.php +++ b/generated/8.3/oci8.php @@ -5,99 +5,12 @@ use Safe\Exceptions\Oci8Exception; /** - * Binds the PHP array var to the Oracle - * placeholder param, which points to an Oracle PL/SQL - * array. Whether it will be used for input or output will be determined at - * run-time. - * - * @param resource $statement A valid OCI statement identifier. - * @param string $param The Oracle placeholder. - * @param array $var An array. - * @param int $max_array_length Sets the maximum length both for incoming and result arrays. - * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, - * oci_bind_array_by_name will find the longest - * element in the incoming array and will use it as the maximum length. - * @param int $type Should be used to set the type of PL/SQL array items. See list of - * available types below: - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * - * - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * - * - * - * SQLT_FLT - for arrays of FLOAT. - * - * - * - * - * SQLT_AFC - for arrays of CHAR. - * - * - * - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * - * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * - * SQLT_AVC - for arrays of CHARZ. - * - * - * - * - * SQLT_STR - for arrays of STRING. - * - * - * - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * - * SQLT_ODT - for arrays of DATE. - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * SQLT_FLT - for arrays of FLOAT. - * - * SQLT_AFC - for arrays of CHAR. - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * SQLT_VCS - for arrays of VARCHAR. - * - * SQLT_AVC - for arrays of CHARZ. - * - * SQLT_STR - for arrays of STRING. - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * SQLT_ODT - for arrays of DATE. + * @param resource $statement + * @param string $param + * @param array $var + * @param int $max_array_length + * @param int $max_item_length + * @param int $type * @throws Oci8Exception * */ @@ -112,198 +25,11 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max /** - * Binds a PHP variable var to the Oracle - * bind variable placeholder param. Binding - * is important for Oracle database performance and also as a way to - * avoid SQL Injection security issues. - * - * Binding allows the database to reuse the statement context and - * caches from previous executions of the statement, even if another - * user or process originally executed it. Binding reduces SQL - * Injection concerns because the data associated with a bind - * variable is never treated as part of the SQL statement. It does - * not need quoting or escaping. - * - * PHP variables that have been bound can be changed and the - * statement re-executed without needing to re-parse the statement or - * re-bind. - * - * In Oracle, bind variables are commonly divided - * into IN binds for values that are passed into - * the database, and OUT binds for values that are - * returned to PHP. A bind variable may be - * both IN and OUT. Whether a - * bind variable will be used for input or output is determined at - * run-time. - * - * You must specify max_length when using - * an OUT bind so that PHP allocates enough memory - * to hold the returned value. - * - * For IN binds it is recommended to set - * the max_length length if the statement is - * re-executed multiple times with different values for the PHP - * variable. Otherwise Oracle may truncate data to the length of the - * initial PHP variable value. If you don't know what the maximum - * length will be, then re-call oci_bind_by_name - * with the current data size prior to - * each oci_execute call. Binding an - * unnecessarily large length will have an impact on process memory - * in the database. - * - * A bind call tells Oracle which memory address to read data from. - * For IN binds that address needs to contain - * valid data when oci_execute is called. This - * means that the variable bound must remain in scope until - * execution. If it doesn't, unexpected results or errors such as - * "ORA-01460: unimplemented or unreasonable conversion requested" - * may occur. For OUT binds one symptom is no - * value being set in the PHP variable. - * - * For a statement that is repeatedly executed, binding values that - * never change may reduce the ability of the Oracle optimizer to - * choose the best statement execution plan. Long running statements - * that are rarely re-executed may not benefit from binding. However - * in both cases, binding might be safer than joining strings into a - * SQL statement, as this can be a security risk if unfiltered user - * text is concatenated. - * - * @param resource $statement A valid OCI8 statement identifier. - * @param string $param The colon-prefixed bind variable placeholder used in the - * statement. The colon is optional - * in param. Oracle does not use question - * marks for placeholders. - * @param mixed $var The PHP variable to be associated with param - * @param int $max_length Sets the maximum length for the data. If you set it to -1, this - * function will use the current length - * of var to set the maximum - * length. In this case the var must - * exist and contain data - * when oci_bind_by_name is called. - * @param int $type The datatype that Oracle will treat the data as. The - * default type used - * is SQLT_CHR. Oracle will convert the data - * between this type and the database column (or PL/SQL variable - * type), when possible. - * - * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - * need to allocate it first using the - * oci_new_descriptor function. The - * length is not used for abstract datatypes - * and should be set to -1. - * - * Possible values for type are: - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * - * - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * - * - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * - * - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * - * - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * - * - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * - * - * - * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * - * SQLT_CHR - for VARCHARs; - * - * - * - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * - * - * - * SQLT_LNG - for LONG columns; - * - * - * - * - * SQLT_LBI - for LONG RAW columns; - * - * - * - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * - * - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) - * - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * SQLT_INT or OCI_B_INT - for integers; - * - * SQLT_CHR - for VARCHARs; - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * SQLT_LNG - for LONG columns; - * - * SQLT_LBI - for LONG RAW columns; - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) + * @param resource $statement + * @param string $param + * @param mixed $var + * @param int $max_length + * @param int $type * @throws Oci8Exception * */ @@ -318,10 +44,7 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 /** - * Invalidates a cursor, freeing all associated resources and cancels the - * ability to read from it. - * - * @param resource $statement An OCI statement. + * @param resource $statement * @throws Oci8Exception * */ @@ -336,24 +59,7 @@ function oci_cancel($statement): void /** - * Commits the outstanding transaction for the - * Oracle connection. A commit ends the - * current transaction and makes permanent all changes. It releases - * all locks held. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -368,101 +74,12 @@ function oci_commit($connection): void /** - * Returns a connection identifier needed for most other OCI8 operations. - * - * For performance, most applications should use persistent connections - * with oci_pconnect instead - * of oci_connect. - * See Connection Handling for general - * information on connection management and connection pooling. - * - * From PHP 5.1.2 (PECL OCI8 1.1) oci_close can - * be used to close the connection. - * - * The second and subsequent calls to oci_connect - * with the same parameters will return the connection handle returned - * from the first call. This means that transactions in one handle are - * also in the other handles, because they use the - * same underlying database connection. If two - * handles need to be transactionally isolated from each other, use - * oci_new_connect instead. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -486,28 +103,10 @@ function oci_connect(string $username, string $password, ?string $connection_str /** - * Associates a PHP variable with a column for query fetches using oci_fetch. - * - * The oci_define_by_name call must occur before - * executing oci_execute. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param string $column The column name used in the query. - * - * Use uppercase for Oracle's default, non-case sensitive column - * names. Use the exact column name case for case-sensitive - * column names. - * @param mixed $var The PHP variable that will contain the returned column value. - * @param int $type The data type to be returned. Generally not needed. Note that - * Oracle-style data conversions are not performed. For example, - * SQLT_INT will be ignored and the returned - * data type will still be SQLT_CHR. - * - * You can optionally use oci_new_descriptor - * to allocate LOB/ROWID/BFILE descriptors. + * @param resource $statement + * @param string $column + * @param mixed $var + * @param int $type * @throws Oci8Exception * */ @@ -522,79 +121,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v /** - * Executes a statement previously returned - * from oci_parse. - * - * After execution, statements like INSERT will - * have data committed to the database by default. For statements - * like SELECT, execution performs the logic of the - * query. Query results can subsequently be fetched in PHP with - * functions like oci_fetch_array. - * - * Each parsed statement may be executed multiple times, saving the - * cost of re-parsing. This is commonly used - * for INSERT statements when data is bound - * with oci_bind_by_name. - * - * @param resource $statement A valid OCI statement identifier. - * @param int $mode An optional second parameter can be one of the following constants: - * - * Execution Modes - * - * - * - * Constant - * Description - * - * - * - * - * OCI_COMMIT_ON_SUCCESS - * Automatically commit all outstanding changes for - * this connection when the statement has succeeded. This - * is the default. - * - * - * OCI_DESCRIBE_ONLY - * Make query meta data available to functions - * like oci_field_name but do not - * create a result set. Any subsequent fetch call such - * as oci_fetch_array will - * fail. - * - * - * OCI_NO_AUTO_COMMIT - * Do not automatically commit changes. Prior to PHP - * 5.3.2 (PECL OCI8 1.4) - * use OCI_DEFAULT which is equivalent - * to OCI_NO_AUTO_COMMIT. - * - * - * - * - * - * Using OCI_NO_AUTO_COMMIT mode starts or continues a - * transaction. Transactions are automatically rolled back when - * the connection is closed, or when the script ends. Explicitly - * call oci_commit to commit a transaction, - * or oci_rollback to abort it. - * - * When inserting or updating data, using transactions is - * recommended for relational data consistency and for performance - * reasons. - * - * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and - * oci_commit - * or oci_rollback is not subsequently - * called, then OCI8 will perform a rollback at the end of the - * script even if no data was changed. To avoid an unnecessary - * rollback, many scripts do not - * use OCI_NO_AUTO_COMMIT mode for queries or - * PL/SQL. Be careful to ensure the appropriate transactional - * consistency for the application when - * using oci_execute with different modes in - * the same script. + * @param resource $statement + * @param int $mode * @throws Oci8Exception * */ @@ -609,11 +137,9 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** - * Returns the name of the column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return string Returns the name as a string + * @param resource $statement + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -629,15 +155,9 @@ function oci_field_name($statement, $column): string /** - * Returns precision of the column. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the precision as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -653,15 +173,9 @@ function oci_field_precision($statement, $column): int /** - * Returns the scale of the column with column index. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the scale as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -677,11 +191,9 @@ function oci_field_scale($statement, $column): int /** - * Returns the size of a column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the size of a column in bytes + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -697,13 +209,9 @@ function oci_field_size($statement, $column): int /** - * Returns Oracle's raw "SQLT" data type of the column. - * - * If you want a field's type name, then use oci_field_type instead. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns Oracle's raw data type as a number + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -719,11 +227,9 @@ function oci_field_type_raw($statement, $column): int /** - * Returns a field's data type name. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return mixed Returns the field data type as a string or an integer + * @param resource $statement + * @param mixed $column + * @return mixed * @throws Oci8Exception * */ @@ -739,9 +245,7 @@ function oci_field_type($statement, $column) /** - * Frees a descriptor allocated by oci_new_descriptor. - * - * @param \OCILob $lob Descriptor allocated by oci_new_descriptor. + * @param \OCILob $lob * @throws Oci8Exception * */ @@ -756,11 +260,7 @@ function oci_free_descriptor(\OCILob $lob): void /** - * Frees resources associated with Oracle's cursor or statement, which was - * received from as a result of oci_parse or obtained - * from Oracle. - * - * @param resource $statement A valid OCI statement identifier. + * @param resource $statement * @throws Oci8Exception * */ @@ -775,14 +275,10 @@ function oci_free_statement($statement): void /** - * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param string $type_name Should be a valid named type (uppercase). - * @param null|string $schema Should point to the scheme, where the named type was created. The name - * of the current user is used when NULL is passed. - * @return \OCI-Collection Returns a new OCICollection object. + * @param resource $connection + * @param string $type_name + * @param null|string $schema + * @return \OCI-Collection * @throws Oci8Exception * */ @@ -802,90 +298,12 @@ function oci_new_collection($connection, string $type_name, ?string $schema = nu /** - * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and - * oci_pconnect, oci_new_connect - * does not cache connections and will always return a brand-new freshly - * opened connection handle. This is useful if your application needs - * transactional isolation between two sets of queries. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -909,11 +327,8 @@ function oci_new_connect(string $username, string $password, ?string $connection /** - * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @return resource Returns a new statement handle. + * @param resource $connection + * @return resource * @throws Oci8Exception * */ @@ -929,14 +344,9 @@ function oci_new_cursor($connection) /** - * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: - * OCI_DTYPE_FILE, OCI_DTYPE_LOB and - * OCI_DTYPE_ROWID. - * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success. + * @param resource $connection + * @param int $type + * @return \OCI-Lob|false * @throws Oci8Exception * */ @@ -952,10 +362,8 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** - * Gets the number of rows affected during statement execution. - * - * @param resource $statement A valid OCI statement identifier. - * @return 0|positive-int Returns the number of rows affected as an integer + * @param resource $statement + * @return 0|positive-int * @throws Oci8Exception * */ @@ -971,24 +379,9 @@ function oci_num_rows($statement): int /** - * Prepares sql using - * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, - * oci_execute and other functions. - * - * Statement identifiers can be freed - * with oci_free_statement or by setting the - * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. - * @param string $sql The SQL or PL/SQL statement. - * - * SQL statements should not end with a - * semi-colon (";"). PL/SQL - * statements should end with a semi-colon - * (";"). - * @return resource Returns a statement handle on success. + * @param resource $connection + * @param string $sql + * @return resource * @throws Oci8Exception * */ @@ -1004,91 +397,12 @@ function oci_parse($connection, string $sql) /** - * Creates a persistent connection to an Oracle server and logs on. - * - * Persistent connections are cached and re-used between requests, resulting in - * reduced overhead on each page load; a typical PHP application will have a - * single persistent connection open against an Oracle server per Apache child - * process (or PHP FPM process). See the OCI8 - * Connection Handling and Connection Pooling section for more - * information. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -1112,30 +426,8 @@ function oci_pconnect(string $username, string $password, ?string $connection_st /** - * Registers a user-defined callback function to connection. - * If connection fails due to instance or network failure, - * the registered callback function will be invoked for several times during - * failover. See OCI8 Transparent Application Failover - * (TAF) Support for information. - * - * When oci_register_taf_callback is called multiple times, - * each registration overwrites the previous one. - * - * Use oci_unregister_taf_callback to explicitly unregister a - * user-defined callback. - * - * TAF callback registration will NOT be saved across - * persistent connections, therefore the callback needs to be re-registered for - * a new persistent connection. - * - * @param resource $connection An Oracle connection identifier. - * @param callable $callback A user-defined callback to register for Oracle TAF. It can be a - * string of the function name or a Closure (anonymous function). - * - * The interface of a TAF user-defined callback function is as follows: - * - * See the parameter description and an example on - * OCI8 Transparent Application Failover (TAF) Support page. + * @param resource $connection + * @param callable $callback * @throws Oci8Exception * */ @@ -1150,20 +442,9 @@ function oci_register_taf_callback($connection, callable $callback): void /** - * Returns the data from column in the current row, - * fetched by oci_fetch. - * - * For details on the data type mapping performed by - * the OCI8 extension, see the datatypes - * supported by the driver - * * @param resource $statement - * @param mixed $column Can be either use the column number (1-based) or the column name. - * The case of the column name must be the case that Oracle meta data - * describes the column as, which is uppercase for columns created - * case insensitively. - * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and - * FILEs). + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -1179,25 +460,7 @@ function oci_result($statement, $column): string /** - * Reverts all uncommitted changes for the Oracle - * connection and ends the transaction. It - * releases all locks held. All Oracle SAVEPOINTS - * are erased. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect - * or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -1212,10 +475,8 @@ function oci_rollback($connection): void /** - * Returns a string with the Oracle Database version and available options - * * @param resource $connection - * @return string Returns the version information as a string. + * @return string * @throws Oci8Exception * */ @@ -1231,23 +492,8 @@ function oci_server_version($connection): string /** - * Sets the action name for Oracle tracing. - * - * The action name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The action name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string up to 32 bytes long. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1262,34 +508,8 @@ function oci_set_action($connection, string $action): void /** - * Sets a timeout limiting the maxium time a database round-trip using this connection may take. - * - * Each OCI8 operation may make zero or more calls to Oracle's client - * library. These internal calls may then may make zero or more - * round-trips to Oracle Database. If any one of those round-trips - * takes more than time_out milliseconds, then the - * operation is cancelled and an error is returned to the application. - * - * The time_out value applies to each round-trip - * individually, not to the sum of all round-trips. Time spent - * processing in PHP OCI8 before or after the completion of each - * round-trip is not counted. - * - * When a call is interrupted, Oracle will attempt to clean up the - * connection for reuse. This operation is allowed to run for - * another time_out period. Depending on the - * outcome of the cleanup, the connection may or may not be reusable. - * - * When persistent connections are used, the timeout value will be - * retained across PHP requests. - * - * The oci_set_call_timeout function is available - * when OCI8 uses Oracle 18 (or later) Client libraries. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @param resource $connection + * @param int $timeout * @throws Oci8Exception * */ @@ -1304,27 +524,8 @@ function oci_set_call_timeout($connection, int $timeout): void /** - * Sets the client identifier used by various database components to - * identify lightweight application users who authenticate as the same - * database user. - * - * The client identifier is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The identifier can subsequently be queried, for example - * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') - * FROM DUAL. Database administration views such - * as V$SESSION will also contain the value. It - * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE - * for tracing and can also be used for auditing. - * - * The value may be retained across page requests that use the same persistent connection. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_id User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_id * @throws Oci8Exception * */ @@ -1339,21 +540,8 @@ function oci_set_client_identifier($connection, string $client_id): void /** - * Sets the client information for Oracle tracing. - * - * The client information is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The client information can subsequently be queried from database - * administration views such as V$SESSION. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_info User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_info * @throws Oci8Exception * */ @@ -1368,22 +556,8 @@ function oci_set_client_info($connection, string $client_info): void /** - * Sets the DBOP for Oracle tracing. - * - * The database operation name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when a SQL - * statement is executed. - * - * The database operation can subsequently be queried from database administration - * views such as V$SQL_MONITOR. - * - * The oci_set_db_operation function is available - * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1398,26 +572,7 @@ function oci_set_db_operation($connection, string $action): void /** - * Sets the database "edition" of objects to be used by a subsequent - * connections. - * - * Oracle Editions allow concurrent versions of applications to run - * using the same schema and object names. This is useful for - * upgrading live systems. - * - * Call oci_set_edition before calling - * oci_connect, oci_pconnect - * or oci_new_connect. - * - * If an edition is set that is not valid in the database, connection - * will fail even if oci_set_edition returns success. - * - * When using persistent connections, if a connection with the - * requested edition setting already exists, it is reused. Otherwise, - * a different persistent connection is created - * - * @param string $edition Oracle Database edition name previously created with the SQL - * "CREATE EDITION" command. + * @param string $edition * @throws Oci8Exception * */ @@ -1432,23 +587,8 @@ function oci_set_edition(string $edition): void /** - * Sets the module name for Oracle tracing. - * - * The module name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $name User chosen string up to 48 bytes long. + * @param resource $connection + * @param string $name * @throws Oci8Exception * */ @@ -1463,28 +603,8 @@ function oci_set_module_name($connection, string $name): void /** - * Sets the internal buffer size used to fetch each CLOB or BLOB value when the - * implementation gets the internal Oracle LOB locator from the database after - * a successful query call to oci_execute and for each - * subsequent internal fetch request to the database. Increasing this value - * can improve the performance of fetching smaller LOBs by reducing round-trips - * between PHP and the database. Memory usage will change. - * - * The value affects LOBs returned as OCILob instances and also those returned - * using OCI_RETURN_LOBS. - * - * Call oci_set_prefetch_lob before - * calling oci_execute. If it is not called, the value - * of oci8.prefetch_lob_size - * is used. - * - * The LOB prefetch value should only be set with Oracle Database 12.2 or later. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $prefetch_lob_size The number of bytes of each LOB to be prefetched, >= 0 + * @param resource $statement + * @param int $prefetch_lob_size * @throws Oci8Exception * */ @@ -1499,56 +619,8 @@ function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void /** - * Sets the number of rows to be buffered by the Oracle Client - * libraries after a successful query call - * to oci_execute and for each subsequent - * internal fetch request to the database. For queries returning a - * large number of rows, performance can be significantly improved by - * increasing the prefetch count above the - * default oci8.default_prefetch - * value. - * - * Prefetching is Oracle's efficient way of returning more than one - * data row from the database in each network request. This can - * result in better network and CPU utilization. The buffering of - * rows is internal to OCI8 and the behavior of OCI8 fetching - * functions is unchanged regardless of the prefetch count. For - * example, oci_fetch_row will always return one - * row. The prefetch buffer is per-statement and is not used by - * re-executed statements or by other connections. - * - * Call oci_set_prefetch before - * calling oci_execute. - * - * A tuning goal is to set the prefetch value to a reasonable size for - * the network and database to handle. For queries returning a very - * large number of rows, overall system efficiency might be better if - * rows are retrieved from the database in several chunks (i.e set the - * prefetch value smaller than the number of rows). This allows the - * database to handle other users' statements while the PHP script is - * processing the current set of rows. - * - * Query prefetching was introduced in Oracle 8i. REF CURSOR - * prefetching was introduced in Oracle 11gR2 and occurs when PHP is - * linked with Oracle 11gR2 (or later) Client libraries. - * Nested cursor prefetching was - * introduced in Oracle 11gR2 and requires both the Oracle Client - * libraries and the database to be version 11gR2 or greater. - * - * Prefetching is not supported when queries contain LONG or LOB - * columns. The prefetch value is ignored and single-row fetches will - * be used in all the situations when prefetching is not supported. - * - * When using Oracle Database 12c, the prefetch - * value set by PHP can be overridden by Oracle's - * client oraaccess.xml configuration file. Refer - * to Oracle documentation for more detail. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $rows The number of rows to be prefetched, >= 0 + * @param resource $statement + * @param int $rows * @throws Oci8Exception * */ @@ -1563,64 +635,8 @@ function oci_set_prefetch($statement, int $rows): void /** - * Returns a keyword identifying the type of the - * OCI8 statement. - * - * @param resource $statement A valid OCI8 statement identifier from oci_parse. - * @return string Returns the type of statement as one of the - * following strings. - * - * Statement type - * - * - * - * Return String - * Notes - * - * - * - * - * ALTER - * - * - * - * BEGIN - * - * - * - * CALL - * Introduced in PHP 5.2.1 (PECL OCI8 1.2.3) - * - * - * CREATE - * - * - * - * DECLARE - * - * - * - * DELETE - * - * - * - * DROP - * - * - * - * INSERT - * - * - * - * SELECT - * - * - * - * UPDATE - * - * - * - * UNKNOW. + * @param resource $statement + * @return string * @throws Oci8Exception * */ @@ -1636,12 +652,7 @@ function oci_statement_type($statement): string /** - * Unregister the user-defined callback function registered to connection - * by oci_register_taf_callback. See - * OCI8 Transparent Application Failover (TAF) Support - * for information. - * - * @param resource $connection An Oracle connection identifier. + * @param resource $connection * @throws Oci8Exception * */ diff --git a/generated/8.3/opcache.php b/generated/8.3/opcache.php index 88d1c435..df3d1999 100644 --- a/generated/8.3/opcache.php +++ b/generated/8.3/opcache.php @@ -5,11 +5,7 @@ use Safe\Exceptions\OpcacheException; /** - * This function compiles a PHP script and adds it to the opcode cache without - * executing it. This can be used to prime the cache after a Web server - * restart by pre-caching files that will be included in later requests. - * - * @param string $filename The path to the PHP script to be compiled. + * @param string $filename * @throws OpcacheException * */ @@ -24,11 +20,8 @@ function opcache_compile_file(string $filename): void /** - * This function returns state information about the in-memory cache instance. It will not return any - * information about the file cache. - * - * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @param bool $include_scripts + * @return array * @throws OpcacheException * */ diff --git a/generated/8.3/openssl.php b/generated/8.3/openssl.php index 776b9669..2bcc19fd 100644 --- a/generated/8.3/openssl.php +++ b/generated/8.3/openssl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\OpensslException; /** - * Gets the cipher initialization vector (iv) length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -24,10 +22,8 @@ function openssl_cipher_iv_length(string $cipher_algo): int /** - * Gets the cipher key length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -43,14 +39,11 @@ function openssl_cipher_key_length(string $cipher_algo): int /** - * Decrypts a CMS message. - * - * @param string $input_filename The name of a file containing encrypted content. - * @param string $output_filename The name of the file to deposit the decrypted content. - * @param \OpenSSLCertificate|string $certificate The name of the file containing a certificate of the recipient. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key The name of the file containing a PKCS#8 key. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key + * @param int $encoding * @throws OpensslException * */ @@ -71,17 +64,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c /** - * This function encrypts content to one or more recipients, - * based on the certificates that are passed to it. - * - * @param string $input_filename The file to be encrypted. - * @param string $output_filename The output file. - * @param \OpenSSLCertificate|array|string $certificate Recipients to encrypt to. - * @param array|null $headers Headers to include when S/MIME is used. - * @param int $flags Flags to be passed to CMS_sign. - * @param int $encoding An encoding to output. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param int $cipher_algo A cypher to use. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|array|string $certificate + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param int $cipher_algo * @throws OpensslException * */ @@ -96,8 +85,6 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c /** - * Performs the exact analog to openssl_pkcs7_read. - * * @param string $input_filename * @param array $certificates * @throws OpensslException @@ -114,19 +101,14 @@ function openssl_cms_read(string $input_filename, array &$certificates): void /** - * This function signs a file with an X.509 certificate and key. - * - * @param string $input_filename The name of the file to be signed. - * @param string $output_filename The name of the file to deposit the results. - * @param \OpenSSLCertificate|string $certificate The signing certificate. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The key associated with certificate. - * See Key/Certificate parameters for a list of valid values. - * @param array|null $headers An array of headers to be included in S/MIME output. - * @param int $flags Flags to be passed to cms_sign. - * @param int $encoding The encoding of the output file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param null|string $untrusted_certificates_filename Intermediate certificates to be included in the signature. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -145,18 +127,15 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert /** - * This function verifies a CMS signature, either attached or detached, with the specified encoding. - * - * @param string $input_filename The input file. - * @param int $flags Flags to pass to cms_verify. - * @param null|string $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. - * @param null|string $untrusted_certificates_filename A file containing additional intermediate certificates. - * @param null|string $content A file pointing to the content when signatures are detached. + * @param string $input_filename + * @param int $flags + * @param null|string $certificates + * @param array $ca_info + * @param null|string $untrusted_certificates_filename + * @param null|string $content * @param null|string $pk7 - * @param null|string $sigfile A file to save the signature to. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param null|string $sigfile + * @param int $encoding * @throws OpensslException * */ @@ -187,17 +166,9 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $cer /** - * openssl_csr_export_to_file takes the Certificate - * Signing Request represented by csr and saves it - * in PEM format into the file named by output_filename. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -212,18 +183,9 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text /** - * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in - * PEM format in output, which is passed by - * reference. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param null|string $output on success, this string will contain the PEM encoded CSR + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -238,12 +200,9 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void /** - * openssl_csr_get_public_key extracts the public key - * from csr and prepares it for use by other functions. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names This parameter is ignored - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -259,16 +218,9 @@ function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsy /** - * openssl_csr_get_subject returns subject - * distinguished name information encoded in the csr - * including fields commonName (CN), organizationName (O), countryName (C) etc. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names shortnames controls how the data is indexed in the - * array - if shortnames is TRUE (the default) then - * fields will be indexed with the short name form, otherwise, the long name - * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return array * @throws OpensslException * */ @@ -284,112 +236,11 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array /** - * openssl_csr_new generates a new CSR (Certificate Signing Request) - * based on the information provided by distinguished_names. - * - * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param array|null $options By default, the information in your system openssl.conf - * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key of - * options. You can also specify an alternative - * openssl configuration file by setting the value of the - * config key to the path of the file you want to use. - * The following keys, if present in options - * behave as their equivalents in the openssl.conf, as - * listed in the table below. - * - * Configuration overrides - * - * - * - * options key - * type - * openssl.conf equivalent - * description - * - * - * - * - * digest_alg - * string - * default_md - * Digest method or signature hash, usually one of openssl_get_md_methods - * - * - * x509_extensions - * string - * x509_extensions - * Selects which extensions should be used when creating an x509 - * certificate - * - * - * req_extensions - * string - * req_extensions - * Selects which extensions should be used when creating a CSR - * - * - * private_key_bits - * int - * default_bits - * Specifies how many bits should be used to generate a private - * key - * - * - * private_key_type - * int - * none - * Specifies the type of private key to create. This can be one - * of OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_RSA or - * OPENSSL_KEYTYPE_EC. - * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * - * encrypt_key - * bool - * encrypt_key - * Should an exported key (with passphrase) be encrypted? - * - * - * encrypt_key_cipher - * int - * none - * - * One of cipher constants. - * - * - * - * curve_name - * string - * none - * - * One of openssl_get_curve_names. - * - * - * - * config - * string - * N/A - * - * Path to your own alternative openssl.conf file. - * - * - * - * - * - * @param array|null $extra_attributes extra_attributes is used to specify additional - * configuration options for the CSR. Both distinguished_names and - * extra_attributes are associative arrays whose keys are - * converted to OIDs and applied to the relevant part of the request. - * @return \OpenSSLCertificateSigningRequest Returns the CSR. + * @param array $distinguished_names + * @param \OpenSSLAsymmetricKey $private_key + * @param array|null $options + * @param array|null $extra_attributes + * @return \OpenSSLCertificateSigningRequest * @throws OpensslException * */ @@ -411,25 +262,13 @@ function openssl_csr_new(array $distinguished_names, \OpenSSLAsymmetricKey &$pri /** - * openssl_csr_sign generates an x509 certificate from the given CSR. - * - * @param \OpenSSLCertificateSigningRequest|string $csr A CSR previously generated by openssl_csr_new. - * It can also be the path to a PEM encoded CSR when specified as - * file://path/to/csr or an exported string generated - * by openssl_csr_export. - * @param \OpenSSLCertificate|null|string $ca_certificate The generated certificate will be signed by ca_certificate. - * If ca_certificate is NULL, the generated certificate - * will be a self-signed certificate. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key that corresponds to - * ca_certificate. - * @param int $days days specifies the length of time for which the - * generated certificate will be valid, in days. - * @param array|null $options You can finetune the CSR signing by options. - * See openssl_csr_new for more information about - * options. - * @param int $serial An optional the serial number of issued certificate. If not specified - * it will default to 0. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param \OpenSSLCertificate|null|string $ca_certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $days + * @param array|null $options + * @param int $serial + * @return \OpenSSLCertificate * @throws OpensslException * */ @@ -451,19 +290,14 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array /** - * Takes a raw or base64 encoded string and decrypts it using a given method and key. - * - * @param string $data The encrypted message to be decrypted. - * @param string $cipher_algo The cipher method. For a list of available cipher methods, use - * openssl_get_cipher_methods. - * @param string $passphrase The key. - * @param int $options options can be one of - * OPENSSL_RAW_DATA, - * OPENSSL_ZERO_PADDING. - * @param string $iv A non-NULL Initialization Vector. - * @param null|string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. - * @param string $aad Additional authenticated data. - * @return string The decrypted string on success. + * @param string $data + * @param string $cipher_algo + * @param string $passphrase + * @param int $options + * @param string $iv + * @param null|string $tag + * @param string $aad + * @return string * @throws OpensslException * */ @@ -485,13 +319,9 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, /** - * The shared secret returned by openssl_dh_compute_key is - * often used as an encryption key to secretly communicate with a remote party. - * This is known as the Diffie-Hellman key exchange. - * - * @param string $public_key DH Public key of the remote party. - * @param \OpenSSLAsymmetricKey $private_key A local DH private key, corresponding to the public key to be shared with the remote party. - * @return string Returns shared secret on success. + * @param string $public_key + * @param \OpenSSLAsymmetricKey $private_key + * @return string * @throws OpensslException * */ @@ -507,14 +337,10 @@ function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $priva /** - * Computes a digest hash value for the given data using a given method, - * and returns a raw or binhex encoded string. - * - * @param string $data The data. - * @param string $digest_algo The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. - * @param bool $binary Setting to TRUE will return as raw output data, otherwise the return - * value is binhex encoded. - * @return string Returns the digested hash value on success. + * @param string $data + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -530,53 +356,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) /** - * Gets the list of available curve names for use in Elliptic curve - * cryptography (ECC) for public/private key operations. The two most widely - * standardized/supported curves are prime256v1 - * (NIST P-256) and secp384r1 (NIST P-384). - * - * Approximate Equivalancies of AES, RSA, DSA and ECC Keysizes - * - * - * - * AES Symmetric Keysize (Bits) - * RSA and DSA Keysize (Bits) - * ECC Keysize (Bits) - * - * - * - * - * 80 - * 1024 - * 160 - * - * - * 112 - * 2048 - * 224 - * - * - * 128 - * 3072 - * 256 - * - * - * 192 - * 7680 - * 384 - * - * - * 256 - * 15360 - * 512 - * - * - * - * - * NIST - * recommends using ECC curves with at least 256 bits. - * - * @return list An array of available curve names. + * @return list * @throws OpensslException * */ @@ -592,28 +372,12 @@ function openssl_get_curve_names(): array /** - * openssl_open opens (decrypts) - * data using the private key associated with - * the key identifier private_key and the envelope key - * encrypted_key, and fills - * output with the decrypted data. - * The envelope key is generated when the - * data are sealed and can only be used by one specific private key. See - * openssl_seal for more information. - * * @param string $data - * @param null|string $output If the call is successful the opened data is returned in this - * parameter. + * @param null|string $output * @param string $encrypted_key * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. + * @param string $cipher_algo + * @param null|string $iv * @throws OpensslException * */ @@ -632,16 +396,12 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr /** - * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), - * a key derivation function defined in PKCS5 v2. - * - * @param string $password Password from which the derived key is generated. - * @param string $salt PBKDF2 recommends a crytographic salt of at least 64 bits (8 bytes). - * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. NIST - * recommends at least 10,000. - * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1. - * @return string Returns raw binary string. + * @param string $password + * @param string $salt + * @param int $key_length + * @param int $iterations + * @param string $digest_algo + * @return string * @throws OpensslException * */ @@ -657,36 +417,11 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it /** - * openssl_pkcs12_export_to_file stores - * certificate into a file named by - * output_filename in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -701,36 +436,11 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p /** - * openssl_pkcs12_export stores - * certificate into a string named by - * output in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PKCS#12. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendlyname" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -745,13 +455,9 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str /** - * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by - * pkcs12 into a array named - * certificates. - * - * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. + * @param string $pkcs12 + * @param array|null $certificates + * @param string $passphrase * @throws OpensslException * */ @@ -766,14 +472,8 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass /** - * Decrypts the S/MIME encrypted message contained in the file specified by - * input_filename using the certificate and its - * associated private key specified by certificate and - * private_key. - * * @param string $input_filename - * @param string $output_filename The decrypted message is written to the file specified by - * output_filename. + * @param string $output_filename * @param \OpenSSLCertificate|string $certificate * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key * @throws OpensslException @@ -794,24 +494,12 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, /** - * openssl_pkcs7_encrypt takes the contents of the - * file named input_filename and encrypts them using an RC2 - * 40-bit cipher so that they can only be read by the intended recipients - * specified by certificate. - * * @param string $input_filename * @param string $output_filename - * @param \OpenSSLCertificate|array|string $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been encrypted. - * - * headers can be either an associative array - * keyed by header name, or an indexed array, where each element contains - * a single header line. - * @param int $flags flags can be used to specify options that affect - * the encoding process - see PKCS7 - * constants. - * @param int $cipher_algo One of cipher constants. + * @param \OpenSSLCertificate|array|string $certificate + * @param array $headers + * @param int $flags + * @param int $cipher_algo * @throws OpensslException * */ @@ -826,10 +514,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, /** - * - * - * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param string $data + * @param array|null $certificates * @throws OpensslException * */ @@ -844,26 +530,13 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void /** - * openssl_pkcs7_sign takes the contents of the file - * named input_filename and signs them using the - * certificate and its matching private key specified by - * certificate and private_key - * parameters. - * - * @param string $input_filename The input file you are intending to digitally sign. - * @param string $output_filename The file which the digital signature will be written to. - * @param \OpenSSLCertificate|string $certificate The X.509 certificate used to digitally sign input_filename. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key corresponding to certificate. - * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been signed (see - * openssl_pkcs7_encrypt for more information about - * the format of this parameter). - * @param int $flags flags can be used to alter the output - see PKCS7 constants. - * @param null|string $untrusted_certificates_filename untrusted_certificates_filename specifies the name of a file containing - * a bunch of extra certificates to include in the signature which can for - * example be used to help the recipient to verify the certificate that you used. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array $headers + * @param int $flags + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -882,15 +555,10 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce /** - * openssl_pkey_derive takes a set of a public_key - * and private_key and derives a shared secret, for either DH or EC keys. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key is the public key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param int $key_length If not zero, will set the desired length of the derived secret. - * @return string The derived secret on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $key_length + * @return string * @throws OpensslException * */ @@ -906,18 +574,10 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** - * openssl_pkey_export_to_file saves an ascii-armoured - * (PEM encoded) rendition of key into the file named - * by output_filename. - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key - * @param string $output_filename Path to the output file. - * @param null|string $passphrase The key can be optionally protected by a - * passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param string $output_filename + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -938,17 +598,10 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas /** - * openssl_pkey_export exports - * key as a PEM encoded string and stores it into - * output (which is passed by reference). - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key * @param null|string $output - * @param null|string $passphrase The key is optionally protected by passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -969,20 +622,8 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, /** - * This function returns the key details (bits, key, type). - * - * @param \OpenSSLAsymmetricKey $key Resource holding the key. - * @return array Returns an array with the key details in success or FALSE in failure. - * Returned array has indexes bits (number of bits), - * key (string representation of the public key) and - * type (type of the key which is one of - * OPENSSL_KEYTYPE_RSA, - * OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_EC or -1 meaning unknown). - * - * Depending on the key type used, additional details may be returned. Note that - * some elements may not always be available. + * @param \OpenSSLAsymmetricKey $key + * @return array * @throws OpensslException * */ @@ -998,21 +639,9 @@ function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array /** - * openssl_pkey_get_private parses - * private_key and prepares it for use by other functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key can be one of the following: - * - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/private key (it may contain both). - * - * - * A PEM formatted private key. - * - * @param null|string $passphrase The optional parameter passphrase must be used - * if the specified key is encrypted (protected by a passphrase). - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param null|string $passphrase + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1032,21 +661,8 @@ function openssl_pkey_get_private($private_key, ?string $passphrase = null): \Op /** - * openssl_pkey_get_public extracts the public key from - * public_key and prepares it for use by other - * functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key can be one of the following: - * - * an OpenSSLAsymmetricKey instance - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/public key (it may contain both). - * - * - * A PEM formatted public key. - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1062,15 +678,8 @@ function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey /** - * openssl_pkey_new generates a new private - * key. - * How to obtain the public component of the key is shown in an example below. - * - * @param array|null $options You can finetune the key generation (such as specifying the number of - * bits) using options. See - * openssl_csr_new for more information about - * options. - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance for the pkey on success. + * @param array|null $options + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1090,22 +699,10 @@ function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey /** - * openssl_private_decrypt decrypts - * data that was previously encrypted via - * openssl_public_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1120,20 +717,10 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat /** - * openssl_private_encrypt encrypts data - * with private private_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_public_decrypt. - * - * This function can be used e.g. to sign data (or its hash) to prove that it - * is not written by someone else. - * * @param string $data * @param null|string $encrypted_data * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param int $padding * @throws OpensslException * */ @@ -1148,21 +735,10 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat /** - * openssl_public_decrypt decrypts - * data that was previous encrypted via - * openssl_private_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to check if the message was written by the - * owner of the private key. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key corresponding that - * was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1177,23 +753,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ /** - * openssl_public_encrypt encrypts data - * with public public_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_private_decrypt. - * - * This function can be used e.g. to encrypt message which can be then read - * only by owner of the private key. It can be also used to store secure data - * in database. - * * @param string $data - * @param null|string $encrypted_data This will hold the result of the encryption. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key The public key. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param null|string $encrypted_data + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1208,19 +771,9 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ /** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer less than or equal to 2147483647. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes. + * @param int $length + * @param bool|null $strong_result + * @return string * */ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string @@ -1232,32 +785,13 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): /** - * openssl_seal seals (encrypts) - * data by using the given cipher_algo with a randomly generated - * secret key. The key is encrypted with each of the public keys - * associated with the identifiers in public_key - * and each encrypted key is returned - * in encrypted_keys. This means that one can send - * sealed data to multiple recipients (provided one has obtained their - * public keys). Each recipient must receive both the sealed data and - * the envelope key that was encrypted with the recipient's public key. - * - * @param string $data The data to seal. - * @param null|string $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. - * @param string $cipher_algo The cipher method. - * - * - * The default value ('RC4') is considered insecure. - * It is strongly recommended to explicitly specify a secure cipher method. - * - * - * @param null|string $iv The initialization vector. - * @return int Returns the length of the sealed data on success. - * If successful the sealed data is returned in - * sealed_data, and the envelope keys in - * encrypted_keys. + * @param string $data + * @param null|string $sealed_data + * @param array|null $encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param null|string $iv + * @return int * @throws OpensslException * */ @@ -1273,21 +807,10 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke /** - * openssl_sign computes a signature for the - * specified data by generating a cryptographic - * digital signature using the private key associated with - * private_key. Note that the data itself is - * not encrypted. - * - * @param string $data The string of data you wish to sign - * @param null|string $signature If the call was successful the signature is returned in - * signature. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey - * - * string - a PEM formatted key - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @param string $data + * @param null|string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int|string $algorithm * @throws OpensslException * */ @@ -1302,10 +825,8 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith /** - * Exports challenge from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated challenge string. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1321,10 +842,8 @@ function openssl_spki_export_challenge(string $spki): ?string /** - * Exports PEM formatted public key from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated PEM formatted public key. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1340,16 +859,10 @@ function openssl_spki_export(string $spki): ?string /** - * Generates a signed public key and challenge using specified hashing algorithm - * - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param string $challenge The challenge associated to associate with the SPKAC - * @param int $digest_algo The digest algorithm. See openssl_get_md_method(). - * @return null|string Returns a signed public key and challenge string. + * @param \OpenSSLAsymmetricKey $private_key + * @param string $challenge + * @param int $digest_algo + * @return null|string * @throws OpensslException * */ @@ -1365,9 +878,7 @@ function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, /** - * Validates the supplied signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge + * @param string $spki * @throws OpensslException * */ @@ -1382,23 +893,11 @@ function openssl_spki_verify(string $spki): void /** - * openssl_verify verifies that the - * signature is correct for the specified - * data using the public key associated with - * public_key. This must be the public key - * corresponding to the private key used for signing. - * - * @param string $data The string of data used to generate the signature previously - * @param string $signature A raw binary string, generated by openssl_sign or similar means - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key OpenSSLAsymmetricKey - a key, returned by openssl_get_publickey - * - * string - a PEM formatted key, example, "-----BEGIN PUBLIC KEY----- - * MIIBCgK..." - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". - * @return -1|0|1 Returns 1 if the signature is correct, 0 if it is incorrect, and - * -1. + * @param string $data + * @param string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int|string $algorithm + * @return -1|0|1 * @throws OpensslException * */ @@ -1414,63 +913,11 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm /** - * openssl_x509_checkpurpose examines a certificate to - * see if it can be used for the specified purpose. - * - * @param \OpenSSLCertificate|string $certificate The examined certificate. + * @param \OpenSSLCertificate|string $certificate * @param int $purpose - * openssl_x509_checkpurpose purposes - * - * - * - * Constant - * Description - * - * - * - * - * X509_PURPOSE_SSL_CLIENT - * Can the certificate be used for the client side of an SSL - * connection? - * - * - * X509_PURPOSE_SSL_SERVER - * Can the certificate be used for the server side of an SSL - * connection? - * - * - * X509_PURPOSE_NS_SSL_SERVER - * Can the cert be used for Netscape SSL server? - * - * - * X509_PURPOSE_SMIME_SIGN - * Can the cert be used to sign S/MIME email? - * - * - * X509_PURPOSE_SMIME_ENCRYPT - * Can the cert be used to encrypt S/MIME email? - * - * - * X509_PURPOSE_CRL_SIGN - * Can the cert be used to sign a certificate revocation list - * (CRL)? - * - * - * X509_PURPOSE_ANY - * Can the cert be used for Any/All purposes? - * - * - * - * - * These options are not bitfields - you may specify one only! - * @param array $ca_info ca_info should be an array of trusted CA files/dirs - * as described in Certificate - * Verification. - * @param null|string $untrusted_certificates_file If specified, this should be the name of a PEM encoded file holding - * certificates that can be used to help verify the certificate, although - * no trust is placed in the certificates that come from that file. - * @return bool|int Returns TRUE if the certificate can be used for the intended purpose, - * FALSE if it cannot. + * @param array $ca_info + * @param null|string $untrusted_certificates_file + * @return bool|int * @throws OpensslException * */ @@ -1490,17 +937,9 @@ function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = /** - * openssl_x509_export_to_file stores - * certificate into a file named by - * output_filename in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1515,17 +954,9 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool /** - * openssl_x509_export stores - * certificate into a string named by - * output in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PEM. + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1540,15 +971,10 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru /** - * openssl_x509_fingerprint returns the digest of - * certificate as a string. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $digest_algo The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. - * @param bool $binary When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless binary is set to TRUE in which case the raw binary representation of the message digest is returned. - * - * Returns FALSE on failure. + * @param \OpenSSLCertificate|string $certificate + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -1564,12 +990,8 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo /** - * openssl_x509_read parses the certificate supplied by - * certificate and returns an OpenSSLCertificate object for - * it. - * - * @param \OpenSSLCertificate|string $certificate X509 certificate. See Key/Certificate parameters for a list of valid values. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificate|string $certificate + * @return \OpenSSLCertificate * @throws OpensslException * */ diff --git a/generated/8.3/outcontrol.php b/generated/8.3/outcontrol.php index 2e094bc8..85c33892 100644 --- a/generated/8.3/outcontrol.php +++ b/generated/8.3/outcontrol.php @@ -5,15 +5,6 @@ use Safe\Exceptions\OutcontrolException; /** - * This function discards the contents of the output buffer. - * - * This function does not destroy the output buffer like - * ob_end_clean does. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * flag. Otherwise ob_clean will not work. - * * @throws OutcontrolException * */ @@ -28,17 +19,6 @@ function ob_clean(): void /** - * This function discards the contents of the topmost output buffer and turns - * off this output buffering. If you want to further process the buffer's - * contents you have to call ob_get_contents before - * ob_end_clean as the buffer contents are discarded - * when ob_end_clean is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_clean will not work. - * * @throws OutcontrolException * */ @@ -53,18 +33,6 @@ function ob_end_clean(): void /** - * This function will send the contents of the topmost output buffer (if - * any) and turn this output buffer off. If you want to further - * process the buffer's contents you have to call - * ob_get_contents before - * ob_end_flush as the buffer contents are - * discarded after ob_end_flush is called. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_end_flush will not work. - * * @throws OutcontrolException * */ @@ -79,15 +47,6 @@ function ob_end_flush(): void /** - * This function will send the contents of the output buffer (if any). If you - * want to further process the buffer's contents you have to call - * ob_get_contents before ob_flush - * as the buffer contents are discarded after ob_flush - * is called. - * - * This function does not destroy the output buffer like - * ob_end_flush does. - * * @throws OutcontrolException * */ @@ -102,19 +61,7 @@ function ob_flush(): void /** - * Gets the current buffer contents and delete current output buffer. - * - * ob_get_clean essentially executes both - * ob_get_contents and - * ob_end_clean. - * - * The output buffer must be started by - * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE - * and PHP_OUTPUT_HANDLER_REMOVABLE - * flags. Otherwise ob_get_clean will not work. - * - * @return string Returns the contents of the output buffer and end output buffering. - * If output buffering isn't active then FALSE is returned. + * @return string * @throws OutcontrolException * */ @@ -130,89 +77,9 @@ function ob_get_clean(): string /** - * This function will turn output buffering on. While output buffering is - * active no output is sent from the script (other than headers), instead the - * output is stored in an internal buffer. - * - * The contents of this internal buffer may be copied into a string variable - * using ob_get_contents. To output what is stored in - * the internal buffer, use ob_end_flush. Alternatively, - * ob_end_clean will silently discard the buffer - * contents. - * - * Output buffers are stackable, that is, you may call - * ob_start while another - * ob_start is active. Just make - * sure that you call ob_end_flush - * the appropriate number of times. If multiple output callback - * functions are active, output is being filtered sequentially - * through each of them in nesting order. - * - * If output buffering is still active when the script ends, PHP outputs the - * contents automatically. - * - * @param array|callable|null|string $callback An optional callback function may be - * specified. This function takes a string as a parameter and should - * return a string. The function will be called when - * the output buffer is flushed (sent) or cleaned (with - * ob_flush, ob_clean or similar - * function) or when the output buffer - * is flushed to the browser at the end of the request. When - * callback is called, it will receive the - * contents of the output buffer as its parameter and is expected to - * return a new output buffer as a result, which will be sent to the - * browser. If the callback is not a - * callable function, this function will return FALSE. - * This is the callback signature: - * - * - * stringhandler - * stringbuffer - * intphase - * - * - * - * buffer - * - * - * Contents of the output buffer. - * - * - * - * - * phase - * - * - * Bitmask of PHP_OUTPUT_HANDLER_* constants. - * - * - * - * - * - * If callback returns FALSE original - * input is sent to the browser. - * - * The callback parameter may be bypassed - * by passing a NULL value. - * - * ob_end_clean, ob_end_flush, - * ob_clean, ob_flush and - * ob_start may not be called from a callback - * function. If you call them from callback function, the behavior is - * undefined. If you would like to delete the contents of a buffer, - * return "" (a null string) from callback function. - * You can't even call functions using the output buffering functions like - * print_r($expression, true) or - * highlight_file($filename, true) from a callback - * function. - * - * ob_gzhandler function exists to - * facilitate sending gz-encoded data to web browsers that support - * compressed web pages. ob_gzhandler determines - * what type of content encoding the browser will accept and will return - * its output accordingly. - * @param int $chunk_size Contents of the output buffer. - * @param int $flags Bitmask of PHP_OUTPUT_HANDLER_* constants. + * @param array|callable|null|string $callback + * @param int $chunk_size + * @param int $flags * @throws OutcontrolException * */ @@ -235,19 +102,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT /** - * This function adds another name/value pair to the URL rewrite mechanism. - * The name and value will be added to URLs (as GET parameter) and forms - * (as hidden input fields) the same way as the session ID when transparent - * URL rewriting is enabled with session.use_trans_sid. - * - * This function's behaviour is controlled by the url_rewriter.tags and - * url_rewriter.hosts php.ini - * parameters. - * - * Note that this function can be successfully called at most once per request. - * - * @param string $name The variable name. - * @param string $value The variable value. + * @param string $name + * @param string $value * @throws OutcontrolException * */ @@ -262,10 +118,6 @@ function output_add_rewrite_var(string $name, string $value): void /** - * This function resets the URL rewriter and removes all rewrite - * variables previously set by the output_add_rewrite_var - * function. - * * @throws OutcontrolException * */ diff --git a/generated/8.3/pcntl.php b/generated/8.3/pcntl.php index 5105a993..85bf4966 100644 --- a/generated/8.3/pcntl.php +++ b/generated/8.3/pcntl.php @@ -5,17 +5,9 @@ use Safe\Exceptions\PcntlException; /** - * pcntl_getpriority gets the priority of - * process_id. Because priority levels can differ between - * system types and kernel versions, please see your system's getpriority(2) - * man page for specific details. - * - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. - * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable - * scheduling. + * @param int|null $process_id + * @param int $mode + * @return int * @throws PcntlException * */ @@ -37,19 +29,9 @@ function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): i /** - * pcntl_setpriority sets the priority of - * process_id. - * - * @param int $priority priority is generally a value in the range - * -20 to 20. The default priority - * is 0 while a lower numerical value causes more - * favorable scheduling. Because priority levels can differ between - * system types and kernel versions, please see your system's setpriority(2) - * man page for specific details. - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. + * @param int $priority + * @param int|null $process_id + * @param int $mode * @throws PcntlException * */ @@ -70,10 +52,6 @@ function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = P /** - * The pcntl_signal_dispatch function calls the signal - * handlers installed by pcntl_signal for each pending - * signal. - * * @throws PcntlException * */ @@ -88,47 +66,9 @@ function pcntl_signal_dispatch(): void /** - * The pcntl_signal function installs a new - * signal handler or replaces the current signal handler for the signal indicated by signal. - * - * @param int $signal The signal number. - * @param callable|int $handler The signal handler. This may be either a callable, which - * will be invoked to handle the signal, or either of the two global - * constants SIG_IGN or SIG_DFL, - * which will ignore the signal or restore the default signal handler - * respectively. - * - * If a callable is given, it must implement the following - * signature: - * - * - * voidhandler - * intsigno - * mixedsiginfo - * - * - * - * signal - * - * - * The signal being handled. - * - * - * - * - * siginfo - * - * - * If operating systems supports siginfo_t structures, this will be an array of signal information dependent on the signal. - * - * - * - * - * - * Note that when you set a handler to an object method, that object's - * reference count is increased which makes it persist until you either - * change the handler to something else, or your script ends. - * @param bool $restart_syscalls The signal being handled. + * @param int $signal + * @param callable|int $handler + * @param bool $restart_syscalls * @throws PcntlException * */ @@ -143,22 +83,9 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi /** - * The pcntl_sigprocmask function adds, removes or sets blocked - * signals, depending on the mode parameter. - * - * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible - * values: - * - * SIG_BLOCK: Add the signals to the - * currently blocked signals. - * SIG_UNBLOCK: Remove the signals from the - * currently blocked signals. - * SIG_SETMASK: Replace the currently - * blocked signals by the given list of signals. - * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array - * containing the list of the previously blocked signals. + * @param int $mode + * @param array $signals + * @param array|null $old_signals * @throws PcntlException * */ @@ -173,19 +100,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul /** - * The pcntl_sigtimedwait function operates in exactly - * the same way as pcntl_sigwaitinfo except that it takes - * two additional parameters, seconds and - * nanoseconds, which enable an upper bound to be placed - * on the time for which the script is suspended. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing - * information about the signal. See - * pcntl_sigwaitinfo. - * @param int $seconds Timeout in seconds. - * @param int $nanoseconds Timeout in nanoseconds. - * @return int pcntl_sigtimedwait returns a signal number on success. + * @param array $signals + * @param array|null $info + * @param int $seconds + * @param int $nanoseconds + * @return int * @throws PcntlException * */ @@ -201,46 +120,9 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 /** - * The pcntl_sigwaitinfo function suspends execution of the - * calling script until one of the signals given in signals - * are delivered. If one of the signal is already pending (e.g. blocked by - * pcntl_sigprocmask), - * pcntl_sigwaitinfo will return immediately. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing - * information about the signal. - * - * The following elements are set for all signals: - * - * signo: Signal number - * errno: An error number - * code: Signal code - * - * - * The following elements may be set for the SIGCHLD signal: - * - * status: Exit value or signal - * utime: User time consumed - * stime: System time consumed - * pid: Sending process ID - * uid: Real user ID of sending process - * - * - * The following elements may be set for the SIGILL, - * SIGFPE, SIGSEGV and - * SIGBUS signals: - * - * addr: Memory location which caused fault - * - * - * The following element may be set for the SIGPOLL - * signal: - * - * band: Band event - * fd: File descriptor number - * - * @return int Returns a signal number on success. + * @param array $signals + * @param array|null $info + * @return int * @throws PcntlException * */ diff --git a/generated/8.3/pcre.php b/generated/8.3/pcre.php index a6b3175c..1e15de35 100644 --- a/generated/8.3/pcre.php +++ b/generated/8.3/pcre.php @@ -5,17 +5,10 @@ use Safe\Exceptions\PcreException; /** - * Returns the array consisting of the elements of the - * array array that match the given - * pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. - * @param int $flags If set to PREG_GREP_INVERT, this function returns - * the elements of the input array that do not match - * the given pattern. - * @return array Returns an array indexed using the keys from the - * array array. + * @param string $pattern + * @param array $array + * @param int $flags + * @return array * @throws PcreException * */ @@ -31,345 +24,12 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array /** - * Searches subject for all matches to the regular - * expression given in pattern and puts them in - * matches in the order specified by - * flags. - * - * After the first match is found, the subsequent searches are continued - * on from end of the last match. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to - * flags. - * @param int $flags Can be a combination of the following flags (note that it doesn't make - * sense to use PREG_PATTERN_ORDER together with - * PREG_SET_ORDER): - * - * - * PREG_PATTERN_ORDER - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * - * - * - * PREG_SET_ORDER - * - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * If no order flag is given, PREG_PATTERN_ORDER is - * assumed. - * @param int $offset Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains array of strings that matched full pattern, - * and $out[1] contains array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|positive-int Returns the number of full pattern matches (which might be zero). + * @param string $pattern + * @param string $subject + * @param array|null $matches + * @param int $flags + * @param int $offset + * @return 0|positive-int * @throws PcreException * */ @@ -385,228 +45,12 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul /** - * Searches subject for a match to the regular - * expression given in pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param null|string[] $matches If matches is provided, then it is filled with - * the results of search. $matches[0] will contain the - * text that matched the full pattern, $matches[1] - * will have the text that matched the first captured parenthesized - * subpattern, and so on. - * @param int $flags flags can be a combination of the following flags: - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * - * - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * The above example will output: - * @param int $offset If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|1 preg_match returns 1 if the pattern - * matches given subject, 0 if it does not. + * @param string $pattern + * @param string $subject + * @param null|string[] $matches + * @param int $flags + * @param int $offset + * @return 0|1 * @throws PcreException * */ @@ -622,28 +66,12 @@ function preg_match(string $pattern, string $subject, ?array &$matches = null, i /** - * The behavior of this function is similar to - * preg_replace_callback, except that callbacks are - * executed on a per-pattern basis. - * - * @param array $pattern An associative array mapping patterns (keys) to callables (values). - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback_array returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array $pattern + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -659,57 +87,13 @@ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, /** - * The behavior of this function is almost identical to - * preg_replace, except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param array|string $pattern The pattern to search for. It can be either a string or an array with - * strings. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. This is the callback signature: - * - * - * stringhandler - * arraymatches - * - * - * You'll often need the callback function - * for a preg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * preg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * - * - * preg_replace_callback and - * anonymous function - * - * - * ]]> - * - * - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array|string $pattern + * @param callable(array):string $callback + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -725,55 +109,11 @@ function preg_replace_callback($pattern, callable $callback, $subject, int $limi /** - * Split the given string by a regular expression. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param int|null $limit If specified, then only substrings up to limit - * are returned with the rest of the string being placed in the last - * substring. A limit of -1 or 0 means "no limit". - * @param int $flags flags can be any combination of the following - * flags (combined with the | bitwise operator): - * - * - * PREG_SPLIT_NO_EMPTY - * - * - * If this flag is set, only non-empty pieces will be returned by - * preg_split. - * - * - * - * - * PREG_SPLIT_DELIM_CAPTURE - * - * - * If this flag is set, parenthesized expression in the delimiter pattern - * will be captured and returned as well. - * - * - * - * - * PREG_SPLIT_OFFSET_CAPTURE - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * - * - * - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * @return list Returns an array containing substrings of subject - * split along boundaries matched by pattern. + * @param string $pattern + * @param string $subject + * @param int|null $limit + * @param int $flags + * @return list * @throws PcreException * */ diff --git a/generated/8.3/pgsql.php b/generated/8.3/pgsql.php index b532b440..32c7896f 100644 --- a/generated/8.3/pgsql.php +++ b/generated/8.3/pgsql.php @@ -5,12 +5,7 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with - * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using - * pg_query. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -25,49 +20,9 @@ function pg_cancel_query(\PgSql\Connection $connection): void /** - * pg_connect opens a connection to a - * PostgreSQL database specified by the - * connection_string. - * - * If a second call is made to pg_connect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * The old syntax with multiple parameters - * $conn = pg_connect("host", "port", "options", "tty", "dbname") - * has been deprecated. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname (defaults to value of user), - * user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * - * The options parameter can be used to set command line parameters - * to be invoked by the server. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * - * If PGSQL_CONNECT_ASYNC is given, then the - * connection is established asynchronously. The state of the connection - * can then be checked via pg_connect_poll or - * pg_connection_status. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -83,10 +38,7 @@ function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connectio /** - * pg_connection_reset resets the connection. - * It is useful for error recovery. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -101,22 +53,11 @@ function pg_connection_reset(\PgSql\Connection $connection): void /** - * pg_convert checks and converts the values in - * values into suitable values for use in an SQL - * statement. Precondition for pg_convert is the - * existence of a table table_name which has at least - * as many columns as values has elements. The - * fieldnames in table_name must match the indices in - * values and the corresponding datatypes must be - * compatible. Returns an array with the converted values on success. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. - * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, - * PGSQL_CONV_FORCE_NULL or - * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return array * @throws PgsqlException * */ @@ -132,20 +73,11 @@ function pg_convert(\PgSql\Connection $connection, string $table_name, array $va /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command - * internally to insert records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. - * Each value in rows becomes a row in table_name. - * Each value in rows should be a delimited string of the values - * to insert into each field. Values should be linefeed terminated. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $rows + * @param string $separator + * @param string $null_as * @throws PgsqlException * */ @@ -160,17 +92,11 @@ function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $ /** - * pg_copy_to copies a table to an array. It - * issues COPY TO SQL command internally to - * retrieve records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to copy the data into rows. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param string $separator + * @param string $null_as + * @return array * @throws PgsqlException * */ @@ -186,37 +112,11 @@ function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $s /** - * pg_delete deletes records from a table - * specified by the keys and values in conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_delete passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be deleted. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -232,18 +132,7 @@ function pg_delete(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_end_copy syncs the PostgreSQL frontend - * (usually a web server process) with the PostgreSQL server after - * doing a copy operation performed by - * pg_put_line. pg_end_copy - * must be issued, otherwise the PostgreSQL server may get out of - * sync with the frontend and will report an error. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -262,37 +151,10 @@ function pg_end_copy(?\PgSql\Connection $connection = null): void /** - * Sends a request to execute a prepared statement with given parameters, and - * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. - * pg_execute is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a - * prepared statement is given instead of a query string. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name of the prepared statement to execute. if - * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, - * pg_send_prepare or a PREPARE SQL - * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Elements are converted to strings by calling this function. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -316,16 +178,9 @@ function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_field_num will return the number of the - * field number that corresponds to the - * field in the given result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param string $field The name of the field. - * The given name is treated like an identifier in an SQL command, - * that is, it is downcased unless double-quoted. - * @return int The field number (numbered from 0). + * @param \PgSql\Result $result + * @param string $field + * @return int * @throws PgsqlException * */ @@ -341,16 +196,10 @@ function pg_field_num(\PgSql\Result $result, string $field): int /** - * pg_field_table returns the name of the table that field - * belongs to, or the table's oid if oid_only is TRUE. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field Field number, starting from 0. - * @param bool $oid_only By default the tables name that field belongs to is returned but - * if oid_only is set to TRUE, then the - * oid will instead be returned. - * @return mixed On success either the fields table name or oid. + * @param \PgSql\Result $result + * @param int $field + * @param bool $oid_only + * @return mixed * @throws PgsqlException * */ @@ -366,13 +215,8 @@ function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = fals /** - * pg_flush flushes any outbound query data waiting to be - * sent on the connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return mixed Returns TRUE if the flush was successful or no data was waiting to be - * flushed, 0 if part of the pending data was flushed but - * more remains. + * @param \PgSql\Connection $connection + * @return mixed * @throws PgsqlException * */ @@ -388,15 +232,7 @@ function pg_flush(\PgSql\Connection $connection) /** - * pg_free_result frees the memory and data associated with the - * specified PgSql\Result instance. - * - * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will - * be automatically freed when the script ends. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). + * @param \PgSql\Result $result * @throws PgsqlException * */ @@ -411,17 +247,8 @@ function pg_free_result(\PgSql\Result $result): void /** - * pg_host returns the host name of the given - * PostgreSQL connection instance is - * connected to. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @return string A string containing the name of the host the - * connection is to. + * @param \PgSql\Connection|null $connection + * @return string * @throws PgsqlException * */ @@ -441,39 +268,11 @@ function pg_host(?\PgSql\Connection $connection = null): string /** - * pg_insert inserts the values - * of values into the table specified - * by table_name. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_insert passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to insert rows. The table table_name must at least - * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be inserted. - * @param int $flags Any number of PGSQL_CONV_OPTS, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -489,30 +288,8 @@ function pg_insert(\PgSql\Connection $connection, string $table_name, array $val /** - * pg_last_oid is used to retrieve the - * OID assigned to an inserted row. - * - * OID field became an optional field from PostgreSQL 7.2 and will - * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use - * pg_result_status to check for successful - * insertion. - * - * To get the value of a SERIAL field in an inserted - * row, it is necessary to use the PostgreSQL CURRVAL - * function, naming the sequence whose last value is required. If the - * name of the sequence is unknown, the pg_get_serial_sequence - * PostgreSQL 8.0 function is necessary. - * - * PostgreSQL 8.1 has a function LASTVAL that returns - * the value of the most recently used sequence in the session. This avoids - * the need for naming the sequence, table or column altogether. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @return string An int or string containing the OID assigned to the most recently inserted - * row in the specified connection or - * no available OID. + * @param \PgSql\Result $result + * @return string * @throws PgsqlException * */ @@ -528,12 +305,7 @@ function pg_last_oid(\PgSql\Result $result): string /** - * pg_lo_close closes a large object. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. + * @param \PgSql\Lob $lob * @throws PgsqlException * */ @@ -548,21 +320,9 @@ function pg_lo_close(\PgSql\Lob $lob): void /** - * pg_lo_export takes a large object in a - * PostgreSQL database and saves its contents to a file on the local - * filesystem. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $pathname The full path and file name of the file in which to write the - * large object on the client filesystem. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $pathname * @throws PgsqlException * */ @@ -585,26 +345,10 @@ function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ? /** - * pg_lo_import creates a new large object - * in the database using a file on the filesystem as its data - * source. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $pathname The full path and file name of the file on the client - * filesystem from which to read the large object data. - * @param $object_id If an object_id is given the function - * will try to create a large object with this id, else a free - * object id is assigned by the server. The parameter - * relies on functionality that first - * appeared in PostgreSQL 8.1. - * @return int The OID of the newly created large object. + * @param \PgSql\Connection $connection + * @param string $pathname + * @param $object_id + * @return int * @throws PgsqlException * */ @@ -628,21 +372,10 @@ function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = /** - * pg_lo_open opens a large object in the database - * and returns an PgSql\Lob instance so that it can be manipulated. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and - * write. - * @return \PgSql\Lob An PgSql\Lob instance. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $mode + * @return \PgSql\Lob * @throws PgsqlException * */ @@ -658,17 +391,9 @@ function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgS /** - * pg_lo_read reads at most - * length bytes from a large object and - * returns it as a string. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $length An optional maximum number of bytes to return. - * @return string A string containing length bytes from the - * large object. + * @param \PgSql\Lob $lob + * @param int $length + * @return string * @throws PgsqlException * */ @@ -684,16 +409,9 @@ function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string /** - * pg_lo_seek seeks a position within an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), - * PGSQL_SEEK_CUR (seek from current position) - * or PGSQL_SEEK_END (seek from object end) . + * @param \PgSql\Lob $lob + * @param int $offset + * @param int $whence * @throws PgsqlException * */ @@ -708,13 +426,8 @@ function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void /** - * pg_lo_truncate truncates an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $size The number of bytes to truncate. + * @param \PgSql\Lob $lob + * @param int $size * @throws PgsqlException * */ @@ -729,18 +442,8 @@ function pg_lo_truncate(\PgSql\Lob $lob, int $size): void /** - * pg_lo_unlink deletes a large object with the - * oid. Returns TRUE on success. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. + * @param \PgSql\Connection $connection + * @param int $oid * @throws PgsqlException * */ @@ -755,20 +458,10 @@ function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void /** - * pg_lo_write writes data into a large object - * at the current seek position. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param string $data The data to be written to the large object. If length is - * an int and is less than the length of data, only - * length bytes will be written. - * @param int|null $length An optional maximum number of bytes to write. Must be greater than zero - * and no greater than the length of data. Defaults to - * the length of data. - * @return int The number of bytes written to the large object. + * @param \PgSql\Lob $lob + * @param string $data + * @param int|null $length + * @return int * @throws PgsqlException * */ @@ -788,13 +481,10 @@ function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int /** - * pg_meta_data returns table definition for - * table_name as an array. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name The name of the table. - * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param bool $extended + * @return array * @throws PgsqlException * */ @@ -810,41 +500,9 @@ function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $e /** - * Looks up a current parameter setting of the server. - * - * Certain parameter values are reported by the server automatically at - * connection startup or whenever their values change. pg_parameter_status can be - * used to interrogate these settings. It returns the current value of a - * parameter if known, or FALSE if the parameter is not known. - * - * Parameters reported as of PostgreSQL 8.0 include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and integer_datetimes. - * (server_encoding, TimeZone, and - * integer_datetimes were not reported by releases before 8.0.) Note that - * server_version, server_encoding and integer_datetimes - * cannot change after PostgreSQL startup. - * - * PostgreSQL 7.3 or lower servers do not report parameter settings, - * pg_parameter_status - * includes logic to obtain values for server_version and - * client_encoding - * anyway. Applications are encouraged to use pg_parameter_status rather than ad - * hoc code to determine these values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $param_name Possible param_name values include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and - * integer_datetimes. Note that this value is case-sensitive. - * @return string A string containing the value of the parameter or invalid - * param_name. + * @param \PgSql\Connection $connection + * @param string $param_name + * @return string * @throws PgsqlException * */ @@ -866,46 +524,9 @@ function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $par /** - * pg_pconnect opens a connection to a - * PostgreSQL database. It returns an PgSql\Connection instance that is - * needed by other PostgreSQL functions. - * - * If a second call is made to pg_pconnect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * To enable persistent connection, the pgsql.allow_persistent - * php.ini directive must be set to "On" (which is the default). - * The maximum number of persistent connection can be defined with the pgsql.max_persistent - * php.ini directive (defaults to -1 for no limit). The total number - * of connections can be set with the pgsql.max_links - * php.ini directive. - * - * pg_close will not close persistent links - * generated by pg_pconnect. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname, user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -921,14 +542,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connecti /** - * pg_ping pings a database connection and tries to - * reconnect it if it is broken. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -947,38 +561,10 @@ function pg_ping(?\PgSql\Connection $connection = null): void /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * pg_prepare is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters - * are used, they are referred to in the query as $1, $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is more flexible since it - * does not require parameter types to be pre-specified.) Also, although there - * is no PHP function for deleting a prepared statement, the SQL DEALLOCATE - * statement can be used for that purpose. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If - * "" is specified, then an unnamed statement is created, overwriting any - * previously defined unnamed statement. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1002,25 +588,8 @@ function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_put_line sends a NULL-terminated string - * to the PostgreSQL backend server. This is needed in conjunction - * with PostgreSQL's COPY FROM command. - * - * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, - * and in a single transaction. - * - * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler - * interface. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL - * terminator is added automatically. + * @param \PgSql\Connection $connection + * @param string $data * @throws PgsqlException * */ @@ -1041,53 +610,10 @@ function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null /** - * Submits a command to the server and waits for the result, with the ability - * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. - * pg_query_params is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * If parameters are used, they are referred to in the - * query string as $1, $2, etc. The same parameter may - * appear more than once in the query; the same value - * will be used in that case. params specifies the - * actual values of the parameters. A NULL value in this array means the - * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, - * but not more than one nonempty command.) - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * - * User-supplied values should always be passed as parameters, not - * interpolated into the query string, where they form possible - * SQL injection - * attack vectors and introduce bugs when handling data containing quotes. - * If for some reason you cannot use a parameter, ensure that interpolated - * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Values intended for bytea fields are not supported as - * parameters. Use pg_escape_bytea instead, or use the - * large object functions. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1111,42 +637,9 @@ function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = /** - * pg_query executes the query - * on the specified database connection. - * pg_query_params should be preferred - * in most cases. - * - * If an error occurs, and FALSE is returned, details of the error can - * be retrieved using the pg_last_error - * function if the connection is valid. - * - * - * - * Although connection can be omitted, it - * is not recommended, since it can be the cause of hard to find - * bugs in scripts. - * - * - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, - * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands - * included in the query string. However, using multiple transactions in one function call is not recommended. - * - * String interpolation of user-supplied data is extremely dangerous and is - * likely to lead to SQL - * injection vulnerabilities. In most cases - * pg_query_params should be preferred, passing - * user-supplied values as parameters rather than substituting them into - * the query string. - * - * Any user-supplied data substituted directly into a query string should - * be properly escaped. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1168,31 +661,9 @@ function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): /** - * pg_result_error_field returns one of the detailed error message - * fields associated with result instance. It is only available - * against a PostgreSQL 7.4 or above server. The error field is specified by - * the field_code. - * - * Because pg_query and pg_query_params return FALSE if the query fails, - * you must use pg_send_query and - * pg_get_result to get the result handle. - * - * If you need to get additional error information from failed pg_query queries, - * use pg_set_error_verbosity and pg_last_error - * and then parse the result. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field_code Possible field_code values are: PGSQL_DIAG_SEVERITY, - * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, - * PGSQL_DIAG_MESSAGE_DETAIL, - * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, - * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), - * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), - * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, - * PGSQL_DIAG_SOURCE_LINE or - * PGSQL_DIAG_SOURCE_FUNCTION. - * @return null|string A string containing the contents of the error field, NULL if the field does not exist. + * @param \PgSql\Result $result + * @param int $field_code + * @return null|string * @throws PgsqlException * */ @@ -1208,13 +679,8 @@ function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string /** - * pg_result_seek sets the internal row offset in - * the result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $row Row to move the internal offset to in the PgSql\Result instance. - * Rows are numbered starting from zero. + * @param \PgSql\Result $result + * @param int $row * @throws PgsqlException * */ @@ -1229,41 +695,12 @@ function pg_result_seek(\PgSql\Result $result, int $row): void /** - * pg_select selects records specified by - * conditions which has - * field=>value. For a successful query, it returns an - * array containing all records and fields that match the condition - * specified by conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_select passes raw values. Values - * must be escaped or PGSQL_DML_ESCAPE option must be - * specified. PGSQL_DML_ESCAPE quotes and escapes - * parameters/identifiers. Therefore, table/column names became case - * sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be retrieved. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags * @param int $mode - * @return mixed Returns string if PGSQL_DML_STRING is passed - * via flags, otherwise it returns an array on success. + * @return mixed * @throws PgsqlException * */ @@ -1279,11 +716,8 @@ function pg_select(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_socket returns a read only resource - * corresponding to the socket underlying the given PostgreSQL connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return resource A socket resource on success. + * @param \PgSql\Connection $connection + * @return resource * @throws PgsqlException * */ @@ -1299,26 +733,9 @@ function pg_socket(\PgSql\Connection $connection) /** - * pg_trace enables tracing of the PostgreSQL - * frontend/backend communication to a file. To fully understand the results, - * one needs to be familiar with the internals of PostgreSQL - * communication protocol. - * - * For those who are not, it can still be - * useful for tracing errors in queries sent to the server, you - * could do for example grep '^To backend' - * trace.log and see what queries actually were sent to the - * PostgreSQL server. For more information, refer to the - * PostgreSQL Documentation. - * - * @param string $filename The full path and file name of the file in which to write the - * trace log. Same as in fopen. - * @param string $mode An optional file access mode, same as for fopen. - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param string $filename + * @param string $mode + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -1337,39 +754,12 @@ function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $conn /** - * pg_update updates records that matches - * conditions with values. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_update passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be updated. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ diff --git a/generated/8.3/posix.php b/generated/8.3/posix.php index f79a82fe..609089ec 100644 --- a/generated/8.3/posix.php +++ b/generated/8.3/posix.php @@ -5,18 +5,8 @@ use Safe\Exceptions\PosixException; /** - * posix_access checks the user's permission of a file. - * - * @param string $filename The name of the file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -31,55 +21,8 @@ function posix_access(string $filename, int $flags = 0): void /** - * Gets information about a group provided its id. - * - * @param int $group_id The group id. - * @return array{name: string, passwd: string, gid: int, members: list} The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID, should be the same as the - * group_id parameter used when calling the - * function, and hence redundant. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $group_id + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -95,55 +38,8 @@ function posix_getgrgid(int $group_id): array /** - * Gets information about a group provided its name. - * - * @param string $name The name of the group - * @return array{name: string, passwd: string, gid: int, members: list} Returns an array on success. - * The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. This should be the same as - * the name parameter used when - * calling the function, and hence redundant. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID of the group in numeric form. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * + * @param string $name + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -159,10 +55,7 @@ function posix_getgrnam(string $name): array /** - * Gets the group set of the current process. - * - * @return list Returns an array of integers containing the numeric group ids of the group - * set of the current process. + * @return list * @throws PosixException * */ @@ -178,9 +71,7 @@ function posix_getgroups(): array /** - * Returns the login name of the user owning the current process. - * - * @return string Returns the login name of the user, as a string. + * @return string * @throws PosixException * */ @@ -196,83 +87,8 @@ function posix_getlogin(): string /** - * Returns an array of information about the user - * referenced by the given user ID. - * - * @param int $user_id The user identifier. - * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} Returns an associative array with the following elements: - * - * The user information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the username of the user. This is - * a short, usually less than 16 character "handle" of the - * user, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the user's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * uid - * - * User ID, should be the same as the - * user_id parameter used when calling the - * function, and hence redundant. - * - * - * - * gid - * - * The group ID of the user. Use the function - * posix_getgrgid to resolve the group - * name and a list of its members. - * - * - * - * gecos - * - * GECOS is an obsolete term that refers to the finger - * information field on a Honeywell batch processing system. - * The field, however, lives on, and its contents have been - * formalized by POSIX. The field contains a comma separated - * list containing the user's full name, office phone, office - * number, and home phone number. On most systems, only the - * user's full name is available. - * - * - * - * dir - * - * This element contains the absolute path to the - * home directory of the user. - * - * - * - * shell - * - * The shell element contains the absolute path to the - * executable of the user's default shell. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $user_id + * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} * @throws PosixException * */ @@ -288,101 +104,7 @@ function posix_getpwuid(int $user_id): array /** - * posix_getrlimit returns an array - * of information about the current resource's soft and hard limits. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @return array Returns an associative array of elements for each - * limit that is defined. Each limit has a soft and a hard limit. - * - * List of possible limits returned - * - * - * - * Limit name - * Limit description - * - * - * - * - * core - * - * The maximum size of the core file. When 0, not core files are - * created. When core files are larger than this size, they will - * be truncated at this size. - * - * - * - * totalmem - * - * The maximum size of the memory of the process, in bytes. - * - * - * - * virtualmem - * - * The maximum size of the virtual memory for the process, in bytes. - * - * - * - * data - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * stack - * - * The maximum size of the process stack, in bytes. - * - * - * - * rss - * - * The maximum number of virtual pages resident in RAM - * - * - * - * maxproc - * - * The maximum number of processes that can be created for the - * real user ID of the calling process. - * - * - * - * memlock - * - * The maximum number of bytes of memory that may be locked into RAM. - * - * - * - * cpu - * - * The amount of time the process is allowed to use the CPU. - * - * - * - * filesize - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * openfiles - * - * One more than the maximum number of open file descriptors. - * - * - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -398,14 +120,8 @@ function posix_getrlimit(): array /** - * Return the session id of the process process_id. - * The session id of a process is the process group id of the session leader. - * - * @param int $process_id The process identifier. If set to 0, the current process is - * assumed. If an invalid process_id is - * specified, then FALSE is returned and an error is set which - * can be checked with posix_get_last_error. - * @return int Returns the identifier, as an int. + * @param int $process_id + * @return int * @throws PosixException * */ @@ -421,10 +137,8 @@ function posix_getsid(int $process_id): int /** - * Calculates the group access list for the user specified in name. - * - * @param string $username The user to calculate the list for. - * @param int $group_id Typically the group number from the password file. + * @param string $username + * @param int $group_id * @throws PosixException * */ @@ -439,11 +153,8 @@ function posix_initgroups(string $username, int $group_id): void /** - * Send the signal signal to the process with - * the process identifier process_id. - * - * @param int $process_id The process identifier. - * @param int $signal One of the PCNTL signals constants. + * @param int $process_id + * @param int $signal * @throws PosixException * */ @@ -458,16 +169,8 @@ function posix_kill(int $process_id, int $signal): void /** - * posix_mkfifo creates a special - * FIFO file which exists in the file system and acts as - * a bidirectional communication endpoint for processes. - * - * @param string $filename Path to the FIFO file. - * @param int $permissions The second parameter permissions has to be given in - * octal notation (e.g. 0644). The permission of the newly created - * FIFO also depends on the setting of the current - * umask. The permissions of the created file are - * (mode & ~umask). + * @param string $filename + * @param int $permissions * @throws PosixException * */ @@ -482,17 +185,10 @@ function posix_mkfifo(string $filename, int $permissions): void /** - * Creates a special or ordinary file. - * - * @param string $filename The file to create - * @param int $flags This parameter is constructed by a bitwise OR between file type (one of - * the following constants: POSIX_S_IFREG, - * POSIX_S_IFCHR, POSIX_S_IFBLK, - * POSIX_S_IFIFO or - * POSIX_S_IFSOCK) and permissions. - * @param int $major The major device kernel identifier (required to pass when using - * S_IFCHR or S_IFBLK). - * @param int $minor The minor device kernel identifier. + * @param string $filename + * @param int $flags + * @param int $major + * @param int $minor * @throws PosixException * */ @@ -507,11 +203,7 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = /** - * Set the effective group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -526,11 +218,7 @@ function posix_setegid(int $group_id): void /** - * Set the effective user ID of the current process. This is a privileged - * function and needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -545,14 +233,7 @@ function posix_seteuid(int $user_id): void /** - * Set the real group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. The - * appropriate order of function calls is - * posix_setgid first, - * posix_setuid last. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -567,11 +248,8 @@ function posix_setgid(int $group_id): void /** - * Let the process process_id join the process group - * process_group_id. - * - * @param int $process_id The process id. - * @param int $process_group_id The process group id. + * @param int $process_id + * @param int $process_group_id * @throws PosixException * */ @@ -586,23 +264,9 @@ function posix_setpgid(int $process_id, int $process_group_id): void /** - * posix_setrlimit sets the soft and hard limits for a - * given system resource. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int $resource The - * resource limit constant - * corresponding to the limit that is being set. - * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. - * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. + * @param int $resource + * @param int $soft_limit + * @param int $hard_limit * @throws PosixException * */ @@ -617,9 +281,7 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void /** - * Make the current process a session leader. - * - * @return int Returns the session ids. + * @return int * @throws PosixException * */ @@ -635,11 +297,7 @@ function posix_setsid(): int /** - * Set the real user ID of the current process. This is a privileged - * function that needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -654,39 +312,7 @@ function posix_setuid(int $user_id): void /** - * Gets information about the current CPU usage. - * - * @return array Returns a hash of strings with information about the current - * process CPU usage. The indices of the hash are: - * - * - * - * ticks - the number of clock ticks that have elapsed since - * reboot. - * - * - * - * - * utime - user time used by the current process. - * - * - * - * - * stime - system time used by the current process. - * - * - * - * - * cutime - user time used by current process and children. - * - * - * - * - * cstime - system time used by current process and children. - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -702,41 +328,7 @@ function posix_times(): array /** - * Gets information about the system. - * - * Posix requires that assumptions must not be made about the - * format of the values, e.g. the assumption that a release may contain - * three digits or anything else returned by this function. - * - * @return array Returns a hash of strings with information about the - * system. The indices of the hash are - * - * - * sysname - operating system name (e.g. Linux) - * - * - * nodename - system name (e.g. valiant) - * - * - * release - operating system release (e.g. 2.2.10) - * - * - * version - operating system version (e.g. #4 Tue Jul 20 - * 17:01:36 MEST 1999) - * - * - * machine - system architecture (e.g. i586) - * - * - * domainname - DNS domainname (e.g. example.com) - * - * - * - * domainname is a GNU extension and not part of POSIX.1, so this - * field is only available on GNU systems or when using the GNU - * libc. - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ diff --git a/generated/8.3/ps.php b/generated/8.3/ps.php index 1eaa9774..912fbb4e 100644 --- a/generated/8.3/ps.php +++ b/generated/8.3/ps.php @@ -5,23 +5,12 @@ use Safe\Exceptions\PsException; /** - * Places a hyperlink at the given position pointing to a file program - * which is being started when clicked on. The hyperlink's source position - * is a rectangle - * with its lower left corner at (llx, lly) and its upper right corner at - * (urx, ury). The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The path of the program to be started, when the link is clicked on. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename * @throws PsException * */ @@ -36,30 +25,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur /** - * Places a hyperlink at the given position pointing to a page in the same - * document. Clicking on the link will jump to the given page. The first page - * in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param int $page The number of the page displayed when clicking on the link. - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param int $page + * @param string $dest * @throws PsException * */ @@ -74,31 +46,15 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury /** - * Adds a note at a certain position on the page. Notes are like little - * rectangular sheets with text on it, which can be placed anywhere on - * a page. They - * are shown either folded or unfolded. If folded, the specified icon - * is used as a placeholder. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $contents The text of the note. - * @param string $title The title of the note as displayed in the header of the note. - * @param string $icon The icon shown if the note is folded. This parameter can be set - * to comment, insert, - * note, paragraph, - * newparagraph, key, or - * help. - * @param int $open If open is unequal to zero the note will - * be shown unfolded after opening the document with a pdf viewer. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open * @throws PsException * */ @@ -113,32 +69,14 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str /** - * Places a hyperlink at the given position pointing to a second pdf document. - * Clicking on the link will branch to the document at the given page. The - * first page in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The name of the pdf document to be opened when clicking on - * this link. - * @param int $page The page number of the destination pdf document - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param int $page + * @param string $dest * @throws PsException * */ @@ -153,25 +91,12 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Places a hyperlink at the given position pointing to a web page. The - * hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and - * its upper right corner at (urx, - * ury). The rectangle has by default a thin - * blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $url The url of the hyperlink to be opened when clicking on - * this link, e.g. http://www.php.net. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $url * @throws PsException * */ @@ -186,21 +111,12 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn counterclockwise (use - * ps_arcn to draw clockwise). The subpath added - * to the current path starts on the arc at angle alpha - * and ends on the arc at angle beta. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The start angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -215,21 +131,12 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn clockwise (use - * ps_arc to draw counterclockwise). The subpath added to - * the current path starts on the arc at angle beta and - * ends on the arc at angle alpha. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The starting angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -244,43 +151,9 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float /** - * Starts a new page. Although the parameters width - * and height imply a different page size for each - * page, this is not possible in PostScript. The first call of - * ps_begin_page will set the page size for the whole - * document. Consecutive calls will have no effect, except for creating a new - * page. The situation is different if you intent to convert the PostScript - * document into PDF. This function places pdfmarks into the document which - * can set the size for each page indiviually. The resulting PDF document will - * have different page sizes. - * - * Though PostScript does not know different page sizes, pslib places - * a bounding box for each page into the document. This size is evaluated - * by some PostScript viewers and will have precedence over the BoundingBox - * in the Header of the document. This can lead to unexpected results when - * you set a BoundingBox whose lower left corner is not (0, 0), because the - * bounding box of the page will always have a lower left corner (0, 0) - * and overwrites the global setting. - * - * Each page is encapsulated into save/restore. This means, that most of the - * settings made on one page will not be retained on the next page. - * - * If there is up to the first call of ps_begin_page no - * call of ps_findfont, then the header of the PostScript - * document will be output and the bounding box will be set to the size of - * the first page. The lower left corner of the bounding box is set to (0, 0). - * If ps_findfont was called before, then the - * header has been output already, and the document will not have a valid - * bounding box. In order to prevent this, one should call - * ps_set_info to set the info field - * BoundingBox and possibly Orientation - * before any ps_findfont or - * ps_begin_page calls. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the page in pixel, e.g. 596 for A4 format. - * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @param resource $psdoc + * @param float $width + * @param float $height * @throws PsException * */ @@ -295,21 +168,13 @@ function ps_begin_page($psdoc, float $width, float $height): void /** - * Starts a new pattern. A pattern is like a page containing e.g. a drawing - * which can be used for filling areas. It is used like a color by calling - * ps_setcolor and setting the color space to - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the pattern in pixel. - * @param float $height The height of the pattern in pixel. - * @param float $xstep The distance in pixel of placements of the pattern in - * horizontal direction. - * @param float $ystep The distance in pixel of placements of the pattern in - * vertical direction. - * @param int $painttype Must be 1 or 2. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param float $width + * @param float $height + * @param float $xstep + * @param float $ystep + * @param int $painttype + * @return int * @throws PsException * */ @@ -325,18 +190,10 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo /** - * Starts a new template. A template is called a form in the postscript - * language. It is created similar to a pattern but used like an image. - * Templates are often used for drawings which are placed several times - * through out the document, e.g. like a company logo. All drawing functions - * may be used within a template. The template will not be drawn until - * it is placed by ps_place_image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the template in pixel. - * @param float $height The height of the template in pixel. - * @return int Returns TRUE on success. + * @param resource $psdoc + * @param float $width + * @param float $height + * @return int * @throws PsException * */ @@ -352,20 +209,10 @@ function ps_begin_template($psdoc, float $width, float $height): int /** - * Draws a circle with its middle point at (x, - * y). The circle starts and ends at position - * (x+radius, - * y). If this function is called outside a path it - * will start a new path. If it is called within a path it will add the circle - * as a subpath. If the last drawing operation does not end in point - * (x+radius, - * y) then there will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius * @throws PsException * */ @@ -380,11 +227,7 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** - * Takes the current path and uses it to define the border of a clipping area. - * Everything drawn outside of that area will not be visible. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -399,14 +242,8 @@ function ps_clip($psdoc): void /** - * Closes an image and frees its resources. Once an image is closed - * it cannot be used anymore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid Resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. + * @param resource $psdoc + * @param int $imageid * @throws PsException * */ @@ -421,17 +258,7 @@ function ps_close_image($psdoc, int $imageid): void /** - * Closes the PostScript document. - * - * This function writes the trailer of the PostScript document. - * It also writes the bookmark tree. ps_close does - * not free any resources, which is done by ps_delete. - * - * This function is also called by ps_delete if it - * has not been called before. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -446,11 +273,7 @@ function ps_close($psdoc): void /** - * Connects the last point with first point of a path and draws the resulting - * closed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -465,11 +288,7 @@ function ps_closepath_stroke($psdoc): void /** - * Connects the last point with the first point of a path. The resulting - * path can be used for stroking, filling, clipping, etc.. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -484,15 +303,8 @@ function ps_closepath($psdoc): void /** - * Output a text one line below the last line. The line spacing is - * taken from the value "leading" which must be set with - * ps_set_value. The actual position of the - * text is determined by the values "textx" and "texty" which can be requested - * with ps_get_value - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -507,17 +319,13 @@ function ps_continue_text($psdoc, string $text): void /** - * Add a section of a cubic Bézier curve described by the three given control - * points to the current path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x1 x-coordinate of first control point. - * @param float $y1 y-coordinate of first control point. - * @param float $x2 x-coordinate of second control point. - * @param float $y2 y-coordinate of second control point. - * @param float $x3 x-coordinate of third control point. - * @param float $y3 y-coordinate of third control point. + * @param resource $psdoc + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PsException * */ @@ -532,15 +340,7 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x /** - * Mainly frees memory used by the document. Also closes a file, if it was not - * closed before with ps_close. You should in any case - * close the file with ps_close before, because - * ps_close not just closes the file but also outputs a - * trailor containing PostScript comments like the number of pages in the - * document and adding the bookmark hierarchy. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -555,13 +355,7 @@ function ps_delete($psdoc): void /** - * Ends a page which was started with ps_begin_page. - * Ending a page will leave the current drawing context, which e.g. requires - * to reload fonts if they were loading within the page, and to set many - * other drawing parameters like the line width, or color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -576,12 +370,7 @@ function ps_end_page($psdoc): void /** - * Ends a pattern which was started with ps_begin_pattern. - * Once a pattern has been ended, it can be used like a color to fill - * areas. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -596,11 +385,7 @@ function ps_end_pattern($psdoc): void /** - * Ends a template which was started with ps_begin_template. - * Once a template has been ended, it can be used like an image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -615,11 +400,7 @@ function ps_end_template($psdoc): void /** - * Fills and draws the path constructed with previously called drawing - * functions like ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -634,11 +415,7 @@ function ps_fill_stroke($psdoc): void /** - * Fills the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -653,128 +430,10 @@ function ps_fill($psdoc): void /** - * Gets several parameters which were directly set by - * ps_set_parameter or indirectly by one of the other - * functions. Parameters are by definition string - * values. This function cannot be used to retrieve resources which were also - * set by ps_set_parameter. - * - * The parameter name can have the following values. - * - * - * - * fontname - * - * - * The name of the currently active font or the font whose - * identifier is passed in parameter modifier. - * - * - * - * - * fontencoding - * - * - * The encoding of the currently active font. - * - * - * - * - * dottedversion - * - * - * The version of the underlying pslib library in the format - * <major>.<minor>.<subminor> - * - * - * - * - * scope - * - * - * The current drawing scope. Can be object, document, null, page, - * pattern, path, template, prolog, font, glyph. - * - * - * - * - * ligaturedisolvechar - * - * - * The character which dissolves a ligature. If your are using a font - * which contains the ligature `ff' and `|' is the char to dissolve the - * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * - * imageencoding - * - * - * The encoding used for encoding images. Can be either - * hex or 85. hex encoding - * uses two bytes in the postscript file each byte in the image. - * 85 stand for Ascii85 encoding. - * - * - * - * - * linenumbermode - * - * - * Set to paragraph if lines are numbered - * within a paragraph or box if they are - * numbered within the surrounding box. - * - * - * - * - * linebreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will add a line - * break. - * - * - * - * - * parbreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will start - * a new paragraph. - * - * - * - * - * hyphenation - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE the paragraph will be hyphenated - * if a hypen dictionary is set and exists. - * - * - * - * - * hyphendict - * - * - * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name Name of the parameter. - * @param float $modifier An identifier needed if a parameter of a resource is requested, - * e.g. the size of an image. In such a case the resource id is - * passed. - * @return string Returns the value of the parameter. + * @param resource $psdoc + * @param string $name + * @param float $modifier + * @return string * @throws PsException * */ @@ -794,23 +453,9 @@ function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string /** - * Hyphenates the passed word. ps_hyphenate evaluates the - * value hyphenminchars (set by ps_set_value) and - * the parameter hyphendict (set by ps_set_parameter). - * hyphendict must be set before calling this function. - * - * This function requires the locale category LC_CTYPE to be set properly. - * This is done when the extension is initialized by using the environment - * variables. On Unix systems read the man page of locale for more information. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text text should not contain any non alpha - * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in - * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in - * the text. + * @param resource $psdoc + * @param string $text + * @return array * @throws PsException * */ @@ -826,12 +471,7 @@ function ps_hyphenate($psdoc, string $text): array /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param string $file * @throws PsException * @@ -847,14 +487,9 @@ function ps_include_file($psdoc, string $file): void /** - * Adds a straight line from the current point to the given coordinates to the - * current path. Use ps_moveto to set the starting point - * of the line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the end point of the line. - * @param float $y y-coordinate of the end point of the line. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -869,15 +504,9 @@ function ps_lineto($psdoc, float $x, float $y): void /** - * Sets the current point to new coordinates. If this is the first call of - * ps_moveto after a previous path has been ended then it - * will start a new path. If this function is called in the middle of a path - * it will just set the current point and start a subpath. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the point to move to. - * @param float $y y-coordinate of the point to move to. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -892,13 +521,7 @@ function ps_moveto($psdoc, float $x, float $y): void /** - * Creates a new document instance. It does not create the file on disk or in - * memory, it just sets up everything. ps_new is usually - * followed by a call of ps_open_file to actually create - * the postscript document. - * - * @return resource Resource of PostScript document. The return value - * is passed to all other functions as the first argument. + * @return resource * @throws PsException * */ @@ -914,14 +537,8 @@ function ps_new() /** - * Creates a new file on disk and writes the PostScript document into it. The - * file will be closed when ps_close is called. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $filename The name of the postscript file. - * If filename is not passed the document will be - * created in memory and all output will go straight to the browser. + * @param resource $psdoc + * @param string $filename * @throws PsException * */ @@ -940,20 +557,11 @@ function ps_open_file($psdoc, ?string $filename = null): void /** - * Places a formerly loaded image on the page. The image can be scaled. - * If the image shall be rotated as well, you will have to rotate the - * coordinate system before with ps_rotate. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. - * @param float $x x-coordinate of the lower left corner of the image. - * @param float $y y-coordinate of the lower left corner of the image. - * @param float $scale The scaling factor for the image. A scale of 1.0 will result - * in a resolution of 72 dpi, because each pixel is equivalent to - * 1 point. + * @param resource $psdoc + * @param int $imageid + * @param float $x + * @param float $y + * @param float $scale * @throws PsException * */ @@ -968,19 +576,11 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): /** - * Draws a rectangle with its lower left corner at (x, - * y). The rectangle starts and ends in its lower left - * corner. If this function is called outside a path it will start a new path. - * If it is called within a path it will add the rectangle as a subpath. If - * the last drawing operation does not end in the lower left corner then there - * will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the lower left corner of the rectangle. - * @param float $y y-coordinate of the lower left corner of the rectangle. - * @param float $width The width of the image. - * @param float $height The height of the image. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PsException * */ @@ -995,14 +595,7 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void /** - * Restores a previously saved graphics context. Any call of - * ps_save must be accompanied by a call to - * ps_restore. All coordinate transformations, line - * style settings, color settings, etc. are being restored to the state - * before the call of ps_save. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1017,11 +610,8 @@ function ps_restore($psdoc): void /** - * Sets the rotation of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $rot Angle of rotation in degree. + * @param resource $psdoc + * @param float $rot * @throws PsException * */ @@ -1036,12 +626,7 @@ function ps_rotate($psdoc, float $rot): void /** - * Saves the current graphics context, containing colors, translation and - * rotation settings and some more. A saved context can be restored with - * ps_restore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1056,12 +641,9 @@ function ps_save($psdoc): void /** - * Sets horizontal and vertical scaling of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x Scaling factor in horizontal direction. - * @param float $y Scaling factor in vertical direction. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1076,18 +658,10 @@ function ps_scale($psdoc, float $x, float $y): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the color of the rectangle's border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $red The red component of the border color. - * @param float $green The green component of the border color. - * @param float $blue The blue component of the border color. + * @param resource $psdoc + * @param float $red + * @param float $green + * @param float $blue * @throws PsException * */ @@ -1102,18 +676,9 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the length of the black and white portion of a - * dashed border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $black The length of the dash. - * @param float $white The length of the gap between dashes. + * @param resource $psdoc + * @param float $black + * @param float $white * @throws PsException * */ @@ -1128,18 +693,9 @@ function ps_set_border_dash($psdoc, float $black, float $white): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the appearance and width of the border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $style style can be solid or - * dashed. - * @param float $width The line width of the border. + * @param resource $psdoc + * @param string $style + * @param float $width * @throws PsException * */ @@ -1154,39 +710,9 @@ function ps_set_border_style($psdoc, string $style, float $width): void /** - * Sets certain information fields of the document. This fields will be shown - * as a comment in the header of the PostScript file. If the document is - * converted to pdf this fields will also be used for the document - * information. - * - * The BoundingBox is usually set to the value given to the - * first page. This only works if ps_findfont has not - * been called before. In such cases the BoundingBox would be left unset - * unless you set it explicitly with this function. - * - * This function will have no effect anymore when the header of the postscript - * file has been already written. It must be called before the first page - * or the first call of ps_findfont. - * - * @param resource $p Resource identifier of the postscript file - * as returned by ps_new. - * @param string $key The name of the information field to set. The values which can be - * set are Keywords, Subject, - * Title, Creator, - * Author, BoundingBox, and - * Orientation. Be aware that some of them has a - * meaning to PostScript viewers. - * @param string $val The value of the information field. The field - * Orientation can be set to either - * Portrait or Landscape. The - * BoundingBox is a string consisting of four numbers. - * The first two numbers are the coordinates of the lower left corner of - * the page. The last two numbers are the coordinates of the upper - * right corner. - * - * Up to version 0.2.6 of pslib, the BoundingBox and Orientation - * will be overwritten by ps_begin_page, - * unless ps_findfont has been called before. + * @param resource $p + * @param string $key + * @param string $val * @throws PsException * */ @@ -1201,13 +727,9 @@ function ps_set_info($p, string $key, string $val): void /** - * Sets several parameters which are used by many functions. Parameters are by - * definition string values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name For a list of possible names see ps_get_parameter. - * @param string $value The value of the parameter. + * @param resource $psdoc + * @param string $name + * @param string $value * @throws PsException * */ @@ -1222,19 +744,9 @@ function ps_set_parameter($psdoc, string $name, string $value): void /** - * Set the position for the next text output. You may alternatively set the x - * and y value separately by calling ps_set_value and - * choosing textx respectively texty as - * the value name. - * - * If you want to output text at a certain position it is more convenient - * to use ps_show_xy instead of setting the text position - * and calling ps_show. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the new text position. - * @param float $y y-coordinate of the new text position. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1249,65 +761,9 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** - * Sets several values which are used by many functions. Parameters are by - * definition float values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name The name can be one of the following: - * - * - * textrendering - * - * - * The way how text is shown. - * - * - * - * - * textx - * - * - * The x coordinate for text output. - * - * - * - * - * texty - * - * - * The y coordinate for text output. - * - * - * - * - * wordspacing - * - * - * The distance between words relative to the width of a space. - * - * - * - * - * leading - * - * - * The distance between lines in pixels. - * - * - * - * - * - * The way how text is shown. - * - * The x coordinate for text output. - * - * The y coordinate for text output. - * - * The distance between words relative to the width of a space. - * - * The distance between lines in pixels. - * @param float $value The way how text is shown. + * @param resource $psdoc + * @param string $name + * @param float $value * @throws PsException * */ @@ -1322,27 +778,13 @@ function ps_set_value($psdoc, string $name, float $value): void /** - * Sets the color for drawing, filling, or both. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The parameter type can be - * both, fill, or - * fillstroke. - * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, - * spot, pattern. Depending on the - * colorspace either only the first, the first three or all parameters - * will be used. - * @param float $c1 Depending on the colorspace this is either the red component (rgb), - * the cyan component (cmyk), the gray value (gray), the identifier of - * the spot color or the identifier of the pattern. - * @param float $c2 Depending on the colorspace this is either the green component (rgb), - * the magenta component (cmyk). - * @param float $c3 Depending on the colorspace this is either the blue component (rgb), - * the yellow component (cmyk). - * @param float $c4 This must only be set in cmyk colorspace and specifies the black - * component. + * @param resource $psdoc + * @param string $type + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PsException * */ @@ -1357,12 +799,9 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** - * Sets the length of the black and white portions of a dashed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $on The length of the dash. - * @param float $off The length of the gap between dashes. + * @param resource $psdoc + * @param float $on + * @param float $off * @throws PsException * */ @@ -1377,13 +816,8 @@ function ps_setdash($psdoc, float $on, float $off): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The value must be between 0.2 and 1. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1398,14 +832,9 @@ function ps_setflat($psdoc, float $value): void /** - * Sets a font, which has to be loaded before with - * ps_findfont. Outputting text without setting a font - * results in an error. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $fontid The font identifier as returned by ps_findfont. - * @param float $size The size of the font. + * @param resource $psdoc + * @param int $fontid + * @param float $size * @throws PsException * */ @@ -1420,11 +849,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** - * Sets the gray value for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $gray The value must be between 0 (white) and 1 (black). + * @param resource $psdoc + * @param float $gray * @throws PsException * */ @@ -1439,14 +865,8 @@ function ps_setgray($psdoc, float $gray): void /** - * Sets how line ends look like. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The type of line ends. Possible values are - * PS_LINECAP_BUTT, - * PS_LINECAP_ROUND, or - * PS_LINECAP_SQUARED. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1461,14 +881,8 @@ function ps_setlinecap($psdoc, int $type): void /** - * Sets how lines are joined. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The way lines are joined. Possible values are - * PS_LINEJOIN_MITER, - * PS_LINEJOIN_ROUND, or - * PS_LINEJOIN_BEVEL. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1483,11 +897,8 @@ function ps_setlinejoin($psdoc, int $type): void /** - * Sets the line width for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of lines in points. + * @param resource $psdoc + * @param float $width * @throws PsException * */ @@ -1502,16 +913,8 @@ function ps_setlinewidth($psdoc, float $width): void /** - * If two lines join in a small angle and the line join is set to - * PS_LINEJOIN_MITER, then - * the resulting spike will be very long. The miter limit is the maximum - * ratio of the miter length (the length of the spike) and the line width. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The maximum ratio between the miter length and the line width. Larger - * values (> 10) will result in very long spikes when two lines meet - * in a small angle. Keep the default unless you know what you are doing. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1526,12 +929,7 @@ function ps_setmiterlimit($psdoc, float $value): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param int $mode * @throws PsException * @@ -1547,14 +945,8 @@ function ps_setoverprintmode($psdoc, int $mode): void /** - * Sets the length of the black and white portions of a dashed line. - * ps_setpolydash is used to set more complicated dash - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $arr arr is a list of length elements alternately for - * the black and white portion. + * @param resource $psdoc + * @param float $arr * @throws PsException * */ @@ -1569,16 +961,10 @@ function ps_setpolydash($psdoc, float $arr): void /** - * Creates a pattern based on a shading, which has to be created before with - * ps_shading. Shading patterns can be used like regular - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. - * @param string $optlist This argument is not currently used. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param int $shadingid + * @param string $optlist + * @return int * @throws PsException * */ @@ -1594,36 +980,18 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** - * Creates a shading, which can be used by ps_shfill or - * ps_shading_pattern. - * - * The color of the shading can be in any color space except for - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The type of shading can be either radial or - * axial. Each shading starts with the current fill - * color and ends with the given color values passed in the parameters - * c1 to c4 - * (see ps_setcolor for their meaning). - * @param float $x0 The coordinates x0, y0, - * x1, y1 are the start and - * end point of the shading. If the type of shading is - * radial the two points are the middle points of - * a starting and ending circle. - * @param float $y0 See ps_setcolor for their meaning. - * @param float $x1 If the shading is of type radial the - * optlist must also contain the parameters - * r0 and r1 with the radius of the - * start and end circle. + * @param resource $psdoc + * @param string $type + * @param float $x0 + * @param float $y0 + * @param float $x1 * @param float $y1 * @param float $c1 * @param float $c2 * @param float $c3 * @param float $c4 * @param string $optlist - * @return int Returns the identifier of the pattern. + * @return int * @throws PsException * */ @@ -1639,15 +1007,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float /** - * Fills an area with a shading, which has to be created before with - * ps_shading. This is an alternative way to creating - * a pattern from a shading ps_shading_pattern and using - * the pattern as the filling color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. + * @param resource $psdoc + * @param int $shadingid * @throws PsException * */ @@ -1662,13 +1023,10 @@ function ps_shfill($psdoc, int $shadingid): void /** - * Output a text at the given text position. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param float $x x-coordinate of the lower left corner of the box surrounding the text. - * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @param resource $psdoc + * @param string $text + * @param float $x + * @param float $y * @throws PsException * */ @@ -1683,10 +1041,6 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param resource $psdoc * @param string $text * @param int $len @@ -1706,19 +1060,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) /** - * Output a text at the current text position. The text position can be set - * by storing the x and y coordinates into the values textx - * and texty with the function - * ps_set_value. The function will issue an - * error if a font was not set before with ps_setfont. - * - * ps_show evaluates the following parameters and values - * as set by ps_set_parameter and - * ps_set_value. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -1733,12 +1076,9 @@ function ps_show($psdoc, string $text): void /** - * Output text at the current position. Do not print more than len characters. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param int $len The maximum number of characters to print. + * @param resource $psdoc + * @param string $text + * @param int $len * @throws PsException * */ @@ -1753,11 +1093,7 @@ function ps_show2($psdoc, string $text, int $len): void /** - * Draws the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1772,13 +1108,8 @@ function ps_stroke($psdoc): void /** - * Output the glyph at position ord in the font - * encoding vector of the current font. The font encoding for a font can be - * set when loading the font with ps_findfont. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $ord The position of the glyph in the font encoding vector. + * @param resource $psdoc + * @param int $ord * @throws PsException * */ @@ -1793,12 +1124,9 @@ function ps_symbol($psdoc, int $ord): void /** - * Sets a new initial point of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the origin of the translated coordinate system. - * @param float $y y-coordinate of the origin of the translated coordinate system. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ diff --git a/generated/8.3/pspell.php b/generated/8.3/pspell.php index 826a9ce3..e94a271e 100644 --- a/generated/8.3/pspell.php +++ b/generated/8.3/pspell.php @@ -5,14 +5,8 @@ use Safe\Exceptions\PspellException; /** - * pspell_add_to_personal adds a word to the personal - * wordlist. If you used pspell_new_config with - * pspell_config_personal to open the dictionary, - * you can save the wordlist later with - * pspell_save_wordlist. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -27,12 +21,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void /** - * pspell_add_to_session adds a word to the wordlist - * associated with the current session. It is very similar to - * pspell_add_to_personal - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -47,11 +37,7 @@ function pspell_add_to_session(int $dictionary, string $word): void /** - * pspell_clear_session clears the current session. - * The current wordlist becomes blank, and, for example, if you try to save - * it with pspell_save_wordlist, nothing happens. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -66,35 +52,11 @@ function pspell_clear_session(int $dictionary): void /** - * Create a config used to open a dictionary. - * - * pspell_config_create has a very similar syntax to - * pspell_new. In fact, using - * pspell_config_create immediately followed by - * pspell_new_config will produce the exact same result. - * However, after creating a new config, you can also use - * pspell_config_* functions before calling - * pspell_new_config to take advantage of some - * advanced functionality. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @return int Returns an PSpell\Config instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @return int * @throws PspellException * */ @@ -110,10 +72,6 @@ function pspell_config_create(string $language, string $spelling = "", string $j /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -130,10 +88,6 @@ function pspell_config_data_dir(int $config, string $directory): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -150,12 +104,8 @@ function pspell_config_dict_dir(int $config, string $directory): void /** - * pspell_config_ignore should be used on a config - * before calling pspell_new_config. This function - * allows short words to be skipped by the spell checker. - * - * @param int $config An PSpell\Config instance. - * @param int $min_length Words less than min_length characters will be skipped. + * @param int $config + * @param int $min_length * @throws PspellException * */ @@ -170,33 +120,8 @@ function pspell_config_ignore(int $config, int $min_length): void /** - * pspell_config_mode should be used on a config - * before calling pspell_new_config. This function - * determines how many suggestions will be returned by - * pspell_suggest. - * - * @param int $config An PSpell\Config instance. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * + * @param int $config + * @param int $mode * @throws PspellException * */ @@ -211,17 +136,8 @@ function pspell_config_mode(int $config, int $mode): void /** - * Set a file that contains personal wordlist. The personal wordlist will be - * loaded and used in addition to the standard one after you call - * pspell_new_config. The file is also the file where - * pspell_save_wordlist will save personal wordlist to. - * - * pspell_config_personal should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The personal wordlist. If the file does not exist, it will be created. - * The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -236,19 +152,8 @@ function pspell_config_personal(int $config, string $filename): void /** - * Set a file that contains replacement pairs. - * - * The replacement pairs improve the quality of the spellchecker. When a word - * is misspelled, and a proper suggestion was not found in the list, - * pspell_store_replacement can be used to store a - * replacement pair and then pspell_save_wordlist to - * save the wordlist along with the replacement pairs. - * - * pspell_config_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -263,18 +168,8 @@ function pspell_config_repl(int $config, string $filename): void /** - * This function determines whether run-together words will be treated as - * legal compounds. That is, "thecat" will be a legal compound, although - * there should be a space between the two words. Changing this setting only - * affects the results returned by pspell_check; - * pspell_suggest will still return suggestions. - * - * pspell_config_runtogether should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $allow TRUE if run-together words should be treated as legal compounds, - * FALSE otherwise. + * @param int $config + * @param bool $allow * @throws PspellException * */ @@ -289,19 +184,8 @@ function pspell_config_runtogether(int $config, bool $allow): void /** - * pspell_config_save_repl determines whether - * pspell_save_wordlist will save the replacement pairs - * along with the wordlist. Usually there is no need to use this function - * because if pspell_config_repl is used, the - * replacement pairs will be saved by - * pspell_save_wordlist anyway, and if it is not, - * the replacement pairs will not be saved. - * - * pspell_config_save_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise. + * @param int $config + * @param bool $save * @throws PspellException * */ @@ -316,17 +200,8 @@ function pspell_config_save_repl(int $config, bool $save): void /** - * pspell_new_config opens up a new dictionary with - * settings specified in a config, created with - * pspell_config_create and modified with - * pspell_config_* functions. This method provides you - * with the most flexibility and has all the functionality provided by - * pspell_new and - * pspell_new_personal. - * - * @param int $config The config parameter is the one returned by - * pspell_config_create when the config was created. - * @return int Returns an PSpell\Dictionary instance on success + * @param int $config + * @return int * @throws PspellException * */ @@ -342,61 +217,13 @@ function pspell_new_config(int $config): int /** - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $filename The file where words added to the personal list will be stored. - * It should be an absolute filename beginning with '/' because otherwise - * it will be relative to $HOME, which is "/root" for most systems, and - * is probably not what you want. - * @param string $language The language code which consists of the two letter ISO 639 language - * code and an optional two letter ISO 3166 country code after a dash - * or underscore. - * @param string $spelling The requested spelling for languages with more than one spelling such - * as English. Known values are 'american', 'british', and 'canadian'. - * @param string $jargon Extra information to distinguish two different words lists that have - * the same language and spelling parameters. - * @param string $encoding The encoding that words are expected to be in. Valid values are - * utf-8, iso8859-*, - * koi8-r, viscii, - * cp1252, machine unsigned 16, - * machine unsigned 32. - * @param int $mode The mode in which spellchecker will work. There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $filename + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -412,64 +239,12 @@ function pspell_new_personal(string $filename, string $language, string $spellin /** - * pspell_new opens up a new dictionary and - * returns an PSpell\Dictionary instance for use in other pspell - * functions. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -485,12 +260,7 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" /** - * pspell_save_wordlist saves the personal wordlist from - * the current session. The location of files to be saved specified with - * pspell_config_personal and (optionally) - * pspell_config_repl. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -505,20 +275,9 @@ function pspell_save_wordlist(int $dictionary): void /** - * pspell_store_replacement stores a replacement pair for - * a word, so that replacement can be returned by - * pspell_suggest later. In order to be able to take - * advantage of this function, you have to use - * pspell_new_personal to open the dictionary. In order - * to permanently save the replacement pair, you have to - * use pspell_config_personal and - * pspell_config_repl to set the path where to save your - * custom wordlists, and then use pspell_save_wordlist - * for the changes to be written to disk. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $misspelled The misspelled word. - * @param string $correct The fixed spelling for the misspelled word. + * @param int $dictionary + * @param string $misspelled + * @param string $correct * @throws PspellException * */ diff --git a/generated/8.3/readline.php b/generated/8.3/readline.php index e5afc24d..82bb7a1f 100644 --- a/generated/8.3/readline.php +++ b/generated/8.3/readline.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ReadlineException; /** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. + * @param string $prompt * @throws ReadlineException * */ @@ -22,19 +20,8 @@ function readline_add_history(string $prompt): void /** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. + * @param string $prompt + * @param callable $callback * @throws ReadlineException * */ @@ -49,8 +36,6 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** - * This function clears the entire command line history. - * * @throws ReadlineException * */ @@ -65,11 +50,7 @@ function readline_clear_history(): void /** - * This function registers a completion function. This is the same kind of - * functionality you'd get if you hit your tab key while using Bash. - * - * @param callable $callback You must supply the name of an existing function which accepts a - * partial command line and returns an array of possible matches. + * @param callable $callback * @throws ReadlineException * */ @@ -84,9 +65,7 @@ function readline_completion_function(callable $callback): void /** - * This function reads a command history from a file. - * - * @param null|string $filename Path to the filename containing the command history. + * @param null|string $filename * @throws ReadlineException * */ @@ -105,9 +84,7 @@ function readline_read_history(?string $filename = null): void /** - * This function writes the command history to a file. - * - * @param null|string $filename Path to the saved file. + * @param null|string $filename * @throws ReadlineException * */ diff --git a/generated/8.3/rnp.php b/generated/8.3/rnp.php index 2c9f3edd..c38882fc 100644 --- a/generated/8.3/rnp.php +++ b/generated/8.3/rnp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\RnpException; /** - * Private keys used for decryption should be loaded into the FFI object before calling this function. - * If password encryption was used, then password provider should be set by calling - * rnp_ffi_set_pass_provider. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input Encrypted message. - * @return string Decrypted message on success. + * @param \RnpFFI $ffi + * @param string $input + * @return string * @throws RnpException * */ @@ -27,11 +23,9 @@ function rnp_decrypt(\RnpFFI $ffi, string $input): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_JSON_DUMP_* predefined constants. - * @return string JSON string with dump. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -47,11 +41,9 @@ function rnp_dump_packets_to_json(string $input, int $flags): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_DUMP_* predefined constants. - * @return string Text describing packet sequence. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -67,13 +59,9 @@ function rnp_dump_packets(string $input, int $flags): string /** - * - * - * @param string $pub_format the format of the public keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant. - * @param string $sec_format the format of the secret keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant - * @return \RnpFFI Returns RnpFFI object on success. + * @param string $pub_format + * @param string $sec_format + * @return \RnpFFI * @throws RnpException * */ @@ -89,25 +77,8 @@ function rnp_ffi_create(string $pub_format, string $sec_format): \RnpFFI /** - * Sets password provider function. This function can ask for the password on a standard input - * (if PHP script is executed in a command line environment), display GUI dialog or provide - * password in any other possible ways. Requested passwords are used to encrypt or decrypt - * secret keys or perform symmetric encryption/decryption operations. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param callable $password_callback The function that is to be called for every password request. It has the following signature: - * - * boolpassword_callback - * stringkey_fp - * stringpgp_context - * stringpassword - * - * - * $key_fp - The key fingerprint, if any. Can be empty. - * $pgp_context - String describing why the key is being requested. - * $password - Password string reference where provided password should be stored to. - * - * Callback function should return TRUE if password was successfully set or FALSE on failure. + * @param \RnpFFI $ffi + * @param callable $password_callback * @throws RnpException * */ @@ -122,12 +93,10 @@ function rnp_ffi_set_pass_provider(\RnpFFI $ffi, callable $password_callback): v /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* predefined constants. - * @return string JSON string with information about new and updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -143,12 +112,10 @@ function rnp_import_keys(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing signatures to be imported. Can be either binary or ASCII armored. - * @param int $flags Currently must be 0. - * @return string JSON string with information about updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -164,17 +131,12 @@ function rnp_import_signatures(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Primary key fingerprint. - * @param string $subkey_fp Subkey to export. Can be an empty string - * to pick the first suitable subkey. - * @param string $uid User ID to export. Can be an empty string - * if exported key has only one uid. - * @param int $flags Only RNP_KEY_EXPORT_BASE64 is currently supported. Enabling - * it would export base64-encoded key data instead of binary. - * @return string OpenPGP packets of exported key on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param string $subkey_fp + * @param string $uid + * @param int $flags + * @return string * @throws RnpException * */ @@ -190,14 +152,11 @@ function rnp_key_export_autocrypt(\RnpFFI $ffi, string $key_fp, string $subkey_f /** - * Note: to revoke a key you'll need to import this signature into the keystore or use - * rnp_key_revoke function. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint of the primary key to be revoked. - * @param int $flags RNP_KEY_EXPORT_ARMORED or 0. - * @param array $options An associative array with options. - * @return string Exported revocation signature on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options + * @return string * @throws RnpException * */ @@ -217,13 +176,10 @@ function rnp_key_export_revocation(\RnpFFI $ffi, string $key_fp, int $flags, ?ar /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_EXPORT_* predefined constants - * (except RNP_KEY_EXPORT_BASE64). - * @return string OpenPGP packets of exported key (binary or ASCII-armored) on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @return string * @throws RnpException * */ @@ -239,11 +195,9 @@ function rnp_key_export(\RnpFFI $ffi, string $key_fp, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @return array An associative array with information about the key. + * @param \RnpFFI $ffi + * @param string $key_fp + * @return array * @throws RnpException * */ @@ -259,12 +213,9 @@ function rnp_key_get_info(\RnpFFI $ffi, string $key_fp): array /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_REMOVE_* constants. Flag RNP_KEY_REMOVE_SUBKEYS will work only for - * the primary key and will remove all of its subkeys as well. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags * @throws RnpException * */ @@ -279,12 +230,10 @@ function rnp_key_remove(\RnpFFI $ffi, string $key_fp, int $flags): void /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags Currently must be 0. - * @param array $options An associative array with options. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options * @throws RnpException * */ @@ -303,11 +252,9 @@ function rnp_key_revoke(\RnpFFI $ffi, string $key_fp, int $flags, ?array $option /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Key identifier type ("userid", "keyid", "grip", "fingerprint"). - * @return array An associative array where key is an identifier string and value is a PGP key fingerprint. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @return array * @throws RnpException * */ @@ -323,12 +270,10 @@ function rnp_list_keys(\RnpFFI $ffi, string $identifier_type): array /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input_path file or directory containing the keys. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input_path + * @param int $flags * @throws RnpException * */ @@ -343,12 +288,10 @@ function rnp_load_keys_from_path(\RnpFFI $ffi, string $format, string $input_pat /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input + * @param int $flags * @throws RnpException * */ @@ -363,13 +306,10 @@ function rnp_load_keys(\RnpFFI $ffi, string $format, string $input, int $flags): /** - * Note: only valid userids are checked while searching by userid. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Identifier type string: "userid", "keyid", "fingerprint", "grip". - * @param string $identifier PGP User ID (name and email) for "userid" type, hexadecimal string - * that represents key id, fingerprint or key grip correspondingly. - * @return string Returns hexadecimal fingerprint of the key found on success. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @param string $identifier + * @return string * @throws RnpException * */ @@ -385,13 +325,11 @@ function rnp_locate_key(\RnpFFI $ffi, string $identifier_type, string $identifie /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $message Message to be encrypted. - * @param array $recipient_keys_fp Array with fingerprints of recipient's keys. At least one key must be present. - * @param array $options An associative array with options. - * @return string Encrypted data on success. + * @param \RnpFFI $ffi + * @param string $message + * @param array $recipient_keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -411,18 +349,12 @@ function rnp_op_encrypt(\RnpFFI $ffi, string $message, array $recipient_keys_fp, /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $userid PGP User ID - text that is intended to represent - * the name and email address of the key holder. - * @param string $key_alg Primary key algorithm (i.e. 'RSA', 'DSA', etc). - * @param string $sub_alg Subkey algorithm. If not set, subkey will not be generated. - * @param array $options An associative array with options. - * @return string Fingerprint of the generated primary key. This fingerprint can be used - * later to reference the key in sign and encrypt operations. The key data is stored in FFI - * memory context and can be saved using - * rnp_save_keys or rnp_save_keys_to_path. + * @param \RnpFFI $ffi + * @param string $userid + * @param string $key_alg + * @param string $sub_alg + * @param array $options + * @return string * @throws RnpException * */ @@ -444,15 +376,11 @@ function rnp_op_generate_key(\RnpFFI $ffi, string $userid, string $key_alg, ?str /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Cleartext signed message containing source data with - * additional headers and ASCII-armored signature on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -472,14 +400,11 @@ function rnp_op_sign_cleartext(\RnpFFI $ffi, string $data, array $keys_fp, ?arra /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Detached signature(s) data on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -499,14 +424,11 @@ function rnp_op_sign_detached(\RnpFFI $ffi, string $data, array $keys_fp, ?array /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Data with embedded signature(s) on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -526,14 +448,10 @@ function rnp_op_sign(\RnpFFI $ffi, string $data, array $keys_fp, ?array $options /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Source data. - * @param string $signature Detached signature data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @param string $signature + * @return array * @throws RnpException * */ @@ -549,13 +467,9 @@ function rnp_op_verify_detached(\RnpFFI $ffi, string $data, string $signature): /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Signed data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @return array * @throws RnpException * */ @@ -571,12 +485,10 @@ function rnp_op_verify(\RnpFFI $ffi, string $data): array /** - * Saves keys present in the FFI object (loaded or generated) to the specified file or directory. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output_path File or directory path where keys should be saved to. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output_path + * @param int $flags * @throws RnpException * */ @@ -591,12 +503,10 @@ function rnp_save_keys_to_path(\RnpFFI $ffi, string $format, string $output_path /** - * Note that for G10, the output must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output key packets will be saved to the string referenced by output. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output + * @param int $flags * @throws RnpException * */ @@ -611,10 +521,8 @@ function rnp_save_keys(\RnpFFI $ffi, string $format, string &$output, int $flags /** - * Get the JSON formatted string containing array of supported rnp feature values (algorithms, curves, etc) by type. - * - * @param string $type See RNP_FEATURE_* constants for supported values. - * @return string String containing JSON formatted array of supported algorithms, curves, etc. + * @param string $type + * @return string * @throws RnpException * */ diff --git a/generated/8.3/rpminfo.php b/generated/8.3/rpminfo.php index 2cd42fa6..4e620f8a 100644 --- a/generated/8.3/rpminfo.php +++ b/generated/8.3/rpminfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\RpminfoException; /** - * Add an additional retrieved tag in subsequent queries. - * - * @param int $tag One of RPMTAG_* constant, see the rpminfo constants page. + * @param int $tag * @throws RpminfoException * */ diff --git a/generated/8.3/rrd.php b/generated/8.3/rrd.php index a68379af..d8dc2b4c 100644 --- a/generated/8.3/rrd.php +++ b/generated/8.3/rrd.php @@ -5,11 +5,8 @@ use Safe\Exceptions\RrdException; /** - * Creates the rdd database file. - * - * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -24,11 +21,9 @@ function rrd_create(string $filename, array $options): void /** - * Returns the first data sample from the specified RRA of the RRD file. - * - * @param string $file RRD database file name. - * @param int $raaindex The index number of the RRA that is to be examined. Default value is 0. - * @return int Integer number of unix timestamp. + * @param string $file + * @param int $raaindex + * @return int * @throws RrdException * */ @@ -44,15 +39,9 @@ function rrd_first(string $file, int $raaindex = 0): int /** - * Creates image for a particular data from RRD file. - * - * @param string $filename The filename to output the graph to. This will generally end in either - * .png, .svg or - * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all - * possible options. All options (data definitions, variable definitions, etc.) - * are allowed. - * @return array Array with information about generated image is returned. + * @param string $filename + * @param array $options + * @return array * @throws RrdException * */ @@ -68,10 +57,8 @@ function rrd_graph(string $filename, array $options): array /** - * Returns information about particular RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @param string $filename + * @return array * @throws RrdException * */ @@ -87,11 +74,8 @@ function rrd_info(string $filename): array /** - * Gets array of the UNIX timestamp and the values stored for each date in the - * most recent update of the RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @param string $filename + * @return array * @throws RrdException * */ @@ -107,11 +91,9 @@ function rrd_lastupdate(string $filename): array /** - * Restores the RRD file from the XML dump. - * - * @param string $xml_file XML filename with the dump of the original RRD database file. - * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param string $xml_file + * @param string $rrd_file + * @param array $options * @throws RrdException * */ @@ -130,12 +112,8 @@ function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null) /** - * Change some options in the RRD dabase header file. E.g. renames the source for - * the data etc. - * - * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See - * rrd tune man page for details. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -150,12 +128,8 @@ function rrd_tune(string $filename, array $options): void /** - * Updates the RRD database file. The input data is time interpolated according to the - * properties of the RRD database file. - * - * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -170,12 +144,8 @@ function rrd_update(string $filename, array $options): void /** - * Exports the information about RRD database file. This data can be converted - * to XML file via user space PHP script and then restored back as RRD database - * file. - * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param array $options + * @return array * @throws RrdException * */ diff --git a/generated/8.3/sem.php b/generated/8.3/sem.php index 4e09b6f9..949771db 100644 --- a/generated/8.3/sem.php +++ b/generated/8.3/sem.php @@ -5,19 +5,9 @@ use Safe\Exceptions\SemException; /** - * msg_get_queue returns an id that can be used to - * access the System V message queue with the given - * key. The first call creates the message queue with - * the optional permissions. - * A second call to msg_get_queue for the same - * key will return a different message queue - * identifier, but both identifiers access the same underlying message - * queue. - * - * @param int $key Message queue numeric ID - * @param int $permissions Queue permissions. Default to 0666. If the message queue already - * exists, the permissions will be ignored. - * @return \SysvMessageQueue Returns SysvMessageQueue instance that can be used to access the System V message queue. + * @param int $key + * @param int $permissions + * @return \SysvMessageQueue * @throws SemException * */ @@ -33,9 +23,7 @@ function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue /** - * Checks whether the message queue key exists. - * - * @param int $key Queue key. + * @param int $key * @throws SemException * */ @@ -50,73 +38,14 @@ function msg_queue_exists(int $key): void /** - * msg_receive will receive the first message from the - * specified queue of the type specified by - * desired_message_type. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $desired_message_type If desired_message_type is 0, the message from the front - * of the queue is returned. If desired_message_type is - * greater than 0, then the first message of that type is returned. - * If desired_message_type is less than 0, the first - * message on the queue with a type less than or equal to the - * absolute value of desired_message_type will be read. - * If no messages match the criteria, your script will wait until a suitable - * message arrives on the queue. You can prevent the script from blocking - * by specifying MSG_IPC_NOWAIT in the - * flags parameter. - * @param int|null $received_message_type The type of the message that was received will be stored in this - * parameter. - * @param int $max_message_size The maximum size of message to be accepted is specified by the - * max_message_size; if the message in the queue is larger - * than this size the function will fail (unless you set - * flags as described below). - * @param mixed $message The received message will be stored in message, - * unless there were errors receiving the message. - * @param bool $unserialize If set to - * TRUE, the message is treated as though it was serialized using the - * same mechanism as the session module. The message will be unserialized - * and then returned to your script. This allows you to easily receive - * arrays or complex object structures from other PHP scripts, or if you - * are using the WDDX serializer, from any WDDX compatible source. - * - * If unserialize is FALSE, the message will be - * returned as a binary-safe string. - * @param int $flags The optional flags allows you to pass flags to the - * low-level msgrcv system call. It defaults to 0, but you may specify one - * or more of the following values (by adding or ORing them together). - * - * Flag values for msg_receive - * - * - * - * MSG_IPC_NOWAIT - * If there are no messages of the - * desired_message_type, return immediately and do not - * wait. The function will fail and return an integer value - * corresponding to MSG_ENOMSG. - * - * - * - * MSG_EXCEPT - * Using this flag in combination with a - * desired_message_type greater than 0 will cause the - * function to receive the first message that is not equal to - * desired_message_type. - * - * - * MSG_NOERROR - * - * If the message is longer than max_message_size, - * setting this flag will truncate the message to - * max_message_size and will not signal an error. - * - * - * - * - * - * @param int|null $error_code If the function fails, the optional error_code - * will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $desired_message_type + * @param int|null $received_message_type + * @param int $max_message_size + * @param mixed $message + * @param bool $unserialize + * @param int $flags + * @param int|null $error_code * @throws SemException * */ @@ -131,12 +60,7 @@ function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int & /** - * msg_remove_queue destroys the message queue specified - * by the queue. Only use this function when all - * processes have finished working with the message queue and you need to - * release the system resources held by it. - * - * @param \SysvMessageQueue $queue The message queue. + * @param \SysvMessageQueue $queue * @throws SemException * */ @@ -151,35 +75,12 @@ function msg_remove_queue(\SysvMessageQueue $queue): void /** - * msg_send sends a message of type - * message_type (which MUST be greater than 0) to - * the message queue specified by queue. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $message_type The type of the message (MUST be greater than 0) - * @param mixed $message The body of the message. - * - * If serialize set to FALSE is supplied, - * MUST be of type: string, int, float - * or bool. In other case a warning will be issued. - * @param bool $serialize The optional serialize controls how the - * message is sent. serialize - * defaults to TRUE which means that the message is - * serialized using the same mechanism as the session module before being - * sent to the queue. This allows complex arrays and objects to be sent to - * other PHP scripts, or if you are using the WDDX serializer, to any WDDX - * compatible client. - * @param bool $blocking If the message is too large to fit in the queue, your script will wait - * until another process reads messages from the queue and frees enough - * space for your message to be sent. - * This is called blocking; you can prevent blocking by setting the - * optional blocking parameter to FALSE, in which - * case msg_send will immediately return FALSE if the - * message is too big for the queue, and set the optional - * error_code to MSG_EAGAIN, - * indicating that you should try to send your message again a little - * later on. - * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $message_type + * @param mixed $message + * @param bool $serialize + * @param bool $blocking + * @param int|null $error_code * @throws SemException * */ @@ -194,19 +95,8 @@ function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $s /** - * msg_set_queue allows you to change the values of the - * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - * underlying message queue data structure. - * - * Changing the data structure will require that PHP be running as the same - * user that created the queue, owns the queue (as determined by the - * existing msg_perm.xxx fields), or be running with root privileges. - * root privileges are required to raise the msg_qbytes values above the - * system defined limit. - * - * @param \SysvMessageQueue $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys - * that you require in the data array. + * @param \SysvMessageQueue $queue + * @param array $data * @throws SemException * */ @@ -221,85 +111,8 @@ function msg_set_queue(\SysvMessageQueue $queue, array $data): void /** - * msg_stat_queue returns the message queue meta data - * for the message queue specified by the queue. - * This is useful, for example, to determine which process sent the message - * that was just received. - * - * @param \SysvMessageQueue $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following - * meanings: - * - * Array structure for msg_stat_queue - * - * - * - * msg_perm.uid - * - * The uid of the owner of the queue. - * - * - * - * msg_perm.gid - * - * The gid of the owner of the queue. - * - * - * - * msg_perm.mode - * - * The file access mode of the queue. - * - * - * - * msg_stime - * - * The time that the last message was sent to the queue. - * - * - * - * msg_rtime - * - * The time that the last message was received from the queue. - * - * - * - * msg_ctime - * - * The time that the queue was last changed. - * - * - * - * msg_qnum - * - * The number of messages waiting to be read from the queue. - * - * - * - * msg_qbytes - * - * The maximum number of bytes allowed in one message queue. On - * Linux, this value may be read and modified via - * /proc/sys/kernel/msgmnb. - * - * - * - * msg_lspid - * - * The pid of the process that sent the last message to the queue. - * - * - * - * msg_lrpid - * - * The pid of the process that received the last message from the queue. - * - * - * - * - * - * - * Returns FALSE on failure. + * @param \SysvMessageQueue $queue + * @return array * @throws SemException * */ @@ -315,21 +128,8 @@ function msg_stat_queue(\SysvMessageQueue $queue): array /** - * sem_acquire by default blocks (if necessary) until the - * semaphore can be acquired. A process attempting to acquire a semaphore which - * it has already acquired will block forever if acquiring the semaphore would - * cause its maximum number of semaphore to be exceeded. - * - * After processing a request, any semaphores acquired by the process but not - * explicitly released will be released automatically and a warning will be - * generated. - * - * @param \SysvSemaphore $semaphore semaphore is a semaphore - * obtained from sem_get. - * @param bool $non_blocking Specifies if the process shouldn't wait for the semaphore to be acquired. - * If set to true, the call will return - * false immediately if a semaphore cannot be immediately - * acquired. + * @param \SysvSemaphore $semaphore + * @param bool $non_blocking * @throws SemException * */ @@ -344,25 +144,11 @@ function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): voi /** - * sem_get returns an id that can be used to - * access the System V semaphore with the given key. - * - * A second call to sem_get for the same key - * will return a different semaphore identifier, but both - * identifiers access the same underlying semaphore. - * - * If key is 0, a new private semaphore - * is created for each call to sem_get. - * * @param int $key - * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously - * is set to max_acquire. - * @param int $permissions The semaphore permissions. Actually this value is - * set only if the process finds it is the only process currently - * attached to the semaphore. - * @param bool $auto_release Specifies if the semaphore should be automatically released on request - * shutdown. - * @return \SysvSemaphore Returns a positive semaphore identifier on success. + * @param int $max_acquire + * @param int $permissions + * @param bool $auto_release + * @return \SysvSemaphore * @throws SemException * */ @@ -378,15 +164,7 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ /** - * sem_release releases the semaphore if it - * is currently acquired by the calling process, otherwise - * a warning is generated. - * - * After releasing the semaphore, sem_acquire - * may be called to re-acquire it. - * - * @param \SysvSemaphore $semaphore A Semaphore as returned by - * sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -401,12 +179,7 @@ function sem_release(\SysvSemaphore $semaphore): void /** - * sem_remove removes the given semaphore. - * - * After removing the semaphore, it is no longer accessible. - * - * @param \SysvSemaphore $semaphore A semaphore as returned - * by sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -421,24 +194,10 @@ function sem_remove(\SysvSemaphore $semaphore): void /** - * shm_attach returns an id that can be used to access - * the System V shared memory with the given key, the - * first call creates the shared memory segment with - * size and the optional perm-bits - * permissions. - * - * A second call to shm_attach for the same - * key will return a different SysvSharedMemory - * instance, but both instances access the same underlying - * shared memory. size and - * permissions will be ignored. - * - * @param int $key A numeric shared memory segment ID - * @param int|null $size The memory size. If not provided, default to the - * sysvshm.init_mem in the php.ini, otherwise 10000 - * bytes. - * @param int $permissions The optional permission bits. Default to 0666. - * @return \SysvSharedMemory Returns a SysvSharedMemory instance on success. + * @param int $key + * @param int|null $size + * @param int $permissions + * @return \SysvSharedMemory * @throws SemException * */ @@ -460,12 +219,7 @@ function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \Sysv /** - * shm_detach disconnects from the shared memory given - * by the shm created by - * shm_attach. Remember, that shared memory still exist - * in the Unix system and the data is still present. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ @@ -480,21 +234,9 @@ function shm_detach(\SysvSharedMemory $shm): void /** - * shm_put_var inserts or updates the - * value with the given - * key. - * - * Warnings (E_WARNING level) will be issued if - * shm is not a valid SysV shared memory - * index or if there was not enough shared memory remaining to complete your - * request. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. - * @param mixed $value The variable. All variable types - * that serialize supports may be used: generally - * this means all types except for resources and some internal objects - * that cannot be serialized. + * @param \SysvSharedMemory $shm + * @param int $key + * @param mixed $value * @throws SemException * */ @@ -509,11 +251,8 @@ function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void /** - * Removes a variable with a given key - * and frees the occupied memory. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. + * @param \SysvSharedMemory $shm + * @param int $key * @throws SemException * */ @@ -528,10 +267,7 @@ function shm_remove_var(\SysvSharedMemory $shm, int $key): void /** - * shm_remove removes the shared memory - * shm. All data will be destroyed. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ diff --git a/generated/8.3/session.php b/generated/8.3/session.php index 8af9b82e..2628b174 100644 --- a/generated/8.3/session.php +++ b/generated/8.3/session.php @@ -5,9 +5,6 @@ use Safe\Exceptions\SessionException; /** - * session_abort finishes session without saving - * data. Thus the original values in session data are kept. - * * @throws SessionException * */ @@ -22,27 +19,8 @@ function session_abort(): void /** - * session_cache_expire returns the current setting of - * session.cache_expire. - * - * The cache expire is reset to the default value of 180 stored in - * session.cache_expire - * at request startup time. Thus, - * you need to call session_cache_expire for every - * request (and before session_start is called). - * - * @param int|null $value If value is given and not NULL, the current cache - * expire is replaced with value. - * - * - * - * Setting value is of value only, if - * session.cache_limiter is set to a value - * different from nocache. - * - * - * @return int Returns the current setting of session.cache_expire. - * The value returned should be read in minutes, defaults to 180. + * @param int|null $value + * @return int * @throws SessionException * */ @@ -62,34 +40,8 @@ function session_cache_expire(?int $value = null): int /** - * session_cache_limiter returns the name of the - * current cache limiter. - * - * The cache limiter defines which cache control HTTP headers are sent to - * the client. These headers determine the rules by which the page content - * may be cached by the client and intermediate proxies. Setting the cache - * limiter to nocache disallows any client/proxy caching. - * A value of public permits caching by proxies and the - * client, whereas private disallows caching by proxies - * and permits the client to cache the contents. - * - * In private mode, the Expire header sent to the client - * may cause confusion for some browsers, including Mozilla. - * You can avoid this problem by using private_no_expire mode. The - * Expire header is never sent to the client in this mode. - * - * Setting the cache limiter to '' will turn off automatic sending - * of cache headers entirely. - * - * The cache limiter is reset to the default value stored in - * session.cache_limiter - * at request startup time. Thus, you need to call - * session_cache_limiter for every - * request (and before session_start is called). - * - * @param null|string $value If value is specified and not NULL, the name of the - * current cache limiter is changed to the new value. - * @return string Returns the name of the current cache limiter. + * @param null|string $value + * @return string * @throws SessionException * */ @@ -109,27 +61,8 @@ function session_cache_limiter(?string $value = null): string /** - * session_create_id is used to create new - * session id for the current session. It returns collision free - * session id. - * - * If session is not active, collision check is omitted. - * - * Session ID is created according to php.ini settings. - * - * It is important to use the same user ID of your web server for GC - * task script. Otherwise, you may have permission problems especially - * with files save handler. - * - * @param string $prefix If prefix is specified, new session id - * is prefixed by prefix. Not all - * characters are allowed within the session id. Characters in - * the range a-z A-Z 0-9 , (comma) and - - * (minus) are allowed. - * @return string session_create_id returns new collision free - * session id for the current session. If it is used without active - * session, it omits collision check. - * On failure, FALSE is returned. + * @param string $prefix + * @return string * @throws SessionException * */ @@ -145,14 +78,7 @@ function session_create_id(string $prefix = ""): string /** - * session_decode decodes the serialized session data provided in - * $data, and populates the $_SESSION superglobal - * with the result. - * - * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. - * The serialization method can be set using session.serialize_handler. - * - * @param string $data The encoded data to be stored. + * @param string $data * @throws SessionException * */ @@ -167,18 +93,6 @@ function session_decode(string $data): void /** - * In order to kill the session altogether, the - * session ID must also be unset. If a cookie is used to propagate the - * session ID (default behavior), then the session cookie must be deleted. - * setcookie may be used for that. - * - * When session.use_strict_mode - * is enabled. You do not have to remove obsolete session ID cookie because - * session module will not accept session ID cookie when there is no - * data associated to the session ID and set new session ID cookie. - * Enabling session.use_strict_mode - * is recommended for all sites. - * * @throws SessionException * */ @@ -193,13 +107,7 @@ function session_destroy(): void /** - * session_encode returns a serialized string of the - * contents of the current session data stored in the $_SESSION superglobal. - * - * By default, the serialization method used is internal to PHP, and is not the same as serialize. - * The serialization method can be set using session.serialize_handler. - * - * @return string Returns the contents of the current session encoded. + * @return string * @throws SessionException * */ @@ -215,28 +123,7 @@ function session_encode(): string /** - * session_gc is used to perform session data - * GC(garbage collection). PHP does probability based session GC by - * default. - * - * Probability based GC works somewhat but it has few problems. 1) Low - * traffic sites' session data may not be deleted within the preferred - * duration. 2) High traffic sites' GC may be too frequent GC. 3) GC is - * performed on the user's request and the user will experience a GC - * delay. - * - * Therefore, it is recommended to execute GC periodically for - * production systems using, e.g., "cron" for UNIX-like systems. - * Make sure to disable probability based GC by setting - * session.gc_probability - * to 0. - * - * @return int session_gc returns number of deleted session - * data for success. - * - * Old save handlers do not return number of deleted session data, but - * only success/failure flag. If this is the case, number of deleted - * session data became 1 regardless of actually deleted data. + * @return int * @throws SessionException * */ @@ -252,24 +139,8 @@ function session_gc(): int /** - * session_id is used to get or set the session id for - * the current session. - * - * The constant SID can also be used to - * retrieve the current name and session id as a string suitable for - * adding to URLs. See also Session - * handling. - * - * @param null|string $id If id is specified and not NULL, it will replace the current - * session id. session_id needs to be called before - * session_start for that purpose. Depending on the - * session handler, not all characters are allowed within the session id. - * For example, the file session handler only allows characters in the - * range a-z A-Z 0-9 , (comma) and - (minus)! - * @return string session_id returns the session id for the current - * session or the empty string ("") if there is no current - * session (no current session id exists). - * On failure, FALSE is returned. + * @param null|string $id + * @return string * @throws SessionException * */ @@ -289,16 +160,8 @@ function session_id(?string $id = null): string /** - * session_module_name gets the name of the current - * session module, which is also known as - * session.save_handler. - * - * @param null|string $module If module is specified and not NULL, that module will be - * used instead. - * Passing "user" to this parameter is forbidden. Instead - * session_set_save_handler has to be called to set a user - * defined session handler. - * @return string Returns the name of the current session module. + * @param null|string $module + * @return string * @throws SessionException * */ @@ -318,44 +181,8 @@ function session_module_name(?string $module = null): string /** - * session_name returns the name of the current - * session. If name is given, - * session_name will update the session name and return - * the old session name. - * - * If a new session name is - * supplied, session_name modifies the HTTP cookie - * (and output content when session.transid is - * enabled). Once the HTTP cookie is - * sent, session_name raises error. - * session_name must be called - * before session_start for the session to work - * properly. - * - * The session name is reset to the default value stored in - * session.name at request startup time. Thus, you need to - * call session_name for every request (and before - * session_start is called). - * - * @param null|string $name The session name references the name of the session, which is - * used in cookies and URLs (e.g. PHPSESSID). It - * should contain only alphanumeric characters; it should be short and - * descriptive (i.e. for users with enabled cookie warnings). - * If name is specified and not NULL, the name of the current - * session is changed to its value. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * @return non-falsy-string Returns the name of the current session. If name is given - * and function updates the session name, name of the old session - * is returned. + * @param null|string $name + * @return non-falsy-string * @throws SessionException * */ @@ -375,17 +202,7 @@ function session_name(?string $name = null): string /** - * session_regenerate_id will replace the current - * session id with a new one, and keep the current session information. - * - * When session.use_trans_sid - * is enabled, output must be started after session_regenerate_id - * call. Otherwise, old session ID is used. - * - * @param bool $delete_old_session Whether to delete the old associated session file or not. - * You should not delete old session if you need to avoid - * races caused by deletion or detect/avoid session hijack - * attacks. + * @param bool $delete_old_session * @throws SessionException * */ @@ -400,10 +217,6 @@ function session_regenerate_id(bool $delete_old_session = false): void /** - * session_reset reinitializes a session with - * original values stored in session storage. This function requires an active session and - * discards changes in $_SESSION. - * * @throws SessionException * */ @@ -418,25 +231,8 @@ function session_reset(): void /** - * session_save_path returns the path of the current - * directory used to save session data. - * - * @param null|string $path Session data path. If specified and not NULL, the path to which data is saved will - * be changed. session_save_path needs to be called - * before session_start for that purpose. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. For example, - * on Linux, reiserfs may provide better performance than ext2fs. - * @return string Returns the path of the current directory used for data storage. + * @param null|string $path + * @return string * @throws SessionException * */ @@ -456,41 +252,7 @@ function session_save_path(?string $path = null): string /** - * session_start creates a session or resumes the - * current one based on a session identifier passed via a GET or POST - * request, or passed via a cookie. - * - * When session_start is called or when a session auto starts, - * PHP will call the open and read session save handlers. These will either be a built-in - * save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be - * custom handler as defined by session_set_save_handler. - * The read callback will retrieve any existing session data (stored in a special serialized format) - * and will be unserialized and used to automatically populate the $_SESSION superglobal when the - * read callback returns the saved session data back to PHP session handling. - * - * To use a named session, call - * session_name before calling - * session_start. - * - * When session.use_trans_sid - * is enabled, the session_start function will - * register an internal output handler for URL rewriting. - * - * If a user uses ob_gzhandler or similar with - * ob_start, the function order is important for - * proper output. For example, - * ob_gzhandler must be registered before starting the session. - * - * @param array $options If provided, this is an associative array of options that will override - * the currently set - * session configuration directives. - * The keys should not include the session. prefix. - * - * In addition to the normal set of configuration directives, a - * read_and_close option may also be provided. If set to - * TRUE, this will result in the session being closed immediately after - * being read, thereby avoiding unnecessary locking if the session data - * won't be changed. + * @param array $options * @throws SessionException * */ @@ -505,9 +267,6 @@ function session_start(array $options = []): void /** - * The session_unset function frees all session variables - * currently registered. - * * @throws SessionException * */ @@ -522,16 +281,6 @@ function session_unset(): void /** - * End the current session and store session data. - * - * Session data is usually stored after your script terminated without the - * need to call session_write_close, but as session data - * is locked to prevent concurrent writes only one script may operate on a - * session at any time. When using framesets together with sessions you will - * experience the frames loading one by one due to this locking. You can - * reduce the time needed to load all the frames by ending the session as - * soon as all changes to session variables are done. - * * @throws SessionException * */ diff --git a/generated/8.3/shmop.php b/generated/8.3/shmop.php index ef9f9d46..51d385bd 100644 --- a/generated/8.3/shmop.php +++ b/generated/8.3/shmop.php @@ -5,10 +5,7 @@ use Safe\Exceptions\ShmopException; /** - * shmop_delete is used to delete a shared memory block. - * - * @param \Shmop $shmop The shared memory block resource created by - * shmop_open + * @param \Shmop $shmop * @throws ShmopException * */ @@ -23,14 +20,10 @@ function shmop_delete(\Shmop $shmop): void /** - * shmop_read will read a string from shared memory block. - * - * @param \Shmop $shmop The shared memory block identifier created by - * shmop_open - * @param int $offset Offset from which to start reading - * @param int $size The number of bytes to read. - * 0 reads shmop_size($shmid) - $start bytes. - * @return string Returns the data. + * @param \Shmop $shmop + * @param int $offset + * @param int $size + * @return string * @throws ShmopException * */ diff --git a/generated/8.3/sockets.php b/generated/8.3/sockets.php index b6dd838f..10e015c8 100644 --- a/generated/8.3/sockets.php +++ b/generated/8.3/sockets.php @@ -5,32 +5,8 @@ use Safe\Exceptions\SocketsException; /** - * After the socket socket has been created - * using socket_create, bound to a name with - * socket_bind, and told to listen for connections - * with socket_listen, this function will accept - * incoming connections on that socket. Once a successful connection - * is made, a new Socket instance is returned, - * which may be used for communication. If there are multiple connections - * queued on the socket, the first will be used. If there are no pending - * connections, socket_accept will block until - * a connection becomes present. If socket - * has been made non-blocking using - * socket_set_blocking or - * socket_set_nonblock, FALSE will be returned. - * - * The Socket instance returned by - * socket_accept may not be used to accept new - * connections. The original listening socket - * socket, however, remains open and may be - * reused. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @return \Socket Returns a new Socket instance on success. The actual - * error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param \Socket $socket + * @return \Socket * @throws SocketsException * */ @@ -46,11 +22,8 @@ function socket_accept(\Socket $socket): \Socket /** - * Create a Socket instance, and bind it to the provided AddressInfo. The return - * value of this function may be used with socket_listen. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -66,11 +39,8 @@ function socket_addrinfo_bind(\AddressInfo $address): \Socket /** - * Create a Socket instance, and connect it to the provided AddressInfo instance. The return - * value of this function may be used with the rest of the socket functions. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -86,16 +56,10 @@ function socket_addrinfo_connect(\AddressInfo $address): \Socket /** - * Lookup different ways we can connect to host. The returned array contains - * a set of AddressInfo instances that we can bind to using socket_addrinfo_bind. - * - * @param string $host Hostname to search. - * @param mixed $service The service to connect to. If service is a numeric string, it designates the port. - * Otherwise it designates a network service name, which is mapped to a port by the operating system. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the - * hints as defined by getaddrinfo. - * @return \AddressInfo[] Returns an array of AddressInfo instances that can be used with the other socket_addrinfo functions. - * On failure, FALSE is returned. + * @param string $host + * @param mixed $service + * @param array $hints + * @return \AddressInfo[] * @throws SocketsException * */ @@ -117,22 +81,9 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] /** - * Binds the name given in address to the socket - * described by socket. This has to be done before - * a connection is be established using socket_connect - * or socket_listen. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param string $address If the socket is of the AF_INET family, the - * address is an IP in dotted-quad notation - * (e.g. 127.0.0.1). - * - * If the socket is of the AF_UNIX family, the - * address is the path of a - * Unix-domain socket (e.g. /tmp/my.sock). - * @param int $port The port parameter is only used when - * binding an AF_INET socket, and designates - * the port on which to listen for connections. + * @param \Socket $socket + * @param string $address + * @param int $port * @throws SocketsException * */ @@ -147,23 +98,9 @@ function socket_bind(\Socket $socket, string $address, int $port = 0): void /** - * Initiate a connection to address using the Socket instance - * socket, which must be Socket - * instance created with socket_create. - * - * @param \Socket $socket A Socket instance created with - * socket_create. - * @param string $address The address parameter is either an IPv4 address - * in dotted-quad notation (e.g. 127.0.0.1) if - * socket is AF_INET, a valid - * IPv6 address (e.g. ::1) if IPv6 support is enabled and - * socket is AF_INET6 - * or the pathname of a Unix domain socket, if the socket family is - * AF_UNIX. - * @param int|null $port The port parameter is only used and is mandatory - * when connecting to an AF_INET or an - * AF_INET6 socket, and designates - * the port on the remote host to which a connection should be made. + * @param \Socket $socket + * @param string $address + * @param int|null $port * @throws SocketsException * */ @@ -182,24 +119,9 @@ function socket_connect(\Socket $socket, string $address, ?int $port = null): vo /** - * socket_create_listen creates a new Socket instance of - * type AF_INET listening on all - * local interfaces on the given port waiting for new connections. - * - * This function is meant to ease the task of creating a new socket which - * only listens to accept new connections. - * - * @param int $port The port on which to listen on all interfaces. - * @param int $backlog The backlog parameter defines the maximum length - * the queue of pending connections may grow to. - * SOMAXCONN may be passed as - * backlog parameter, see - * socket_listen for more information. - * @return \Socket socket_create_listen returns a new Socket instance - * on success. The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $port + * @param int $backlog + * @return \Socket * @throws SocketsException * */ @@ -215,27 +137,10 @@ function socket_create_listen(int $port, int $backlog = 128): \Socket /** - * socket_create_pair creates two connected and - * indistinguishable sockets, and stores them in pair. - * This function is commonly used in IPC (InterProcess Communication). - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. See socket_create - * for the full list. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the - * full list. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be retrieved by - * name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * - * See socket_create for the full list of supported - * protocols. - * @param \Socket[]|null $pair Reference to an array in which the two Socket instances will be inserted. + * @param int $domain + * @param int $type + * @param int $protocol + * @param \Socket[]|null $pair * @throws SocketsException * */ @@ -250,25 +155,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair /** - * Creates and returns a Socket instance, also referred to as an endpoint - * of communication. A typical network connection is made up of 2 sockets, one - * performing the role of the client, and another performing the role of the server. - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be - * retrieved by name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * @return \Socket socket_create returns a Socket instance on success. The actual error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $domain + * @param int $type + * @param int $protocol + * @return \Socket * @throws SocketsException * */ @@ -284,10 +174,8 @@ function socket_create(int $domain, int $type, int $protocol): \Socket /** - * - * * @param \Socket $socket - * @return resource Return resource. + * @return resource * @throws SocketsException * */ @@ -303,38 +191,10 @@ function socket_export_stream(\Socket $socket) /** - * The socket_get_option function retrieves the value for - * the option specified by the option parameter for the - * specified socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by - * specifying the protocol number of that level. Protocol numbers can be - * found by using the getprotobyname function. - * @param int $option Reports whether the socket lingers on - * socket_close if data is present. By default, - * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, - * socket_close will wait for its peer to - * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the - * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is - * non-zero and l_linger is non-zero, - * socket_close will block until all the data - * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, - * socket_close will fail and return an error. - * @return mixed Returns the value of the given option. + * @param \Socket $socket + * @param int $level + * @param int $option + * @return mixed * @throws SocketsException * */ @@ -350,25 +210,9 @@ function socket_get_option(\Socket $socket, int $level, int $option) /** - * Queries the remote side of the given socket which may either result in - * host/port or in a Unix filesystem path, dependent on its type. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET or - * AF_INET6, socket_getpeername - * will return the peers (remote) IP address in - * appropriate notation (e.g. 127.0.0.1 or - * fe80::1) in the address - * parameter and, if the optional port parameter is - * present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getpeername will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If given, this will hold the port associated to - * address. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -383,22 +227,9 @@ function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = nu /** - * - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET - * or AF_INET6, socket_getsockname - * will return the local IP address in appropriate notation (e.g. - * 127.0.0.1 or fe80::1) in the - * address parameter and, if the optional - * port parameter is present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getsockname will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If provided, this will hold the associated port. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -413,10 +244,8 @@ function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = nu /** - * Imports a stream that encapsulates a socket into a socket extension resource. - * - * @param resource $stream The stream resource to import. - * @return \Socket Returns FALSE on failure. + * @param resource $stream + * @return \Socket * @throws SocketsException * */ @@ -432,30 +261,8 @@ function socket_import_stream($stream): \Socket /** - * After the socket socket has been created - * using socket_create and bound to a name with - * socket_bind, it may be told to listen for incoming - * connections on socket. - * - * socket_listen is applicable only to sockets of - * type SOCK_STREAM or - * SOCK_SEQPACKET. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_addrinfo_bind - * @param int $backlog A maximum of backlog incoming connections will be - * queued for processing. If a connection request arrives with the queue - * full the client may receive an error with an indication of - * ECONNREFUSED, or, if the underlying protocol supports - * retransmission, the request may be ignored so that retries may succeed. - * - * The maximum number passed to the backlog - * parameter highly depends on the underlying platform. On Linux, it is - * silently truncated to SOMAXCONN. On win32, if - * passed SOMAXCONN, the underlying service provider - * responsible for the socket will set the backlog to a maximum - * reasonable value. There is no standard provision to - * find out the actual backlog value on this platform. + * @param \Socket $socket + * @param int $backlog * @throws SocketsException * */ @@ -470,38 +277,10 @@ function socket_listen(\Socket $socket, int $backlog = 0): void /** - * The function socket_read reads from the Socket instance - * socket created by the - * socket_create or - * socket_accept functions. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $length The maximum number of bytes read is specified by the - * length parameter. Otherwise you can use - * \r, \n, - * or \0 to end reading (depending on the mode - * parameter, see below). - * @param int $mode Optional mode parameter is a named constant: - * - * - * - * PHP_BINARY_READ (Default) - use the system - * recv() function. Safe for reading binary data. - * - * - * - * - * PHP_NORMAL_READ - reading stops at - * \n or \r. - * - * - * - * @return string socket_read returns the data as a string on success (including if the remote host has closed the - * connection). The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual representation of - * the error. + * @param \Socket $socket + * @param int $length + * @param int $mode + * @return string * @throws SocketsException * */ @@ -517,52 +296,11 @@ function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): /** - * The function socket_send sends - * length bytes to the socket - * socket from data. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param string $data A buffer containing the data that will be sent to the remote host. - * @param int $length The number of bytes that will be sent to the remote host from - * data. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @return int socket_send returns the number of bytes sent. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @return int * @throws SocketsException * */ @@ -578,12 +316,10 @@ function socket_send(\Socket $socket, string $data, int $length, int $flags): in /** - * - * * @param \Socket $socket * @param array $message * @param int $flags - * @return int Returns the number of bytes sent. + * @return int * @throws SocketsException * */ @@ -599,56 +335,13 @@ function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int /** - * The function socket_sendto sends - * length bytes from data - * through the socket socket to the - * port at the address address. - * - * @param \Socket $socket A Socket instance created using socket_create. - * @param string $data The sent data will be taken from buffer data. - * @param int $length length bytes from data will be - * sent. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @param string $address IP address of the remote host. - * @param int|null $port port is the remote port number at which the data - * will be sent. - * @return int socket_sendto returns the number of bytes sent to the - * remote host. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @param string $address + * @param int|null $port + * @return int * @throws SocketsException * */ @@ -668,16 +361,7 @@ function socket_sendto(\Socket $socket, string $data, int $length, int $flags, s /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the - * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a blocking socket, the script will pause its execution until it receives - * a signal or it can perform the operation. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -692,17 +376,7 @@ function socket_set_block(\Socket $socket): void /** - * The socket_set_nonblock function sets the - * O_NONBLOCK flag on the socket specified by - * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a - * signal or it can perform the operation. Rather, if the operation would result - * in a block, the called function will fail. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -717,24 +391,10 @@ function socket_set_nonblock(\Socket $socket): void /** - * The socket_set_option function sets the option - * specified by the option parameter, at the - * specified protocol level, to the value pointed to - * by the value parameter for the - * socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to set options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the - * getprotobyname function. - * @param int $option The available socket options are the same as those for the - * socket_get_option function. - * @param array|int|string $value The option value. + * @param \Socket $socket + * @param int $level + * @param int $option + * @param array|int|string $value * @throws SocketsException * */ @@ -749,37 +409,8 @@ function socket_set_option(\Socket $socket, int $level, int $option, $value): vo /** - * The socket_shutdown function allows you to stop - * incoming, outgoing or all data (the default) from being sent through the - * socket - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param int $mode The value of mode can be one of the following: - * - * possible values for mode - * - * - * - * 0 - * - * Shutdown socket reading - * - * - * - * 1 - * - * Shutdown socket writing - * - * - * - * 2 - * - * Shutdown socket reading and writing - * - * - * - * - * + * @param \Socket $socket + * @param int $mode * @throws SocketsException * */ @@ -794,13 +425,9 @@ function socket_shutdown(\Socket $socket, int $mode = 2): void /** - * Exports the WSAPROTOCOL_INFO structure into shared memory and returns - * an identifier to be used with socket_wsaprotocol_info_import. The - * exported ID is only valid for the given process_id. - * - * @param \Socket $socket A Socket instance. - * @param int $process_id The ID of the process which will import the socket. - * @return string Returns an identifier to be used for the import + * @param \Socket $socket + * @param int $process_id + * @return string * @throws SocketsException * */ @@ -816,11 +443,8 @@ function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): strin /** - * Imports a socket which has formerly been exported from another process. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. - * @return \Socket Returns a Socket instance on success + * @param string $info_id + * @return \Socket * @throws SocketsException * */ @@ -836,10 +460,7 @@ function socket_wsaprotocol_info_import(string $info_id): \Socket /** - * Releases the shared memory corresponding to the given info_id. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. + * @param string $info_id * @throws SocketsException * */ diff --git a/generated/8.3/sodium.php b/generated/8.3/sodium.php index 5e64d001..3fe1d20c 100644 --- a/generated/8.3/sodium.php +++ b/generated/8.3/sodium.php @@ -5,16 +5,11 @@ use Safe\Exceptions\SodiumException; /** - * Verify then decrypt with AES-256-GCM. - * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aes256gcm_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -30,15 +25,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt with ChaCha20-Poly1305. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -54,14 +45,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string /** - * Encrypt then authenticate with ChaCha20-Poly1305. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -77,17 +65,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad /** - * Verify then decrypt with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -103,16 +85,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st /** - * Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -128,18 +105,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin /** - * Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -155,17 +125,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s /** - * Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -181,15 +145,9 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri /** - * Verify the authentication tag is valid for a given message and key. - * - * Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached), - * any party capable of verifying a message is also capable of authenticating - * their own messages. (Hence, symmetric authentication.) - * - * @param string $mac Authentication tag produced by sodium_crypto_auth - * @param string $message Message - * @param string $key Authentication key + * @param string $mac + * @param string $message + * @param string $key * @throws SodiumException * */ @@ -204,14 +162,10 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v /** - * Decrypt a message using asymmetric (public key) cryptography. - * - * @param string $ciphertext The encrypted message to attempt to decrypt. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key_pair See sodium_crypto_box_keypair_from_secretkey_and_publickey. - * This should include the sender's public key and the recipient's secret key. - * @return string Returns the plaintext message on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -227,11 +181,9 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p /** - * Decrypt a message that was encrypted with sodium_crypto_box_seal - * - * @param string $ciphertext The encrypted message - * @param string $key_pair The keypair of the recipient. Must include the secret key. - * @return string The plaintext on success. + * @param string $ciphertext + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -247,10 +199,8 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri /** - * Appends a message to the internal hash state. - * - * @param non-empty-string $state The return value of sodium_crypto_generichash_init. - * @param string $message Data to append to the hashing state. + * @param non-empty-string $state + * @param string $message * @throws SodiumException * */ @@ -265,14 +215,10 @@ function sodium_crypto_generichash_update(string &$state, string $message): void /** - * Decrypt an encrypted message with a symmetric (shared) key. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_secretbox - * (ciphertext and tag, concatenated). - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string The decrypted string on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -288,11 +234,9 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string /** - * Verify the signature attached to a message and return the message - * - * @param string $signed_message A message signed with sodium_crypto_sign - * @param non-empty-string $public_key An Ed25519 public key - * @return string Returns the original signed message on success. + * @param string $signed_message + * @param non-empty-string $public_key + * @return string * @throws SodiumException * */ @@ -308,11 +252,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st /** - * Verify signature for the message - * - * @param non-empty-string $signature The cryptographic signature obtained from sodium_crypto_sign_detached - * @param string $message The message being verified - * @param non-empty-string $public_key Ed25519 public key + * @param non-empty-string $signature + * @param string $message + * @param non-empty-string $public_key * @throws SodiumException * */ @@ -327,15 +269,11 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message, /** - * The function is similar to sodium_crypto_stream_xchacha20_xor - * but adds the ability to set the initial value of the block counter to a non-zero value. - * This permits direct access to any block without having to compute the previous ones. - * - * @param string $message The message to encrypt. - * @param string $nonce 24-byte nonce. - * @param int $counter The initial value of the block counter. - * @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen. - * @return string Encrypted message. + * @param string $message + * @param string $nonce + * @param int $counter + * @param string $key + * @return string * @throws SodiumException * */ diff --git a/generated/8.3/solr.php b/generated/8.3/solr.php index 0c4260a0..e5e269d0 100644 --- a/generated/8.3/solr.php +++ b/generated/8.3/solr.php @@ -5,9 +5,7 @@ use Safe\Exceptions\SolrException; /** - * This function returns the current version of the extension as a string. - * - * @return string It returns a string on success. + * @return string * @throws SolrException * */ diff --git a/generated/8.3/spl.php b/generated/8.3/spl.php index 704e4319..7c012526 100644 --- a/generated/8.3/spl.php +++ b/generated/8.3/spl.php @@ -5,12 +5,9 @@ use Safe\Exceptions\SplException; /** - * This function returns an array with the names of the interfaces that the - * given object_or_class and its parents implement. - * - * @param object|string $object_or_class An object (class instance) or a string (class or interface name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -26,12 +23,9 @@ function class_implements($object_or_class, bool $autoload = true): array /** - * This function returns an array with the name of the parent classes of - * the given object_or_class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -47,13 +41,9 @@ function class_parents($object_or_class, bool $autoload = true): array /** - * This function returns an array with the names of the traits that the - * given object_or_class uses. This does however not include - * any traits used by a parent class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -69,30 +59,9 @@ function class_uses($object_or_class, bool $autoload = true): array /** - * Register a function with the spl provided __autoload queue. If the queue - * is not yet activated it will be activated. - * - * If your code has an existing __autoload function then - * this function must be explicitly registered on the __autoload queue. This - * is because spl_autoload_register will effectively - * replace the engine cache for the __autoload function - * by either spl_autoload or - * spl_autoload_call. - * - * If there must be multiple autoload functions, spl_autoload_register - * allows for this. It effectively creates a queue of autoload functions, and - * runs through each of them in the order they are defined. By contrast, - * __autoload may only be defined once. - * - * @param callable(string):void|null $callback The autoload function being registered. - * If NULL, 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 callback - * cannot be registered. - * @param bool $prepend If true, spl_autoload_register will prepend - * the autoloader on the autoload queue instead of appending it. + * @param callable(string):void|null $callback + * @param bool $throw + * @param bool $prepend * @throws SplException * */ @@ -115,14 +84,7 @@ function spl_autoload_register(?callable $callback = null, bool $throw = true, b /** - * Removes a function from the autoload queue. If the queue - * is activated and empty after removing the given function then it will - * be deactivated. - * - * When this function results in the queue being deactivated, any - * __autoload function that previously existed will not be reactivated. - * - * @param mixed $callback The autoload function being unregistered. + * @param mixed $callback * @throws SplException * */ diff --git a/generated/8.3/sqlsrv.php b/generated/8.3/sqlsrv.php index fd85b774..2fc4fbfa 100644 --- a/generated/8.3/sqlsrv.php +++ b/generated/8.3/sqlsrv.php @@ -5,16 +5,7 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and commit/roll - * back transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ @@ -29,14 +20,7 @@ function sqlsrv_begin_transaction($conn): void /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been - * consumed. - * - * @param resource $stmt The statement resource to be cancelled. + * @param resource $stmt * @throws SqlsrvException * */ @@ -51,39 +35,8 @@ function sqlsrv_cancel($stmt): void /** - * Returns information about the client and specified connection - * - * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. - * - * Array returned by sqlsrv_client_info - * - * - * - * Key - * Description - * - * - * - * - * DriverDllName - * SQLNCLI10.DLL - * - * - * DriverODBCVer - * ODBC version (xx.yy) - * - * - * DriverVer - * SQL Server Native Client DLL version (10.5.xxx) - * - * - * ExtensionVer - * php_sqlsrv.dll version (2.0.xxx.x) - * - * - * - * + * @param resource $conn + * @return array * @throws SqlsrvException * */ @@ -99,9 +52,7 @@ function sqlsrv_client_info($conn): array /** - * Closes an open connection and releases resourses associated with the connection. - * - * @param resource $conn The connection to be closed. + * @param resource $conn * @throws SqlsrvException * */ @@ -116,16 +67,7 @@ function sqlsrv_close($conn): void /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and commit/roll back - * transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection on which the transaction is to be committed. + * @param resource $conn * @throws SqlsrvException * */ @@ -140,44 +82,8 @@ function sqlsrv_commit($conn): void /** - * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are - * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". - * @param mixed $value The value of the specified setting. The following table shows possible values: - * - * Error and Logging Setting Options - * - * - * - * Setting - * Options - * - * - * - * - * WarningsReturnAsErrors - * 1 (TRUE) or 0 (FALSE) - * - * - * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) - * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * - * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) - * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * @param string $setting + * @param mixed $value * @throws SqlsrvException * */ @@ -192,11 +98,7 @@ function sqlsrv_configure(string $setting, $value): void /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with - * different parameter values. - * - * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @param resource $stmt * @throws SqlsrvException * */ @@ -211,29 +113,11 @@ function sqlsrv_execute($stmt): void /** - * Returns the next available row of data as an associative array, a numeric - * array, or both (the default). - * - * @param resource $stmt A statement resource returned by sqlsrv_query or sqlsrv_prepare. - * @param int $fetchType A predefined constant specifying the type of array to return. Possible - * values are SQLSRV_FETCH_ASSOC, - * SQLSRV_FETCH_NUMERIC, and - * SQLSRV_FETCH_BOTH (the default). - * - * A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a - * result set with multiple columns of the same name. - * @param int $row Specifies the row to access in a result set that uses a scrollable cursor. - * Possible values are SQLSRV_SCROLL_NEXT, - * SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, - * SQLSRV_SCROLL_LAST, SQLSRV_SCROLL_ABSOLUTE and, - * SQLSRV_SCROLL_RELATIVE (the default). When this parameter - * is specified, the fetchType must be explicitly defined. - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return array|null Returns an array on success, NULL if there are no more rows to return, and - * FALSE if an error occurs. + * @param resource $stmt + * @param int $fetchType + * @param int $row + * @param int $offset + * @return array|null * @throws SqlsrvException * */ @@ -257,34 +141,12 @@ function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?in /** - * Retrieves the next row of data in a result set as an instance of the specified - * class with properties that match the row field names and values that correspond - * to the row field values. - * - * @param resource $stmt A statement resource created by sqlsrv_query or - * sqlsrv_execute. - * @param string $className The name of the class to instantiate. If no class name is specified, - * stdClass is instantiated. - * @param array $ctorParams Values passed to the constructor of the specified class. If the constructor - * of the specified class takes parameters, the ctorParams array must be - * supplied. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return null|object Returns an object on success, NULL if there are no more rows to return, - * and FALSE if an error occurs or if the specified class does not exist. + * @param resource $stmt + * @param string $className + * @param array $ctorParams + * @param int $row + * @param int $offset + * @return null|object * @throws SqlsrvException * */ @@ -310,28 +172,10 @@ function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParam /** - * Makes the next row in a result set available for reading. Use - * sqlsrv_get_field to read the fields of the row. - * - * @param resource $stmt A statement resource created by executing sqlsrv_query - * or sqlsrv_execute. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return bool|null Returns TRUE if the next row of a result set was successfully retrieved, - * FALSE if an error occurs, and NULL if there are no more rows in the result set. + * @param resource $stmt + * @param int $row + * @param int $offset + * @return bool|null * @throws SqlsrvException * */ @@ -353,15 +197,7 @@ function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement - * is rolled back. - * - * @param resource $stmt The statement for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be - * called multiple times in a script. + * @param resource $stmt * @throws SqlsrvException * */ @@ -376,20 +212,10 @@ function sqlsrv_free_stmt($stmt): void /** - * Gets field data from the currently selected row. Fields must be accessed in - * order. Field indices start at 0. - * - * @param resource $stmt A statement resource returned by sqlsrv_query or - * sqlsrv_execute. - * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields - * must be accessed in order. i.e. If you access field index 1, then field - * index 0 will not be available. - * @param int $getAsType The PHP data type for the returned field data. If this parameter is not - * set, the field data will be returned as its default PHP data type. - * For information about default PHP data types, see - * Default PHP Data Types - * in the Microsoft SQLSRV documentation. - * @return mixed Returns data from the specified field on success. + * @param resource $stmt + * @param int $fieldIndex + * @param int $getAsType + * @return mixed * @throws SqlsrvException * */ @@ -409,12 +235,8 @@ function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null) /** - * Makes the next result of the specified statement active. Results include result - * sets, row counts, and output parameters. - * - * @param resource $stmt The statement on which the next result is being called. - * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error - * occurred, and NULL if there are no more results to retrieve. + * @param resource $stmt + * @return bool|null * @throws SqlsrvException * */ @@ -430,12 +252,8 @@ function sqlsrv_next_result($stmt): ?bool /** - * Retrieves the number of fields (columns) on a statement. - * - * @param resource $stmt The statement for which the number of fields is returned. - * sqlsrv_num_fields can be called on a statement before - * or after statement execution. - * @return int Returns the number of fields on success. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -451,19 +269,8 @@ function sqlsrv_num_fields($stmt): int /** - * Retrieves the number of rows in a result set. This function requires that the - * statement resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statement resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * @return int Returns the number of rows retrieved on success. - * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -479,23 +286,11 @@ function sqlsrv_num_rows($stmt): int /** - * Prepares a query for execution. This function is ideal for preparing a query - * that will be executed multiple times with different parameter values. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized - * query. Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -517,22 +312,11 @@ function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $optio /** - * Prepares and executes a query. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. - * Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -554,10 +338,7 @@ function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction - * and returns the connection to auto-commit mode. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ diff --git a/generated/8.3/ssdeep.php b/generated/8.3/ssdeep.php index 2c09aea9..8d93d77a 100644 --- a/generated/8.3/ssdeep.php +++ b/generated/8.3/ssdeep.php @@ -5,14 +5,9 @@ use Safe\Exceptions\SsdeepException; /** - * Calculates the match score between signature1 - * and signature2 using - * context-triggered piecewise hashing, and returns the match - * score. - * - * @param string $signature1 The first fuzzy hash signature string. - * @param string $signature2 The second fuzzy hash signature string. - * @return int Returns an integer from 0 to 100 on success. + * @param string $signature1 + * @param string $signature2 + * @return int * @throws SsdeepException * */ @@ -28,13 +23,8 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int /** - * ssdeep_fuzzy_hash_filename calculates the hash - * of the file specified by file_name using - * context-triggered piecewise - * hashing, and returns that hash. - * - * @param string $file_name The filename of the file to hash. - * @return string Returns a string on success. + * @param string $file_name + * @return string * @throws SsdeepException * */ @@ -50,12 +40,8 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string /** - * ssdeep_fuzzy_hash calculates the hash of - * to_hash using - * context-triggered piecewise hashing, and returns that hash. - * - * @param string $to_hash The input string. - * @return string Returns a string on success. + * @param string $to_hash + * @return string * @throws SsdeepException * */ diff --git a/generated/8.3/ssh2.php b/generated/8.3/ssh2.php index 04882b11..c9d72f28 100644 --- a/generated/8.3/ssh2.php +++ b/generated/8.3/ssh2.php @@ -5,11 +5,8 @@ use Safe\Exceptions\Ssh2Exception; /** - * Authenticate over SSH using the ssh agent - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. + * @param resource $session + * @param string $username * @throws Ssh2Exception * */ @@ -24,18 +21,13 @@ function ssh2_auth_agent($session, string $username): void /** - * Authenticate using a public hostkey read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username * @param string $hostname * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. - * @param string $local_username If local_username is omitted, then the value - * for username will be used for it. + * @param string $passphrase + * @param string $local_username * @throws Ssh2Exception * */ @@ -56,13 +48,9 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** - * Authenticate over SSH using a plain password. Since version 0.12 this function - * also supports keyboard_interactive method. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. - * @param string $password Password for username + * @param resource $session + * @param string $username + * @param string $password * @throws Ssh2Exception * */ @@ -77,17 +65,11 @@ function ssh2_auth_password($session, string $username, string $password): void /** - * Authenticate using a public key read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username - * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * - * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. + * @param string $passphrase * @throws Ssh2Exception * */ @@ -106,201 +88,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** - * Establish a connection to a remote SSH server. - * - * Once connected, the client should verify the server's hostkey using - * ssh2_fingerprint, then authenticate using either - * password or public key. - * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters - * as described below. - * - * - * methods may be an associative array - * with any or all of the following parameters. - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * kex - * - * List of key exchange methods to advertise, comma separated - * in order of preference. - * - * - * diffie-hellman-group1-sha1, - * diffie-hellman-group14-sha1, and - * diffie-hellman-group-exchange-sha1 - * - * - * - * hostkey - * - * List of hostkey methods to advertise, comma separated - * in order of preference. - * - * - * ssh-rsa and - * ssh-dss - * - * - * - * client_to_server - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from client to server. - * - * - * - * - * server_to_client - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from server to client. - * - * - * - * - * - * - * - * * - Supported Values are dependent on methods supported by underlying library. - * See libssh2 documentation for additional - * information. - * - * - * - * client_to_server and - * server_to_client may be an associative array - * with any or all of the following parameters. - * - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * crypt - * List of crypto methods to advertise, comma separated - * in order of preference. - * - * rijndael-cbc@lysator.liu.se, - * aes256-cbc, - * aes192-cbc, - * aes128-cbc, - * 3des-cbc, - * blowfish-cbc, - * cast128-cbc, - * arcfour, and - * none** - * - * - * - * comp - * List of compression methods to advertise, comma separated - * in order of preference. - * - * zlib and - * none - * - * - * - * mac - * List of MAC methods to advertise, comma separated - * in order of preference. - * - * hmac-sha1, - * hmac-sha1-96, - * hmac-ripemd160, - * hmac-ripemd160@openssh.com, and - * none** - * - * - * - * - * - * - * - * Crypt and MAC method "none" - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * - * - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any - * or all of the following parameters. - * - * - * Callbacks parameters - * - * - * - * - * Index - * Meaning - * Prototype - * - * - * - * - * ignore - * - * Name of function to call when an - * SSH2_MSG_IGNORE packet is received - * - * void ignore_cb($message) - * - * - * debug - * - * Name of function to call when an - * SSH2_MSG_DEBUG packet is received - * - * void debug_cb($message, $language, $always_display) - * - * - * macerror - * - * Name of function to call when a packet is received but the - * message authentication code failed. If the callback returns - * TRUE, the mismatch will be ignored, otherwise the connection - * will be terminated. - * - * bool macerror_cb($packet) - * - * - * disconnect - * - * Name of function to call when an - * SSH2_MSG_DISCONNECT packet is received - * - * void disconnect_cb($reason, $message, $language) - * - * - * - * - * @return resource Returns a resource on success. + * @param array $methods + * @param array $callbacks + * @return resource * @throws Ssh2Exception * */ @@ -322,10 +114,7 @@ function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?arr /** - * Close a connection to a remote SSH server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @throws Ssh2Exception * */ @@ -340,20 +129,14 @@ function ssh2_disconnect($session): void /** - * Execute a command at the remote end and allocate a channel for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream on success. + * @param array $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ @@ -381,10 +164,8 @@ function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = /** - * Accepts a connection created by a listener. - * - * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen. - * @return resource Returns a stream resource. + * @param resource $listener + * @return resource * @throws Ssh2Exception * */ @@ -400,13 +181,11 @@ function ssh2_forward_accept($listener) /** - * Binds a port on the remote server and listen for connections. - * - * @param resource $session An SSH Session resource, obtained from a call to ssh2_connect. - * @param int $port The port of the remote server. + * @param resource $session + * @param int $port * @param string $host * @param int $max_connections - * @return resource Returns an SSH2 Listener. + * @return resource * @throws Ssh2Exception * */ @@ -428,17 +207,11 @@ function ssh2_forward_listen($session, int $port, ?string $host = null, int $max /** - * - * - * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data - * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. - * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. - * To mark an attribute as mandatory, precede its name with an asterisk. - * If the server is unable to support an attribute marked mandatory, - * it will abort the add process. + * @param resource $pkey + * @param string $algoname + * @param string $blob + * @param bool $overwrite + * @param array $attributes * @throws Ssh2Exception * */ @@ -457,17 +230,8 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** - * Request the Publickey subsystem from an already connected SSH2 server. - * - * The publickey subsystem allows an already connected and authenticated - * client to manage the list of authorized public keys stored on the - * target server in an implementation agnostic manner. - * If the remote server does not support the publickey subsystem, - * the ssh2_publickey_init function will return FALSE. - * * @param resource $session - * @return resource Returns an SSH2 Publickey Subsystem resource for use - * with all other ssh2_publickey_*() methods. + * @return resource * @throws Ssh2Exception * */ @@ -483,11 +247,9 @@ function ssh2_publickey_init($session) /** - * Removes an authorized publickey. - * - * @param resource $pkey Publickey Subsystem Resource - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data + * @param resource $pkey + * @param string $algoname + * @param string $blob * @throws Ssh2Exception * */ @@ -502,12 +264,9 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** - * Copy a file from the remote server to the local filesystem using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $remote_file Path to the remote file. - * @param string $local_file Path to the local file. + * @param resource $session + * @param string $remote_file + * @param string $local_file * @throws Ssh2Exception * */ @@ -522,14 +281,10 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** - * Copy a file from the local filesystem to the remote server using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $local_file Path to the local file. - * @param string $remote_file Path to the remote file. - * @param int $create_mode The file will be created with the mode specified by - * create_mode. + * @param resource $session + * @param string $local_file + * @param string $remote_file + * @param int $create_mode * @throws Ssh2Exception * */ @@ -544,13 +299,7 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** - * Sends an EOF to the stream; this is typically used to close standard input, - * while keeping output and error alive. For example, one can send a remote - * process some data over standard input, close it to start processing, and - * still be able to read out the results without creating additional files. - * - * @param resource $channel An SSH stream; can be acquired through functions like ssh2_fetch_stream - * or ssh2_connect. + * @param resource $channel * @throws Ssh2Exception * */ @@ -565,12 +314,9 @@ function ssh2_send_eof($channel): void /** - * Attempts to change the mode of the specified file to that given in - * mode. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename Path to the file. - * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @param resource $sftp + * @param string $filename + * @param int $mode * @throws Ssh2Exception * */ @@ -585,18 +331,10 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** - * Creates a directory on the remote file server with permissions set to - * mode. - * - * This function is similar to using mkdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname Path of the new directory. - * @param int $mode Permissions on the new directory. - * The actual mode is affected by the current umask. - * @param bool $recursive If recursive is TRUE any parent directories - * required for dirname will be automatically created as well. + * @param resource $sftp + * @param string $dirname + * @param int $mode + * @param bool $recursive * @throws Ssh2Exception * */ @@ -611,11 +349,9 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** - * Renames a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $from The current file that is being renamed. - * @param string $to The new file name that replaces from. + * @param resource $sftp + * @param string $from + * @param string $to * @throws Ssh2Exception * */ @@ -630,12 +366,7 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** - * Removes a directory from the remote file server. - * - * This function is similar to using rmdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $dirname * @throws Ssh2Exception * @@ -651,11 +382,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** - * Creates a symbolic link named link on the remote - * filesystem pointing to target. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $target Target of the symbolic link. + * @param resource $sftp + * @param string $target * @param string $link * @throws Ssh2Exception * @@ -671,9 +399,7 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** - * Deletes a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $filename * @throws Ssh2Exception * @@ -689,13 +415,8 @@ function ssh2_sftp_unlink($sftp, string $filename): void /** - * Request the SFTP subsystem from an already connected SSH2 server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @return resource This method returns an SSH2 SFTP resource for use with - * all other ssh2_sftp_*() methods and the - * ssh2.sftp:// fopen wrapper. + * @param resource $session + * @return resource * @throws Ssh2Exception * */ @@ -711,20 +432,13 @@ function ssh2_sftp($session) /** - * Open a shell at the remote end and allocate a stream for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $termtype termtype should correspond to one of the - * entries in the target system's /etc/termcap file. - * @param array|null $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream resource on success. + * @param resource $session + * @param string $termtype + * @param array|null $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ diff --git a/generated/8.3/stream.php b/generated/8.3/stream.php index a21295cc..86647144 100644 --- a/generated/8.3/stream.php +++ b/generated/8.3/stream.php @@ -5,11 +5,8 @@ use Safe\Exceptions\StreamException; /** - * Sets parameters on the specified context. - * - * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: - * $params['paramname'] = "paramvalue";. + * @param resource $context + * @param array $params * @throws StreamException * */ @@ -24,18 +21,11 @@ function stream_context_set_params($context, array $params): void /** - * Makes a copy of up to length bytes - * of data from the current position (or from the - * offset position, if specified) in - * from to to. If - * length is NULL, all remaining content in - * from will be copied. - * - * @param resource $from The source stream - * @param resource $to The destination stream - * @param int|null $length Maximum bytes to copy. By default all bytes left are copied. - * @param int $offset The offset where to start to copy data - * @return int Returns the total count of bytes copied. + * @param resource $from + * @param resource $to + * @param int|null $length + * @param int $offset + * @return int * @throws StreamException * */ @@ -57,33 +47,11 @@ function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_append will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified - * params to the end of - * the list and will therefore be called last during stream operations. - * To add a filter to the beginning of the list, use - * stream_filter_prepend. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -105,34 +73,11 @@ function stream_filter_append($stream, string $filtername, ?int $read_write = nu /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_prepend will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * See stream_filter_append for an example of - * using this parameter. - * @param mixed $params This filter will be added with the specified params - * to the beginning of the list and will therefore be - * called first during stream operations. To add a filter to the end of the - * list, use stream_filter_append. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -154,20 +99,8 @@ function stream_filter_prepend($stream, string $filtername, ?int $read_write = n /** - * stream_filter_register allows you to implement - * your own filter on any registered stream used with all the other - * filesystem functions (such as fopen, - * fread etc.). - * - * @param string $filter_name The filter name to be registered. - * @param string $class To implement a filter, you need to define a class as an extension of - * php_user_filter with a number of member - * functions. When performing read/write operations on the stream - * to which your filter is attached, PHP will pass the data through your - * filter (and any other filters attached to that stream) so that the - * data may be modified as desired. You must implement the methods - * exactly as described in php_user_filter - doing - * otherwise will lead to undefined behaviour. + * @param string $filter_name + * @param string $class * @throws StreamException * */ @@ -182,13 +115,7 @@ function stream_filter_register(string $filter_name, string $class): void /** - * Removes a stream filter previously added to a stream with - * stream_filter_prepend or - * stream_filter_append. Any data remaining in the - * filter's internal buffer will be flushed through to the next filter before - * removing it. - * - * @param resource $stream_filter The stream filter to be removed. + * @param resource $stream_filter * @throws StreamException * */ @@ -203,18 +130,10 @@ function stream_filter_remove($stream_filter): void /** - * Identical to file_get_contents, except that - * stream_get_contents operates on an already open - * stream resource and returns the remaining contents in a string, up to - * length bytes and starting at the specified - * offset. - * - * @param resource $stream A stream resource (e.g. returned from fopen) - * @param int|null $length The maximum bytes to read. Defaults to NULL (read all the remaining - * buffer). - * @param int $offset Seek to the specified offset before reading. If this number is negative, - * no seeking will occur and reading will start from the current position. - * @return string Returns a string. + * @param resource $stream + * @param int|null $length + * @param int $offset + * @return string * @throws StreamException * */ @@ -236,25 +155,10 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st /** - * Gets a line from the given handle. - * - * Reading ends when length bytes have been read, when - * the non-empty string specified by ending is found (which is - * not included in the return value), or on EOF - * (whichever comes first). - * - * This function is nearly identical to fgets except in - * that it allows end of line delimiters other than the standard \n, \r, and - * \r\n, and does not return the delimiter itself. - * - * @param resource $stream A valid file handle. - * @param int $length The maximum number of bytes to read from the handle. - * Negative values are not supported. - * Zero (0) means the default socket chunk size, - * i.e. 8192 bytes. - * @param string $ending An optional string delimiter. - * @return string Returns a string of up to length bytes read from the file - * pointed to by stream. + * @param resource $stream + * @param int $length + * @param string $ending + * @return string * @throws StreamException * */ @@ -270,9 +174,6 @@ function stream_get_line($stream, int $length, string $ending = ""): string /** - * Determines if stream stream refers to a valid terminal type device. - * This is a more portable version of posix_isatty, since it works on Windows systems too. - * * @param resource $stream * @throws StreamException * @@ -288,10 +189,8 @@ function stream_isatty($stream): void /** - * Resolve filename against the include path according to the same rules as fopen/include. - * - * @param string $filename The filename to resolve. - * @return string Returns a string containing the resolved absolute filename. + * @param string $filename + * @return string * @throws StreamException * */ @@ -307,20 +206,8 @@ function stream_resolve_include_path(string $filename): string /** - * Sets blocking or non-blocking mode on a stream. - * - * This function works for any stream that supports non-blocking mode - * (currently, regular files and socket streams). - * - * @param resource $stream The stream. - * @param bool $enable If enable is FALSE, the given stream - * will be switched to non-blocking mode, and if TRUE, it - * will be switched to blocking mode. This affects calls like - * fgets and fread - * that read from the stream. In non-blocking mode an - * fgets call will always return right away - * while in blocking mode it will wait for data to become available - * on the stream. + * @param resource $stream + * @param bool $enable * @throws StreamException * */ @@ -335,17 +222,9 @@ function stream_set_blocking($stream, bool $enable): void /** - * Sets the timeout value on stream, - * expressed in the sum of seconds and - * microseconds. - * - * When the stream times out, the 'timed_out' key of the array returned by - * stream_get_meta_data is set to TRUE, although no - * error/warning is generated. - * - * @param resource $stream The target stream. - * @param int $seconds The seconds part of the timeout to be set. - * @param int $microseconds The microseconds part of the timeout to be set. + * @param resource $stream + * @param int $seconds + * @param int $microseconds * @throws StreamException * */ @@ -360,19 +239,10 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** - * Accept a connection on a socket previously created by - * stream_socket_server. - * - * @param resource $socket The server socket to accept a connection from. - * @param float|null $timeout Override the default socket accept timeout. Time should be given in - * seconds. By default, default_socket_timeout - * is used. - * @param null|string $peer_name Will be set to the name (address) of the client which connected, if - * included and available from the selected transport. - * - * Can also be determined later using - * stream_socket_get_name. - * @return resource Returns a stream to the accepted socket connection. + * @param resource $socket + * @param float|null $timeout + * @param null|string $peer_name + * @return resource * @throws StreamException * */ @@ -394,52 +264,13 @@ function stream_socket_accept($socket, ?float $timeout = null, ?string &$peer_na /** - * Initiates a stream or datagram connection to the destination specified - * by address. The type of socket created - * is determined by the transport specified using standard URL formatting: - * transport://target. For Internet Domain sockets - * (AF_INET) such as TCP and UDP, the target portion - * of the address parameter should consist of - * a hostname or IP address followed by a colon and a port number. For Unix - * domain sockets, the target portion should point - * to the socket file on the filesystem. - * - * @param string $address Address to the socket to connect to. - * @param int|null $error_code Will be set to the system level error number if connection fails. - * @param null|string $error_message Will be set to the system level error message if the connection fails. - * @param float|null $timeout Number of seconds until the connect() system call - * should timeout. By default, default_socket_timeout - * is used. - * - * - * This parameter only applies when not making asynchronous - * connection attempts. - * - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * @param int-mask $flags Bitmask field which may be set to any combination of connection flags. - * Currently the select of connection flags is limited to - * STREAM_CLIENT_CONNECT (default), - * STREAM_CLIENT_ASYNC_CONNECT and - * STREAM_CLIENT_PERSISTENT. - * @param null|resource $context A valid context resource created with stream_context_create. - * @return resource On success a stream resource is returned which may - * be used together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @param int-mask $flags + * @param null|resource $context + * @return resource * @throws StreamException * */ @@ -463,12 +294,9 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string /** - * Returns the local or remote name of a given socket connection. - * - * @param resource $socket The socket to get the name of. - * @param bool $remote If set to TRUE the remote socket name will be returned, if set - * to FALSE the local socket name will be returned. - * @return string The name of the socket. + * @param resource $socket + * @param bool $remote + * @return string * @throws StreamException * */ @@ -484,25 +312,10 @@ function stream_socket_get_name($socket, bool $remote): string /** - * stream_socket_pair creates a pair of connected, - * indistinguishable socket streams. This function is commonly used in IPC - * (Inter-Process Communication). - * - * @param int $domain The protocol family to be used: STREAM_PF_INET, - * STREAM_PF_INET6 or - * STREAM_PF_UNIX - * @param int $type The type of communication to be used: - * STREAM_SOCK_DGRAM, - * STREAM_SOCK_RAW, - * STREAM_SOCK_RDM, - * STREAM_SOCK_SEQPACKET or - * STREAM_SOCK_STREAM - * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, - * STREAM_IPPROTO_IP, - * STREAM_IPPROTO_RAW, - * STREAM_IPPROTO_TCP or - * STREAM_IPPROTO_UDP - * @return resource[] Returns an array with the two socket resources on success. + * @param int $domain + * @param int $type + * @param int $protocol + * @return resource[] * @throws StreamException * */ @@ -518,38 +331,11 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array /** - * stream_socket_recvfrom accepts - * data from a remote socket up to length bytes. - * - * @param resource $socket The remote socket. - * @param int $length The number of bytes to receive from the socket. - * @param int $flags The value of flags can be any combination - * of the following: - * - * Possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * STREAM_PEEK - * - * Retrieve data from the socket, but do not consume the buffer. - * Subsequent calls to fread or - * stream_socket_recvfrom will see - * the same data. - * - * - * - * - * - * @param null|string $address If address is provided it will be populated with - * the address of the remote socket. - * @return string Returns the read data, as a string. + * @param resource $socket + * @param int $length + * @param int $flags + * @param null|string $address + * @return string * @throws StreamException * */ @@ -565,31 +351,11 @@ function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$ /** - * Sends the specified data through the - * socket. - * - * @param resource $socket The socket to send data to. - * @param string $data The data to be sent. - * @param int $flags The value of flags can be any combination - * of the following: - * - * possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * - * - * @param string $address The address specified when the socket stream was created will be used - * unless an alternate address is specified in address. - * - * If specified, it must be in dotted quad (or [ipv6]) format. - * @return int Returns a result code, as an integer. + * @param resource $socket + * @param string $data + * @param int $flags + * @param string $address + * @return int * @throws StreamException * */ @@ -605,44 +371,12 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** - * Creates a stream or datagram socket on the specified - * address. - * - * This function only creates a socket, to begin accepting connections - * use stream_socket_accept. - * - * @param string $address The type of socket created is determined by the transport specified - * using standard URL formatting: transport://target. - * - * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the - * remote_socket parameter should consist of a - * hostname or IP address followed by a colon and a port number. For - * Unix domain sockets, the target portion should - * point to the socket file on the filesystem. - * - * Depending on the environment, Unix domain sockets may not be available. - * A list of available transports can be retrieved using - * stream_get_transports. See - * for a list of bulitin transports. - * @param int|null $error_code If the optional error_code and error_message - * arguments are present they will be set to indicate the actual system - * level error that occurred in the system-level socket(), - * bind(), and listen() calls. If - * the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. - * Note that the error_code and - * error_message arguments will always be passed by reference. - * @param null|string $error_message See error_code description. - * @param int $flags A bitmask field which may be set to any combination of socket creation - * flags. - * - * For UDP sockets, you must use STREAM_SERVER_BIND as - * the flags parameter. + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param int $flags * @param null|resource $context - * @return resource Returns the created stream. + * @return resource * @throws StreamException * */ @@ -662,15 +396,8 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string /** - * Shutdowns (partially or not) a full-duplex connection. - * - * @param resource $stream An open stream (opened with stream_socket_client, - * for example) - * @param int $mode One of the following constants: STREAM_SHUT_RD - * (disable further receptions), STREAM_SHUT_WR - * (disable further transmissions) or - * STREAM_SHUT_RDWR (disable further receptions and - * transmissions). + * @param resource $stream + * @param int $mode * @throws StreamException * */ @@ -685,10 +412,7 @@ function stream_socket_shutdown($stream, int $mode): void /** - * Tells whether the stream supports locking through - * flock. - * - * @param resource $stream The stream to check. + * @param resource $stream * @throws StreamException * */ @@ -703,16 +427,9 @@ function stream_supports_lock($stream): void /** - * Allows you to implement your own protocol handlers and streams for use - * with all the other filesystem functions (such as fopen, - * fread etc.). - * - * @param string $protocol The wrapper name to be registered. - * Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. - * @param string $class The classname which implements the protocol. - * @param int $flags Should be set to STREAM_IS_URL if - * protocol is a URL protocol. Default is 0, local - * stream. + * @param string $protocol + * @param string $class + * @param int $flags * @throws StreamException * */ @@ -727,9 +444,6 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 /** - * Restores a built-in wrapper previously unregistered with - * stream_wrapper_unregister. - * * @param string $protocol * @throws StreamException * @@ -745,11 +459,6 @@ function stream_wrapper_restore(string $protocol): void /** - * Allows you to disable an already defined stream wrapper. Once the wrapper - * has been disabled you may override it with a user-defined wrapper using - * stream_wrapper_register or reenable it later on with - * stream_wrapper_restore. - * * @param string $protocol * @throws StreamException * diff --git a/generated/8.3/strings.php b/generated/8.3/strings.php index 4b673a75..a9f7e651 100644 --- a/generated/8.3/strings.php +++ b/generated/8.3/strings.php @@ -5,10 +5,8 @@ use Safe\Exceptions\StringsException; /** - * convert_uudecode decodes a uuencoded string. - * - * @param string $string The uuencoded data. - * @return string Returns the decoded data as a string. + * @param string $string + * @return string * @throws StringsException * */ @@ -24,10 +22,8 @@ function convert_uudecode(string $string): string /** - * Decodes a hexadecimally encoded binary string. - * - * @param string $string Hexadecimal representation of data. - * @return string Returns the binary representation of the given data. + * @param string $string + * @return string * @throws StringsException * */ @@ -43,16 +39,9 @@ function hex2bin(string $string): string /** - * Calculates the MD5 hash of the file specified by the - * filename parameter using the - * RSA Data Security, Inc. - * MD5 Message-Digest Algorithm, and returns that hash. - * The hash is a 32-character hexadecimal number. - * - * @param string $filename The filename - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 16. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ @@ -68,15 +57,9 @@ function md5_file(string $filename, bool $binary = false): string /** - * Calculates the sha1 hash of the file specified by - * filename using the - * US Secure Hash Algorithm 1, - * and returns that hash. The hash is a 40-character hexadecimal number. - * - * @param string $filename The filename of the file to hash. - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 20. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ diff --git a/generated/8.3/swoole.php b/generated/8.3/swoole.php index 3e9d4dc5..f9500d37 100644 --- a/generated/8.3/swoole.php +++ b/generated/8.3/swoole.php @@ -5,12 +5,8 @@ use Safe\Exceptions\SwooleException; /** - * - * - * @param string $hostname The host name. - * @param callable $callback The host name. - * - * The IP address. + * @param string $hostname + * @param callable $callback * @throws SwooleException * */ @@ -25,12 +21,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void /** - * - * - * @param string $filename The filename of the file being read. - * @param string $callback The name of the file. - * - * The content read from the file. + * @param string $filename + * @param string $callback * @throws SwooleException * */ @@ -45,11 +37,9 @@ function swoole_async_readfile(string $filename, string $callback): void /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. - * @param int $offset The offset. + * @param string $filename + * @param string $content + * @param int $offset * @param callable $callback * @throws SwooleException * @@ -71,10 +61,8 @@ function swoole_async_write(string $filename, string $content, ?int $offset = nu /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. + * @param string $filename + * @param string $content * @param callable $callback * @param int $flags * @throws SwooleException @@ -97,8 +85,6 @@ function swoole_async_writefile(string $filename, string $content, ?callable $ca /** - * - * * @param callable $callback * @throws SwooleException * @@ -114,8 +100,6 @@ function swoole_event_defer(callable $callback): void /** - * - * * @param int $fd * @throws SwooleException * @@ -131,8 +115,6 @@ function swoole_event_del(int $fd): void /** - * - * * @param int $fd * @param string $data * @throws SwooleException diff --git a/generated/8.3/uodbc.php b/generated/8.3/uodbc.php index 3afbd818..23dd7049 100644 --- a/generated/8.3/uodbc.php +++ b/generated/8.3/uodbc.php @@ -5,22 +5,9 @@ use Safe\Exceptions\UodbcException; /** - * Toggles autocommit behaviour. - * - * By default, auto-commit is on for a connection. Disabling - * auto-commit is equivalent with starting a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param bool $enable If enable is TRUE, auto-commit is enabled, if - * it is FALSE auto-commit is disabled. - * @return mixed Without the enable parameter, this function returns - * auto-commit status for odbc. Non-zero is - * returned if auto-commit is on, 0 if it is off, or FALSE if an error - * occurs. - * - * If enable is set, this function returns TRUE on - * success. + * @param resource $odbc + * @param bool $enable + * @return mixed * @throws UodbcException * */ @@ -36,101 +23,8 @@ function odbc_autocommit($odbc, bool $enable = false) /** - * Controls handling of binary column data. ODBC SQL types affected are - * BINARY, VARBINARY, and - * LONGVARBINARY. - * The default mode can be set using the - * uodbc.defaultbinmode php.ini directive. - * - * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte - * (8 bits) of source data is represented as two ASCII characters. - * These characters are the ASCII character representation of the - * number in its hexadecimal form. For example, a binary - * 00000001 is converted to - * "01" and a binary 11111111 - * is converted to "FF". - * - * While the handling of BINARY and VARBINARY - * columns only depend on the binmode, the handling of LONGVARBINARY - * columns also depends on the longreadlen as well: - * - * LONGVARBINARY handling - * - * - * - * binmode - * longreadlen - * result - * - * - * - * - * ODBC_BINMODE_PASSTHRU - * 0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * 0 - * passthru - * - * - * ODBC_BINMODE_CONVERT - * 0 - * passthru - * - * - * ODBC_BINMODE_PASSTHRU - * >0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * >0 - * return as is - * - * - * ODBC_BINMODE_CONVERT - * >0 - * return as char - * - * - * - * - * - * If odbc_fetch_into is used, passthru means that an - * empty string is returned for these columns. - * If odbc_result is used, passthru means that the data are - * sent directly to the client (i.e. printed). - * - * @param int $statement The result identifier. - * - * If statement is 0, the - * settings apply as default for new results. - * @param int $mode Possible values for mode are: - * - * - * - * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * - * ODBC_BINMODE_RETURN: Return as is - * - * - * - * - * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * - * - * - * Handling of binary long - * columns is also affected by odbc_longreadlen. - * - * + * @param int $statement + * @param int $mode * @throws UodbcException * */ @@ -145,39 +39,12 @@ function odbc_binmode(int $statement, int $mode): void /** - * Lists columns and associated privileges for the given table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * This result identifier can be used to fetch a list of columns and - * associated privileges. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param string $column + * @return resource * @throws UodbcException * */ @@ -193,47 +60,12 @@ function odbc_columnprivileges($odbc, string $catalog, string $schema, string $t /** - * Lists all columns in the requested range. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -259,10 +91,7 @@ function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?s /** - * Commits all pending transactions on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -277,44 +106,11 @@ function odbc_commit($odbc): void /** - * The connection id returned by this functions is needed by other - * ODBC functions. You can have multiple connections open at once as long as - * they either use different db or different credentials. - * - * With some ODBC drivers, executing a complex stored procedure may - * fail with an error similar to: "Cannot open a cursor on a stored - * procedure that has anything other than a single select statement - * in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some - * drivers don't support the optional row_number parameter in - * odbc_fetch_row. SQL_CUR_USE_ODBC might help - * in that case, too. - * - * @param string $dsn The database source name for the connection. Alternatively, a - * DSN-less connection string can be used. - * @param string $user The username. - * @param string $password The password. - * @param int $cursor_option This sets the type of cursor to be used - * for this connection. This parameter is not normally needed, but - * can be useful for working around problems with some ODBC drivers. - * - * - * - * - * SQL_CUR_USE_IF_NEEDED - * - * - * - * - * SQL_CUR_USE_ODBC - * - * - * - * - * SQL_CUR_USE_DRIVER - * - * - * - * @return resource Returns an ODBC connection. + * @param string $dsn + * @param string $user + * @param string $password + * @param int $cursor_option + * @return resource * @throws UodbcException * */ @@ -330,10 +126,8 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o /** - * Gets the cursorname for the given result_id. - * - * @param resource $statement The result identifier. - * @return string Returns the cursor name, as a string. + * @param resource $statement + * @return string * @throws UodbcException * */ @@ -349,17 +143,9 @@ function odbc_cursor($statement): string /** - * This function will return the list of available DSN (after calling it - * several times). - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $fetch_type The fetch_type can be one of two constant types: - * SQL_FETCH_FIRST, SQL_FETCH_NEXT. - * Use SQL_FETCH_FIRST the first time this function is - * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching - * the last available DSN. + * @param resource $odbc + * @param int $fetch_type + * @return array * @throws UodbcException * */ @@ -375,13 +161,9 @@ function odbc_data_source($odbc, int $fetch_type): array /** - * Sends an SQL statement to the database server. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The SQL statement. - * @return resource Returns an ODBC result identifier if the SQL command was executed - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -397,18 +179,8 @@ function odbc_exec($odbc, string $query) /** - * Executes a statement prepared with odbc_prepare. - * - * @param resource $statement The result id resource, from odbc_prepare. - * @param array $params Parameters in params will be - * substituted for placeholders in the prepared statement in order. - * Elements of this array will be converted to strings by calling this - * function. - * - * Any parameters in params which - * start and end with single quotes will be taken as the name of a - * file to read and send to the database server as the data for the - * appropriate placeholder. + * @param resource $statement + * @param array $params * @throws UodbcException * */ @@ -423,16 +195,10 @@ function odbc_execute($statement, array $params = []): void /** - * Fetch one result row into array. - * - * @param resource $statement The result resource. - * @param array|null $array The result array - * that can be of any type since it will be converted to type - * array. The array will contain the column values starting at array - * index 0. - * @param int $row The row number. - * @return int Returns the number of columns in the result; - * FALSE on error. + * @param resource $statement + * @param array|null $array + * @param int $row + * @return int * @throws UodbcException * */ @@ -448,12 +214,9 @@ function odbc_fetch_into($statement, ?array &$array, int $row = 0): int /** - * Gets the length of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field length. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -469,12 +232,9 @@ function odbc_field_len($statement, int $field): int /** - * Gets the name of the field occupying the given column number in the given - * result identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field name as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -490,13 +250,9 @@ function odbc_field_name($statement, int $field): string /** - * Gets the number of the column slot that corresponds to the named field in - * the given result identifier. - * - * @param resource $statement The result identifier. - * @param string $field The field name. - * @return int Returns the field number as a integer. - * Field numbering starts at 1. + * @param resource $statement + * @param string $field + * @return int * @throws UodbcException * */ @@ -512,12 +268,9 @@ function odbc_field_num($statement, string $field): int /** - * Gets the scale of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field scale as a integer. + * @param resource $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -533,12 +286,9 @@ function odbc_field_scale($statement, int $field): int /** - * Gets the SQL type of the field referenced by number in the given result - * identifier. - * - * @param resource $statement The result identifier. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field type as a string. + * @param resource $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -554,38 +304,14 @@ function odbc_field_type($statement, int $field): string /** - * Retrieves a list of foreign keys in the specified table or a list of - * foreign keys in other tables that refer to the primary key in the - * specified table - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. - * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. - * @param string $pk_table The primary key table. - * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_table The foreign key table. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PKTABLE_CAT - * PKTABLE_SCHEM - * PKTABLE_NAME - * PKCOLUMN_NAME - * FKTABLE_CAT - * FKTABLE_SCHEM - * FKTABLE_NAME - * FKCOLUMN_NAME - * KEY_SEQ - * UPDATE_RULE - * DELETE_RULE - * FK_NAME - * PK_NAME - * DEFERRABILITY - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $pk_catalog + * @param string $pk_schema + * @param string $pk_table + * @param string $fk_catalog + * @param string $fk_schema + * @param string $fk_table + * @return resource * @throws UodbcException * */ @@ -601,34 +327,9 @@ function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $ /** - * Retrieves information about data types supported by the data source. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $data_type The data type, which can be used to restrict the information to a - * single data type. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TYPE_NAME - * DATA_TYPE - * PRECISION - * LITERAL_PREFIX - * LITERAL_SUFFIX - * CREATE_PARAMS - * NULLABLE - * CASE_SENSITIVE - * SEARCHABLE - * UNSIGNED_ATTRIBUTE - * MONEY - * AUTO_INCREMENT - * LOCAL_TYPE_NAME - * MINIMUM_SCALE - * MAXIMUM_SCALE - * - * - * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @param resource $odbc + * @param int $data_type + * @return resource * @throws UodbcException * */ @@ -644,14 +345,8 @@ function odbc_gettypeinfo($odbc, int $data_type = 0) /** - * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. - * The default length can be set using the - * uodbc.defaultlrl php.ini directive. - * - * @param resource $statement The result identifier. - * @param int $length The number of bytes returned to PHP is controlled by the parameter - * length. If it is set to 0, long column data is passed through to the - * client (i.e. printed) when retrieved with odbc_result. + * @param resource $statement + * @param int $length * @throws UodbcException * */ @@ -666,10 +361,8 @@ function odbc_longreadlen($statement, int $length): void /** - * Gets the number of fields (columns) in an ODBC result. - * - * @param resource $statement The result identifier returned by odbc_exec. - * @return int Returns the number of fields. + * @param resource $statement + * @return int * @throws UodbcException * */ @@ -685,23 +378,11 @@ function odbc_num_fields($statement): int /** - * Opens a persistent database connection. - * - * This function is much like - * odbc_connect, except that the connection is - * not really closed when the script has finished. Future requests - * for a connection with the same dsn, - * user, password - * combination (via odbc_connect and - * odbc_pconnect) can reuse the persistent - * connection. - * * @param string $dsn * @param string $user * @param string $password * @param int $cursor_option - * @return resource Returns an ODBC connection. - * error. + * @return resource * @throws UodbcException * */ @@ -717,19 +398,9 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ /** - * Prepares a statement for execution. The result identifier can be used - * later to execute the statement with odbc_execute. - * - * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support - * stored procedures that accept parameters of type IN, INOUT, and OUT as - * defined by the ODBC specification. However, the Unified ODBC driver - * currently only supports parameters of type IN to stored procedures. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The query string statement being prepared. - * @return resource Returns an ODBC result identifier if the SQL command was prepared - * successfully. + * @param resource $odbc + * @param string $query + * @return resource * @throws UodbcException * */ @@ -745,26 +416,11 @@ function odbc_prepare($odbc, string $query) /** - * Returns a result identifier that can be used to fetch the column names - * that comprise the primary key for a table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param resource $odbc + * @param string $catalog + * @param string $schema * @param string $table - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * KEY_SEQ - * PK_NAME - * - * Drivers can report additional columns. + * @return resource * @throws UodbcException * */ @@ -780,50 +436,12 @@ function odbc_primarykeys($odbc, string $catalog, string $schema, string $table) /** - * Retrieve information about parameters to procedures. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The proc. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns the list of input and output parameters, as well as the - * columns that make up the result set for the specified procedures. - * Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * COLUMN_NAME - * COLUMN_TYPE - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @param null|string $column + * @return resource * @throws UodbcException * */ @@ -849,34 +467,11 @@ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = /** - * Lists all procedures in the requested range. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource Returns an ODBC - * result identifier containing the information. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * NUM_INPUT_PARAMS - * NUM_OUTPUT_PARAMS - * NUM_RESULT_SETS - * REMARKS - * PROCEDURE_TYPE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @return resource * @throws UodbcException * */ @@ -900,16 +495,9 @@ function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, /** - * Prints all rows from a result identifier produced by - * odbc_exec. The result is printed in HTML table format. - * The data is not escaped. - * - * This function is not supposed to be used in production environments; it is - * merely meant for development purposes, to get a result set quickly rendered. - * - * @param resource $statement The result identifier. - * @param string $format Additional overall table formatting. - * @return int Returns the number of rows in the result. + * @param resource $statement + * @param string $format + * @return int * @throws UodbcException * */ @@ -925,14 +513,9 @@ function odbc_result_all($statement, string $format = ""): int /** - * Get result data - * - * @param resource $statement The ODBC resource. - * @param mixed $field The field name being retrieved. It can either be an integer containing - * the column number of the field you want; or it can be a string - * containing the name of the field. - * @return mixed Returns the string contents of the field, FALSE on error, NULL for - * NULL data, or TRUE for binary data. + * @param resource $statement + * @param mixed $field + * @return mixed * @throws UodbcException * */ @@ -948,10 +531,7 @@ function odbc_result($statement, $field) /** - * Rolls back all pending statements on the connection. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. + * @param resource $odbc * @throws UodbcException * */ @@ -966,32 +546,10 @@ function odbc_rollback($odbc): void /** - * This function allows fiddling with the ODBC options for a - * particular connection or query result. It was written to help - * find work around to problems in quirky ODBC drivers. You should - * probably only use this function if you are an ODBC programmer and - * understand the effects the various options will have. You will - * certainly need a good ODBC reference to explain all the different - * options and values that can be used. Different driver versions - * support different options. - * - * Because the effects may vary depending on the ODBC driver, use of - * this function in scripts to be made publicly available is - * strongly discouraged. Also, some ODBC options are not available - * to this function because they must be set before the connection - * is established or the query is prepared. However, if on a - * particular job it can make PHP work so your boss doesn't tell you - * to use a commercial product, that's all that really - * matters. - * - * @param resource $odbc Is a connection id or result id on which to change the settings. - * For SQLSetConnectOption(), this is a connection id. - * For SQLSetStmtOption(), this is a result id. - * @param int $which Is the ODBC function to use. The value should be - * 1 for SQLSetConnectOption() and - * 2 for SQLSetStmtOption(). - * @param int $option The option to set. - * @param int $value The value for the given option. + * @param resource $odbc + * @param int $which + * @param int $option + * @param int $value * @throws UodbcException * */ @@ -1006,42 +564,14 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void /** - * Retrieves either the optimal set of columns that uniquely identifies a - * row in the table, or columns that are automatically updated when any - * value in the row is updated by a transaction. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $type When the type argument is SQL_BEST_ROWID, - * odbc_specialcolumns returns the - * column or columns that uniquely identify each row in the table. - * - * When the type argument is SQL_ROWVER, - * odbc_specialcolumns returns the column or columns in the - * specified table, if any, that are automatically updated by the data source - * when any value in the row is updated by any transaction. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table. - * @param int $scope The scope, which orders the result set. - * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION - * or SQL_SCOPE_SESSION. - * @param int $nullable Determines whether to return special columns that can have a NULL value. - * One of SQL_NO_NULLS or SQL_NULLABLE . - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * SCOPE - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * PSEUDO_COLUMN - * - * Drivers can report additional columns. + * @param resource $odbc + * @param int $type + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $scope + * @param int $nullable + * @return resource * @throws UodbcException * */ @@ -1057,37 +587,13 @@ function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, /** - * Get statistics about a table and its indexes. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table name. - * @param int $unique The type of the index. - * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. - * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. - * The latter requests that the driver retrieve the CARDINALITY and - * PAGES only if they are readily available from the server. - * @return resource Returns an ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * NON_UNIQUE - * INDEX_QUALIFIER - * INDEX_NAME - * TYPE - * ORDINAL_POSITION - * COLUMN_NAME - * ASC_OR_DESC - * CARDINALITY - * PAGES - * FILTER_CONDITION - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $unique + * @param int $accuracy + * @return resource * @throws UodbcException * */ @@ -1103,33 +609,11 @@ function odbc_statistics($odbc, string $catalog, string $schema, string $table, /** - * Lists tables in the requested range and the privileges associated - * with each table. - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return resource An ODBC result identifier. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param resource $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @return resource * @throws UodbcException * */ @@ -1145,75 +629,12 @@ function odbc_tableprivileges($odbc, string $catalog, string $schema, string $ta /** - * Lists all tables in the requested range. - * - * To support enumeration of qualifiers, owners, and table types, - * the following special semantics for the - * catalog, schema, - * table, and - * table_type are available: - * - * - * - * If catalog is a single percent - * character (%) and schema and - * table are empty strings, then the result - * set contains a list of valid qualifiers for the data - * source. (All columns except the TABLE_QUALIFIER column contain - * NULLs.) - * - * - * - * - * If schema is a single percent character - * (%) and catalog and - * table are empty strings, then the result - * set contains a list of valid owners for the data source. (All - * columns except the TABLE_OWNER column contain - * NULLs.) - * - * - * - * - * If table_type is a single percent - * character (%) and catalog, - * schema and table - * are empty strings, then the result set contains a list of - * valid table types for the data source. (All columns except the - * TABLE_TYPE column contain NULLs.) - * - * - * - * - * @param resource $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $types If table_type is not an empty string, it - * must contain a list of comma-separated values for the types of - * interest; each value may be enclosed in single quotes (') or - * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the - * data source does not support a specified table type, - * odbc_tables does not return any results for - * that type. - * @return resource Returns an ODBC result identifier containing the information. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * TABLE_TYPE - * REMARKS - * - * Drivers can report additional columns. + * @param resource $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $types + * @return resource * @throws UodbcException * */ diff --git a/generated/8.3/uopz.php b/generated/8.3/uopz.php index 17d2e760..de1a0dc9 100644 --- a/generated/8.3/uopz.php +++ b/generated/8.3/uopz.php @@ -5,10 +5,8 @@ use Safe\Exceptions\UopzException; /** - * Makes class extend parent - * - * @param string $class The name of the class to extend - * @param string $parent The name of the class to inherit + * @param string $class + * @param string $parent * @throws UopzException * */ @@ -23,8 +21,6 @@ function uopz_extend(string $class, string $parent): void /** - * Makes class implement interface - * * @param string $class * @param string $interface * @throws UopzException diff --git a/generated/8.3/url.php b/generated/8.3/url.php index a6d06093..f65c527b 100644 --- a/generated/8.3/url.php +++ b/generated/8.3/url.php @@ -5,15 +5,9 @@ use Safe\Exceptions\UrlException; /** - * Decodes a base64 encoded string. - * - * @param string $string The encoded data. - * @param bool $strict If the strict parameter is set to TRUE - * then the base64_decode function will return - * FALSE if the input contains character from outside the base64 - * alphabet. Otherwise invalid characters will be silently discarded. - * @return string Returns the decoded data. The returned data may be - * binary. + * @param string $string + * @param bool $strict + * @return string * @throws UrlException * */ @@ -29,17 +23,10 @@ function base64_decode(string $string, bool $strict = false): string /** - * get_headers returns an array with the headers sent - * by the server in response to a HTTP request. - * - * @param string $url The target URL. - * @param bool $associative If the optional associative parameter is set to true, - * get_headers parses the response and sets the - * array's keys. - * @param null|resource $context A valid context resource created with - * stream_context_create, or NULL to use the - * default context. - * @return array Returns an indexed or associative array with the headers. + * @param string $url + * @param bool $associative + * @param null|resource $context + * @return array * @throws UrlException * */ @@ -59,38 +46,9 @@ function get_headers(string $url, bool $associative = false, $context = null): a /** - * Opens filename and parses it line by line for - * <meta> tags in the file. The parsing stops at - * </head>. - * - * @param string $filename The path to the HTML file, as a string. This can be a local file or an - * URL. - * - * - * What get_meta_tags parses - * - * - * - * - * - * - * ]]> - * - * - * @param bool $use_include_path Setting use_include_path to TRUE will result - * in PHP trying to open the file along the standard include path as per - * the include_path directive. - * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. - * - * The value of the name property becomes the key, the value of the content - * property becomes the value of the returned array, so you can easily use - * standard array functions to traverse it or access single values. - * Special characters in the value of the name property are substituted with - * '_', the rest is converted to lower case. If two meta tags have the same - * name, only the last one is returned. - * - * Returns FALSE on failure. + * @param string $filename + * @param bool $use_include_path + * @return array * @throws UrlException * */ @@ -106,90 +64,9 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array /** - * This function parses a URL and returns an associative array containing any - * of the various components of the URL that are present. - * The values of the array elements are not URL decoded. - * - * This function is not meant to validate - * the given URL, it only breaks it up into the parts listed below. Partial and invalid - * URLs are also accepted, parse_url tries its best to - * parse them correctly. - * - * @param string $url The URL to parse. - * @param int $component Specify one of PHP_URL_SCHEME, - * PHP_URL_HOST, PHP_URL_PORT, - * PHP_URL_USER, PHP_URL_PASS, - * PHP_URL_PATH, PHP_URL_QUERY - * or PHP_URL_FRAGMENT to retrieve just a specific - * URL component as a string (except when - * PHP_URL_PORT is given, in which case the return - * value will be an int). - * @return array|int|null|string On seriously malformed URLs, parse_url. - * - * If the component parameter is omitted, an - * associative array is returned. At least one element will be - * present within the array. Potential keys within this array are: - * - * - * - * scheme - e.g. http - * - * - * - * - * host - * - * - * - * - * port - * - * - * - * - * user - * - * - * - * - * pass - * - * - * - * - * path - * - * - * - * - * query - after the question mark ? - * - * - * - * - * fragment - after the hashmark # - * - * - * - * - * If the component parameter is specified, - * parse_url returns a string (or an - * int, in the case of PHP_URL_PORT) - * instead of an array. If the requested component doesn't exist - * within the given URL, NULL will be returned. - * As of PHP 8.0.0, parse_url distinguishes absent and empty - * queries and fragments: - * - * - * - * - * - * - * - * Previously all cases resulted in query and fragment being NULL. - * - * Note that control characters (cf. ctype_cntrl) in the - * components are replaced with underscores (_). + * @param string $url + * @param int $component + * @return array|int|null|string * @throws UrlException * */ diff --git a/generated/8.3/var.php b/generated/8.3/var.php index 70f048df..48e3f889 100644 --- a/generated/8.3/var.php +++ b/generated/8.3/var.php @@ -5,48 +5,8 @@ use Safe\Exceptions\VarException; /** - * Set the type of variable var to - * type. - * - * @param mixed $var The variable being converted. - * @param string $type Possibles values of type are: - * - * - * - * "boolean" or "bool" - * - * - * - * - * "integer" or "int" - * - * - * - * - * "float" or "double" - * - * - * - * - * "string" - * - * - * - * - * "array" - * - * - * - * - * "object" - * - * - * - * - * "null" - * - * - * + * @param mixed $var + * @param string $type * @throws VarException * */ diff --git a/generated/8.3/xdiff.php b/generated/8.3/xdiff.php index dab92fce..4ed412cd 100644 --- a/generated/8.3/xdiff.php +++ b/generated/8.3/xdiff.php @@ -5,14 +5,9 @@ use Safe\Exceptions\XdiffException; /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -27,14 +22,9 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * and xdiff_file_rabdiff functions or their string counterparts. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -49,16 +39,9 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -73,20 +56,11 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest /** - * Makes an unified diff containing differences between old_file and - * new_file and stores it in dest file. The - * resulting file is human-readable. An optional context parameter - * specifies how many lines of context should be added around each change. - * Setting minimal parameter to true will result in outputting the shortest - * patch file possible (can take a long time). - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. - * @param int $context Indicates how many lines of context you want to include in diff - * result. - * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result - * (can take a long time). + * @param string $old_file + * @param string $new_file + * @param string $dest + * @param int $context + * @param bool $minimal * @throws XdiffException * */ @@ -101,16 +75,9 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * or xdiff_file_rabdiff functions or their string counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -125,19 +92,9 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi /** - * Makes a binary diff of two files and stores the result in a patch file. - * The difference between this function and xdiff_file_bdiff is different - * algorithm used which should result in faster execution and smaller diff produced. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff - * website. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -152,13 +109,9 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -174,15 +127,9 @@ function xdiff_string_bpatch(string $str, string $patch): string /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -198,24 +145,11 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. - * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if - * it is provided. - * - * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, - * xdiff_file_diff functions or compatible tools. - * @param int $flags flags can be either - * XDIFF_PATCH_NORMAL (default mode, normal patch) - * or XDIFF_PATCH_REVERSE (reversed patch). - * - * Starting from version 1.5.0, you can also use binary OR to enable - * XDIFF_PATCH_IGNORESPACE flag. - * @param null|string $error If provided then rejected parts are stored inside this variable. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @param int $flags + * @param null|string $error + * @return string * @throws XdiffException * */ diff --git a/generated/8.3/xml.php b/generated/8.3/xml.php index 8b53cf72..72f86934 100644 --- a/generated/8.3/xml.php +++ b/generated/8.3/xml.php @@ -5,9 +5,7 @@ use Safe\Exceptions\XmlException; /** - * Frees the given XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to free. + * @param \XMLParser $parser * @throws XmlException * */ @@ -22,48 +20,8 @@ function xml_parser_free(\XMLParser $parser): void /** - * Sets the character data handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up character data handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * data - * - * - * The second parameter, data, contains - * the character data as a string. - * - * - * - * - * - * Character data handler is called for every piece of a text in the XML - * document. It can be called multiple times inside each fragment (e.g. - * for non-ASCII strings). - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -78,50 +36,8 @@ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): /** - * Sets the default handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up default handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters: - * - * handler - * XMLParserparser - * stringdata - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * - * data - * - * - * - * The second parameter, data, contains - * the character data.This may be the XML declaration, - * document type declaration, entities or other data for which - * no other handler exists. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -136,63 +52,9 @@ function xml_set_default_handler(\XMLParser $parser, callable $handler): void /** - * Sets the element handler functions for the XML parser. - * start_handler and - * end_handler are strings containing - * the names of functions that must exist when xml_parse - * is called for parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up start and end element handler functions. - * @param callable $start_handler The function named by start_handler - * must accept three parameters: - * - * start_element_handler - * XMLParserparser - * stringname - * arrayattribs - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * name - * - * - * The second parameter, name, contains the name - * of the element for which this handler is called.If case-folding is in effect for this - * parser, the element name will be in uppercase letters. - * - * - * - * - * attribs - * - * - * The third parameter, attribs, contains an - * associative array with the element's attributes (if any).The keys - * of this array are the attribute names, the values are the attribute - * values.Attribute names are case-folded on the same criteria as - * element names.Attribute values are not - * case-folded. - * - * - * The original order of the attributes can be retrieved by walking - * through attribs the normal way, using - * each.The first key in the array was the first - * attribute, and so on. - * - * - * - * - * @param callable $end_handler The first parameter, parser, is a - * reference to the XML parser calling the handler. + * @param \XMLParser $parser + * @param callable $start_handler + * @param callable $end_handler * @throws XmlException * */ @@ -207,49 +69,8 @@ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, ca /** - * Set a handler to be called when leaving the scope of a namespace - * declaration. This will be called, for each namespace declaration, after - * the handler for the end tag of the element in which the namespace was - * declared. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * two parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -264,84 +85,8 @@ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handle /** - * Sets the external entity reference handler function for the XML parser - * parser. - * - * @param \XMLParser $parser A reference to the XML parser to set up external entity reference handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters, and should return an integer value.If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringopen_entity_names - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * open_entity_names - * - * - * The second parameter, open_entity_names, is a - * space-separated list of the names of the entities that are open for - * the parse of this entity (including the name of the referenced - * entity). - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (system_id) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * The fourth parameter, system_id, is the - * system identifier as specified in the entity declaration. - * - * - * - * - * public_id - * - * - * The fifth parameter, public_id, is the - * public identifier as specified in the entity declaration, or - * an empty string if none was specified; the whitespace in the - * public identifier will have been normalized as required by - * the XML spec. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -356,89 +101,8 @@ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handl /** - * Sets the notation declaration handler function for the XML parser - * parser. - * - * A notation declaration is part of the document's DTD and has the - * following format: - * - * name - * { systemId | publicId?> - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param \XMLParser $parser A reference to the XML parser to set up notation declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * five parameters: - * - * handler - * XMLParserparser - * stringnotation_name - * stringbase - * stringsystem_id - * stringpublic_id - * - * - * - * - * parser - * - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * Currently this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -453,13 +117,8 @@ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): v /** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param \XMLParser $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. + * @param \XMLParser $parser + * @param object $object * @throws XmlException * */ @@ -474,66 +133,8 @@ function xml_set_object(\XMLParser $parser, object $object): void /** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * <?target - * data?> - * - * - * You can put PHP code into such a tag, but be aware of one limitation: in - * an XML PI, the PI end tag (?>) can not be quoted, - * so this character sequence should not appear in the PHP code you embed - * with PIs in XML documents.If it does, the rest of the PHP code, as well - * as the "real" PI end tag, will be treated as character data. - * - * @param \XMLParser $parser A reference to the XML parser to set up processing instruction (PI) handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters: - * - * handler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * target - * - * - * The second parameter, target, contains the PI - * target. - * - * - * - * - * data - * - * - * The third parameter, data, contains the PI - * data. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -548,58 +149,8 @@ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $ha /** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param \XMLParser $parser A reference to the XML parser. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept - * three parameters, and should return an integer value. If the - * value returned from the handler is FALSE (which it will be if no - * value is returned), the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * - * handler - * XMLParserparser - * stringprefix - * stringuri - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ @@ -614,96 +165,8 @@ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $hand /** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param \XMLParser $parser A reference to the XML parser to set up unparsed entity declaration handler function. - * @param callable $handler handler is a string containing the name of a - * function that must exist when xml_parse is called - * for parser. - * - * The function named by handler must accept six - * parameters: - * - * handler - * XMLParserparser - * stringentity_name - * stringbase - * stringsystem_id - * stringpublic_id - * stringnotation_name - * - * - * - * parser - * - * - * The first parameter, parser, is a - * reference to the XML parser calling the - * handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity.Currently - * this parameter will always be set to an empty string. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * - * - * - * notation_name - * - * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). - * - * - * - * - * - * If a handler function is set to an empty string, or FALSE, the handler - * in question is disabled. + * @param \XMLParser $parser + * @param callable $handler * @throws XmlException * */ diff --git a/generated/8.3/xmlrpc.php b/generated/8.3/xmlrpc.php index 3007ab7d..38243a14 100644 --- a/generated/8.3/xmlrpc.php +++ b/generated/8.3/xmlrpc.php @@ -5,10 +5,8 @@ use Safe\Exceptions\XmlrpcException; /** - * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * - * @param \DateTime|string $value Value to set the type - * @param string $type 'base64' or 'datetime' + * @param \DateTime|string $value + * @param string $type * @throws XmlrpcException * */ diff --git a/generated/8.3/yaml.php b/generated/8.3/yaml.php index 0b549947..8e6b196f 100644 --- a/generated/8.3/yaml.php +++ b/generated/8.3/yaml.php @@ -5,21 +5,11 @@ use Safe\Exceptions\YamlException; /** - * Convert all or part of a YAML document stream read from a file to a PHP variable. - * - * @param string $filename Path to the file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $filename + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -39,24 +29,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?a /** - * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * - * @param string $url url should be of the form "scheme://...". PHP - * will search for a protocol handler (also known as a wrapper) for that - * scheme. If no wrappers for that protocol are registered, PHP will emit - * a notice to help you track potential problems in your script and then - * continue as though filename specifies a regular file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is - * -1 an array will be returned with one entry - * for each document found in the stream. + * @param string $url + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -76,21 +53,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $ /** - * Convert all or part of a YAML document stream to a PHP variable. - * - * @param string $input The string to parse as a YAML document stream. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $input + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ diff --git a/generated/8.3/yaz.php b/generated/8.3/yaz.php index ce5dd4d0..1832141f 100644 --- a/generated/8.3/yaz.php +++ b/generated/8.3/yaz.php @@ -5,45 +5,9 @@ use Safe\Exceptions\YazException; /** - * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search - * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf - * prior to this function. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array - * containing the valid RPN query under the key rpn. - * - * Upon failure, three indexes are set in this array to indicate the cause - * of failure: - * - * - * - * errorcode - the CCL error code (integer) - * - * - * - * - * errorstring - the CCL error string - * - * - * - * - * errorpos - approximate position in query of failure - * (integer is character position) - * - * - * - * - * errorcode - the CCL error code (integer) - * - * errorstring - the CCL error string - * - * errorpos - approximate position in query of failure - * (integer is character position) + * @param resource $id + * @param string $query + * @param array|null $result * @throws YazException * */ @@ -58,9 +22,7 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void /** - * Closes the connection given by parameter id. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -75,193 +37,9 @@ function yaz_close($id): void /** - * This function returns a connection resource on success, zero on - * failure. - * - * yaz_connect prepares for a connection to a - * Z39.50 server. - * This function is non-blocking and does not attempt to establish - * a connection - it merely prepares a connect to be performed later when - * yaz_wait is called. - * - * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted - * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication - * string (OpenAuth). - * - * If given as an array, the contents of the array serves as options. - * - * - * user - * - * - * Username for authentication. - * - * - * - * - * group - * - * - * Group for authentication. - * - * - * - * - * password - * - * - * Password for authentication. - * - * - * - * - * cookie - * - * - * Cookie for session (YAZ proxy). - * - * - * - * - * proxy - * - * - * Proxy for connection (YAZ proxy). - * - * - * - * - * persistent - * - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * - * - * - * - * piggyback - * - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * - * - * - * charset - * - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * - * preferredMessageSize - * - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * maximumRecordSize - * - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * - * Username for authentication. - * - * Group for authentication. - * - * Password for authentication. - * - * Cookie for session (YAZ proxy). - * - * Proxy for connection (YAZ proxy). - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * @return mixed A connection resource on success, FALSE on error. + * @param string $zurl + * @param mixed $options + * @return mixed * @throws YazException * */ @@ -281,14 +59,8 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by - * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to - * yaz_connect. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are - * separated by a plus sign +. + * @param resource $id + * @param string $databases * @throws YazException * */ @@ -303,15 +75,8 @@ function yaz_database($id, string $databases): void /** - * This function sets the element set name for retrieval. - * - * Call this function before yaz_search or - * yaz_present to specify the element set name for - * records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $elementset Most servers support F (for full records) and - * B (for brief records). + * @param resource $id + * @param string $elementset * @throws YazException * */ @@ -326,12 +91,7 @@ function yaz_element($id, string $elementset): void /** - * This function prepares for retrieval of records after a successful search. - * - * The yaz_range function should be called prior to this - * function to specify the range of records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -346,32 +106,9 @@ function yaz_present($id): void /** - * yaz_search prepares for a search on the given - * connection. - * - * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when - * yaz_wait is called. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 - * query in prefix query notation. - * @param string $query The RPN query is a textual representation of the Type-1 query as - * defined by the Z39.50 standard. However, in the text representation - * as used by YAZ a prefix notation is used, that is the operator - * precedes the operands. The query string is a sequence of tokens where - * white space is ignored unless surrounded by double quotes. Tokens beginning - * with an at-character (@) are considered operators, - * otherwise they are treated as search terms. - * - * You can find information about attributes at the - * Z39.50 Maintenance Agency - * site. - * - * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and - * yaz_ccl_parse. + * @param resource $id + * @param string $type + * @param string $query * @throws YazException * */ @@ -386,44 +123,8 @@ function yaz_search($id, string $type, string $query): void /** - * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and - * yaz_itemorder. - * - * yaz_wait returns when all servers have either - * completed all requests or aborted (in case of errors). - * - * @param array $options An associative array of options: - * - * - * timeout - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * - * - * - * event - * - * - * A boolean. - * - * - * - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * A boolean. - * @return mixed Returns TRUE on success. - * In event mode, returns resource. + * @param array $options + * @return mixed * @throws YazException * */ diff --git a/generated/8.3/zip.php b/generated/8.3/zip.php index d1a628eb..7cbf1cce 100644 --- a/generated/8.3/zip.php +++ b/generated/8.3/zip.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ZipException; /** - * Closes the specified directory entry. - * - * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @param resource $zip_entry * @throws ZipException * */ @@ -22,10 +20,8 @@ function zip_entry_close($zip_entry): void /** - * Returns the compressed size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The compressed size. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -41,11 +37,8 @@ function zip_entry_compressedsize($zip_entry): int /** - * Returns the compression method of the directory entry specified - * by zip_entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The compression method. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -61,10 +54,8 @@ function zip_entry_compressionmethod($zip_entry): string /** - * Returns the actual size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The size of the directory entry. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -80,10 +71,8 @@ function zip_entry_filesize($zip_entry): int /** - * Returns the name of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The name of the directory entry. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -99,16 +88,9 @@ function zip_entry_name($zip_entry): string /** - * Opens a directory entry in a zip file for reading. - * - * @param resource $zip_dp A valid resource handle returned by zip_open. - * @param resource $zip_entry A directory entry returned by zip_read. - * @param string $mode Any of the modes specified in the documentation of - * fopen. - * - * Currently, mode is ignored and is always - * "rb". This is due to the fact that zip support - * in PHP is read only access. + * @param resource $zip_dp + * @param resource $zip_entry + * @param string $mode * @throws ZipException * */ @@ -123,13 +105,9 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void /** - * Reads from an open directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $len The number of bytes to return. - * - * This should be the uncompressed length you wish to read. - * @return string Returns the data read, empty string on end of a file. + * @param resource $zip_entry + * @param int $len + * @return string * @throws ZipException * */ diff --git a/generated/8.3/zlib.php b/generated/8.3/zlib.php index ea3510e0..38e4f681 100644 --- a/generated/8.3/zlib.php +++ b/generated/8.3/zlib.php @@ -5,20 +5,10 @@ use Safe\Exceptions\ZlibException; /** - * Incrementally deflates data in the specified context. - * - * @param \DeflateContext $context A context created with deflate_init. - * @param string $data A chunk of data to compress. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of compressed data. + * @param \DeflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -34,92 +24,9 @@ function deflate_add(\DeflateContext $context, string $data, int $flush_mode = Z /** - * Initializes an incremental deflate context using the specified - * encoding. - * - * Note that the window option here only sets the window size - * of the algorithm, differently from the zlib filters where the same parameter - * also sets the encoding to use; the encoding must be set with the - * encoding parameter. - * - * Limitation: there is currently no way to set the header information on a GZIP - * compressed stream, which are set as follows: GZIP signature - * (\x1f\x8B); compression method (\x08 - * == DEFLATE); 6 zero bytes; the operating system set to the current system - * (\x00 = Windows, \x03 = Unix, etc.) - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \DeflateContext Returns a deflate context resource (zlib.deflate) on - * success. + * @param int $encoding + * @param array $options + * @return \DeflateContext * @throws ZlibException * */ @@ -135,10 +42,7 @@ function deflate_init(int $encoding, array $options = []): \DeflateContext /** - * Closes the given gz-file pointer. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -153,20 +57,10 @@ function gzclose($stream): void /** - * This function compresses the given string using the ZLIB - * data format. - * - * For details on the ZLIB compression algorithm see the document - * "ZLIB Compressed Data Format - * Specification version 3.3" (RFC 1950). - * - * @param string $data The data to compress. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. - * - * If -1 is used, the default compression of the zlib library is used which is 6. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The compressed string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -182,12 +76,9 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** - * This function returns a decoded version of the input - * data. - * - * @param string $data The data to decode, encoded by gzencode. - * @param int $max_length The maximum length of data to decode. - * @return string The decoded string, or. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -203,19 +94,10 @@ function gzdecode(string $data, int $max_length = 0): string /** - * This function compresses the given string using the DEFLATE - * data format. - * - * For details on the DEFLATE compression algorithm see the document - * "DEFLATE Compressed Data Format - * Specification version 1.3" (RFC 1951). - * - * @param string $data The data to deflate. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The deflated string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -231,25 +113,10 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ /** - * This function returns a compressed version of the input - * data compatible with the output of the - * gzip program. - * - * For more information on the GZIP file format, see the document: - * GZIP file format specification - * version 4.3 (RFC 1952). - * - * @param string $data The data to encode. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default) - * or FORCE_DEFLATE. - * - * FORCE_DEFLATE generates - * RFC 1950 compliant output, consisting of a zlib header, the deflated - * data, and an Adler checksum. - * @return string The encoded string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -265,13 +132,9 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G /** - * This function is identical to readgzfile, except that - * it returns the file in an array. - * - * @param string $filename The file name. - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return list An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @param string $filename + * @param int $use_include_path + * @return list * @throws ZlibException * */ @@ -287,14 +150,9 @@ function gzfile(string $filename, int $use_include_path = 0): array /** - * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a - * newline, or on EOF (whichever comes first). - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int|null $length The length of data to get. - * @return string The uncompressed string. + * @param resource $stream + * @param int|null $length + * @return string * @throws ZlibException * */ @@ -314,15 +172,9 @@ function gzgets($stream, ?int $length = null): string /** - * This function inflates a deflated string. - * - * @param string $data The data compressed by gzdeflate. - * @param int $max_length The maximum length of decoded data. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or, unless max_length is 0, more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -338,28 +190,10 @@ function gzinflate(string $data, int $max_length = 0): string /** - * Opens a gzip (.gz) file for reading or writing. - * - * gzopen can be used to read a file which is - * not in gzip format; in this case gzread will - * directly read from the file without decompression. - * - * @param string $filename The file name. - * @param string $mode As in fopen (rb or - * wb) but can also include a compression level - * (wb9) or a strategy: f for - * filtered data as in wb6f, h for - * Huffman only compression as in wb1h. - * (See the description of deflateInit2 - * in zlib.h for - * more information about the strategy parameter.) - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return resource Returns a file pointer to the file opened, after that, everything you read - * from this file descriptor will be transparently decompressed and what you - * write gets compressed. - * - * If the open fails, the function returns FALSE. + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return resource * @throws ZlibException * */ @@ -375,13 +209,8 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) /** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The number of uncompressed characters read from gz - * and passed through to the input. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -397,15 +226,9 @@ function gzpassthru($stream): int /** - * gzread reads up to length bytes - * from the given gz-file pointer. Reading stops when - * length (uncompressed) bytes have been read - * or EOF is reached, whichever comes first. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int $length The number of bytes to read. - * @return string The data that have been read. + * @param resource $stream + * @param int $length + * @return string * @throws ZlibException * */ @@ -421,11 +244,7 @@ function gzread($stream, int $length): string /** - * Sets the file position indicator of the given gz-file pointer to the - * beginning of the file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -440,12 +259,8 @@ function gzrewind($stream): void /** - * Gets the position of the given file pointer; i.e., its offset into the - * uncompressed file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The position of the file pointer or FALSE if an error occurs. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -461,15 +276,9 @@ function gztell($stream): int /** - * This function uncompress a compressed string. - * - * @param string $data The data compressed by gzcompress. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -485,18 +294,10 @@ function gzuncompress(string $data, int $max_length = 0): string /** - * gzwrite writes the contents of - * data to the given gz-file. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param string $data The string to write. - * @param int|null $length The number of uncompressed bytes to write. If supplied, writing will - * stop after length (uncompressed) bytes have been - * written or the end of data is reached, - * whichever comes first. - * @return int Returns the number of (uncompressed) bytes written to the given gz-file - * stream. + * @param resource $stream + * @param string $data + * @param int|null $length + * @return int * @throws ZlibException * */ @@ -516,10 +317,8 @@ function gzwrite($stream, string $data, ?int $length = null): int /** - * - * * @param \InflateContext $context - * @return int Returns number of bytes read so far. + * @return int * @throws ZlibException * */ @@ -535,10 +334,8 @@ function inflate_get_read_len(\InflateContext $context): int /** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * * @param \InflateContext $context - * @return int Returns decompression status. + * @return int * @throws ZlibException * */ @@ -554,23 +351,10 @@ function inflate_get_status(\InflateContext $context): int /** - * Incrementally inflates encoded data in the specified context. - * - * Limitation: header information from GZIP compressed data are not made - * available. - * - * @param \InflateContext $context A context created with inflate_init. - * @param string $data A chunk of compressed data. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of uncompressed data. + * @param \InflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -586,73 +370,9 @@ function inflate_add(\InflateContext $context, string $data, int $flush_mode = Z /** - * Initialize an incremental inflate context with the specified - * encoding. - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \InflateContext Returns an inflate context resource (zlib.inflate) on - * success. + * @param int $encoding + * @param array $options + * @return \InflateContext * @throws ZlibException * */ @@ -668,17 +388,9 @@ function inflate_init(int $encoding, array $options = []): \InflateContext /** - * Reads a file, decompresses it and writes it to standard output. - * - * readgzfile can be used to read a file which is not in - * gzip format; in this case readgzfile will directly - * read from the file without decompression. - * - * @param string $filename The file name. This file will be opened from the filesystem and its - * contents written to standard output. - * @param $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return 0|positive-int Returns the number of (uncompressed) bytes read from the file on success + * @param string $filename + * @param $use_include_path + * @return 0|positive-int * @throws ZlibException * */ @@ -694,11 +406,9 @@ function readgzfile(string $filename, $use_include_path = 0): int /** - * Uncompress any raw/gzip/zlib encoded data. - * * @param string $data * @param int $max_length - * @return string Returns the uncompressed data. + * @return string * @throws ZlibException * */ diff --git a/generated/8.4/apache.php b/generated/8.4/apache.php index e4e25b69..56bba47d 100644 --- a/generated/8.4/apache.php +++ b/generated/8.4/apache.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ApacheException; /** - * Fetch the Apache version. - * - * @return string Returns the Apache version on success. + * @return string * @throws ApacheException * */ @@ -23,12 +21,9 @@ function apache_get_version(): string /** - * Retrieve an Apache environment variable specified by - * variable. - * - * @param string $variable The Apache environment variable - * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. - * @return string The value of the Apache environment variable on success + * @param string $variable + * @param bool $walk_to_top + * @return string * @throws ApacheException * */ @@ -44,39 +39,8 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string /** - * This performs a partial request for a URI. It goes just far - * enough to obtain all the important information about the given - * resource. - * - * @param string $filename The filename (URI) that's being requested. - * @return object An object of related URI information. The properties of - * this object are: - * - * - * status - * the_request - * status_line - * method - * content_type - * handler - * uri - * filename - * path_info - * args - * boundary - * no_cache - * no_local_copy - * allowed - * send_bodyct - * bytes_sent - * byterange - * clength - * unparsed_uri - * mtime - * request_time - * - * - * Returns FALSE on failure. + * @param string $filename + * @return object * @throws ApacheException * */ @@ -92,10 +56,7 @@ function apache_lookup_uri(string $filename): object /** - * Fetches all HTTP request headers from the current request. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array|false An associative array of all the HTTP headers in the current request. + * @return array|false * */ function apache_request_headers() @@ -107,10 +68,7 @@ function apache_request_headers() /** - * Fetch all HTTP response headers. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array|false An array of all Apache response headers on success. + * @return array|false * */ function apache_response_headers() @@ -122,13 +80,9 @@ function apache_response_headers() /** - * apache_setenv sets the value of the Apache - * environment variable specified by - * variable. - * - * @param string $variable The environment variable that's being set. - * @param string $value The new variable value. - * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @param string $variable + * @param string $value + * @param bool $walk_to_top * @throws ApacheException * */ @@ -143,13 +97,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals /** - * Fetches all HTTP headers from the current request. - * - * This function is an alias for apache_request_headers. - * Please read the apache_request_headers - * documentation for more information on how this function works. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * */ function getallheaders(): array @@ -161,19 +109,7 @@ function getallheaders(): array /** - * virtual is an Apache-specific function which - * is similar to <!--#include virtual...--> in - * mod_include. - * It performs an Apache sub-request. It is useful for including - * CGI scripts or .shtml files, or anything else that you would - * parse through Apache. Note that for a CGI script, the script - * must generate valid CGI headers. At the minimum that means it - * must generate a Content-Type header. - * - * To run the sub-request, all buffers are terminated and flushed to the - * browser, pending headers are sent too. - * - * @param string $uri The file that the virtual command will be performed on. + * @param string $uri * @throws ApacheException * */ diff --git a/generated/8.4/apcu.php b/generated/8.4/apcu.php index a8ec70b4..f47fec43 100644 --- a/generated/8.4/apcu.php +++ b/generated/8.4/apcu.php @@ -5,12 +5,8 @@ use Safe\Exceptions\ApcuException; /** - * Retrieves cached information and meta-data from APC's data store. - * - * @param bool $limited If limited is TRUE, the - * return value will exclude the individual list of cache entries. This - * is useful when trying to optimize calls for statistics gathering. - * @return array Array of cached data (and meta-data) + * @param bool $limited + * @return array * @throws ApcuException * */ @@ -26,13 +22,9 @@ function apcu_cache_info(bool $limited = false): array /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value - * with the value of the new parameter. - * - * @param string $key The key of the value being updated. - * @param int $old The old value (the value currently stored). - * @param int $new The new value to update to. + * @param string $key + * @param int $old + * @param int $new * @throws ApcuException * */ @@ -47,14 +39,11 @@ function apcu_cas(string $key, int $old, int $new): void /** - * Decreases a stored integer value. - * - * @param string $key The key of the value being decreased. - * @param int $step The step, or value to decrease. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -70,14 +59,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Increases a stored number. - * - * @param string $key The key of the value being increased. - * @param int $step The step, or value to increase. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -93,11 +79,8 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Retrieves APCu Shared Memory Allocation information. - * - * @param bool $limited When set to FALSE (default) apcu_sma_info will - * return a detailed information about each segment. - * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @param bool $limited + * @return array * @throws ApcuException * */ diff --git a/generated/8.4/array.php b/generated/8.4/array.php index addd5cb3..d539303b 100644 --- a/generated/8.4/array.php +++ b/generated/8.4/array.php @@ -5,20 +5,8 @@ use Safe\Exceptions\ArrayException; /** - * array_all returns TRUE, if the given - * callback returns TRUE for all elements. - * Otherwise the function returns FALSE. - * - * @param array $array The array that should be searched. - * @param callable $callback The callback function to call to check each element, which must be - * - * boolcallback - * mixedvalue - * mixedkey - * - * If this function returns FALSE, FALSE is returned from - * array_all and the callback will not be called for - * further elements. + * @param array $array + * @param callable $callback * @throws ArrayException * */ @@ -33,14 +21,9 @@ function array_all(array $array, callable $callback): void /** - * Creates an array by using the values from the - * keys array as keys and the values from the - * values array as the corresponding values. - * - * @param array $keys Array of keys to be used. Illegal values for key will be - * converted to string. - * @param array $values Array of values to be used - * @return array Returns the combined array. + * @param array $keys + * @param array $values + * @return array * */ function array_combine(array $keys, array $values): array @@ -52,21 +35,8 @@ function array_combine(array $keys, array $values): array /** - * array_flip returns an array in flip - * order, i.e. keys from array become values and values - * from array become keys. - * - * Note that the values of array need to be valid - * keys, i.e. they need to be either int or - * string. A warning will be emitted if a value has the wrong - * type, and the key/value pair in question will not be included - * in the result. - * - * If a value has several occurrences, the latest key will be - * used as its value, and all others will be lost. - * - * @param array $array An array of key/value pairs to be flipped. - * @return array Returns the flipped array. + * @param array $array + * @return array * */ function array_flip(array $array): array @@ -78,27 +48,9 @@ function array_flip(array $array): array /** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second array - * are both arrays, array_replace_recursive will replace - * their respective value recursively. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace_recursive(array $array, array ...$replacements): array @@ -114,17 +66,9 @@ function array_replace_recursive(array $array, array ...$replacements): array /** - * array_replace creates a new array and assigns items into - * it for each key in each of the provided arrays. If a key appears in multiple - * input arrays, the value from the right-most input array will be used. - * - * array_replace does not process elements items recursively, - * it replaces the entire value for each key when it does a replacement. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace(array $array, array ...$replacements): array @@ -140,25 +84,10 @@ function array_replace(array $array, array ...$replacements): array /** - * Applies the user-defined callback function to each - * element of the array. This function will recurse - * into deeper arrays. - * - * @param array|object $array The input array. - * @param callable $callback Typically, callback takes on two parameters. - * The array parameter's value being the first, and - * the key/index second. - * - * If callback needs to be working with the - * actual values of the array, specify the first parameter of - * callback as a - * reference. Then, - * any changes made to those elements will be made in the - * original array itself. - * @param mixed $arg If the optional arg parameter is supplied, - * it will be passed as the third parameter to the - * callback. - * @return bool Always returns TRUE. + * @param array|object $array + * @param callable $callback + * @param mixed $arg + * @return bool * */ function array_walk_recursive(&$array, callable $callback, $arg = null): bool @@ -174,10 +103,8 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): bool /** - * This function shuffles (randomizes the order of the elements in) an array. - * - * @param array $array The array. - * @return bool Always returns TRUE. + * @param array $array + * @return bool * */ function shuffle(array &$array): bool diff --git a/generated/8.4/bzip2.php b/generated/8.4/bzip2.php index 2ac21619..6205be66 100644 --- a/generated/8.4/bzip2.php +++ b/generated/8.4/bzip2.php @@ -5,10 +5,7 @@ use Safe\Exceptions\Bzip2Exception; /** - * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -23,12 +20,7 @@ function bzclose($bz): void /** - * This function is supposed to force a write of all buffered bzip2 data for the file pointer - * bz, - * but is implemented as null function in libbz2, and as such does nothing. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -43,14 +35,9 @@ function bzflush($bz): void /** - * bzopen opens a bzip2 (.bz2) file for reading or - * writing. - * - * @param resource|string $file The name of the file to open, or an existing stream resource. - * @param string $mode The modes 'r' (read), and 'w' (write) are supported. - * Everything else will cause bzopen to return FALSE. - * @return resource If the open fails, bzopen returns FALSE, otherwise - * it returns a pointer to the newly opened file. + * @param resource|string $file + * @param string $mode + * @return resource * @throws Bzip2Exception * */ @@ -66,17 +53,9 @@ function bzopen($file, string $mode) /** - * bzread reads from the given bzip2 file pointer. - * - * Reading stops when length (uncompressed) bytes have - * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param int $length 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 Returns the uncompressed data. + * @param resource $bz + * @param int $length + * @return string * @throws Bzip2Exception * */ @@ -92,16 +71,10 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file - * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param string $data The written data. - * @param int|null $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of - * data is reached, whichever comes first. - * @return int Returns the number of bytes written. + * @param resource $bz + * @param string $data + * @param int|null $length + * @return int * @throws Bzip2Exception * */ diff --git a/generated/8.4/calendar.php b/generated/8.4/calendar.php index bdbe04db..f426ef08 100644 --- a/generated/8.4/calendar.php +++ b/generated/8.4/calendar.php @@ -5,13 +5,8 @@ use Safe\Exceptions\CalendarException; /** - * Return the Julian Day for a Unix timestamp - * (seconds since 1.1.1970), or for the current day if no - * timestamp is given. Either way, the time is regarded - * as local time (not UTC). - * - * @param int|null $timestamp A unix timestamp to convert. - * @return int A julian day number as integer. + * @param int|null $timestamp + * @return int * @throws CalendarException * */ diff --git a/generated/8.4/classobj.php b/generated/8.4/classobj.php index d2ca82d1..4f70129b 100644 --- a/generated/8.4/classobj.php +++ b/generated/8.4/classobj.php @@ -5,14 +5,9 @@ use Safe\Exceptions\ClassobjException; /** - * Creates an alias named alias - * based on the user defined class class. - * The aliased class is exactly the same as the original class. - * - * @param string $class The original class. - * @param string $alias The alias name for the class. - * @param bool $autoload Whether to autoload - * if the original class is not found. + * @param string $class + * @param string $alias + * @param bool $autoload * @throws ClassobjException * */ diff --git a/generated/8.4/com.php b/generated/8.4/com.php index 18313855..81ba5b88 100644 --- a/generated/8.4/com.php +++ b/generated/8.4/com.php @@ -5,12 +5,7 @@ use Safe\Exceptions\ComException; /** - * Generates a Globally Unique Identifier (GUID). - * - * A GUID is generated in the same way as DCE UUID's, except that the - * Microsoft convention is to enclose a GUID in curly braces. - * - * @return string Returns the GUID as a string. + * @return string * @throws ComException * */ @@ -26,24 +21,9 @@ function com_create_guid(): string /** - * Instructs COM to sink events generated by - * variant into the PHP object - * sink_object. - * - * Be careful how you use this feature; if you are doing something similar - * to the example below, then it doesn't really make sense to run it in a - * web server context. - * * @param object $variant - * @param object $sink_object sink_object should be an instance of a class with - * methods named after those of the desired dispinterface; you may use - * com_print_typeinfo to help generate a template class - * for this purpose. - * @param mixed $sink_interface PHP will attempt to use the default dispinterface type specified by - * the typelibrary associated with variant, but - * you may override this choice by setting - * sink_interface to the name of the dispinterface - * that you want to use. + * @param object $sink_object + * @param mixed $sink_interface * @throws ComException * */ @@ -62,54 +42,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = /** - * Loads a type-library and registers its constants in the engine, as though - * they were defined using define. - * - * Note that it is much more efficient to use the com.typelib-file php.ini setting to pre-load and - * register the constants, although not so flexible. - * - * If com.autoregister-typelib is turned on, then - * PHP will attempt to automatically register the constants associated with a - * COM object when you instantiate it. This depends on the interfaces - * provided by the COM object itself, and may not always be possible. - * - * @param string $typelib typelib can be one of the following: - * - * - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * - * - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * - * - * - * PHP will attempt to resolve the type library in this order, as the - * process gets more and more expensive as you progress down the list; - * searching for the type library by name is handled by physically - * enumerating the registry until we find a match. - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * @param bool $case_insensitive The case_insensitive behaves inversely to - * the parameter $case_insensitive in the define - * function. + * @param string $typelib + * @param bool $case_insensitive * @throws ComException * */ @@ -124,17 +58,9 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void /** - * The purpose of this function is to help generate a skeleton class for use - * as an event sink. You may also use it to generate a dump of any COM - * object, provided that it supports enough of the introspection interfaces, - * and that you know the name of the interface you want to display. - * - * @param object $variant variant should be either an instance of a COM - * object, or be the name of a typelibrary (which will be resolved according - * to the rules set out in com_load_typelib). - * @param null|string $dispatch_interface The name of an IDispatch descendant interface that you want to display. - * @param bool $display_sink If set to TRUE, the corresponding sink interface will be displayed - * instead. + * @param object $variant + * @param null|string $dispatch_interface + * @param bool $display_sink * @throws ComException * */ @@ -155,12 +81,8 @@ function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, /** - * Converts variant from a VT_DATE - * (or similar) value into a Unix timestamp. This allows easier - * interopability between the Unix-ish parts of PHP and COM. - * - * @param object $variant The variant. - * @return int Returns a unix timestamp. + * @param object $variant + * @return int * @throws ComException * */ @@ -176,12 +98,9 @@ function variant_date_to_timestamp(object $variant): int /** - * Returns the value of value rounded to - * decimals decimal places. - * - * @param mixed $value The variant. - * @param int $decimals Number of decimal places. - * @return mixed Returns the rounded value. + * @param mixed $value + * @param int $decimals + * @return mixed * @throws ComException * */ diff --git a/generated/8.4/cubrid.php b/generated/8.4/cubrid.php index 423f0cc5..40c5f695 100644 --- a/generated/8.4/cubrid.php +++ b/generated/8.4/cubrid.php @@ -5,122 +5,10 @@ use Safe\Exceptions\CubridException; /** - * The cubrid_bind function is used to bind values to a - * corresponding named or question mark placeholder in the SQL statement that - * was passed to cubrid_prepare. If - * bind_value_type is not given, string will be the - * default. - * - * The following table shows the types of substitute values. - * - * - * CUBRID Bind Date Types - * - * - * - * Support - * Bind Type - * Corresponding SQL Type - * - * - * - * - * Supported - * STRING - * CHAR, VARCHAR - * - * - * - * NCHAR - * NCHAR, NVARCHAR - * - * - * - * BIT - * BIT, VARBIT - * - * - * - * NUMERIC or NUMBER - * SHORT, INT, NUMERIC - * - * - * - * FLOAT - * FLOAT - * - * - * - * DOUBLE - * DOUBLE - * - * - * - * TIME - * TIME - * - * - * - * DATE - * DATE - * - * - * - * TIMESTAMP - * TIMESTAMP - * - * - * - * OBJECT - * OBJECT - * - * - * - * ENUM - * ENUM - * - * - * - * BLOB - * BLOB - * - * - * - * CLOB - * CLOB - * - * - * - * NULL - * NULL - * - * - * Not supported - * SET - * SET - * - * - * - * MULTISET - * MULTISET - * - * - * - * SEQUENCE - * SEQUENCE - * - * - * - * - * - * @param resource $req_identifier Request identifier as a result of - * cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type A type of the value to bind. (It is omitted by default. - * Thus, the system internally uses string by default. However, you need to - * specify the exact type of the value as an argument when they are NCHAR, - * BIT, or BLOB/CLOB). + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -139,14 +27,10 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bin /** - * The cubrid_col_size function is used to get the - * number of elements in a collection type (set, multiset, sequence) - * attribute. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID the instance that you want to work with. - * @param string $attr_name Name of the attribute that you want to work with. - * @return int Number of elements, when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @return int * @throws CubridException * */ @@ -162,11 +46,8 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int /** - * The cubrid_column_names function is used to get the - * column names of the query result by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column names, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -182,11 +63,8 @@ function cubrid_column_names($req_identifier): array /** - * The cubrid_column_types function gets column types of - * query results by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column types, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -202,18 +80,7 @@ function cubrid_column_types($req_identifier): array /** - * The cubrid_commit function is used to execute commit - * on the transaction pointed by conn_identifier, - * currently in progress. Connection to the server is closed after the - * cubrid_commit function is called; However, - * the connection handle is still valid. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction management. - * You can set it by using cubrid_set_autocommit. - * You can get its status by using cubrid_get_autocommit. Before you start a transaction, - * remember to disable the auto-commit mode. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -228,78 +95,11 @@ function cubrid_commit($conn_identifier): void /** - * The cubrid_connect_with_url function is used to - * establish the environment for connecting to your server by using connection - * information passed with an url string argument. If the HA feature is - * enabled in CUBRID, you must specify the connection information of the - * standby server, which is used for failover when failure occurs, in the url - * string argument of this function. If the user name and password is not - * given, then the "PUBLIC" connection will be made by default. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @param bool $new_link If a second call is made to - * cubrid_connect_with_url with the same arguments, - * no new connection will be established, but instead, the connection - * identifier of the already opened connection will be returned. The - * new_link parameter modifies this behavior and - * makes cubrid_connect_with_url always open a new - * connection, even if cubrid_connect_with_url was - * called before with the same parameters. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -323,27 +123,13 @@ function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?stri /** - * The cubrid_connect function is used to establish the - * environment for connecting to your server by using your server address, - * port number, database name, user name, and password. If the user name and - * password is not given, then the "PUBLIC" connection will be made by - * default. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. If not given, the default - * value is "public". - * @param string $passwd User password. If not given, the default value is "". - * @param bool $new_link If a second call is made to - * cubrid_connect with the same arguments, no new - * connection will be established, but instead, the connection identifier - * of the already opened connection will be 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 Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -367,14 +153,8 @@ function cubrid_connect(string $host, int $port, string $dbname, ?string $userid /** - * The cubrid_current_oid function is used to get the - * oid of the current cursor location from the query result. To use - * cubrid_current_oid, the query executed must be a - * updatable query, and the CUBRID_INCLUDE_OID option must be included during - * the query execution. - * - * @param resource $req_identifier Request identifier. - * @return string Oid of current cursor location, when process is successful. + * @param resource $req_identifier + * @return string * @throws CubridException * */ @@ -390,11 +170,7 @@ function cubrid_current_oid($req_identifier): string /** - * The cubrid_disconnect function closes the connection - * handle and disconnects from server. If any request handle is not closed at this point, - * it will be closed. It is similar to the CUBRID MySQL compatible function cubrid_close. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -413,11 +189,8 @@ function cubrid_disconnect($conn_identifier = null): void /** - * The cubrid_drop function is used to delete an - * instance from database by using the oid of the instance. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid Oid of the instance that you want to delete. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -432,12 +205,7 @@ function cubrid_drop($conn_identifier, string $oid): void /** - * This function frees the memory occupied by the result data. It returns - * TRUE on success. Note that it can only frees the - * client fetch buffer now, and if you want free all memory, use function - * cubrid_close_request. - * - * @param resource $req_identifier This is the request identifier. + * @param resource $req_identifier * @throws CubridException * */ @@ -452,12 +220,8 @@ function cubrid_free_result($req_identifier): void /** - * This function returns the current CUBRID connection charset and is similar - * to the CUBRID MySQL compatible function - * cubrid_client_encoding. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID connection charset on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -473,13 +237,9 @@ function cubrid_get_charset($conn_identifier): string /** - * The cubrid_get_class_name function is used to get the - * class name from oid. It doesn't work when selecting data from the system tables, - * for example db_class. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to check the existence. - * @return string Class name when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @return string * @throws CubridException * */ @@ -495,9 +255,7 @@ function cubrid_get_class_name($conn_identifier, string $oid): string /** - * This function returns a string that represents the client library version. - * - * @return string A string that represents the client library version on success. + * @return string * @throws CubridException * */ @@ -513,115 +271,8 @@ function cubrid_get_client_info(): string /** - * This function returns the CUBRID database parameters. - * It returns an associative array with the values for the following parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * PARAM_MAX_STRING_LENGTH - * PARAM_AUTO_COMMIT - * - * - * - * Database parameters - * - * - * - * Parameter - * Description - * - * - * - * - * PARAM_ISOLATION_LEVEL - * The transaction isolation level. - * - * - * LOCK_TIMEOUT - * CUBRID provides the lock timeout feature, which sets the waiting - * time (in seconds) for the lock until the transaction lock setting is - * allowed. The default value of the lock_timeout_in_secs parameter is - * -1, which means the application client will wait indefinitely until - * the transaction lock is allowed. - * - * - * - * PARAM_AUTO_COMMIT - * In CUBRID PHP, auto-commit mode is disabled by default for - * transaction management. It can be set by using - * cubrid_set_autocommit. - * - * - * - * - * - * - * The following table shows the isolation levels from 1 to 6. It consists of - * table schema (row) and isolation level: - * - * Levels of Isolation Supported by CUBRID - * - * - * - * Name - * Description - * - * - * - * - * SERIALIZABLE (6) - * In this isolation level, problems concerning concurrency (e.g. - * dirty read, non-repeatable read, phantom read, etc.) do not - * occur. - * - * - * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience phantom read for the record R that was - * inserted by another transaction T2 when it is repeatedly retrieving a - * specific record. - * - * - * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience R read (non-repeatable read) that was - * updated and committed by another transaction T2 when it is repeatedly - * retrieving the record R. - * - * - * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) - * Default isolation level. Another transaction T2 cannot update - * the schema of table A while transaction T1 is viewing table A. - * Transaction T1 may experience R' read (dirty read) for the record that - * was updated but not committed by another transaction T2. - * - * - * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is viewing table A repeatedly. Transaction T1 may experience - * R' read (non-repeatable read) for the record that was updated and - * committed by another transaction T2 while it is retrieving the record - * R repeatedly. - * - * - * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is repeatedly viewing table A. Transaction T1 may experience - * R' read (dirty read) for the record that was updated but not committed - * by another transaction T2. - * - * - * - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @return array An associative array with CUBRID database parameters; on success. + * @param resource $conn_identifier + * @return array * @throws CubridException * */ @@ -637,11 +288,8 @@ function cubrid_get_db_parameter($conn_identifier): array /** - * The cubrid_get_query_timeout function is used to get - * the query timeout of the request. - * - * @param resource $req_identifier Request identifier. - * @return int Returns the query timeout value in milliseconds of the current request on success. + * @param resource $req_identifier + * @return int * @throws CubridException * */ @@ -657,10 +305,8 @@ function cubrid_get_query_timeout($req_identifier): int /** - * This function returns a string that represents the CUBRID server version. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID server version on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -676,19 +322,8 @@ function cubrid_get_server_info($conn_identifier): string /** - * The cubrid_insert_id function retrieves the ID - * generated for the AUTO_INCREMENT column which is updated by the previous - * INSERT query. It returns 0 if the previous query does not generate new - * rows. - * - * @param resource $conn_identifier The connection identifier previously obtained by a call to - * cubrid_connect. - * @return string A string representing the ID generated for an AUTO_INCREMENT column by the - * previous query, on success. - * - * 0, if the previous query does not generate new rows. - * - * FALSE on failure. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -708,10 +343,7 @@ function cubrid_insert_id($conn_identifier = null): string /** - * cubrid_lob_close is used to close all BLOB/CLOB - * returned from cubrid_lob_get. - * - * @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get. + * @param array $lob_identifier_array * @throws CubridException * */ @@ -726,12 +358,9 @@ function cubrid_lob_close(array $lob_identifier_array): void /** - * cubrid_lob_export is used to get BLOB/CLOB data from CUBRID database, and saves its contents to a file. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. - * @param string $path_name Path name of the file. + * @param resource $conn_identifier + * @param resource $lob_identifier + * @param string $path_name * @throws CubridException * */ @@ -746,15 +375,9 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) /** - * cubrid_lob_get is used to get BLOB/CLOB meta info from CUBRID database, - * CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. - * Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. - * - * Remember to use cubrid_lob_close to release the LOBs if you don't need it any more. - * - * @param resource $conn_identifier Connection identifier. - * @param string $sql SQL statement to be executed. - * @return array Return an array of LOB resources, when process is successful. + * @param resource $conn_identifier + * @param string $sql + * @return array * @throws CubridException * */ @@ -770,11 +393,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array /** - * cubrid_lob_send reads BLOB/CLOB data and passes it straight through to the browser. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. + * @param resource $conn_identifier + * @param resource $lob_identifier * @throws CubridException * */ @@ -789,10 +409,8 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void /** - * cubrid_lob_size is used to get BLOB/CLOB data size. - * - * @param resource $lob_identifier LOB identifier. - * @return string A string representing LOB data size, when process is successful. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -808,17 +426,10 @@ function cubrid_lob_size($lob_identifier): string /** - * The cubrid_lob2_bind function is used to bind BLOB/CLOB datas - * to a corresponding question mark placeholder in the SQL statement that was passed - * to cubrid_prepare. If bind_value_type - * is not given, string will be "BLOB" as the default. But if you use - * cubrid_lob2_new before, bind_value_type - * will be consistent with type in cubrid_lob2_new as the default. - * - * @param resource $req_identifier Request identifier as a result of cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type It must be "BLOB" or "CLOB" and it won't be case-sensitive. If it not be given, the default value is "BLOB". + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -837,10 +448,7 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string /** - * The cubrid_lob2_close function is used to close LOB object - * returned from cubrid_lob2_new or got from the result set. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @param resource $lob_identifier * @throws CubridException * */ @@ -855,15 +463,8 @@ function cubrid_lob2_close($lob_identifier): void /** - * The cubrid_lob2_export function is used to save the - * contents of BLOB/CLOB data to a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID - * database first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to store BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -878,15 +479,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void /** - * The cubrid_lob2_import function is used to save the - * contents of BLOB/CLOB data from a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID database - * first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to import BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -901,14 +495,9 @@ function cubrid_lob2_import($lob_identifier, string $file_name): void /** - * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). - * This function should be used before you bind a lob object. - * - * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, - * the last connection opened by cubrid_connect or - * cubrid_connect_with_url is assumed. - * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". - * @return resource Lob identifier when it is successful. + * @param resource $conn_identifier + * @param string $type + * @return resource * @throws CubridException * */ @@ -930,12 +519,9 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") /** - * The cubrid_lob2_read function reads len bytes from the - * LOB data and returns the bytes read. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $len Length from buffer you want to read from the lob data. - * @return string Returns the contents as a string, FALSE when there is no more data. + * @param resource $lob_identifier + * @param int $len + * @return string * @throws CubridException * */ @@ -951,30 +537,9 @@ function cubrid_lob2_read($lob_identifier, int $len): string /** - * The cubrid_lob2_seek function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move - * backward offset units from the end of LOB object and - * offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param int $offset + * @param int $origin * @throws CubridException * */ @@ -989,31 +554,9 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR /** - * The cubrid_lob2_seek64 function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * If the offset you want to move is larger than an integer - * data can be stored, you can use this function. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move backward - * offset units from the end of LOB object and offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param string $offset + * @param int $origin * @throws CubridException * */ @@ -1028,10 +571,8 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI /** - * The cubrid_lob2_size function is used to get the size of a lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the size of the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1047,13 +588,8 @@ function cubrid_lob2_size($lob_identifier): int /** - * The cubrid_lob2_size64 function is used to get the - * size of a lob object. If the size of a lob object is larger than an - * integer data can be stored, you can use this function and it will return - * the size as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the size of the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1069,10 +605,8 @@ function cubrid_lob2_size64($lob_identifier): string /** - * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the cursor position on the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1088,13 +622,8 @@ function cubrid_lob2_tell($lob_identifier): int /** - * The cubrid_lob2_tell64 function is used to tell the - * cursor position of the LOB object. If the size of a lob object is larger - * than an integer data can be stored, you can use this function and it will - * return the position information as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1110,12 +639,8 @@ function cubrid_lob2_tell64($lob_identifier): string /** - * The cubrid_lob2_write function reads as much as data - * from buf and stores it to the LOB object. Note that - * this function can only append characters now. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $buf Data that need to be written to the lob object. + * @param resource $lob_identifier + * @param string $buf * @throws CubridException * */ @@ -1130,11 +655,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void /** - * The cubrid_lock_read function is used to put read - * lock on the instance pointed by given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put read lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1149,11 +671,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void /** - * The cubrid_lock_write function is used to put write - * lock on the instance pointed by the given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put write lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1168,26 +687,10 @@ function cubrid_lock_write($conn_identifier, string $oid): void /** - * The cubrid_move_cursor function is used to move the - * current cursor location of req_identifier by the - * value set in the offset argument, to the direction - * set in the origin argument. To set the - * origin argument, you can use CUBRID_CURSOR_FIRST - * for the first part of the result, CUBRID_CURSOR_CURRENT for the current - * location of the result, or CUBRID_CURSOR_LAST for the last part of the - * result. If origin argument is not explicitly - * designated, then the function uses CUBRID_CURSOR_CURRENT as its default - * value. - * - * If the value of cursor movement range goes over the valid limit, then the - * cursor moves to the next location after the valid range for the cursor. - * For example, if you move 20 units in the result with the size of 10, then - * the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. - * - * @param resource $req_identifier Request identifier. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. - * @return int Returns TRUE on success. + * @param resource $req_identifier + * @param int $offset + * @param int $origin + * @return int * @throws CubridException * */ @@ -1203,12 +706,7 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C /** - * The cubrid_next_result function is used to get - * results of next query if multiple SQL statements are executed and - * CUBRID_EXEC_QUERY_ALL flag is set upon - * cubrid_execute. - * - * @param resource $result result comes from a call to cubrid_execute + * @param resource $result * @throws CubridException * */ @@ -1223,80 +721,10 @@ function cubrid_next_result($result): void /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect_with_url acts very much like - * cubrid_connect_with_url with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect_with_url). - * - * This type of link is therefore called 'persistent'. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1318,30 +746,12 @@ function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?str /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect acts very much like - * cubrid_connect with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect). - * - * This type of link is therefore called 'persistent'. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1363,20 +773,10 @@ function cubrid_pconnect(string $host, int $port, string $dbname, ?string $useri /** - * The cubrid_prepare function is a sort of API which represents SQL statements - * compiled previously to a given connection handle. This pre-compiled SQL statement will be included - * in the cubrid_prepare. - * - * Accordingly, you can use this statement effectively to execute several times repeatedly or to - * process long data. Only a single statement can be used and a parameter may put a question mark (?) - * to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES - * clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a - * MARK(?) by using the cubrid_bind function only. - * - * @param resource $conn_identifier Connection identifier. - * @param string $prepare_stmt Prepare query. - * @param int $option OID return option CUBRID_INCLUDE_OID. - * @return resource Request identifier, if process is successful. + * @param resource $conn_identifier + * @param string $prepare_stmt + * @param int $option + * @return resource * @throws CubridException * */ @@ -1392,20 +792,10 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) /** - * The cubrid_put function is used to update an - * attribute of the instance of the given oid. - * - * You can update single attribute by using string data type to set - * attr. In such case, you can use integer, - * floating point or string type data for the value - * argument. To update multiple number of attributes, you can disregard the - * attr argument, and set - * value argument with associative array data type. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to update. - * @param string $attr Name of the attribute that you want to update. - * @param mixed $value New value that you want to assign to the attribute. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr + * @param mixed $value * @throws CubridException * */ @@ -1426,15 +816,7 @@ function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value /** - * The cubrid_rollback function executes rollback on the - * transaction pointed by conn_identifier, currently in - * progress. - * - * Connection to server is closed after calling - * cubrid_rollback. Connection handle, however, is - * still valid. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -1449,391 +831,11 @@ function cubrid_rollback($conn_identifier): void /** - * The cubrid_schema function is used to get the - * requested schema information from database. To get information about specific class, - * set the class_name, to get information about specific attribute - * (can be used only with CUBRID_SCH_ATTR_PRIVILEGE), - * set the attr_name. - * - * The result of the cubrid_schema function is returned as a two-dimensional - * array (column (associative array) * row (numeric array)). The following - * tables shows types of schema and the column structure of the result array to - * be returned based on the schema type. - * - * - * Result Composition of Each Type - * - * - * - * Schema - * Column Number - * Column Name - * Value - * - * - * - * - * CUBRID_SCH_CLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_VCLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 1:vclass - * - * - * - * CUBRID_SCH_QUERY_SPEC - * 1 - * QUERY_SPEC - * - * - * - * - * CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE - * 1 - * ATTR_NAME - * - * - * - * - * 2 - * DOMAIN - * - * - * - * - * 3 - * SCALE - * - * - * - * - * 4 - * PRECISION - * - * - * - * - * 5 - * INDEXED - * 1:indexed - * - * - * - * 6 - * NOT NULL - * 1:not null - * - * - * - * 7 - * SHARED - * 1:shared - * - * - * - * 8 - * UNIQUE - * 1:unique - * - * - * - * 9 - * DEFAULT - * - * - * - * - * 10 - * ATTR_ORDER - * base:1 - * - * - * - * 11 - * CLASS_NAME - * - * - * - * - * 12 - * SOURCE_CLASS - * - * - * - * - * 13 - * IS_KEY - * 1:key - * - * - * - * CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD - * 1 - * NAME - * - * - * - * - * 2 - * RET_DOMAIN - * - * - * - * - * 3 - * ARG_DOMAIN - * - * - * - * - * CUBRID_SCH_METHOD_FILE - * 1 - * METHOD_FILE - * - * - * - * - * CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_CONSTRAINT - * 1 - * TYPE - * 0:unique 1:index 2:reverse unique 3:reverse index - * - * - * - * 2 - * NAME - * - * - * - * - * 3 - * ATTR_NAME - * - * - * - * - * 4 - * NUM_PAGES - * - * - * - * - * 5 - * NUM_KEYS - * - * - * - * - * 6 - * PRIMARY_KEY - * 1:primary key - * - * - * - * 7 - * KEY_ORDER - * base:1 - * - * - * - * CUBRID_SCH_TRIGGER - * 1 - * NAME - * - * - * - * - * 2 - * STATUS - * - * - * - * - * 3 - * EVENT - * - * - * - * - * 4 - * TARGET_CLASS - * - * - * - * - * 5 - * TARGET_ATTR - * - * - * - * - * 6 - * ACTION_TIME - * - * - * - * - * 7 - * ACTION - * - * - * - * - * 8 - * PRIORITY - * - * - * - * - * 9 - * CONDITION_TIME - * - * - * - * - * 10 - * CONDITION - * - * - * - * - * CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE - * 1 - * CLASS_NAME / ATTR_NAME - * - * - * - * - * 2 - * PRIVILEGE - * - * - * - * - * 3 - * GRANTABLE - * - * - * - * - * CUBRID_SCH_PRIMARY_KEY - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * ATTR_NAME - * - * - * - * - * 3 - * KEY_SEQ - * base:1 - * - * - * - * 4 - * KEY_NAME - * - * - * - * - * CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE - * 1 - * PKTABLE_NAME - * - * - * - * - * 2 - * PKCOLUMN_NAME - * - * - * - * - * 3 - * FKTABLE_NAME - * base:1 - * - * - * - * 4 - * FKCOLUMN_NAME - * - * - * - * - * 5 - * KEY_SEQ - * base:1 - * - * - * - * 6 - * UPDATE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 7 - * DELETE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 8 - * FK_NAME - * - * - * - * - * 9 - * PK_NAME - * - * - * - * - * - * - * @param resource $conn_identifier Connection identifier. - * @param int $schema_type Schema data that you want to know. - * @param string $class_name Class you want to know the schema of. - * @param string $attr_name Attribute you want to know the schema of. - * @return array Array containing the schema information, when process is successful. + * @param resource $conn_identifier + * @param int $schema_type + * @param string $class_name + * @param string $attr_name + * @return array * @throws CubridException * */ @@ -1855,14 +857,10 @@ function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = /** - * The cubrid_seq_drop function is used to delete an - * element you request from the given sequence type attribute in the - * database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to delete an element from. - * @param int $index Index of the element that you want to delete (1-based). + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index * @throws CubridException * */ @@ -1877,14 +875,11 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ /** - * The cubrid_col_insert function is used to insert an - * element to a sequence type attribute in a requested location. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an instance to. - * @param int $index Location of the element, you want to insert the element to (1-based). - * @param string $seq_element Content of the element that you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1899,14 +894,11 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int /** - * The cubrid_seq_put function is used to update the - * content of the requested element in a sequent type attribute using OID. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to update an element. - * @param int $index Index (1-based) of the element that you want to update. - * @param string $seq_element New content that you want to use for the update. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1921,14 +913,10 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i /** - * The cubrid_set_add function is used to insert a - * single element to a set type attribute (set, multiset, sequence) you - * requested. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an element. - * @param string $set_element Content of the element you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -1943,20 +931,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string /** - * The cubrid_set_autocommit function is used to set the - * CUBRID database auto-commit mode of the current database connection. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction - * management. When auto-commit mode is truned from off to on, any pending work is - * automatically committed. - * - * @param resource $conn_identifier Connection identifier. - * @param bool $mode Auto-commit mode. The following constants can be used: - * - * - * CUBRID_AUTOCOMMIT_FALSE - * CUBRID_AUTOCOMMIT_TRUE - * + * @param resource $conn_identifier + * @param bool $mode * @throws CubridException * */ @@ -1971,19 +947,9 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void /** - * The cubrid_set_db_parameter function is used to set - * the CUBRID database parameters. It can set the following CUBRID database - * parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @param int $param_type Database parameter type. - * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @param resource $conn_identifier + * @param int $param_type + * @param int $param_value * @throws CubridException * */ @@ -1998,14 +964,10 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v /** - * The cubrid_set_drop function is used to delete an - * element that you request from the given set type (set, multiset) attribute - * of the database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to delete an element from. - * @param string $set_element Content of the element you want to delete. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -2020,11 +982,8 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin /** - * The cubrid_set_query_timeout function is used to set - * the timeout time of query execution. - * - * @param resource $req_identifier Request identifier. - * @param int $timeout Timeout time in milliseconds. + * @param resource $req_identifier + * @param int $timeout * @throws CubridException * */ diff --git a/generated/8.4/curl.php b/generated/8.4/curl.php index 6b47f241..96d5ba05 100644 --- a/generated/8.4/curl.php +++ b/generated/8.4/curl.php @@ -5,11 +5,8 @@ use Safe\Exceptions\CurlException; /** - * Copies a cURL handle keeping the same preferences. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return \CurlHandle Returns a new cURL handle. + * @param \CurlHandle $handle + * @return \CurlHandle * @throws CurlException * */ @@ -25,12 +22,9 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle /** - * This function URL encodes the given string according to RFC 3986. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The string to be encoded. - * @return string Returns escaped string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -46,18 +40,8 @@ function curl_escape(\CurlHandle $handle, string $string): string /** - * Execute the given cURL session. - * - * This function should be called after initializing a cURL session and all - * the options for the session are set. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return bool|string On success, this function flushes the result directly to the - * stdout and returns TRUE. - * However, if the CURLOPT_RETURNTRANSFER - * option is set, it will return - * the result on success. + * @param \CurlHandle $handle + * @return bool|string * @throws CurlException * */ @@ -73,158 +57,9 @@ function curl_exec(\CurlHandle $handle) /** - * Gets information about the last transfer. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int|null $option One of the CURLINFO_* constants. - * @return mixed If option is given, returns its value. - * Otherwise, returns an associative array with the following elements - * (which correspond to option): - * - * - * - * "url" - * - * - * - * - * "content_type" - * - * - * - * - * "http_code" - * - * - * - * - * "header_size" - * - * - * - * - * "request_size" - * - * - * - * - * "filetime" - * - * - * - * - * "ssl_verify_result" - * - * - * - * - * "redirect_count" - * - * - * - * - * "total_time" - * - * - * - * - * "namelookup_time" - * - * - * - * - * "connect_time" - * - * - * - * - * "pretransfer_time" - * - * - * - * - * "size_upload" - * - * - * - * - * "size_download" - * - * - * - * - * "speed_download" - * - * - * - * - * "speed_upload" - * - * - * - * - * "download_content_length" - * - * - * - * - * "upload_content_length" - * - * - * - * - * "starttransfer_time" - * - * - * - * - * "redirect_time" - * - * - * - * - * "certinfo" - * - * - * - * - * "primary_ip" - * - * - * - * - * "primary_port" - * - * - * - * - * "local_ip" - * - * - * - * - * "local_port" - * - * - * - * - * "redirect_url" - * - * - * - * - * "request_header" (This is only set if the CURLINFO_HEADER_OUT - * is set by a previous call to curl_setopt) - * - * - * - * - * "posttransfer_time_us" (Available as of PHP 8.4.0 and cURL 8.10.0) - * - * - * - * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. + * @param \CurlHandle $handle + * @param int|null $option + * @return mixed * @throws CurlException * */ @@ -244,15 +79,8 @@ function curl_getinfo(\CurlHandle $handle, ?int $option = null) /** - * Initializes a new session and returns a cURL handle. - * - * @param null|string $url If provided, the CURLOPT_URL option will be set - * to its value. This can be set manually using the - * curl_setopt function. - * - * The file protocol is disabled by cURL if - * open_basedir is set. - * @return \CurlHandle Returns a cURL handle on success. + * @param null|string $url + * @return \CurlHandle * @throws CurlException * */ @@ -272,47 +100,9 @@ function curl_init(?string $url = null): \CurlHandle /** - * Ask the multi handle if there are any messages or information from the individual transfers. - * Messages may include information such as an error code from the transfer or just the fact - * that a transfer is completed. - * - * Repeated calls to this function will return a new result each time, until a FALSE is returned - * as a signal that there is no more to get at this point. The integer pointed to with - * queued_messages will contain the number of remaining messages after this - * function was called. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int|null $queued_messages Number of messages that are still in the queue - * @return array On success, returns an associative array for the message. - * - * - * Contents of the returned array - * - * - * - * Key: - * Value: - * - * - * - * - * msg - * The CURLMSG_DONE constant. Other return values - * are currently not available. - * - * - * result - * One of the CURLE_* constants. If everything is - * OK, the CURLE_OK will be the result. - * - * - * handle - * Resource of type curl indicates the handle which it concerns. - * - * - * - * + * @param \CurlMultiHandle $multi_handle + * @param int|null $queued_messages + * @return array * @throws CurlException * */ @@ -328,9 +118,7 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess /** - * Allows the processing of multiple cURL handles asynchronously. - * - * @return \CurlMultiHandle Returns a cURL multi handle. + * @return \CurlMultiHandle * */ function curl_multi_init(): \CurlMultiHandle @@ -342,15 +130,9 @@ function curl_multi_init(): \CurlMultiHandle /** - * Sets an option on the given cURL multi handle. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int $option One of the CURLMOPT_* constants. - * @param mixed $value The value to be set on option. - * See the description of the - * CURLMOPT_* constants - * for details on the type of values each constant expects. + * @param \CurlMultiHandle $multi_handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -365,15 +147,9 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): /** - * Sets an option on the given cURL session handle. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int $option The CURLOPT_* option to set. - * @param mixed $value The value to be set on option. - * See the description of the - * CURLOPT_* constants - * for details on the type of values each constant expects. + * @param \CurlHandle $handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -388,11 +164,8 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void /** - * Return an integer containing the last share curl error number. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @return int Returns an integer containing the last share curl error number. + * @param \CurlShareHandle $share_handle + * @return int * */ function curl_share_errno(\CurlShareHandle $share_handle): int @@ -404,12 +177,9 @@ function curl_share_errno(\CurlShareHandle $share_handle): int /** - * Sets an option on the given cURL share handle. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @param int $option One of the CURLSHOPT_* constants. - * @param mixed $value One of the CURL_LOCK_DATA_* constants. + * @param \CurlShareHandle $share_handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -424,12 +194,9 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): /** - * This function decodes the given URL encoded string. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The URL encoded string to be decoded. - * @return string Returns decoded string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -445,18 +212,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string /** - * Available if built against libcurl >= 7.62.0. - * - * Some protocols have "connection upkeep" mechanisms. - * These mechanisms usually send some traffic on existing connections in order to keep them alive; - * this can prevent connections from being closed due to overzealous firewalls, for example. - * - * Connection upkeep is currently available only for HTTP/2 connections. - * A small amount of traffic is usually sent to keep a connection alive. - * HTTP/2 maintains its connection by sending a HTTP/2 PING frame. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. + * @param \CurlHandle $handle * @throws CurlException * */ diff --git a/generated/8.4/datetime.php b/generated/8.4/datetime.php index 9a3e6f8d..25eb3372 100644 --- a/generated/8.4/datetime.php +++ b/generated/8.4/datetime.php @@ -5,16 +5,9 @@ use Safe\Exceptions\DatetimeException; /** - * This is the procedural version of - * DateTimeImmutable::__construct. - * - * Unlike the DateTimeImmutable constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTimeImmutable Returns a new DateTimeImmutable instance + * @return \DateTimeImmutable * @throws DatetimeException * */ @@ -34,16 +27,9 @@ function date_create_immutable(string $datetime = "now", ?\DateTimeZone $timezon /** - * This is the procedural version of - * DateTime::__construct. - * - * Unlike the DateTime constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param null|string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTime Returns a new DateTime instance + * @return \DateTime * @throws DatetimeException * */ @@ -63,44 +49,9 @@ function date_create(?string $datetime = "now", ?\DateTimeZone $timezone = null) /** - * Returns associative array with detailed info about given date/time. - * - * @param string $format Documentation on how the format is used, please - * refer to the documentation of - * DateTimeImmutable::createFromFormat. The same - * rules apply. - * @param string $datetime String representing the date/time. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. An example - * below shows such a warning. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. An example - * below shows such an error. + * @param string $format + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -116,62 +67,8 @@ function date_parse_from_format(string $format, string $datetime): ?array /** - * date_parse parses the given - * datetime string according to the same rules as - * strtotime and - * DateTimeImmutable::__construct. Instead of returning a - * Unix timestamp (with strtotime) or a - * DateTimeImmutable object (with - * DateTimeImmutable::__construct), it returns an - * associative array with the information that it could detect in the given - * datetime string. - * - * If no information about a certain group of elements can be found, these - * array elements will be set to FALSE or are missing. If needed for - * constructing a timestamp or DateTimeImmutable object from - * the same datetime string, more fields can be set to - * a non-FALSE value. See the examples for cases where that happens. - * - * @param string $datetime Date/time in format accepted by - * DateTimeImmutable::__construct. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * If relative time elements are present in the - * datetime string such as +3 days, - * the then returned array includes a nested array with the key - * relative. This array then contains the keys - * year, month, day, - * hour, minute, - * second, and if necessary weekday, and - * weekdays, depending on the string that was passed in. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * */ function date_parse(string $datetime): ?array @@ -183,98 +80,10 @@ function date_parse(string $datetime): ?array /** - * - * - * @param int $timestamp Unix timestamp. - * @param float $latitude Latitude in degrees. - * @param float $longitude Longitude in degrees. - * @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 an array whose structure 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. - * - * - * - * - * - * The values of the array elements are either UNIX timestamps, 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. + * @param int $timestamp + * @param float $latitude + * @param float $longitude + * @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 * */ function date_sun_info(int $timestamp, float $latitude, float $longitude) @@ -286,84 +95,13 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude) /** - * date_sunrise returns the sunrise time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunrise - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunrise_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunrise: the point where the sun becomes visible. - * - * - * 96° - * Civil twilight: conventionally used to signify the start of dawn. - * - * - * 102° - * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunrise time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not rise at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -389,84 +127,13 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ? /** - * date_sunset returns the sunset time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunset - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunset_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunset: the point where the sun becomes invisible. - * - * - * 96° - * Civil twilight: conventionally used to signify the end of dusk. - * - * - * 102° - * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunset time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not set at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -492,17 +159,9 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f /** - * Returns a string formatted according to the given format string using the - * given integer timestamp (Unix timestamp) or the current time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * @param string $format Format accepted by DateTimeInterface::format. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns a formatted date string. + * @param string $format + * @param int|null $timestamp + * @return string * */ function date(string $format, ?int $timestamp = null): string @@ -518,35 +177,13 @@ function date(string $format, ?int $timestamp = null): string /** - * Identical to mktime except the passed parameters represents a - * GMT date. gmmktime internally uses mktime - * so only times valid in derived local time can be used. - * - * Like mktime, optional arguments may be left out in - * order from right to left, with any omitted arguments being set to the - * current corresponding GMT value. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year The year - * @return int Returns a int Unix timestamp on success, or FALSE if the - * timestamp doesn't fit in a PHP integer. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -574,23 +211,9 @@ function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $mon /** - * Behaves the same as strftime except that the - * time returned is Greenwich Mean Time (GMT). For example, when run - * in Eastern Standard Time (GMT -0500), the first line below prints - * "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 - * 01:00:00". - * - * @param string $format See description in strftime. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * On failure, FALSE is returned. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -610,118 +233,9 @@ function gmstrftime(string $format, ?int $timestamp = null): string /** - * Returns a number formatted according to the given format string using the - * given integer timestamp or the current local time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * Unlike the function date, idate - * accepts just one char in the format parameter. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format character - * Description - * - * - * - * - * B - * Swatch Beat/Internet Time - * - * - * d - * Day of the month - * - * - * h - * Hour (12 hour format) - * - * - * H - * Hour (24 hour format) - * - * - * i - * Minutes - * - * - * I (uppercase i) - * returns 1 if DST is activated, - * 0 otherwise - * - * - * L (uppercase l) - * returns 1 for leap year, - * 0 otherwise - * - * - * m - * Month number - * - * - * N - * ISO-8601 day of the week (1 for Monday - * through 7 for Sunday) - * - * - * o - * ISO-8601 year (4 digits) - * - * - * s - * Seconds - * - * - * t - * Days in current month - * - * - * U - * Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - - * this is the same as time - * - * - * w - * Day of the week (0 on Sunday) - * - * - * W - * ISO-8601 week number of year, weeks starting on - * Monday - * - * - * y - * Year (1 or 2 digits - check note below) - * - * - * Y - * Year (4 digits) - * - * - * z - * Day of the year - * - * - * Z - * Timezone offset in seconds - * - * - * - * - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return int Returns an int on success. - * - * As idate always returns an int and - * as they can't start with a "0", idate may return - * fewer digits than you would expect. See the example below. + * @param int|null $timestamp + * @return int * @throws DatetimeException * */ @@ -741,40 +255,13 @@ function idate(string $format, ?int $timestamp = null): int /** - * Returns the Unix timestamp corresponding to the arguments - * given. This timestamp is a long integer containing the number of - * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time - * specified. - * - * Any optional - * arguments omitted or NULL will be set to the current value according - * to the local date and time. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year 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 - * is somewhere between 1901 and 2038. - * @return int mktime returns the Unix timestamp of the arguments - * given, or FALSE if the timestamp doesn't fit in a PHP integer. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -802,305 +289,9 @@ function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month /** - * Format the time and/or date according to locale settings. Month and weekday - * names and other language-dependent strings respect the current locale set - * with setlocale. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format - * Description - * Example returned values - * - * - * - * - * Day - * --- - * --- - * - * - * %a - * An abbreviated textual representation of the day - * Sun through Sat - * - * - * %A - * A full textual representation of the day - * Sunday through Saturday - * - * - * %d - * Two-digit day of the month (with leading zeros) - * 01 to 31 - * - * - * %e - * - * Day of the month, with a space preceding single digits. Not - * implemented as described on Windows. See below for more information. - * - * 1 to 31 - * - * - * %j - * Day of the year, 3 digits with leading zeros - * 001 to 366 - * - * - * %u - * ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * - * %w - * Numeric representation of the day of the week - * 0 (for Sunday) through 6 (for Saturday) - * - * - * Week - * --- - * --- - * - * - * %U - * Week number of the given year, starting with the first - * Sunday as the first week - * 13 (for the 13th full week of the year) - * - * - * %V - * ISO-8601:1988 week number of the given year, starting with - * the first week of the year with at least 4 weekdays, with Monday - * being the start of the week - * 01 through 53 (where 53 - * accounts for an overlapping week) - * - * - * %W - * A numeric representation of the week of the year, starting - * with the first Monday as the first week - * 46 (for the 46th week of the year beginning - * with a Monday) - * - * - * Month - * --- - * --- - * - * - * %b - * Abbreviated month name, based on the locale - * Jan through Dec - * - * - * %B - * Full month name, based on the locale - * January through December - * - * - * %h - * Abbreviated month name, based on the locale (an alias of %b) - * Jan through Dec - * - * - * %m - * Two digit representation of the month - * 01 (for January) through 12 (for December) - * - * - * Year - * --- - * --- - * - * - * %C - * Two digit representation of the century (year divided by 100, truncated to an integer) - * 19 for the 20th Century - * - * - * %g - * Two digit representation of the year going by ISO-8601:1988 standards (see %V) - * Example: 09 for the week of January 6, 2009 - * - * - * %G - * The full four-digit version of %g - * Example: 2008 for the week of January 3, 2009 - * - * - * %y - * Two digit representation of the year - * Example: 09 for 2009, 79 for 1979 - * - * - * %Y - * Four digit representation for the year - * Example: 2038 - * - * - * Time - * --- - * --- - * - * - * %H - * Two digit representation of the hour in 24-hour format - * 00 through 23 - * - * - * %k - * Hour in 24-hour format, with a space preceding single digits - * 0 through 23 - * - * - * %I - * Two digit representation of the hour in 12-hour format - * 01 through 12 - * - * - * %l (lower-case 'L') - * Hour in 12-hour format, with a space preceding single digits - * 1 through 12 - * - * - * %M - * Two digit representation of the minute - * 00 through 59 - * - * - * %p - * UPPER-CASE 'AM' or 'PM' based on the given time - * Example: AM for 00:31, - * PM for 22:23. The exact result depends on the - * Operating System, and they can also return lower-case variants, or - * variants with dots (such as a.m.). - * - * - * %P - * lower-case 'am' or 'pm' based on the given time - * Example: am for 00:31, - * pm for 22:23. Not supported by all Operating - * Systems. - * - * - * %r - * Same as "%I:%M:%S %p" - * Example: 09:34:17 PM for 21:34:17 - * - * - * %R - * Same as "%H:%M" - * Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM - * - * - * %S - * Two digit representation of the second - * 00 through 59 - * - * - * %T - * Same as "%H:%M:%S" - * Example: 21:34:17 for 09:34:17 PM - * - * - * %X - * Preferred time representation based on locale, without the date - * Example: 03:59:16 or 15:59:16 - * - * - * %z - * The time zone offset. Not implemented as described on - * Windows. See below for more information. - * Example: -0500 for US Eastern Time - * - * - * %Z - * The time zone abbreviation. Not implemented as described on - * Windows. See below for more information. - * Example: EST for Eastern Time - * - * - * Time and Date Stamps - * --- - * --- - * - * - * %c - * Preferred date and time stamp based on locale - * Example: Tue Feb 5 00:45:10 2009 for - * February 5, 2009 at 12:45:10 AM - * - * - * %D - * Same as "%m/%d/%y" - * Example: 02/05/09 for February 5, 2009 - * - * - * %F - * Same as "%Y-%m-%d" (commonly used in database datestamps) - * Example: 2009-02-05 for February 5, 2009 - * - * - * %s - * Unix Epoch Time timestamp (same as the time - * function) - * Example: 305815200 for September 10, 1979 08:40:00 AM - * - * - * %x - * Preferred date representation based on locale, without the time - * Example: 02/05/09 for February 5, 2009 - * - * - * Miscellaneous - * --- - * --- - * - * - * %n - * A newline character ("\n") - * --- - * - * - * %t - * A Tab character ("\t") - * --- - * - * - * %% - * A literal percentage character ("%") - * --- - * - * - * - * - * - * Windows only: - * - * The %e modifier is not supported in the Windows - * implementation of this function. To achieve this value, the - * %#d modifier can be used instead. The example below - * illustrates how to write a cross platform compatible function. - * - * The %z and %Z modifiers both - * return the time zone name instead of the offset or abbreviation. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * The function returns FALSE if format is empty, contains unsupported - * conversion specifiers, or if the length of the returned string would be greater than - * 4095. + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -1120,74 +311,9 @@ function strftime(string $format, ?int $timestamp = null): string /** - * strptime returns an array with the - * timestamp parsed. - * - * Month and weekday names and other language dependent strings respect the - * current locale set with setlocale (LC_TIME). - * - * @param string $timestamp The string to parse (e.g. returned from strftime). - * @param string $format The format used in timestamp (e.g. the same as - * used in strftime). Note that some of the format - * options available to strftime may not have any - * effect within strptime; the exact subset that are - * supported will vary based on the operating system and C library in - * use. - * - * For more information about the format options, read the - * strftime page. - * @return array Returns an array. - * - * - * The following parameters are returned in the array - * - * - * - * parameters - * Description - * - * - * - * - * "tm_sec" - * Seconds after the minute (0-61) - * - * - * "tm_min" - * Minutes after the hour (0-59) - * - * - * "tm_hour" - * Hour since midnight (0-23) - * - * - * "tm_mday" - * Day of the month (1-31) - * - * - * "tm_mon" - * Months since January (0-11) - * - * - * "tm_year" - * Years since 1900 - * - * - * "tm_wday" - * Days since Sunday (0-6) - * - * - * "tm_yday" - * Days since January 1 (0-365) - * - * - * "unparsed" - * the timestamp part which was not - * recognized using the specified format - * - * - * - * + * @param string $timestamp + * @param string $format + * @return array * @throws DatetimeException * */ @@ -1203,16 +329,9 @@ function strptime(string $timestamp, string $format): array /** - * Each parameter of this function uses the default time zone unless a - * time zone is specified in that parameter. Be careful not to use - * different time zones in each parameter unless that is intended. - * See date_default_timezone_get on the various - * ways to define the default time zone. - * - * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. - * @param int|null $baseTimestamp The timestamp which is used as a base for the calculation of relative - * dates. - * @return int Returns a timestamp on success. + * @param string $datetime + * @param int|null $baseTimestamp + * @return int * @throws DatetimeException * */ @@ -1232,23 +351,10 @@ function strtotime(string $datetime, ?int $baseTimestamp = null): int /** - * - * - * @param string $abbr Time zone abbreviation. - * @param int $utcOffset 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 Daylight saving time indicator. Defaults to -1, which means that - * whether the time zone has daylight saving or not is not taken into - * consideration when searching. If this is set to 1, then the - * utcOffset is assumed to be an offset with - * daylight saving in effect; if 0, then utcOffset - * is assumed to be an offset without daylight saving in effect. If - * abbr doesn't exist then the time zone is - * searched solely by the utcOffset and - * isDST. - * @return string Returns time zone name on success. + * @param string $abbr + * @param int $utcOffset + * @param int $isDST + * @return string * @throws DatetimeException * */ diff --git a/generated/8.4/dir.php b/generated/8.4/dir.php index 03a68274..a9c1288a 100644 --- a/generated/8.4/dir.php +++ b/generated/8.4/dir.php @@ -5,10 +5,7 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to - * directory. - * - * @param string $directory The new current directory + * @param string $directory * @throws DirException * */ @@ -23,18 +20,7 @@ function chdir(string $directory): void /** - * Changes the root directory of the current process to - * directory, and changes the current - * working directory to "/". - * - * This function is only available to GNU and BSD systems, and - * only when using the CLI, CGI or Embed SAPI. Also, this function - * requires root privileges. - * - * Calling this function does not change the values of the __DIR__ - * and __FILE__ magic constants. - * - * @param string $directory The path to change the root directory to. + * @param string $directory * @throws DirException * */ @@ -49,13 +35,9 @@ function chroot(string $directory): void /** - * A pseudo-object-oriented mechanism for reading a directory. The - * given directory is opened. - * - * @param string $directory Directory to open - * @param null|resource $context A context stream - * resource. - * @return \Directory Returns an instance of Directory, or FALSE in case of error. + * @param string $directory + * @param null|resource $context + * @return \Directory * @throws DirException * */ @@ -75,15 +57,7 @@ function dir(string $directory, $context = null): \Directory /** - * Gets the current working directory. - * - * @return non-empty-string Returns the current working directory on success. - * - * On some Unix variants, getcwd will return - * FALSE if any one of the parent directories does not have the - * readable or search mode set, even if the current directory - * does. See chmod for more information on - * modes and permissions. + * @return non-empty-string * @throws DirException * */ @@ -99,15 +73,9 @@ function getcwd(): string /** - * Opens up a directory handle to be used in subsequent - * closedir, readdir, and - * rewinddir calls. - * - * @param string $directory The directory path that is to be opened - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return resource Returns a directory handle resource on success + * @param string $directory + * @param null|resource $context + * @return resource * @throws DirException * */ @@ -127,21 +95,10 @@ function opendir(string $directory, $context = null) /** - * Returns an array of files and directories from the - * directory. - * - * @param string $directory The directory that will be scanned. - * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order By default, the sorted order is alphabetical in ascending order. If - * the optional sorting_order is set to - * SCANDIR_SORT_DESCENDING, then the sort order is - * alphabetical in descending order. If it is set to - * SCANDIR_SORT_NONE then the result is unsorted. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return list Returns an array of filenames on success. If directory is not a directory, then - * boolean FALSE is returned, and an error of level - * E_WARNING is generated. + * @param string $directory + * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order + * @param null|resource $context + * @return list * @throws DirException * */ diff --git a/generated/8.4/eio.php b/generated/8.4/eio.php index f5673390..4fd10a55 100644 --- a/generated/8.4/eio.php +++ b/generated/8.4/eio.php @@ -5,17 +5,11 @@ use Safe\Exceptions\EioException; /** - * eio_busy artificially increases load taking - * delay seconds to execute. May be used for debugging, - * or benchmarking. - * - * @param int $delay Delay in seconds - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. - * @param callable|null $callback This callback is called when all the group requests are done. - * @param mixed $data Arbitrary variable passed to callback. - * @return resource eio_busy returns request resource on success. + * @param int $delay + * @param int $pri + * @param callable|null $callback + * @param mixed $data + * @return resource * @throws EioException * */ @@ -31,43 +25,12 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = /** - * eio_chmod changes file, or directory permissions. The - * new permissions are specified by mode. - * - * @param string $path Path to the target file or directory - * Avoid relative - * paths - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -83,43 +46,13 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * Changes file, or directory permissions. - * - * @param string $path Path to file or directory. - * Avoid relative - * paths - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chown returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -135,40 +68,11 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** - * eio_close closes file specified by - * fd. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_close returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -184,50 +88,11 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_custom executes custom function specified by - * execute processing it just like any other eio_* call. - * - * @param callable $execute Specifies the request function that should match the following prototype: - * - * - * callback is event completion callback that should match the following - * prototype: - * - * - * data is the data passed to - * execute via data argument - * without modifications - * result value returned by execute - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param callable $execute + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_custom returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -243,40 +108,12 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul /** - * eio_dup2 duplicates file descriptor. - * - * @param mixed $fd Source stream, Socket resource, or numeric file descriptor - * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param mixed $fd2 + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_dup2 returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -292,8 +129,6 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = n /** - * eio_event_loop polls libeio until all requests proceeded. - * * @throws EioException * */ @@ -308,47 +143,14 @@ function eio_event_loop(): void /** - * eio_fallocate allows the caller to directly manipulate the allocated disk space for the - * file specified by fd file descriptor for the byte - * range starting at offset and continuing for - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode Currently only one flag is supported for mode: - * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant - * FALLOC_FL_KEEP_SIZE). - * @param int $offset Specifies start of the byte range. - * @param int $length Specifies length the byte range. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fallocate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -364,41 +166,12 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** - * eio_fchmod changes permissions for the file specified - * by fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fchmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -414,42 +187,13 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callb /** - * eio_fchown changes ownership of the file specified by - * fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -465,39 +209,11 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?c /** - * eio_fdatasync synchronizes a file's in-core state with storage device. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fdatasync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -513,40 +229,11 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = nu /** - * eio_fstat returns file status information in - * result argument of callback - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -566,40 +253,11 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** - * eio_fstatvfs returns file system statistics in - * result of callback. - * - * @param mixed $fd A file descriptor of a file within the mounted file system. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fstatvfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -619,39 +277,11 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** - * Synchronize a file's in-core state with storage device - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fsync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -667,42 +297,12 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_ftruncate causes a regular file referenced by - * fd file descriptor to be truncated to precisely - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $offset Offset from beginning of the file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_ftruncate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -718,42 +318,13 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callab /** - * eio_futime changes file last access and modification - * times. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_futime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -769,35 +340,9 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** - * eio_grp creates a request group. - * * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_grp returns request group resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -813,40 +358,11 @@ function eio_grp(callable $callback, ?string $data = null) /** - * eio_lstat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_lstat returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -862,41 +378,12 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) /** - * eio_mkdir creates directory with specified access - * mode. - * - * @param string $path Path for the new directory. - * @param int $mode Access mode, e.g. 0755 - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mkdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -912,57 +399,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * eio_mknod creates ordinary or special(often) file. - * - * @param string $path Path for the new node(file). - * @param int $mode Specifies both the permissions to use and the type of node to be - * created. It should be a combination (using bitwise OR) of one of the - * file types listed below and the permissions for the new node(e.g. 0640). - * - * Possible file types are: EIO_S_IFREG(regular file), - * EIO_S_IFCHR(character file), - * EIO_S_IFBLK(block special file), - * EIO_S_IFIFO(FIFO - named pipe) and - * EIO_S_IFSOCK(UNIX domain socket). - * - * To specify permissions EIO_S_I* constants could be - * used. - * @param int $dev If the file type is EIO_S_IFCHR or - * EIO_S_IFBLK then dev specifies the major and minor - * numbers of the newly created device special file. Otherwise - * dev ignored. See mknod(2) man page for - * details. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $dev + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mknod returns request resource on success. - * @throws EioException + * @param mixed $data + * @return resource + * @throws EioException * */ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null) @@ -977,39 +421,10 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** - * eio_nop does nothing, except go through the whole - * request cycle. Could be useful in debugging. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_nop returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1025,42 +440,13 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = /** - * eio_readahead populates the page cache with data from a file so that subsequent reads from - * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $length Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_readahead returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1076,295 +462,12 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT /** - * Reads through a whole directory(via the opendir, readdir and - * closedir system calls) and returns either the names or an array in - * result argument of callback - * function, depending on the flags argument. - * - * @param string $path Directory path. - * @param int $flags Combination of EIO_READDIR_* constants. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $flags + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readdir returns request resource on success. - * Sets result argument of - * callback function according to - * flags: - * - * - * - * - * - * - * EIO_READDIR_DENTS - * (int) - * - * - * - * eio_readdir flag. If specified, the result argument of the callback - * becomes an array with the following keys: - * 'names' - array of directory names - * 'dents' - array of struct - * eio_dirent-like arrays having the following keys each: - * 'name' - the directory name; - * 'type' - one of EIO_DT_* - * constants; - * 'inode' - the inode number, if available, otherwise - * unspecified; - * - * - * - * - * - * EIO_READDIR_DIRS_FIRST - * (int) - * - * - * - * When this flag is specified, the names will be returned in an order - * where likely directories come first, in optimal stat order. - * - * - * - * - * - * EIO_READDIR_STAT_ORDER - * (int) - * - * - * - * When this flag is specified, then the names will be returned in an order - * suitable for stat'ing each one. When planning to - * stat all files in the given directory, the - * returned order will likely be - * fastest. - * - * - * - * - * - * EIO_READDIR_FOUND_UNKNOWN - * (int) - * - * - * - * - * - * - * - * - * - * - * - * Node types: - * - * - * - * - * - * EIO_DT_UNKNOWN - * (int) - * - * - * - * Unknown node type(very common). Further stat needed. - * - * - * - * - * - * EIO_DT_FIFO - * (int) - * - * - * - * FIFO node type - * - * - * - * - * - * EIO_DT_CHR - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPC - * (int) - * - * - * - * Multiplexed char device (v7+coherent) node type - * - * - * - * - * - * EIO_DT_DIR - * (int) - * - * - * - * Directory node type - * - * - * - * - * - * EIO_DT_NAM - * (int) - * - * - * - * Xenix special named file node type - * - * - * - * - * - * EIO_DT_BLK - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPB - * (int) - * - * - * - * Multiplexed block device (v7+coherent) - * - * - * - * - * - * EIO_DT_REG - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_NWK - * (int) - * - * - * - * - * - * - * - * - * EIO_DT_CMP - * (int) - * - * - * - * HP-UX network special node type - * - * - * - * - * - * EIO_DT_LNK - * (int) - * - * - * - * Link node type - * - * - * - * - * - * EIO_DT_SOCK - * (int) - * - * - * - * Socket node type - * - * - * - * - * - * EIO_DT_DOOR - * (int) - * - * - * - * Solaris door node type - * - * - * - * - * - * EIO_DT_WHT - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MAX - * (int) - * - * - * - * Highest node type value - * - * - * - * - * - * - * + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1380,39 +483,11 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?st /** - * - * - * @param string $path Source symbolic link path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readlink returns request resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1428,40 +503,12 @@ function eio_readlink(string $path, int $pri, callable $callback, ?string $data /** - * eio_rename renames or moves a file to new location. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rename returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1477,39 +524,11 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_rmdir removes a directory. - * - * @param string $path Directory path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rmdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1525,49 +544,13 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback /** - * eio_seek repositions the offset of the open file associated with - * stream, Socket instance, or file descriptor specified by fd to - * the argument offset according to - * the directive whence. - * - * @param mixed $fd Stream, Socket instance, or numeric file descriptor. - * @param int $offset Starting point from which data is to be read. - * @param int $whence whence values are: - * - * EIO_SEEK_SET - Set position equal to offset bytes. - * EIO_SEEK_CUR - Set position to current location plus offset. - * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $whence + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_seek returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1583,43 +566,14 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?ca /** - * eio_sendfile copies data between one file descriptor - * and another. See SENDFILE(2) man page for details. - * - * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. - * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. - * @param int $offset Offset within the source file. - * @param int $length Number of bytes to copy. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $out_fd + * @param mixed $in_fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param string $data is custom data passed to the request. - * @return resource eio_sendfile returns request resource on success. + * @param string $data + * @return resource * @throws EioException * */ @@ -1643,41 +597,11 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = nul /** - * eio_stat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_stat returns request resource on success. On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1693,42 +617,11 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null) /** - * eio_statvfs returns file system statistics information in - * result argument of callback - * - * @param string $path Pathname of any file within the mounted file system - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_statvfs returns request resource on success. - * On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1748,41 +641,12 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** - * eio_symlink creates a symbolic link - * new_path to path. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_symlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1798,50 +662,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file - * descriptor fd with disk. - * - * @param mixed $fd File descriptor - * @param int $offset The starting byte of the file range to be synchronized - * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If - * nbytes is zero, then all bytes from offset through - * to the end of file are synchronized. - * @param int $flags A bit-mask. Can include any of the following values: - * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, - * EIO_SYNC_FILE_RANGE_WRITE, - * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have - * the same meaning as their SYNC_FILE_RANGE_* - * counterparts(see SYNC_FILE_RANGE(2) man page). - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $nbytes + * @param int $flags + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_sync_file_range returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1857,12 +685,10 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * * @param int $pri * @param callable|null $callback * @param mixed $data - * @return resource eio_sync returns request resource on success. + * @return resource * @throws EioException * */ @@ -1878,39 +704,11 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data /** - * - * - * @param mixed $fd File descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_syncfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1926,41 +724,12 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_truncate causes the regular file named by path to be truncated to - * a size of precisely length bytes - * - * @param string $path File path - * @param int $offset Offset from beginning of the file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1976,39 +745,11 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** - * eio_unlink deletes a name from the file system. - * - * @param string $path Path to file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_unlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2024,41 +765,13 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callbac /** - * - * - * @param string $path Path to the file. - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_utime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2074,44 +787,14 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ /** - * eio_write writes up to length - * bytes from str at offset - * offset from the beginning of the file. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param string $str Source string - * @param int $length Maximum number of bytes to write. - * @param int $offset Offset from the beginning of file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param string $str + * @param int $length + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_write returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ diff --git a/generated/8.4/errorfunc.php b/generated/8.4/errorfunc.php index 671fe69c..2e0c2df9 100644 --- a/generated/8.4/errorfunc.php +++ b/generated/8.4/errorfunc.php @@ -5,64 +5,10 @@ use Safe\Exceptions\ErrorfuncException; /** - * Sends an error message to the web server's error log or to a file. - * - * @param string $message The error message that should be logged. - * @param 0|1|2|3|4 $message_type Says where the error should go. The possible message types are as - * follows: - * - * - * error_log log types - * - * - * - * 0 - * - * message is sent to PHP's system logger, using - * the Operating System's system logging mechanism or a file, depending - * on what the error_log - * configuration directive is set to. This is the default option. - * - * - * - * 1 - * - * message is sent by email to the address in - * the destination parameter. This is the only - * message type where the fourth parameter, - * additional_headers is used. - * - * - * - * 2 - * - * No longer an option. - * - * - * - * 3 - * - * message is appended to the file - * destination. A newline is not automatically - * added to the end of the message string. - * - * - * - * 4 - * - * message is sent directly to the SAPI logging - * handler. - * - * - * - * - * - * @param null|string $destination The destination. Its meaning depends on the - * message_type parameter as described above. - * @param null|string $additional_headers The extra headers. It's used when the message_type - * parameter is set to 1. - * This message type uses the same internal function as - * mail does. + * @param string $message + * @param 0|1|2|3|4 $message_type + * @param null|string $destination + * @param null|string $additional_headers * @throws ErrorfuncException * */ diff --git a/generated/8.4/exec.php b/generated/8.4/exec.php index 7e35d71b..534f7a89 100644 --- a/generated/8.4/exec.php +++ b/generated/8.4/exec.php @@ -5,30 +5,10 @@ use Safe\Exceptions\ExecException; /** - * exec executes the given - * command. - * - * @param string $command The command that will be executed. - * @param array|null $output If the output argument is present, then the - * specified array will be filled with every line of output from the - * command. Trailing whitespace, such as \n, is not - * included in this array. Note that if the array already contains some - * elements, exec will append to the end of the array. - * If you do not want the function to append elements, call - * unset on the array before passing it to - * exec. - * @param int|null $result_code If the result_code argument is present - * along with the output argument, then the - * return status of the executed command will be written to this - * variable. - * @return string The last line from the result of the command. If you need to execute a - * command and have all the data from the command passed directly back without - * any interference, use the passthru function. - * - * Returns FALSE on failure. - * - * To get the output of the executed command, be sure to set and use the - * output parameter. + * @param string $command + * @param array|null $output + * @param int|null $result_code + * @return string * @throws ExecException * */ @@ -44,18 +24,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null /** - * proc_close is similar to pclose - * except that it only works on processes opened by - * proc_open. - * proc_close waits for the process to terminate, and - * returns its exit code. Open pipes to that process are closed - * when this function is called, in - * order to avoid a deadlock - the child process may not be able to exit - * while the pipes are open. - * - * @param resource $process The proc_open resource that will - * be closed. - * @return int Returns the termination status of the process that was run. + * @param resource $process + * @return int * @throws ExecException * */ @@ -71,22 +41,7 @@ function proc_close($process): int /** - * proc_nice changes the priority of the current - * process by the amount specified in priority. A - * positive priority will lower the priority of the - * current process, whereas a negative priority - * will raise the priority. - * - * proc_nice is not related to - * proc_open and its associated functions in any way. - * - * @param int $priority The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority - * whereas positive values have a lower priority. - * - * For Windows the priority parameter has the - * following meaning: + * @param int $priority * @throws ExecException * */ @@ -101,81 +56,13 @@ function proc_nice(int $priority): void /** - * proc_open is similar to popen - * but provides a much greater degree of control over the program execution. - * - * @param string $command The commandline to execute as string. Special characters have to be properly escaped, - * and proper quoting has to be applied. - * - * As of PHP 7.4.0, command may be passed as array of command parameters. - * In this case the process will be opened directly (without going through a shell) - * and PHP will take care of any necessary argument escaping. - * - * On Windows, the argument escaping of the array elements assumes that the - * command line parsing of the executed command is compatible with the parsing - * of command line arguments done by the VC runtime. - * @param array $descriptor_spec An indexed array where the key represents the descriptor number and the - * value represents how PHP will pass that descriptor to the child - * process. 0 is stdin, 1 is stdout, while 2 is stderr. - * - * Each element can be: - * - * An array describing the pipe to pass to the process. The first - * element is the descriptor type and the second element is an option for - * the given type. Valid types are pipe (the second - * element is either r to pass the read end of the pipe - * to the process, or w to pass the write end) and - * file (the second element is a filename). - * Note that anything else than w is treated like r. - * - * - * A stream resource representing a real file descriptor (e.g. opened file, - * a socket, STDIN). - * - * - * - * The file descriptor numbers are not limited to 0, 1 and 2 - you may - * specify any valid file descriptor number and it will be passed to the - * child process. This allows your script to interoperate with other - * scripts that run as "co-processes". In particular, this is useful for - * passing passphrases to programs like PGP, GPG and openssl in a more - * secure manner. It is also useful for reading status information - * provided by those programs on auxiliary file descriptors. - * @param null|resource[] $pipes Will be set to an indexed array of file pointers that correspond to - * PHP's end of any pipes that are created. - * @param null|string $cwd The initial working dir for the command. This must be an - * absolute directory path, or NULL - * if you want to use the default value (the working dir of the current - * PHP process) - * @param array|null $env_vars An array with the environment variables for the command that will be - * run, or NULL to use the same environment as the current PHP process - * @param array|null $options Allows you to specify additional options. Currently supported options - * include: - * - * - * suppress_errors (windows only): suppresses errors - * generated by this function when it's set to TRUE - * - * - * bypass_shell (windows only): bypass - * cmd.exe shell when set to TRUE - * - * - * blocking_pipes (windows only): force - * blocking pipes when set to TRUE - * - * - * create_process_group (windows only): allow the - * child process to handle CTRL events when set to TRUE - * - * - * create_new_console (windows only): the new process - * has a new console, instead of inheriting its parent's console - * - * - * @return resource Returns a resource representing the process, which should be freed using - * proc_close when you are finished with it. On failure - * returns FALSE. + * @param string $command + * @param array $descriptor_spec + * @param null|resource[] $pipes + * @param null|string $cwd + * @param array|null $env_vars + * @param array|null $options + * @return resource * @throws ExecException * */ @@ -199,10 +86,8 @@ function proc_open(string $command, array $descriptor_spec, ?array &$pipes, ?str /** - * This function is identical to the backtick operator. - * - * @param string $command The command that will be executed. - * @return null|string A string containing the output from the executed command or NULL if an error occurs or the command produces no output. + * @param string $command + * @return null|string * @throws ExecException * */ @@ -218,23 +103,9 @@ function shell_exec(string $command): ?string /** - * system is just like the C version of the - * function in that it executes the given - * command and outputs the result. - * - * The system call also tries to automatically - * flush the web server's output buffer after each line of output if - * PHP is running as a server module. - * - * If you need to execute a command and have all the data from the - * command passed directly back without any interference, use the - * passthru function. - * - * @param string $command The command that will be executed. - * @param int|null $result_code If the result_code argument is present, then the - * return status of the executed command will be written to this - * variable. - * @return string Returns the last line of the command output on success. + * @param string $command + * @param int|null $result_code + * @return string * @throws ExecException * */ diff --git a/generated/8.4/fileinfo.php b/generated/8.4/fileinfo.php index e82e617f..2e832a4e 100644 --- a/generated/8.4/fileinfo.php +++ b/generated/8.4/fileinfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\FileinfoException; /** - * This function closes the instance opened by finfo_open. - * - * @param \finfo $finfo An finfo instance, returned by finfo_open. + * @param \finfo $finfo * @throws FileinfoException * */ @@ -22,24 +20,9 @@ function finfo_close(\finfo $finfo): void /** - * Procedural style - * - * Object-oriented style (constructor): - * - * This function opens a magic database and returns its instance. - * - * @param int $flags One or disjunction of more Fileinfo - * constants. - * @param null|string $magic_database Name of a magic database file, usually something like - * /path/to/magic.mime. If not specified, the - * MAGIC environment variable is used. If the - * environment variable isn't set, then PHP's bundled magic database will - * be used. - * - * Passing NULL or an empty string will be equivalent to the default - * value. - * @return \finfo (Procedural style only) - * Returns an finfo instance on success. + * @param int $flags + * @param null|string $magic_database + * @return \finfo * @throws FileinfoException * */ @@ -59,12 +42,8 @@ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): /** - * Returns the MIME content type for a file as determined by using - * information from the magic.mime file. - * - * @param resource|string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like - * text/plain or application/octet-stream. + * @param resource|string $filename + * @return string * @throws FileinfoException * */ diff --git a/generated/8.4/filesystem.php b/generated/8.4/filesystem.php index 9bf69875..a3c6ea4a 100644 --- a/generated/8.4/filesystem.php +++ b/generated/8.4/filesystem.php @@ -5,14 +5,8 @@ use Safe\Exceptions\FilesystemException; /** - * Attempts to change the group of the file filename - * to group. - * - * Only the superuser may change the group of a file arbitrarily; other users - * may change the group of a file to any group of which that user is a member. - * - * @param string $filename Path to the file. - * @param int|string $group A group name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -27,35 +21,9 @@ function chgrp(string $filename, $group): void /** - * Attempts to change the mode of the specified file to that given in - * permissions. - * - * @param string $filename Path to the file. - * @param int $permissions Note that permissions is not automatically - * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix permissions with a zero (0). - * Strings such as "g+w" will not work properly. - * - * - * - * - * ]]> - * - * - * - * The permissions parameter consists of three octal - * number components specifying access restrictions for the owner, - * the user group in which the owner is in, and to everybody else in - * this order. One component can be computed by adding up the needed - * permissions for that target user base. Number 1 means that you - * grant execute rights, number 2 means that you make the file - * writeable, number 4 means that you make the file readable. Add - * up these numbers to specify needed rights. You can also read more - * about modes on Unix systems with 'man 1 chmod' - * and 'man 2 chmod'. - * - * - * + * @param string $filename + * @param int $permissions + * @throws FilesystemException * */ function chmod(string $filename, int $permissions): void @@ -69,12 +37,8 @@ function chmod(string $filename, int $permissions): void /** - * Attempts to change the owner of the file filename - * to user user. Only the superuser may change the - * owner of a file. - * - * @param string $filename Path to the file. - * @param int|string $user A user name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -89,19 +53,9 @@ function chown(string $filename, $user): void /** - * Makes a copy of the file from to - * to. - * - * If you wish to move a file, use the rename function. - * - * @param string $from Path to the source file. - * @param string $to The destination path. If to is a URL, the - * copy operation may fail if the wrapper does not support overwriting of - * existing files. - * - * If the destination file already exists, it will be overwritten. - * @param null|resource $context A valid context resource created with - * stream_context_create. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -120,16 +74,8 @@ function copy(string $from, string $to, $context = null): void /** - * Given a string containing a directory, this function will return the - * number of bytes available on the corresponding filesystem or disk - * partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * - * Given a file name instead of a directory, the behaviour of the - * function is unspecified and may differ between operating systems and - * PHP versions. - * @return float Returns the number of available bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -145,11 +91,8 @@ function disk_free_space(string $directory): float /** - * Given a string containing a directory, this function will return the total - * number of bytes on the corresponding filesystem or disk partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * @return float Returns the total number of bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -165,10 +108,7 @@ function disk_total_space(string $directory): float /** - * The file pointed to by stream is closed. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or fsockopen. + * @param resource $stream * @throws FilesystemException * */ @@ -183,15 +123,7 @@ function fclose($stream): void /** - * This function synchronizes stream contents to storage media, just like fsync does, - * but it does not synchronize file meta-data. - * Note that this function is only effectively different in POSIX systems. - * In Windows, this function is aliased to fsync. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -206,13 +138,7 @@ function fdatasync($stream): void /** - * This function forces a write of all buffered output to the resource - * pointed to by the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -227,36 +153,12 @@ function fflush($stream): void /** - * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to length bytes. On failure, - * file_get_contents will return FALSE. - * - * file_get_contents is the preferred way to read the - * contents of a file into a string. It will use memory mapping techniques if - * supported by your OS to enhance performance. - * - * @param string $filename Name of the file to read. - * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used - * to trigger include path - * search. - * This is not possible if strict typing - * is enabled, since FILE_USE_INCLUDE_PATH is an - * int. Use TRUE instead. - * @param null|resource $context A valid context resource created with - * stream_context_create. If you don't need to use a - * custom context, you can skip this parameter by NULL. - * @param int $offset The offset where the reading starts on the original stream. - * Negative offsets count from the end of the stream. - * - * Seeking (offset) is not supported with remote files. - * Attempting to seek on non-local files may work with small offsets, but this - * is unpredictable because it works on the buffered stream. - * @param 0|null|positive-int $length Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the - * stream processed by the filters. - * @return string The function returns the read data. + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @param int $offset + * @param 0|null|positive-int $length + * @return string * @throws FilesystemException * */ @@ -280,76 +182,11 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * This function is identical to calling fopen, - * fwrite and fclose successively - * to write data to a file. - * - * If filename does not exist, the file is created. - * Otherwise, the existing file is overwritten, unless the - * FILE_APPEND flag is set. - * - * @param string $filename Path to the file where to write the data. - * @param mixed $data The data to write. Can be either a string, an - * array or a stream resource. - * - * If data is a stream resource, the - * remaining buffer of that stream will be copied to the specified file. - * This is similar with using stream_copy_to_stream. - * - * You can also specify the data parameter as a single - * dimension array. This is equivalent to - * file_put_contents($filename, implode('', $array)). - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * - * Available flags - * - * - * - * Flag - * Description - * - * - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * Search for filename in the include directory. - * See include_path for more - * information. - * - * - * - * - * FILE_APPEND - * - * - * If file filename already exists, append - * the data to the file instead of overwriting it. - * - * - * - * - * LOCK_EX - * - * - * Acquire an exclusive lock on the file while proceeding to the - * writing. In other words, a flock call happens - * between the fopen call and the - * fwrite call. This is not identical to an - * fopen call with mode "x". - * - * - * - * - * - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return 0|positive-int This function returns the number of bytes that were written to the file. + * @param string $filename + * @param mixed $data + * @param int $flags + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -369,57 +206,10 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n /** - * Reads an entire file into an array. - * - * @param string $filename Path to the file. - * @param int-mask $flags The optional parameter flags can be one, or - * more, of the following constants: - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * - * Search for the file in the include_path. - * - * - * - * - * - * FILE_IGNORE_NEW_LINES - * - * - * - * Omit newline at the end of each array element - * - * - * - * - * - * FILE_SKIP_EMPTY_LINES - * - * - * - * Skip empty lines - * - * - * - * - * - * FILE_NO_DEFAULT_CONTEXT - * - * - * - * Don't use the default context - * - * - * - * - * @param null|resource $context Search for the file in the include_path. - * @return list Returns the file in an array. Each element of the array corresponds to a - * line in the file, with the newline still attached. Upon failure, - * file returns FALSE. + * @param string $filename + * @param int-mask $flags + * @param null|resource $context + * @return list * @throws FilesystemException * */ @@ -439,11 +229,8 @@ function file(string $filename, int $flags = 0, $context = null): array /** - * Gets the last access time of the given file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last accessed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -459,11 +246,8 @@ function fileatime(string $filename): int /** - * Gets the inode change time of a file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last changed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -479,10 +263,8 @@ function filectime(string $filename): int /** - * Gets the file inode. - * - * @param string $filename Path to the file. - * @return int Returns the inode number of the file. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -498,13 +280,8 @@ function fileinode(string $filename): int /** - * This function returns the time when the data blocks of a file were being - * written to, that is, the time when the content of the file was changed. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last modified. - * The time is returned as a Unix timestamp, which is - * suitable for the date function. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -520,12 +297,8 @@ function filemtime(string $filename): int /** - * Gets the file owner. - * - * @param string $filename Path to the file. - * @return int Returns the user ID of the owner of the file. - * The user ID is returned in numerical format, use - * posix_getpwuid to resolve it to a username. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -541,24 +314,8 @@ function fileowner(string $filename): int /** - * Gets permissions for the given file. - * - * @param string $filename Path to the file. - * @return int Returns the file's permissions as a numeric mode. Lower bits of this mode - * are the same as the permissions expected by chmod, - * however on most platforms the return value will also include information on - * the type of file given as filename. The examples - * below demonstrate how to test the return value for specific permissions and - * file types on POSIX systems, including Linux and macOS. - * - * For local files, the specific return value is that of the - * st_mode member of the structure returned by the C - * library's stat function. Exactly which bits are set - * can vary from platform to platform, and looking up your specific platform's - * documentation is recommended if parsing the non-permission bits of the - * return value is required. - * - * Returns FALSE on failure. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -574,11 +331,8 @@ function fileperms(string $filename): int /** - * Gets the size for the given file. - * - * @param string $filename Path to the file. - * @return 0|positive-int Returns the size of the file in bytes, or FALSE (and generates an error - * of level E_WARNING) in case of an error. + * @param string $filename + * @return 0|positive-int * @throws FilesystemException * */ @@ -594,15 +348,8 @@ function filesize(string $filename): int /** - * Returns the type of the given file. - * - * @param string $filename Path to the file. - * @return string Returns the type of the file. Possible values are fifo, char, - * dir, block, link, file, socket and unknown. - * - * Returns FALSE if an error occurs. filetype will also - * produce an E_NOTICE message if the stat call fails - * or if the file type is unknown. + * @param string $filename + * @return string * @throws FilesystemException * */ @@ -618,44 +365,9 @@ function filetype(string $filename): string /** - * flock allows you to perform a simple reader/writer - * model which can be used on virtually every platform (including most Unix - * derivatives and even Windows). - * - * The lock is released also by fclose, - * or when stream is garbage collected. - * - * PHP supports a portable way of locking complete files in an advisory way - * (which means all accessing programs have to use the same way of locking - * or it will not work). By default, this function will block until the - * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param int-mask $operation operation is one of the following: - * - * - * - * LOCK_SH to acquire a shared lock (reader). - * - * - * - * - * LOCK_EX to acquire an exclusive lock (writer). - * - * - * - * - * LOCK_UN to release a lock (shared or exclusive). - * - * - * - * - * It is also possible to add LOCK_NB as a bitmask to one - * of the above operations, if flock should not - * block during the locking attempt. - * @param 0|1|null $would_block The optional third argument is set to 1 if the lock would block - * (EWOULDBLOCK errno condition). + * @param resource $stream + * @param int-mask $operation + * @param 0|1|null $would_block * @throws FilesystemException * */ @@ -670,201 +382,11 @@ function flock($stream, int $operation, ?int &$would_block = null): void /** - * fopen binds a named resource, specified by - * filename, to a stream. - * - * @param string $filename If filename is of the form "scheme://...", it - * is assumed to be a URL and PHP will search for a protocol handler - * (also known as a wrapper) for that scheme. If no wrappers for that - * protocol are registered, PHP will emit a notice to help you track - * potential problems in your script and then continue as though - * filename specifies a regular file. - * - * If PHP has decided that filename specifies - * a local file, then it will try to open a stream on that file. - * The file must be accessible to PHP, so you need to ensure that - * the file access permissions allow this access. - * If you have enabled - * open_basedir further - * restrictions may apply. - * - * If PHP has decided that filename specifies - * a registered protocol, and that protocol is registered as a - * network URL, PHP will check to make sure that - * allow_url_fopen is - * enabled. If it is switched off, PHP will emit a warning and - * the fopen call will fail. - * - * The list of supported protocols can be found in . Some protocols (also referred to as - * wrappers) support context - * and/or php.ini options. Refer to the specific page for the - * protocol in use for a list of options which can be set. (e.g. - * php.ini value user_agent used by the - * http wrapper). - * - * On the Windows platform, be careful to escape any backslashes - * used in the path to the file, or use forward slashes. - * - * - * - * ]]> - * - * - * @param string $mode The mode parameter specifies the type of access - * you require to the stream. It may be any of the following: - * - * - * A list of possible modes for fopen - * using mode - * - * - * - * - * mode - * Description - * - * - * - * - * 'r' - * - * Open for reading only; place the file pointer at the - * beginning of the file. - * - * - * - * 'r+' - * - * Open for reading and writing; place the file pointer at - * the beginning of the file. - * - * - * - * 'w' - * - * Open for writing only; place the file pointer at the - * beginning of the file and truncate the file to zero length. - * If the file does not exist, attempt to create it. - * - * - * - * 'w+' - * - * Open for reading and writing; otherwise it has the - * same behavior as 'w'. - * - * - * - * 'a' - * - * Open for writing only; place the file pointer at the end of - * the file. If the file does not exist, attempt to create it. - * In this mode, fseek has no effect, writes are always appended. - * - * - * - * 'a+' - * - * Open for reading and writing; place the file pointer at - * the end of the file. If the file does not exist, attempt to - * create it. In this mode, fseek only affects - * the reading position, writes are always appended. - * - * - * - * 'x' - * - * Create and open for writing only; place the file pointer at the - * beginning of the file. If the file already exists, the - * fopen call will fail by returning FALSE and - * generating an error of level E_WARNING. If - * the file does not exist, attempt to create it. This is equivalent - * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * - * 'x+' - * - * Create and open for reading and writing; otherwise it has the - * same behavior as 'x'. - * - * - * - * 'c' - * - * Open the file for writing only. If the file does not exist, it is - * created. If it exists, it is neither truncated (as opposed to - * 'w'), nor the call to this function fails (as is - * the case with 'x'). The file pointer is - * positioned on the beginning of the file. This may be useful if it's - * desired to get an advisory lock (see flock) - * before attempting to modify the file, as using - * 'w' could truncate the file before the lock - * was obtained (if truncation is desired, - * ftruncate can be used after the lock is - * requested). - * - * - * - * 'c+' - * - * Open the file for reading and writing; otherwise it has the same - * behavior as 'c'. - * - * - * - * 'e' - * - * Set close-on-exec flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conform systems. - * - * - * - * - * - * - * Different operating system families have different line-ending - * conventions. When you write a text file and want to insert a line - * break, you need to use the correct line-ending character(s) for your - * operating system. Unix based systems use \n as the - * line ending character, Windows based systems use \r\n - * as the line ending characters and Macintosh based systems (Mac OS Classic) used - * \r as the line ending character. - * - * If you use the wrong line ending characters when writing your files, you - * might find that other applications that open those files will "look - * funny". - * - * Windows offers a text-mode translation flag ('t') - * which will transparently translate \n to - * \r\n when working with the file. In contrast, you - * can also use 'b' to force binary mode, which will not - * translate your data. To use these flags, specify either - * 'b' or 't' as the last character - * of the mode parameter. - * - * The default translation mode is 'b'. - * You can use the 't' - * mode if you are working with plain-text files and you use - * \n to delimit your line endings in your script, but - * expect your files to be readable with applications such as old versions of notepad. You - * should use the 'b' in all other cases. - * - * If you specify the 't' flag when working with binary files, you - * may experience strange problems with your data, including broken image - * files and strange problems with \r\n characters. - * - * For portability, it is also strongly recommended that - * you re-write code that uses or relies upon the 't' - * mode so that it uses the correct line endings and - * 'b' mode instead. - * @param bool $use_include_path The optional third use_include_path parameter - * can be set to TRUE if you want to search for the file in the - * include_path, too. - * @param null|resource $context A context stream - * resource. - * @return resource Returns a file pointer resource on success + * @param string $filename + * @param string $mode + * @param bool $use_include_path + * @param null|resource $context + * @return resource * @throws FilesystemException * */ @@ -884,41 +406,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ /** - * fread reads up to - * length bytes from the file pointer - * referenced by stream. Reading stops as soon as one - * of the following conditions is met: - * - * - * - * length bytes have been read - * - * - * - * - * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the - * socket timeout occurs (for network streams) - * - * - * - * - * if the stream is read buffered and it does not represent a plain file, at - * most one read of up to a number of bytes equal to the chunk size (usually - * 8192) is made; depending on the previously buffered data, the size of the - * returned data may be larger than the chunk size. - * - * - * - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param positive-int $length Up to length number of bytes read. - * @return string Returns the read string. + * @param resource $stream + * @param positive-int $length + * @return string * @throws FilesystemException * */ @@ -934,16 +424,8 @@ function fread($stream, int $length): string /** - * Gathers the statistics of the file opened by the file - * pointer stream. This function is similar to the - * stat function except that it operates - * on an open file pointer instead of a filename. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @return array Returns an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * Returns FALSE on failure. + * @param resource $stream + * @return array * @throws FilesystemException * */ @@ -959,13 +441,7 @@ function fstat($stream): array /** - * This function synchronizes changes to the file, including its meta-data. This is similar to fflush, - * but it also instructs the operating system to write to the storage media. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -980,16 +456,8 @@ function fsync($stream): void /** - * Returns the position of the file pointer referenced by stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or popen. - * ftell gives undefined results for append-only streams - * (opened with "a" flag). - * @return int Returns the position of the file pointer referenced by - * stream as an integer; i.e., its offset into the file stream. - * - * If an error occurs, returns FALSE. + * @param resource $stream + * @return int * @throws FilesystemException * */ @@ -1005,19 +473,8 @@ function ftell($stream): int /** - * Takes the filepointer, stream, and truncates the file to - * length, size. - * - * @param resource $stream The file pointer. - * - * The stream must be open for writing. - * @param 0|positive-int $size The size to truncate to. - * - * If size is larger than the file then the file - * is extended with null bytes. - * - * If size is smaller than the file then the file - * is truncated to that size. + * @param resource $stream + * @param 0|positive-int $size * @throws FilesystemException * */ @@ -1032,18 +489,10 @@ function ftruncate($stream, int $size): void /** - * fwrite writes the contents of - * data to the file stream pointed to by - * stream. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param string $data The string that is to be written. - * @param 0|null|positive-int $length If length is an integer, writing will stop - * after length bytes have been written or the - * end of data is reached, whichever comes first. - * @return 0|positive-int fwrite returns the number of bytes - * written. + * @param resource $stream + * @param string $data + * @param 0|null|positive-int $length + * @return 0|positive-int * @throws FilesystemException * */ @@ -1063,44 +512,9 @@ function fwrite($stream, string $data, ?int $length = null): int /** - * The glob function searches for all the pathnames - * matching pattern according to the rules used by - * the libc glob() function, which is similar to the rules used by common - * shells. - * - * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. - * - * Special characters: - * - * - * - * * - Matches zero or more characters. - * - * - * - * - * ? - Matches exactly one character (any character). - * - * - * - * - * [...] - Matches one character from a group of - * characters. If the first character is !, - * matches any character not in the group. - * - * - * - * - * \ - Escapes the following character, - * except when the GLOB_NOESCAPE flag is used. - * - * - * - * @param int $flags Any of the GLOB_* constants. - * @return list Returns an array containing the matched files/directories, an empty array - * if no file matched. - * Unless GLOB_NOSORT was used, the names will - * be sorted alphanumerically. + * @param string $pattern + * @param int $flags + * @return list * @throws FilesystemException * */ @@ -1116,15 +530,8 @@ function glob(string $pattern, int $flags = 0): array /** - * Attempts to change the group of the symlink filename - * to group. - * - * Only the superuser may change the group of a symlink arbitrarily; other - * users may change the group of a symlink to any group of which that user is - * a member. - * - * @param string $filename Path to the symlink. - * @param int|string $group The group specified by name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -1139,13 +546,8 @@ function lchgrp(string $filename, $group): void /** - * Attempts to change the owner of the symlink filename - * to user user. - * - * Only the superuser may change the owner of a symlink. - * - * @param string $filename Path to the file. - * @param int|string $user User name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -1160,10 +562,8 @@ function lchown(string $filename, $user): void /** - * link creates a hard link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1178,18 +578,8 @@ function link(string $target, string $link): void /** - * Gathers the statistics of the file or symbolic link named by - * filename. - * - * @param string $filename Path to a file or a symbolic link. - * @return array See the manual page for stat for information on - * the structure of the array that lstat returns. - * This function is identical to the stat function - * except that if the filename parameter is a symbolic - * link, the status of the symbolic link is returned, not the status of the - * file pointed to by the symbolic link. - * - * On failure, FALSE is returned. + * @param string $filename + * @return array * @throws FilesystemException * */ @@ -1205,30 +595,10 @@ function lstat(string $filename): array /** - * Attempts to create the directory specified by directory. - * - * @param string $directory The directory path. - * A URL can be used as a - * filename with this function if the fopen wrappers have been enabled. - * See fopen for more details on how to specify the - * filename. See the for links to information - * about what abilities the various wrappers have, notes on their usage, - * and information on any predefined variables they may - * provide. - * @param int $permissions The permissions are 0777 by default, which means the widest possible - * access. For more information on permissions, read the details - * on the chmod page. - * - * permissions is ignored on Windows. - * - * Note that you probably want to specify the permissions as an octal number, - * which means it should have a leading zero. The permissions is also modified - * by the current umask, which you can change using - * umask. - * @param bool $recursive If TRUE, then any parent directories to the directory specified will - * also be created, with the same permissions. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param int $permissions + * @param bool $recursive + * @param null|resource $context * @throws FilesystemException * */ @@ -1247,31 +617,10 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal /** - * parse_ini_file loads in the - * ini file specified in filename, - * and returns the settings in it in an associative array. - * - * The structure of the ini file is the same as the php.ini's. - * - * @param string $filename The filename of the ini file being parsed. If a relative path is used, - * it is evaluated relative to the current working directory, then the - * include_path. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $filename + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1287,28 +636,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s /** - * parse_ini_string returns the settings in string - * ini_string in an associative array. - * - * The structure of the ini string is the same as the php.ini's. - * - * @param string $ini_string The contents of the ini file being parsed. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $ini_string + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1324,11 +655,8 @@ function parse_ini_string(string $ini_string, bool $process_sections = false, in /** - * Closes a file pointer to a pipe opened by popen. - * - * @param resource $handle The file pointer must be valid, and must have been returned by a - * successful call to popen. - * @return int Returns the termination status of the process that was run. + * @param resource $handle + * @return int * @throws FilesystemException * */ @@ -1344,28 +672,9 @@ function pclose($handle): int /** - * Opens a pipe to a process executed by forking the command given - * by command. - * - * @param string $command The command - * @param string $mode The mode. Either 'r' for reading, or 'w' - * for writing. - * - * On Windows, popen defaults to text mode, i.e. any \n - * characters written to or read from the pipe will be translated to \r\n. - * If this is not desired, binary mode can be enforced by setting mode - * to 'rb' and 'wb', respectively. - * @return resource Returns a file pointer identical to that returned by - * fopen, except that it is unidirectional (may - * only be used for reading or writing) and must be closed with - * pclose. This pointer may be used with - * fgets, fgetss, and - * fwrite. When the mode is 'r', the returned - * file pointer equals to the STDOUT of the command, when the mode - * is 'w', the returned file pointer equals to the STDIN of the - * command. - * - * If an error occurs, returns FALSE. + * @param string $command + * @param string $mode + * @return resource * @throws FilesystemException * */ @@ -1381,14 +690,10 @@ function popen(string $command, string $mode) /** - * Reads a file and writes it to the output buffer. - * - * @param string $filename The filename being read. - * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if - * you want to search for the file in the include_path, too. - * @param null|resource $context A context stream - * resource. - * @return 0|positive-int Returns the number of bytes read from the file on success + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -1408,10 +713,8 @@ function readfile(string $filename, bool $use_include_path = false, $context = n /** - * readlink does the same as the readlink C function. - * - * @param string $path The symbolic link path. - * @return string Returns the contents of the symbolic link path. + * @param string $path + * @return string * @throws FilesystemException * */ @@ -1427,27 +730,8 @@ function readlink(string $path): string /** - * realpath expands all symbolic links and - * resolves references to /./, /../ and extra / characters in - * the input path and returns the canonicalized - * absolute pathname. - * - * @param string $path The path being checked. - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * @return non-empty-string Returns the canonicalized absolute pathname on success. The resulting path - * will have no symbolic link, /./ or /../ components. Trailing delimiters, - * such as \ and /, are also removed. - * - * realpath returns FALSE on failure, e.g. if - * the file does not exist. + * @param string $path + * @return non-empty-string * @throws FilesystemException * */ @@ -1463,27 +747,9 @@ function realpath(string $path): string /** - * Attempts to rename from to - * to, moving it between directories if necessary. - * If renaming a file and to exists, - * it will be overwritten. If renaming a directory and - * to exists, - * this function will emit a warning. - * - * @param string $from The old name. - * - * The wrapper used in from - * must match the wrapper used in - * to. - * @param string $to The new name. - * - * - * On Windows, if to already exists, it must be writable. - * Otherwise rename fails and issues E_WARNING. - * - * - * @param null|resource $context A context stream - * resource. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -1502,11 +768,7 @@ function rename(string $from, string $to, $context = null): void /** - * Sets the file position indicator for stream - * to the beginning of the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file - * successfully opened by fopen. + * @param resource $stream * @throws FilesystemException * */ @@ -1521,13 +783,8 @@ function rewind($stream): void /** - * Attempts to remove the directory named by directory. - * The directory must be empty, and the relevant permissions must permit this. - * A E_WARNING level error will be generated on failure. - * - * @param string $directory Path to the directory. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param null|resource $context * @throws FilesystemException * */ @@ -1546,12 +803,8 @@ function rmdir(string $directory, $context = null): void /** - * symlink creates a symbolic link to the existing - * target with the specified name - * link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1566,14 +819,9 @@ function symlink(string $target, string $link): void /** - * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. - * If the directory does not exist or is not writable, tempnam may - * generate a file in the system's temporary directory, and return - * the full path to that file, including its name. - * - * @param string $directory The directory where the temporary filename will be created. - * @param string $prefix The prefix of the generated temporary filename. - * @return non-falsy-string Returns the new temporary filename (with path). + * @param string $directory + * @param string $prefix + * @return non-falsy-string * @throws FilesystemException * */ @@ -1589,16 +837,7 @@ function tempnam(string $directory, string $prefix): string /** - * Creates a temporary file with a unique name in read-write-binary (w+b) mode and - * returns a file handle. - * - * The file is automatically removed when closed (for example, by calling - * fclose, or when there are no remaining references to - * the file handle returned by tmpfile), or when the - * script ends. - * - * @return resource Returns a file handle, similar to the one returned by - * fopen, for the new file. + * @return resource * @throws FilesystemException * */ @@ -1614,21 +853,9 @@ function tmpfile() /** - * Attempts to set the access and modification times of the file named in the - * filename parameter to the value given in - * mtime. - * Note that the access time is always modified, regardless of the number - * of parameters. - * - * If the file does not exist, it will be created. - * - * @param string $filename The name of the file being touched. - * @param int|null $mtime The touch time. If mtime is NULL, - * the current system time is used. - * @param int|null $atime If not NULL, the access time of the given filename is set to - * the value of atime. Otherwise, it is set to - * the value passed to the mtime parameter. - * If both are NULL, the current system time is used. + * @param string $filename + * @param int|null $mtime + * @param int|null $atime * @throws FilesystemException * */ @@ -1649,16 +876,8 @@ function touch(string $filename, ?int $mtime = null, ?int $atime = null): void /** - * Deletes filename. Similar to the Unix C unlink() - * function. An E_WARNING level error will be generated on - * failure. - * - * @param string $filename Path to the file. - * - * If the file is a symlink, the symlink will be deleted. On Windows, to delete - * a symlink to a directory, rmdir has to be used instead. - * @param null|resource $context A context stream - * resource. + * @param string $filename + * @param null|resource $context * @throws FilesystemException * */ diff --git a/generated/8.4/filter.php b/generated/8.4/filter.php index 68c2ec7d..0f05571c 100644 --- a/generated/8.4/filter.php +++ b/generated/8.4/filter.php @@ -5,34 +5,10 @@ use Safe\Exceptions\FilterException; /** - * This function is useful for retrieving many values without - * repetitively calling filter_input. - * - * @param int $type One of the INPUT_* constants. - * - * The content of the superglobal that is being filtered is the original - * "raw" content provided by the SAPI, - * prior to any user modification to the superglobal. - * To filter a modified superglobal use - * filter_var_array instead. + * @param int $type * @param array|int $options * @param bool $add_empty - * @return array|null On success, an array containing the values of the requested variables. - * - * On failure, FALSE is returned. - * Except if the failure is that the input array designated by - * type is not populated where NULL is returned - * if the FILTER_NULL_ON_FAILURE flag is used. - * - * Missing entries from the input array will be populated into the returned - * array if add_empty is TRUE. - * In which case, missing entries will be set to NULL, - * unless the FILTER_NULL_ON_FAILURE flag is used, - * in which case it will be FALSE. - * - * An entry of the returned array will be FALSE if the filter fails, - * unless the FILTER_NULL_ON_FAILURE flag is used, - * in which case it will be NULL. + * @return array|null * @throws FilterException * */ @@ -48,41 +24,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt /** - * Filter an associative array of values using - * FILTER_VALIDATE_* - * validation filters, - * FILTER_SANITIZE_* - * sanitization filters, or custom filters. - * - * @param array $array An associative array containing the data to filter. - * @param mixed $options Either an associative array of options, - * or the filter to apply to each entry, - * which can either be a validation filter by using one of the - * FILTER_VALIDATE_* - * constants, or a sanitization filter by using one of the - * FILTER_SANITIZE_* - * constants. - * - * The option array is an associative array where the key corresponds - * to a key in the data array and the associated - * value is either the filter to apply to this entry, - * or an associative array describing how and which filter should be - * applied to this entry. - * - * The associative array describing how a filter should be applied - * must contain the 'filter' key whose associated - * value is the filter to apply, which can be one of the - * FILTER_VALIDATE_*, - * FILTER_SANITIZE_*, - * FILTER_UNSAFE_RAW, or - * FILTER_CALLBACK constants. - * It can optionally contain the 'flags' key - * which specifies and flags that apply to the filter, - * and the 'options' key which specifies any options - * that apply to the filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if - * the variable is not set. + * @param array $array + * @param mixed $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ diff --git a/generated/8.4/fpm.php b/generated/8.4/fpm.php index c25d951e..73840e0d 100644 --- a/generated/8.4/fpm.php +++ b/generated/8.4/fpm.php @@ -5,10 +5,6 @@ use Safe\Exceptions\FpmException; /** - * 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. - * * @throws FpmException * */ @@ -23,14 +19,7 @@ function fastcgi_finish_request(): void /** - * This function returns the full current FPM pool status as an associative array. It always - * returns the full status, including per-process status information. See the - * FPM status page guide for further - * details. - * - * Note that this function will only be defined if FPM is being used to serve the script. - * - * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} Associative array containing the full FPM pool status. + * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} * @throws FpmException * */ diff --git a/generated/8.4/ftp.php b/generated/8.4/ftp.php index f5b87f06..2154de6d 100644 --- a/generated/8.4/ftp.php +++ b/generated/8.4/ftp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to - * allocate space for a file to be uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $size The number of bytes to allocate. - * @param null|string $response A textual representation of the servers response will be returned by - * reference in response if a variable is provided. + * @param \FTP\Connection $ftp + * @param int $size + * @param null|string $response * @throws FtpException * */ @@ -26,9 +22,7 @@ function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @param string $remote_filename * @param string $local_filename * @param FTP_ASCII|FTP_BINARY $mode @@ -46,9 +40,7 @@ function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local /** - * Changes to the parent directory. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -63,10 +55,8 @@ function ftp_cdup(\FTP\Connection $ftp): void /** - * Changes the current directory to the specified one. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The target directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -81,13 +71,10 @@ function ftp_chdir(\FTP\Connection $ftp, string $directory): void /** - * Sets the permissions on the specified remote file to - * permissions. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $permissions The new permissions, given as an octal value. - * @param string $filename The remote file. - * @return int Returns the new file permissions on success. + * @param \FTP\Connection $ftp + * @param int $permissions + * @param string $filename + * @return int * @throws FtpException * */ @@ -103,10 +90,7 @@ function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): in /** - * ftp_close closes the given link identifier - * and releases the resource. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -121,18 +105,10 @@ function ftp_close(\FTP\Connection $ftp): void /** - * ftp_connect opens an FTP connection to the - * specified hostname. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -148,11 +124,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\ /** - * ftp_delete deletes the file specified by - * filename from the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The file to delete. + * @param \FTP\Connection $ftp + * @param string $filename * @throws FtpException * */ @@ -167,15 +140,11 @@ function ftp_delete(\FTP\Connection $ftp, string $filename): void /** - * ftp_fget retrieves remote_filename - * from the FTP server, and writes it to the given file pointer. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param resource $stream An open file pointer in which we store the data. - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param resource $stream + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -190,15 +159,11 @@ function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $m /** - * ftp_fput uploads the data from a file pointer - * to a remote file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param resource $stream An open file pointer on the local file. Reading stops at end of file. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param resource $stream + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -213,15 +178,11 @@ function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $m /** - * ftp_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -236,11 +197,9 @@ function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_fi /** - * Logs in to the given FTP connection. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $username The username (USER). - * @param string $password The password (PASS). + * @param \FTP\Connection $ftp + * @param string $username + * @param string $password * @throws FtpException * */ @@ -255,11 +214,9 @@ function ftp_login(\FTP\Connection $ftp, string $username, string $password): vo /** - * Creates the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The name of the directory that will be created. - * @return string Returns the newly created directory name on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return string * @throws FtpException * */ @@ -275,11 +232,9 @@ function ftp_mkdir(\FTP\Connection $ftp, string $directory): string /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. - * @return array Returns an array of arrays with file infos from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -295,21 +250,12 @@ function ftp_mlsd(\FTP\Connection $ftp, string $directory): array /** - * ftp_nb_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * The difference between this function and ftp_get is that - * this function retrieves the file asynchronously, so your program can perform - * other operations while the file is being downloaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -325,20 +271,12 @@ function ftp_nb_get(\FTP\Connection $ftp, string $local_filename, string $remote /** - * ftp_nb_put stores a local file on the FTP server. - * - * The difference between this function and the ftp_put - * is that this function uploads the file asynchronously, so your program can - * perform other operations while the file is being uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -354,14 +292,9 @@ function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. This parameter can also include arguments, eg. - * ftp_nlist($ftp, "-la /your/dir");. - * Note that this parameter isn't escaped so there may be some issues with - * filenames containing spaces and other characters. - * @return array Returns an array of filenames from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -377,16 +310,8 @@ function ftp_nlist(\FTP\Connection $ftp, string $directory): array /** - * ftp_pasv turns on or off passive mode. In - * passive mode, data connections are initiated by the client, - * rather than by the server. - * It may be needed if the client is behind firewall. - * - * Please note that ftp_pasv can only be called after a - * successful login or otherwise it will fail. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off. + * @param \FTP\Connection $ftp + * @param bool $enable * @throws FtpException * */ @@ -401,14 +326,11 @@ function ftp_pasv(\FTP\Connection $ftp, bool $enable): void /** - * ftp_put stores a local file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -423,10 +345,8 @@ function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_fi /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the current directory name. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ @@ -442,12 +362,9 @@ function ftp_pwd(\FTP\Connection $ftp): string /** - * ftp_rename renames a file or a directory on the FTP - * server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $from The old file/directory name. - * @param string $to The new name. + * @param \FTP\Connection $ftp + * @param string $from + * @param string $to * @throws FtpException * */ @@ -462,11 +379,8 @@ function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void /** - * Removes the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to delete. This must be either an absolute or relative - * path to an empty directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -481,16 +395,8 @@ function ftp_rmdir(\FTP\Connection $ftp, string $directory): void /** - * ftp_site sends the given SITE - * command to the FTP server. - * - * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and - * group membership. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $command The SITE command. Note that this parameter isn't escaped so there may - * be some issues with filenames containing spaces and other characters. + * @param \FTP\Connection $ftp + * @param string $command * @throws FtpException * */ @@ -505,12 +411,9 @@ function ftp_site(\FTP\Connection $ftp, string $command): void /** - * ftp_size returns the size of the given file in - * bytes. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The remote file. - * @return int Returns the file size on success. + * @param \FTP\Connection $ftp + * @param string $filename + * @return int * @throws FtpException * */ @@ -526,23 +429,10 @@ function ftp_size(\FTP\Connection $ftp, string $filename): int /** - * ftp_ssl_connect opens an explicit SSL-FTP connection to the - * specified hostname. That implies that - * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP. Only when ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail. - * The connection established by ftp_ssl_connect will not do - * peer-certificate verification. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -558,10 +448,8 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \ /** - * Returns the system type identifier of the remote FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the remote system type. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ diff --git a/generated/8.4/funchand.php b/generated/8.4/funchand.php index 2c04487a..c691f7ea 100644 --- a/generated/8.4/funchand.php +++ b/generated/8.4/funchand.php @@ -5,10 +5,7 @@ use Safe\Exceptions\FunchandException; /** - * Registers the given callback to be executed when a - * tick is called. - * - * @param callable(): void $callback The function to register. + * @param callable(): void $callback * @param mixed $args * @throws FunchandException * diff --git a/generated/8.4/gettext.php b/generated/8.4/gettext.php index 02a0ee63..8cfc1059 100644 --- a/generated/8.4/gettext.php +++ b/generated/8.4/gettext.php @@ -5,14 +5,9 @@ use Safe\Exceptions\GettextException; /** - * The bindtextdomain function sets or gets the path - * for a domain. - * - * @param string $domain The domain. - * @param null|string $directory The directory path. - * An empty string means the current directory. - * If NULL, the currently set directory is returned. - * @return string The full pathname for the domain currently being set. + * @param string $domain + * @param null|string $directory + * @return string * @throws GettextException * */ diff --git a/generated/8.4/gmp.php b/generated/8.4/gmp.php index 9017ed2c..09d70b37 100644 --- a/generated/8.4/gmp.php +++ b/generated/8.4/gmp.php @@ -5,17 +5,7 @@ use Safe\Exceptions\GmpException; /** - * - * - * @param \GMP|int|string $seed The seed to be set for the gmp_random, - * gmp_random_bits, and - * gmp_random_range functions. - * - * - * A GMP object, an integer, - * or a string that can be interpreted as a number following the same logic - * as if the string was used in gmp_init with automatic - * base detection (i.e. when base is equal to 0). + * @param \GMP|int|string $seed * */ function gmp_random_seed($seed): void diff --git a/generated/8.4/gnupg.php b/generated/8.4/gnupg.php index 83784522..0c16e88c 100644 --- a/generated/8.4/gnupg.php +++ b/generated/8.4/gnupg.php @@ -5,12 +5,9 @@ use Safe\Exceptions\GnupgException; /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -25,11 +22,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. + * @param resource $identifier + * @param string $fingerprint * @throws GnupgException * */ @@ -44,12 +38,9 @@ function gnupg_addencryptkey($identifier, string $fingerprint): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -68,10 +59,7 @@ function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -86,10 +74,7 @@ function gnupg_cleardecryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -104,10 +89,7 @@ function gnupg_clearencryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -122,12 +104,9 @@ function gnupg_clearsignkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $key The key to delete. - * @param bool $allow_secret It specifies whether to delete secret keys as well. + * @param resource $identifier + * @param string $key + * @param bool $allow_secret * @throws GnupgException * */ @@ -142,13 +121,8 @@ function gnupg_deletekey($identifier, string $key, bool $allow_secret): void /** - * Toggle the armored output. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $armor Pass a non-zero integer-value to this function to enable armored-output - * (default). - * Pass 0 to disable armored output. + * @param resource $identifier + * @param int $armor * @throws GnupgException * */ @@ -163,18 +137,8 @@ function gnupg_setarmor($identifier, int $armor): void /** - * Sets the mode for signing. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $signmode The mode for signing. - * - * signmode takes a constant indicating what type of - * signature should be produced. The possible values are - * GNUPG_SIG_MODE_NORMAL, - * GNUPG_SIG_MODE_DETACH and - * GNUPG_SIG_MODE_CLEAR. - * By default GNUPG_SIG_MODE_CLEAR is used. + * @param resource $identifier + * @param int $signmode * @throws GnupgException * */ diff --git a/generated/8.4/hash.php b/generated/8.4/hash.php index 255b05ea..b9d39c78 100644 --- a/generated/8.4/hash.php +++ b/generated/8.4/hash.php @@ -5,29 +5,12 @@ use Safe\Exceptions\HashException; /** - * - * - * @param string $algo Name of selected hashing algorithm (e.g. "sha256"). - * For a list of supported algorithms see hash_hmac_algos. - * - * - * Non-cryptographic hash functions are not allowed. - * - * - * - * Non-cryptographic hash functions are not allowed. - * @param string $key Input keying material (raw binary). Cannot be empty. - * @param int $length 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. - * @param string $info Application/context-specific info string. - * @param string $salt Salt to use during derivation. - * - * While optional, adding random salt significantly improves the strength of HKDF. - * @return false|non-falsy-string Returns a string containing a raw binary representation of the derived key - * (also known as output keying material - OKM). + * @param string $algo + * @param string $key + * @param int $length + * @param string $info + * @param string $salt + * @return false|non-falsy-string * */ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = "") @@ -39,11 +22,9 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "" /** - * - * - * @param \HashContext $context Hashing context returned by hash_init. - * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. - * @param \HashContext|null $stream_context Stream context as returned by stream_context_create. + * @param \HashContext $context + * @param string $filename + * @param \HashContext|null $stream_context * @throws HashException * */ diff --git a/generated/8.4/ibase.php b/generated/8.4/ibase.php index aca3c032..3eb08b46 100644 --- a/generated/8.4/ibase.php +++ b/generated/8.4/ibase.php @@ -5,10 +5,7 @@ use Safe\Exceptions\IbaseException; /** - * This function will discard a BLOB if it has not yet been closed by - * fbird_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -23,14 +20,12 @@ function fbird_blob_cancel($blob_handle): void /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the new database user. - * @param string $password The password of the new user. - * @param string $first_name The first name of the new database user. - * @param string $middle_name The middle name of the new database user. - * @param string $last_name The last name of the new database user. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -53,29 +48,12 @@ function ibase_add_user($service_handle, string $user_name, string $password, ?s /** - * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. - * @param string $dest_file The path to the backup file on the database server. - * @param int $options Additional options to pass to the database server for backup. - * The options parameter can be a combination - * of the following constants: - * IBASE_BKP_IGNORE_CHECKSUMS, - * IBASE_BKP_IGNORE_LIMBO, - * IBASE_BKP_METADATA_ONLY, - * IBASE_BKP_NO_GARBAGE_COLLECT, - * IBASE_BKP_OLD_DESCRIPTIONS, - * IBASE_BKP_NON_TRANSPORTABLE or - * IBASE_BKP_CONVERT. - * Read the section about for further information. - * @param bool $verbose Since the backup process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the backup process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_db + * @param string $dest_file + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -91,10 +69,7 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int /** - * This function will discard a BLOB if it has not yet been closed by - * ibase_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -109,13 +84,8 @@ function ibase_blob_cancel($blob_handle): void /** - * ibase_blob_create creates a new BLOB for filling with - * data. - * - * @param null|resource $link_identifier An InterBase link identifier. If omitted, the last opened link is - * assumed. - * @return resource Returns a BLOB handle for later use with - * ibase_blob_add. + * @param null|resource $link_identifier + * @return resource * @throws IbaseException * */ @@ -135,12 +105,9 @@ function ibase_blob_create($link_identifier = null) /** - * This function returns at most len bytes from a BLOB - * that has been opened for reading by ibase_blob_open. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. - * @param int $len Size of returned data. - * @return string Returns at most len bytes from the BLOB. + * @param resource $blob_handle + * @param int $len + * @return string * @throws IbaseException * */ @@ -156,14 +123,7 @@ function ibase_blob_get($blob_handle, int $len): string /** - * Closes the link to an InterBase database that's associated with - * a connection id returned from ibase_connect. - * Default transaction on link is committed, other transactions are - * rolled back. - * - * @param null|resource $connection_id An InterBase link identifier returned from - * ibase_connect. If omitted, the last opened link - * is assumed. + * @param null|resource $connection_id * @throws IbaseException * */ @@ -182,15 +142,7 @@ function ibase_close($connection_id = null): void /** - * Commits a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -209,13 +161,7 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** - * Commits a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -234,35 +180,15 @@ function ibase_commit($link_or_trans_identifier = null): void /** - * Establishes a connection to an Firebird/InterBase server. - * - * In case a second call is made to ibase_connect with - * the same arguments, no new link will be established, but instead, the link - * identifier of the already opened link will be returned. The link to the - * server will be closed as soon as the execution of the script ends, unless - * it's closed earlier by explicitly calling ibase_close. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' - * (TCP/IP with interbase server on custom TCP port), '//hostname/' - * (NetBEUI), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an Firebird/InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -296,10 +222,8 @@ function ibase_connect(?string $database = null, ?string $username = null, ?stri /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the user you want to delete from the database. + * @param resource $service_handle + * @param string $user_name * @throws IbaseException * */ @@ -314,11 +238,7 @@ function ibase_delete_user($service_handle, string $user_name): void /** - * This functions drops a database that was opened by either ibase_connect - * or ibase_pconnect. The database is closed and deleted from the server. - * - * @param null|resource $connection An InterBase link identifier. If omitted, the last opened link is - * assumed. + * @param null|resource $connection * @throws IbaseException * */ @@ -337,12 +257,7 @@ function ibase_drop_db($connection = null): void /** - * This function causes the registered event handler specified by - * event to be cancelled. The callback function will - * no longer be called for the events it was registered to handle. - * - * @param resource $event An event resource, created by - * ibase_set_event_handler. + * @param resource $event * @throws IbaseException * */ @@ -357,9 +272,7 @@ function ibase_free_event_handler($event): void /** - * Frees a prepared query. - * - * @param resource $query A query prepared with ibase_prepare. + * @param resource $query * @throws IbaseException * */ @@ -374,10 +287,7 @@ function ibase_free_query($query): void /** - * Frees a result set. - * - * @param resource $result_identifier A result set created by ibase_query or - * ibase_execute. + * @param resource $result_identifier * @throws IbaseException * */ @@ -392,8 +302,6 @@ function ibase_free_result($result_identifier): void /** - * - * * @param resource $service_handle * @param string $db * @param int $action @@ -412,14 +320,12 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the database user to modify. - * @param string $password The user's new password. - * @param string $first_name The user's new first name. - * @param string $middle_name The user's new middle name. - * @param string $last_name The user's new last name. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -442,11 +348,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** - * This function assigns a name to a result set. This name can be used later in - * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * - * @param resource $result An InterBase result set. - * @param string $name The name to be assigned. + * @param resource $result + * @param string $name * @throws IbaseException * */ @@ -461,42 +364,15 @@ function ibase_name_result($result, string $name): void /** - * Opens a persistent connection to an InterBase database. - * - * ibase_pconnect acts very much like - * ibase_connect with two major differences. - * - * First, when connecting, the function will first try to find a (persistent) - * link that's already opened with the same parameters. If one is found, an - * identifier for it will be returned instead of opening a new connection. - * - * Second, the connection to the InterBase server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (ibase_close will not close links - * established by ibase_pconnect). This type of link is - * therefore called 'persistent'. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' - * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. Functional only with InterBase 6 - * and up. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -530,32 +406,12 @@ function ibase_pconnect(?string $database = null, ?string $username = null, ?str /** - * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_file The absolute path on the server where the backup file is located. - * @param string $dest_db The path to create the new database on the server. You can also use database alias. - * @param int $options Additional options to pass to the database server for restore. - * The options parameter can be a combination - * of the following constants: - * IBASE_RES_DEACTIVATE_IDX, - * IBASE_RES_NO_SHADOW, - * IBASE_RES_NO_VALIDITY, - * IBASE_RES_ONE_AT_A_TIME, - * IBASE_RES_REPLACE, - * IBASE_RES_CREATE, - * IBASE_RES_USE_ALL_SPACE, - * IBASE_PRP_PAGE_BUFFERS, - * IBASE_PRP_SWEEP_INTERVAL, - * IBASE_RES_CREATE. - * Read the section about for further information. - * @param bool $verbose Since the restore process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the restore process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_file + * @param string $dest_db + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -571,15 +427,7 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in /** - * Rolls back a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -598,13 +446,7 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** - * Rolls back a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -623,13 +465,10 @@ function ibase_rollback($link_or_trans_identifier = null): void /** - * - * - * @param string $host The name or ip address of the database host. You can define the port by adding - * '/' and port number. If no port is specified, port 3050 will be used. - * @param string $dba_username The name of any valid user. - * @param string $dba_password The user's password. - * @return resource Returns a Interbase / Firebird link identifier on success. + * @param string $host + * @param string $dba_username + * @param string $dba_password + * @return resource * @throws IbaseException * */ @@ -645,9 +484,7 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa /** - * - * - * @param resource $service_handle A previously created connection to the database server. + * @param resource $service_handle * @throws IbaseException * */ diff --git a/generated/8.4/ibmDb2.php b/generated/8.4/ibmDb2.php index e17bb2d4..791865ae 100644 --- a/generated/8.4/ibmDb2.php +++ b/generated/8.4/ibmDb2.php @@ -5,45 +5,9 @@ use Safe\Exceptions\IbmDb2Exception; /** - * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. - * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value One of the following constants: - * - * - * DB2_AUTOCOMMIT_OFF - * - * - * Turns AUTOCOMMIT off. - * - * - * - * - * DB2_AUTOCOMMIT_ON - * - * - * Turns AUTOCOMMIT on. - * - * - * - * - * - * Turns AUTOCOMMIT off. - * - * Turns AUTOCOMMIT on. - * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool When 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 - * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, - * while a value of DB2_AUTOCOMMIT_ON indicates that - * AUTOCOMMIT is on. - * - * When db2_autocommit receives both the - * connection parameter and - * autocommit parameter, it attempts to set the - * AUTOCOMMIT state of the requested connection to the corresponding state. - * Returns TRUE on success. + * @param resource $connection + * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value + * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool * @throws IbmDb2Exception * */ @@ -63,37 +27,13 @@ function db2_autocommit($connection, $value = null) /** - * Binds a PHP variable to an SQL statement parameter in a statement resource - * returned by db2_prepare. This function gives you more - * control over the parameter type, data type, precision, and scale for the - * parameter than simply passing the variable as part of the optional input - * array to db2_execute. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared - * statement. - * @param string $variable_name A string specifying the name of the PHP variable to bind to the - * parameter specified by parameter_number. - * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the - * SQL parameter as an input parameter (DB2_PARAM_IN), - * an output parameter (DB2_PARAM_OUT), or as a - * parameter that accepts input and returns output - * (DB2_PARAM_INOUT). To avoid memory overhead, you can - * also specify DB2_PARAM_FILE to bind the PHP variable - * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) - * data. - * @param int $data_type A constant specifying the SQL data type that the PHP variable should be - * bound as: one of DB2_BINARY, - * DB2_CHAR, DB2_DOUBLE, or - * DB2_LONG . - * @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 - * output value from the stored procedure. - * @param int $scale Specifies the scale with which the variable should be bound to the - * database. + * @param resource $stmt + * @param int $parameter_number + * @param string $variable_name + * @param int $parameter_type + * @param int $data_type + * @param int $precision + * @param int $scale * @throws IbmDb2Exception * */ @@ -108,111 +48,8 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int /** - * This function returns an object with read-only properties that return - * information about the DB2 database client. The following table lists - * the DB2 client properties: - * - * DB2 client properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * APPL_CODEPAGE - * int - * The application code page. - * - * - * CONN_CODEPAGE - * int - * The code page for the current connection. - * - * - * DATA_SOURCE_NAME - * string - * The data source name (DSN) used to create the current connection - * to the database. - * - * - * DRIVER_NAME - * string - * The name of the library that implements the DB2 Call - * Level Interface (CLI) specification. - * - * - * DRIVER_ODBC_VER - * string - * The version of ODBC that the DB2 client supports. This returns a - * string "MM.mm" where MM is the major version and - * mm is the minor version. The DB2 client always - * returns "03.51". - * - * - * - * DRIVER_VER - * string - * The version of the client, in the form of a string "MM.mm.uuuu" where - * MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * ODBC_SQL_CONFORMANCE - * string - * - * The level of ODBC SQL grammar supported by the client: - * - * - * MINIMUM - * - * - * Supports the minimum ODBC SQL grammar. - * - * - * - * - * CORE - * - * - * Supports the core ODBC SQL grammar. - * - * - * - * - * EXTENDED - * - * - * Supports extended ODBC SQL grammar. - * - * - * - * - * - * - * - * - * ODBC_VER - * string - * The version of ODBC that the ODBC driver manager supports. This - * returns a string "MM.mm.rrrr" where MM is the major - * version, mm is the minor version, and - * rrrr is the release. The DB2 client always returns - * "03.01.0000". - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -228,15 +65,7 @@ function db2_client_info($connection): \stdClass /** - * This function closes a DB2 client connection created with - * db2_connect and returns the corresponding - * resources to the database server. - * - * If you attempt to close a persistent DB2 client connection created with - * db2_pconnect, the close request is ignored and the - * persistent DB2 client connection remains available for the next caller. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -251,13 +80,7 @@ function db2_close($connection): void /** - * Commits an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_commit is not necessary unless AUTOCOMMIT - * has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -272,26 +95,8 @@ function db2_commit($connection): void /** - * db2_execute executes an SQL statement that was - * prepared by db2_prepare. - * - * If the SQL statement returns a result set, for example, a SELECT statement - * or a CALL to a stored procedure that returns one or more result sets, you - * can retrieve a row as an array from the stmt resource - * using db2_fetch_assoc, - * db2_fetch_both, or - * db2_fetch_array. Alternatively, you can use - * db2_fetch_row to move the result set pointer to the - * next row and fetch a column at a time from that row with - * db2_result. - * - * Refer to db2_prepare for a brief discussion of the - * advantages of using db2_prepare and - * db2_execute rather than db2_exec. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param array $parameters An array of input parameters matching any parameter markers contained - * in the prepared statement. + * @param resource $stmt + * @param array $parameters * @throws IbmDb2Exception * */ @@ -306,12 +111,7 @@ function db2_execute($stmt, array $parameters = []): void /** - * Frees the system and database resources that are associated with a result - * set. These resources are freed implicitly when a script finishes, but you - * can call db2_free_result to explicitly free the result - * set resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -326,12 +126,7 @@ function db2_free_result($stmt): void /** - * Frees the system and database resources that are associated with a statement - * resource. These resources are freed implicitly when a script finishes, but - * you can call db2_free_stmt to explicitly free the - * statement resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -346,152 +141,9 @@ function db2_free_stmt($stmt): void /** - * Retrieves the value of a specified option value for a statement resource - * or a connection resource. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * 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 - * that can be set during execution with db2_get_option. - * - * - * 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 - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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 - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success. + * @param resource $resource + * @param string $option + * @return string * @throws IbmDb2Exception * */ @@ -507,23 +159,8 @@ function db2_get_option($resource, string $option): string /** - * Returns the number of rows deleted, inserted, or updated by an SQL - * statement. - * - * To determine the number of rows that will be returned by a SELECT - * statement, issue SELECT COUNT(*) with the same predicates as your - * intended SELECT statement and retrieve the value. - * - * If your application logic checks the number of rows returned by a SELECT - * statement and branches if the number of rows is 0, consider modifying your - * application to attempt to return the first row with one of - * db2_fetch_assoc, db2_fetch_both, - * db2_fetch_array, or db2_fetch_row, - * and branch if the fetch function returns FALSE. - * - * @param resource $stmt A valid stmt resource containing a result set. - * @return 0|positive-int Returns the number of rows affected by the last SQL statement issued by - * the specified statement handle + * @param resource $stmt + * @return 0|positive-int * @throws IbmDb2Exception * */ @@ -539,24 +176,7 @@ function db2_num_rows($stmt): int /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system - * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for - * a long period of time. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -571,13 +191,7 @@ function db2_pclose($connection): void /** - * Rolls back an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_rollback normally has no effect unless - * AUTOCOMMIT has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -592,253 +206,8 @@ function db2_rollback($connection): void /** - * This function returns an object with read-only properties that return - * information about the IBM DB2, Cloudscape, or Apache Derby database server. - * The following table lists the database server properties: - * - * Database server properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * DBMS_NAME - * string - * The name of the database server to which you are - * connected. For DB2 servers this is a combination of - * DB2 followed by the operating system on which - * the database server is running. - * - * - * DBMS_VER - * string - * The version of the database server, in the form of a string - * "MM.mm.uuuu" where MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * DB_CODEPAGE - * int - * The code page of the database to which you are connected. - * - * - * DB_NAME - * string - * The name of the database to which you are connected. - * - * - * DFT_ISOLATION - * string - * - * The default transaction isolation level supported by the - * server: - * - * - * UR - * - * - * Uncommitted read: changes are immediately visible by all - * concurrent transactions. - * - * - * - * - * CS - * - * - * Cursor stability: a row read by one transaction can be altered and - * committed by a second concurrent transaction. - * - * - * - * - * RS - * - * - * Read stability: a transaction can add or remove rows matching a - * search condition or a pending transaction. - * - * - * - * - * RR - * - * - * Repeatable read: data affected by pending transaction is not - * available to other transactions. - * - * - * - * - * NC - * - * - * No commit: any changes are visible at the end of a successful - * operation. Explicit commits and rollbacks are not allowed. - * - * - * - * - * - * - * - * - * IDENTIFIER_QUOTE_CHAR - * string - * The character used to delimit an identifier. - * - * - * INST_NAME - * string - * The instance on the database server that contains the - * database. - * - * - * ISOLATION_OPTION - * array - * An array of the isolation options supported by the - * database server. The isolation options are described in - * the DFT_ISOLATION property. - * - * - * KEYWORDS - * array - * An array of the keywords reserved by the database - * server. - * - * - * LIKE_ESCAPE_CLAUSE - * bool - * TRUE if the database server supports the - * use of % and _ wildcard - * characters. FALSE if the database server does not - * support these wildcard characters. - * - * - * MAX_COL_NAME_LEN - * int - * Maximum length of a column name supported by the database - * server, expressed in bytes. - * - * - * MAX_IDENTIFIER_LEN - * int - * Maximum length of an SQL identifier supported by the database - * server, expressed in characters. - * - * - * MAX_INDEX_SIZE - * int - * Maximum size of columns combined in an index supported by the - * database server, expressed in bytes. - * - * - * MAX_PROC_NAME_LEN - * int - * Maximum length of a procedure name supported by the database - * server, expressed in bytes. - * - * - * MAX_ROW_SIZE - * int - * Maximum length of a row in a base table supported by the - * database server, expressed in bytes. - * - * - * MAX_SCHEMA_NAME_LEN - * int - * Maximum length of a schema name supported by the database - * server, expressed in bytes. - * - * - * MAX_STATEMENT_LEN - * int - * Maximum length of an SQL statement supported by the database - * server, expressed in bytes. - * - * - * MAX_TABLE_NAME_LEN - * int - * Maximum length of a table name supported by the database - * server, expressed in bytes. - * - * - * NON_NULLABLE_COLUMNS - * bool - * TRUE if the database server supports columns that can be - * defined as NOT NULL, FALSE if the database server does not support - * columns defined as NOT NULL. - * - * - * PROCEDURES - * bool - * TRUE if the database server supports the use of the CALL - * statement to call stored procedures, FALSE if the database - * server does not support the CALL statement. - * - * - * SPECIAL_CHARS - * string - * A string containing all of the characters other than - * a-Z, 0-9, and underscore that can be used in an identifier name. - * - * - * SQL_CONFORMANCE - * string - * - * The level of conformance to the ANSI/ISO SQL-92 specification - * offered by the database server: - * - * - * ENTRY - * - * - * Entry-level SQL-92 compliance. - * - * - * - * - * FIPS127 - * - * - * FIPS-127-2 transitional compliance. - * - * - * - * - * FULL - * - * - * Full level SQL-92 compliance. - * - * - * - * - * INTERMEDIATE - * - * - * Intermediate level SQL-92 compliance. - * - * - * - * - * - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -854,379 +223,9 @@ function db2_server_info($connection): \stdClass /** - * Sets options for a statement resource or a connection resource. You - * cannot set options for result set resources. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * db2_pconnect. - * @param array $options An associative array containing valid statement or connection - * options. This parameter can be used to change autocommit values, - * cursor types (scrollable or forward), and to specify the case of - * the column names (lower, upper, or natural) that will appear in a - * result set. - * - * - * autocommit - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * - * - * - * cursor - * - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * - * - * - * binmode - * - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * - * - * - * db2_attr_case - * - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * - * - * - * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * - * - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 - * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * - * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * - * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * - * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * - * - * - * trusted_password - * - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during - * execution with db2_get_option. - * - * - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @param int $type Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. + * @param resource $resource + * @param array $options + * @param int $type * @throws IbmDb2Exception * */ diff --git a/generated/8.4/iconv.php b/generated/8.4/iconv.php index a4f8cd16..0df05789 100644 --- a/generated/8.4/iconv.php +++ b/generated/8.4/iconv.php @@ -5,21 +5,8 @@ use Safe\Exceptions\IconvException; /** - * Retrieve internal configuration variables of iconv extension. - * - * @param string $type The value of the optional type can be: - * - * all - * input_encoding - * output_encoding - * internal_encoding - * - * @return mixed Returns the current value of the internal configuration variable if - * successful. - * - * If type is omitted or set to "all", - * iconv_get_encoding returns an array that - * stores all these variables. + * @param string $type + * @return mixed * @throws IconvException * */ @@ -35,53 +22,10 @@ function iconv_get_encoding(string $type = "all") /** - * Decodes a MIME header field. - * - * @param string $string The encoded header, as a string. - * @param int $mode mode determines the behaviour in the event - * iconv_mime_decode encounters a malformed - * MIME header field. You can specify any combination - * of the following bitmasks. - * - * Bitmasks acceptable to iconv_mime_decode - * - * - * - * Value - * Constant - * Description - * - * - * - * - * 1 - * ICONV_MIME_DECODE_STRICT - * - * If set, the given header is decoded in full conformance with the - * standards defined in RFC2047. - * This option is disabled by default because there are a lot of - * broken mail user agents that don't follow the specification and don't - * produce correct MIME headers. - * - * - * - * 2 - * ICONV_MIME_DECODE_CONTINUE_ON_ERROR - * - * If set, iconv_mime_decode_headers - * attempts to ignore any grammatical errors and continue to process - * a given header. - * - * - * - * - * - * @param null|string $encoding The optional encoding parameter specifies the - * character set to represent the result by. If omitted or NULL, - * iconv.internal_encoding - * will be used. - * @return string Returns a decoded MIME field on success, - * or FALSE if an error occurs during the decoding. + * @param string $string + * @param int $mode + * @param null|string $encoding + * @return string * @throws IconvException * */ @@ -101,108 +45,10 @@ function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = nu /** - * Composes and returns a string that represents a valid MIME - * header field, which looks like the following: - * - * - * - * In the above example, "Subject" is the field name and the portion that - * begins with "=?ISO-8859-1?..." is the field value. - * - * @param string $field_name The field name. - * @param string $field_value The field value. - * @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 options. - * The items supported by iconv_mime_encode are - * listed below. Note that item names are treated case-sensitive. - * - * Configuration items supported by iconv_mime_encode - * - * - * - * Item - * Type - * Description - * Default value - * Example - * - * - * - * - * scheme - * string - * - * Specifies the method to encode a field value by. The value of - * this item may be either "B" or "Q", where "B" stands for - * base64 encoding scheme and "Q" stands for - * quoted-printable encoding scheme. - * - * B - * B - * - * - * input-charset - * string - * - * Specifies the character set in which the first parameter - * field_name and the second parameter - * field_value are presented. If not given, - * iconv_mime_encode assumes those parameters - * are presented to it in the - * iconv.internal_encoding - * ini setting. - * - * - * iconv.internal_encoding - * - * ISO-8859-1 - * - * - * output-charset - * string - * - * Specifies the character set to use to compose the - * MIME header. - * - * - * iconv.internal_encoding - * - * UTF-8 - * - * - * line-length - * int - * - * Specifies the maximum length of the header lines. The resulting - * header is "folded" to a set of multiple lines in case - * the resulting header field would be longer than the value of this - * parameter, according to - * RFC2822 - Internet Message Format. - * If not given, the length will be limited to 76 characters. - * - * 76 - * 996 - * - * - * line-break-chars - * string - * - * Specifies the sequence of characters to append to each line - * as an end-of-line sign when "folding" is performed on a long header - * field. If not given, this defaults to "\r\n" - * (CR LF). Note that - * this parameter is always treated as an ASCII string regardless - * of the value of input-charset. - * - * \r\n - * \n - * - * - * - * - * @return string Returns an encoded MIME field on success, - * or FALSE if an error occurs during the encoding. + * @param string $field_name + * @param string $field_value + * @param array $options + * @return string * @throws IconvException * */ @@ -218,16 +64,8 @@ function iconv_mime_encode(string $field_name, string $field_value, array $optio /** - * Changes the value of the internal configuration variable specified by - * type to encoding. - * - * @param string $type The value of type can be any one of these: - * - * input_encoding - * output_encoding - * internal_encoding - * - * @param string $encoding The character set. + * @param string $type + * @param string $encoding * @throws IconvException * */ @@ -242,18 +80,9 @@ function iconv_set_encoding(string $type, string $encoding): void /** - * In contrast to strlen, - * iconv_strlen counts the occurrences of characters - * in the given byte sequence string on the basis of - * the specified character set, the result of which is not necessarily - * identical to the length of the string in bytes. - * - * @param string $string The string. - * @param null|string $encoding If encoding parameter is omitted or NULL, - * string is assumed to be encoded in - * iconv.internal_encoding. - * @return 0|positive-int Returns the character count of string, as an integer, - * or FALSE if an error occurs during the encoding. + * @param string $string + * @param null|string $encoding + * @return 0|positive-int * @throws IconvException * */ @@ -273,28 +102,10 @@ function iconv_strlen(string $string, ?string $encoding = null): int /** - * Converts string from from_encoding - * to to_encoding. - * - * @param string $from_encoding The current encoding used to interpret string. - * @param string $to_encoding The desired encoding of the result. - * - * If the string //TRANSLIT is appended to - * to_encoding, then transliteration is activated. This - * means that when a character can't be represented in the target charset, - * it may be approximated through one or several similarly looking - * characters. If the string //IGNORE is appended, - * characters that cannot be represented in the target charset are silently - * discarded. Otherwise, E_NOTICE is generated and the function - * will return FALSE. - * - * If and how //TRANSLIT works exactly depends on the - * system's iconv() implementation (cf. ICONV_IMPL). - * Some implementations are known to ignore //TRANSLIT, - * so the conversion is likely to fail for characters which are illegal for - * the to_encoding. - * @param string $string The string to be converted. - * @return string Returns the converted string. + * @param string $from_encoding + * @param string $to_encoding + * @param string $string + * @return string * @throws IconvException * */ diff --git a/generated/8.4/image.php b/generated/8.4/image.php index f6bf97bb..be37705b 100644 --- a/generated/8.4/image.php +++ b/generated/8.4/image.php @@ -5,64 +5,9 @@ use Safe\Exceptions\ImageException; /** - * The getimagesize function will determine the - * size of any supported given image file and return the dimensions along with - * the file type and a height/width text string to be used inside a - * normal HTML IMG tag and the - * correspondent HTTP content type. - * - * getimagesize can also return some more information - * in image_info parameter. - * - * @param string $filename This parameter specifies the file you wish to retrieve information - * about. It can reference a local file or (configuration permitting) a - * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended - * information from the image file. Currently, this will return the - * different JPG APP markers as an associative array. - * Some programs use these APP markers to embed text information in - * images. A very common one is to embed - * IPTC information in the APP13 marker. - * You can use the iptcparse function to parse the - * binary APP13 marker into something readable. - * - * The image_info only supports - * JFIF files. - * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null Returns an array with up to 7 elements. Not all image types will include - * the channels and bits elements. - * - * Index 0 and 1 contains respectively the width and the height of the image. - * - * Index 2 is one of the IMAGETYPE_* constants indicating - * the type of the image. - * - * Index 3 is a text string with the correct - * height="yyy" width="xxx" string that can be used - * directly in an IMG tag. - * - * mime is the correspondant MIME type of the image. - * This information can be used to deliver images with the correct HTTP - * Content-type header: - * - * getimagesize and MIME types - * - * - * ]]> - * - * - * - * channels will be 3 for RGB pictures and 4 for CMYK - * pictures. - * - * bits is the number of bits for each color. - * - * For some image types, the presence of channels and - * bits values can be a bit - * confusing. As an example, GIF always uses 3 channels - * per pixel, but the number of bits per pixel cannot be calculated for an - * animated GIF with a global color table. - * - * On failure, FALSE is returned. + * @param string $filename + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null * @throws ImageException * */ @@ -78,12 +23,9 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array /** - * Returns the extension for the given IMAGETYPE_* - * constant. - * - * @param int $image_type One of the IMAGETYPE_* constant. - * @param bool $include_dot Whether to prepend a dot to the extension or not. Default to TRUE. - * @return string A string with the extension corresponding to the given image type. + * @param int $image_type + * @param bool $include_dot + * @return string * @throws ImageException * */ @@ -99,13 +41,10 @@ function image_type_to_extension(int $image_type, bool $include_dot = true): str /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array|null $clip Array with keys "x", "y", "width" and "height"; or NULL. - * @return \GdImage Return affined image object on success. + * @param \GdImage $image + * @param array $affine + * @param array|null $clip + * @return \GdImage * @throws ImageException * */ @@ -125,16 +64,9 @@ function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdIm /** - * Returns the concatenation of two affine transformation matrices, - * what is useful if multiple transformations should be applied to the same - * image in one go. - * - * @param array $matrix1 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param array $matrix1 + * @param array $matrix2 + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -150,19 +82,9 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array /** - * Returns an affine transformation matrix. - * - * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE - * or IMG_AFFINE_SCALE, - * options has to be an array with keys x - * and y, both having float values. - * - * If type is IMG_AFFINE_ROTATE, - * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, - * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param int $type + * @param array|float $options + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -178,21 +100,8 @@ function imageaffinematrixget(int $type, $options): array /** - * imagealphablending allows for two different - * modes of drawing on truecolor images. In blending mode, the - * alpha channel component of the color supplied to all drawing function, - * such as imagesetpixel determines how much of the - * underlying color should be allowed to shine through. As a result, gd - * automatically blends the existing color at that point with the drawing color, - * and stores the result in the image. The resulting pixel is opaque. In - * non-blending mode, the drawing color is copied literally with its alpha channel - * information, replacing the destination pixel. Blending mode is not available - * when drawing on palette images. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable the blending mode or not. On true color images - * the default value is TRUE otherwise the default value is FALSE + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -207,20 +116,8 @@ function imagealphablending(\GdImage $image, bool $enable): void /** - * Activate the fast drawing antialiased methods for lines and wired polygons. - * It does not support alpha components. It works using a direct blend - * operation. It works only with truecolor images. - * - * Thickness and styled are not supported. - * - * Using antialiased primitives with transparent background color can end with - * some unexpected results. The blend method uses the background color as any - * other colors. The lack of alpha component support does not allow an alpha - * based antialiasing method. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable antialiasing or not. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -235,20 +132,14 @@ function imageantialias(\GdImage $image, bool $enable): void /** - * imagearc draws an arc of circle centered at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color * @throws ImageException * */ @@ -263,17 +154,10 @@ function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int /** - * Outputs or saves a AVIF Raster image from the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) - * to 100 (best quality, larger file). - * If -1 is provided, the default value 30 is used. - * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) - * to 10 (fast, larger file). - * If -1 is provided, the default value 6 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $speed * @throws ImageException * */ @@ -296,15 +180,9 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed /** - * Outputs or saves a BMP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the compressed arguments is - * not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @param \GdImage $image + * @param null|resource|string $file + * @param bool $compressed * @throws ImageException * */ @@ -325,21 +203,12 @@ function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void /** - * imagechar draws the first character of - * char in the image identified by - * image with its upper-left at - * x,y (top left is 0, - * 0) with the color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -354,18 +223,12 @@ function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int /** - * Draws the character char vertically at the specified - * coordinate on the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -380,19 +243,10 @@ function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, i /** - * Returns the index of the color of the pixel at the - * specified location in the image specified by image. - * - * If the image is a - * truecolor image, this function returns the RGB value of that pixel as - * integer. Use bitshifting and masking to access the distinct red, green and blue - * component values: - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of the point. - * @param int $y y-coordinate of the point. - * @return int Returns the index of the color. + * @param \GdImage $image + * @param int $x + * @param int $y + * @return int * @throws ImageException * */ @@ -408,13 +262,8 @@ function imagecolorat(\GdImage $image, int $x, int $y): int /** - * De-allocates a color previously allocated with - * imagecolorallocate or - * imagecolorallocatealpha. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color identifier. + * @param \GdImage $image + * @param int $color * @throws ImageException * */ @@ -429,11 +278,8 @@ function imagecolordeallocate(\GdImage $image, int $color): void /** - * Makes the colors of the palette version of an image more closely match the true color version. - * - * @param \GdImage $image1 A truecolor image object. - * @param \GdImage $image2 A palette image object pointing to an image that has the same - * size as image1. + * @param \GdImage $image1 + * @param \GdImage $image2 * @throws ImageException * */ @@ -448,18 +294,12 @@ function imagecolormatch(\GdImage $image1, \GdImage $image2): void /** - * This sets the specified index in the palette to the specified - * color. This is useful for creating flood-fill-like effects in - * palleted images without the overhead of performing the actual - * flood-fill. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color An index in the palette. - * @param int $red Value of red component. - * @param int $green Value of green component. - * @param int $blue Value of blue component. - * @param int $alpha Value of alpha component. + * @param \GdImage $image + * @param int $color + * @param int $red + * @param int $green + * @param int $blue + * @param int $alpha * @throws ImageException * */ @@ -474,13 +314,9 @@ function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $b /** - * Gets the color for a specified index. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color index. - * @return array{red: int, green: int, blue: int, alpha: int} Returns an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index. + * @param \GdImage $image + * @param int $color + * @return array{red: int, green: int, blue: int, alpha: int} * */ function imagecolorsforindex(\GdImage $image, int $color): array @@ -492,14 +328,10 @@ function imagecolorsforindex(\GdImage $image, int $color): array /** - * Applies a convolution matrix on the image, using the given coefficient and - * offset. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. - * @param float $divisor The divisor of the result of the convolution, used for normalization. - * @param float $offset Color offset. + * @param \GdImage $image + * @param array $matrix + * @param float $divisor + * @param float $offset * @throws ImageException * */ @@ -514,22 +346,14 @@ function imageconvolution(\GdImage $image, array $matrix, float $divisor, float /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -544,28 +368,15 @@ function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $ds /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, except for - * ignoring alpha components, while it implements alpha transparency - * for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -580,32 +391,15 @@ function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, in /** - * imagecopymergegray copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * This function is identical to imagecopymerge except - * that when merging it preserves the hue of the source by converting - * the destination pixels to gray scale before the copy operation. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The src_image will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, except for - * ignoring alpha components, while - * it implements alpha transparency for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -620,37 +414,16 @@ function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresampled copies a rectangular - * portion of one image to another image, smoothly interpolating pixel - * values so that, in particular, reducing the size of an image still - * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -665,37 +438,16 @@ function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresized copies a rectangular - * portion of one image to another image. - * dst_image is the destination image, - * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -710,20 +462,9 @@ function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, /** - * imagecreate returns an image identifier - * representing a blank image of specified size. - * - * In general, we recommend the use of - * imagecreatetruecolor instead of - * imagecreate so that image processing occurs on the - * highest quality image possible. If you want to output a palette image, then - * imagetruecolortopalette should be called immediately - * before saving the image with imagepng or - * imagegif. - * - * @param int $width The image width. - * @param int $height The image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -739,11 +480,8 @@ function imagecreate(int $width, int $height): \GdImage /** - * imagecreatefromavif returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the AVIF raster image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -759,11 +497,8 @@ function imagecreatefromavif(string $filename): \GdImage /** - * imagecreatefrombmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the BMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -779,10 +514,8 @@ function imagecreatefrombmp(string $filename): \GdImage /** - * Create a new image from GD file or URL. - * - * @param string $filename Path to the GD file. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -798,10 +531,8 @@ function imagecreatefromgd(string $filename): \GdImage /** - * Create a new image from GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -817,14 +548,12 @@ function imagecreatefromgd2(string $filename): \GdImage /** - * Create a new image from a given part of GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @param int $x x-coordinate of source point. - * @param int $y y-coordinate of source point. - * @param int $width Source width. - * @param int $height Source height. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -840,11 +569,8 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in /** - * imagecreatefromgif returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the GIF image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -860,11 +586,8 @@ function imagecreatefromgif(string $filename): \GdImage /** - * imagecreatefromjpeg returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the JPEG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -880,11 +603,8 @@ function imagecreatefromjpeg(string $filename): \GdImage /** - * imagecreatefrompng returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the PNG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -900,15 +620,8 @@ function imagecreatefrompng(string $filename): \GdImage /** - * imagecreatefromstring returns an image identifier - * representing the image obtained from the given data. - * These types will be automatically detected if your build of PHP supports - * them: JPEG, PNG, GIF, BMP, WBMP, GD2, WEBP and AVIF. - * - * @param string $data A string containing the image data. - * @return \GdImage An image object will be returned on success. FALSE is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. + * @param string $data + * @return \GdImage * @throws ImageException * */ @@ -924,11 +637,8 @@ function imagecreatefromstring(string $data): \GdImage /** - * imagecreatefromtga returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the Truevision TGA image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -944,11 +654,8 @@ function imagecreatefromtga(string $filename): \GdImage /** - * imagecreatefromwbmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WBMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -964,12 +671,8 @@ function imagecreatefromwbmp(string $filename): \GdImage /** - * imagecreatefromwebp returns an image identifier - * representing the image obtained from the given filename. - * Note that animated WebP files cannot be read. - * - * @param string $filename Path to the WebP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -985,11 +688,8 @@ function imagecreatefromwebp(string $filename): \GdImage /** - * imagecreatefromxbm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XBM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1005,11 +705,8 @@ function imagecreatefromxbm(string $filename): \GdImage /** - * imagecreatefromxpm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XPM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1025,12 +722,9 @@ function imagecreatefromxpm(string $filename): \GdImage /** - * imagecreatetruecolor returns an image object - * representing a black image of the specified size. - * - * @param int $width Image width. - * @param int $height Image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -1046,15 +740,9 @@ function imagecreatetruecolor(int $width, int $height): \GdImage /** - * Crops an image to the given rectangular area and returns the resulting image. - * The given image is not modified. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys - * x, y, width and - * height. - * @return \GdImage Return cropped image object on success. + * @param \GdImage $image + * @param array $rectangle + * @return \GdImage * @throws ImageException * */ @@ -1070,18 +758,11 @@ function imagecrop(\GdImage $image, array $rectangle): \GdImage /** - * Automatically crops an image according to the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode One of the following constants: - * @param float $threshold Same as IMG_CROP_TRANSPARENT. - * Before PHP 7.4.0, the bundled libgd fell back to IMG_CROP_SIDES, - * if the image had no transparent color. - * @param int $color Crops out a transparent background. - * @return \GdImage Returns a cropped image object on success. - * FALSE is also returned if the whole image was cropped. + * @param \GdImage $image + * @param int $mode + * @param float $threshold + * @param int $color + * @return \GdImage * @throws ImageException * */ @@ -1097,17 +778,12 @@ function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $thr /** - * This function is deprecated. Use combination of - * imagesetstyle and imageline - * instead. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1122,11 +798,7 @@ function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, in /** - * Prior to PHP 8.0.0, imagedestroy freed any memory associated - * with image image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. + * @param \GdImage $image * @throws ImageException * */ @@ -1141,15 +813,12 @@ function imagedestroy(\GdImage $image): void /** - * Draws an ellipse centered at the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1164,15 +833,10 @@ function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, /** - * Performs a flood fill starting at the given coordinate (top left is 0, 0) - * with the given color in the - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start point. - * @param int $y y-coordinate of start point. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -1187,36 +851,15 @@ function imagefill(\GdImage $image, int $x, int $y, int $color): void /** - * Draws a partial arc centered at the specified coordinate in the - * given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. - * @param int $style A bitwise OR of the following possibilities: - * - * IMG_ARC_PIE - * IMG_ARC_CHORD - * IMG_ARC_NOFILL - * IMG_ARC_EDGED - * - * IMG_ARC_PIE and IMG_ARC_CHORD are - * mutually exclusive; IMG_ARC_CHORD just - * connects the starting and ending angles with a straight line, while - * IMG_ARC_PIE produces a rounded edge. - * IMG_ARC_NOFILL indicates that the arc - * or chord should be outlined, not filled. IMG_ARC_EDGED, - * used together with IMG_ARC_NOFILL, indicates that the - * beginning and ending angles should be connected to the center - this is a - * good way to outline (rather than fill) a 'pie slice'. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color + * @param int $style * @throws ImageException * */ @@ -1231,16 +874,12 @@ function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $widt /** - * Draws an ellipse centered at the specified coordinate on the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1255,17 +894,12 @@ function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $ /** - * Creates a rectangle filled with color in the given - * image starting at point 1 and ending at point 2. - * 0, 0 is the top left corner of the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for point 1. - * @param int $y1 y-coordinate for point 1. - * @param int $x2 x-coordinate for point 2. - * @param int $y2 y-coordinate for point 2. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1280,18 +914,11 @@ function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y /** - * imagefilltoborder performs a flood fill - * whose border color is defined by border_color. - * The starting point for the fill is x, - * y (top left is 0, 0) and the region is - * filled with color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start. - * @param int $y y-coordinate of start. - * @param int $border_color The border color. A color identifier created with imagecolorallocate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $border_color + * @param int $color * @throws ImageException * */ @@ -1306,138 +933,9 @@ function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, i /** - * imagefilter applies the given filter - * filter on the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $filter filter can be one of the following: - * - * - * - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * - * - * - * - * IMG_FILTER_GRAYSCALE: Converts the image into - * grayscale by changing the red, green and blue components to their - * weighted sum using the same coefficients as the REC.601 luma (Y') - * calculation. The alpha components are retained. For palette images the - * result may differ due to palette limitations. - * - * - * - * - * IMG_FILTER_BRIGHTNESS: Changes the brightness - * of the image. Use args to set the level of - * brightness. The range for the brightness is -255 to 255. - * - * - * - * - * IMG_FILTER_CONTRAST: Changes the contrast of - * the image. Use args to set the level of - * contrast. - * - * - * - * - * IMG_FILTER_COLORIZE: Like - * IMG_FILTER_GRAYSCALE, except you can specify the - * color. Use args, arg2 and - * arg3 in the form of - * red, green, - * blue and arg4 for the - * alpha channel. The range for each color is 0 to 255. - * - * - * - * - * IMG_FILTER_EDGEDETECT: Uses edge detection to - * highlight the edges in the image. - * - * - * - * - * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * - * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using - * the Gaussian method. - * - * - * - * - * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * - * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to - * achieve a "sketchy" effect. - * - * - * - * - * IMG_FILTER_SMOOTH: Makes the image smoother. - * Use args to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use args to set the block size - * and arg2 to set the pixelation effect mode. - * - * - * - * - * IMG_FILTER_SCATTER: Applies scatter effect - * to the image, use args and - * arg2 to define the effect strength and - * additionally arg3 to only apply the - * on select pixel colors. - * - * - * + * @param \GdImage $image + * @param int $filter * @param int $args - * - * - * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * - * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * - * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * - * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * - * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * - * IMG_FILTER_SCATTER: Effect substraction level. - * This must not be higher or equal to the addition level set with - * arg2. - * - * - * * @throws ImageException * */ @@ -1456,43 +954,8 @@ function imagefilter(\GdImage $image, int $filter, int ...$args): void /** - * Flips the image image using the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * - * Constant - * Meaning - * - * - * - * - * IMG_FLIP_HORIZONTAL - * - * Flips the image horizontally. - * - * - * - * IMG_FLIP_VERTICAL - * - * Flips the image vertically. - * - * - * - * IMG_FLIP_BOTH - * - * Flips the image both horizontally and vertically. - * - * - * - * - * + * @param \GdImage $image + * @param int $mode * @throws ImageException * */ @@ -1507,83 +970,12 @@ function imageflip(\GdImage $image, int $mode): void /** - * This function calculates and returns the bounding box in pixels - * for a FreeType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be - * measured. - * @param string $font_filename The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1599,100 +991,16 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size to use in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The index of the desired color for the text, see - * imagecolorexact. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * font_filename does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * @param string $text Text to be inserted into image. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * - * - * - * - * 0 - * lower left x-coordinate - * - * - * 1 - * lower left y-coordinate - * - * - * 2 - * lower right x-coordinate - * - * - * 3 - * lower right y-coordinate - * - * - * 4 - * upper right x-coordinate - * - * - * 5 - * upper right y-coordinate - * - * - * 6 - * upper left x-coordinate - * - * - * 7 - * upper left y-coordinate - * - * - * - * - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1708,13 +1016,9 @@ function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, /** - * Applies gamma correction to the given gd image - * given an input and an output gamma. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $input_gamma The input gamma. - * @param float $output_gamma The output gamma. + * @param \GdImage $image + * @param float $input_gamma + * @param float $output_gamma * @throws ImageException * */ @@ -1729,11 +1033,8 @@ function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_ga /** - * Outputs a GD image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1752,15 +1053,10 @@ function imagegd(\GdImage $image, $file = null): void /** - * Outputs a GD2 image to the given file. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $chunk_size Chunk size. - * @param int $mode Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $chunk_size + * @param int $mode * @throws ImageException * */ @@ -1783,20 +1079,8 @@ function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mod /** - * imagegif creates the GIF - * file in file from the image image. The - * image argument is the return from the - * imagecreate or imagecreatefrom* - * function. - * - * The image format will be GIF87a unless the - * image has been made transparent with - * imagecolortransparent, in which case the - * image format will be GIF89a. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1815,9 +1099,7 @@ function imagegif(\GdImage $image, $file = null): void /** - * Grabs a screenshot of the whole screen. - * - * @return \GdImage Returns an image object on success. + * @return \GdImage * @throws ImageException * */ @@ -1833,11 +1115,9 @@ function imagegrabscreen(): \GdImage /** - * Grabs a window or its client area using a windows handle (HWND property in COM instance) - * - * @param int $handle The HWND window ID. - * @param bool $client_area Include the client area of the application window. - * @return \GdImage Returns an image object on success. + * @param int $handle + * @param bool $client_area + * @return \GdImage * @throws ImageException * */ @@ -1853,15 +1133,9 @@ function imagegrabwindow(int $handle, bool $client_area = false): \GdImage /** - * imagejpeg creates a JPEG file from - * the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default (-1) uses the default IJG quality value (about 75). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -1882,57 +1156,8 @@ function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void /** - * Set the alpha blending flag to use layering effects. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $effect One of the following constants: - * - * - * IMG_EFFECT_REPLACE - * - * - * Use pixel replacement (equivalent of passing TRUE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_ALPHABLEND - * - * - * Use normal pixel blending (equivalent of passing FALSE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_NORMAL - * - * - * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * - * IMG_EFFECT_OVERLAY - * - * - * Overlay has the effect that black background pixels will remain - * black, white background pixels will remain white, but grey - * background pixels will take the colour of the foreground pixel. - * - * - * - * - * IMG_EFFECT_MULTIPLY - * - * - * Overlays with a multiply effect. - * - * - * - * + * @param \GdImage $image + * @param int $effect * @throws ImageException * */ @@ -1947,15 +1172,12 @@ function imagelayereffect(\GdImage $image, int $effect): void /** - * Draws a line between the two given points. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for first point. - * @param int $y1 y-coordinate for first point. - * @param int $x2 x-coordinate for second point. - * @param int $y2 y-coordinate for second point. - * @param int $color The line color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1970,58 +1192,8 @@ function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $col /** - * imageloadfont loads a user-defined bitmap and returns - * its identifier. - * - * @param string $filename The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * - * - * Font file format - * - * - * - * byte position - * C data type - * description - * - * - * - * - * byte 0-3 - * int - * number of characters in the font - * - * - * byte 4-7 - * int - * - * value of first character in the font (often 32 for space) - * - * - * - * byte 8-11 - * int - * pixel width of each character - * - * - * byte 12-15 - * int - * pixel height of each character - * - * - * byte 16- - * char - * - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * - * @return int Returns an GdFont instance. + * @param string $filename + * @return int * @throws ImageException * */ @@ -2037,24 +1209,10 @@ function imageloadfont(string $filename): int /** - * Outputs or saves a PNG image from the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the quality and - * filters arguments are not used. - * @param int $quality Compression level: from 0 (no compression) to 9. - * The default (-1) uses the zlib compression default. - * For more information see the zlib manual. - * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_* - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * The default value (-1) disables filtering. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $filters * @throws ImageException * */ @@ -2077,17 +1235,12 @@ function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters /** - * imagerectangle creates a rectangle starting at - * the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate - * 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -2102,27 +1255,10 @@ function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int /** - * imageresolution allows to set and get the resolution of - * an image in DPI (dots per inch). If the optional parameters are NULL, - * the current resolution is returned as an indexed array. If only - * resolution_x is not NULL, the horizontal and vertical resolution - * are set to this value. If none of the optional parameters are NULL, the horizontal - * and vertical resolution are set to these values, respectively. - * - * The resolution is only used as meta information when images are read from and - * written to formats supporting this kind of information (curently PNG and - * JPEG). It does not affect any drawing operations. The default resolution - * for new images is 96 DPI. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int|null $resolution_x The horizontal resolution in DPI. - * @param int|null $resolution_y The vertical resolution in DPI. - * @return mixed When used as getter, - * it returns an indexed array of the horizontal and vertical resolution on - * success. - * When used as setter, it returns - * TRUE on success. + * @param \GdImage $image + * @param int|null $resolution_x + * @param int|null $resolution_y + * @return mixed * @throws ImageException * */ @@ -2144,18 +1280,10 @@ function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resol /** - * Rotates the image image using the given - * angle in degrees. - * - * The center of rotation is the center of the image, and the rotated - * image may have different dimensions than the original image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the - * number of degrees to rotate the image anticlockwise. - * @param int $background_color Specifies the color of the uncovered zone after the rotation - * @return \GdImage Returns an image object for the rotated image. + * @param \GdImage $image + * @param float $angle + * @param int $background_color + * @return \GdImage * @throws ImageException * */ @@ -2171,28 +1299,8 @@ function imagerotate(\GdImage $image, float $angle, int $background_color): \GdI /** - * imagesavealpha sets the flag which determines whether to retain - * full alpha channel information (as opposed to single-color transparency) - * when saving images. - * This is only supported for image formats which support full alpha channel information, - * i.e. PNG, WebP and AVIF. - * - * - * imagesavealpha is only meaningful for PNG - * images, since the full alpha channel is always saved for WebP - * and AVIF. It is not recommended to rely on this behavior, - * as it may change in the future. Thus, imagesavealpha - * should be called deliberately also for WebP and - * AVIF images. - * - * - * - * Alphablending has to be disabled (imagealphablending($im, false)) - * to retain the alpha-channel in the first place. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -2207,25 +1315,11 @@ function imagesavealpha(\GdImage $image, bool $enable): void /** - * imagescale scales an image using the given - * interpolation algorithm. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $width The width to scale the image to. - * @param int $height The height to scale the image to. If omitted or negative, the aspect - * ratio will be preserved. - * @param int $mode One of IMG_NEAREST_NEIGHBOUR, - * IMG_BILINEAR_FIXED, - * IMG_BICUBIC, - * IMG_BICUBIC_FIXED or anything else (will use two - * pass). - * - * - * IMG_WEIGHTED4 is not yet supported. - * - * - * @return \GdImage Return the scaled image object on success. + * @param \GdImage $image + * @param int $width + * @param int $height + * @param int $mode + * @return \GdImage * @throws ImageException * */ @@ -2241,15 +1335,8 @@ function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = I /** - * imagesetbrush sets the brush image to be - * used by all line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * colors IMG_COLOR_BRUSHED or - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $brush An image object. + * @param \GdImage $image + * @param \GdImage $brush * @throws ImageException * */ @@ -2264,15 +1351,11 @@ function imagesetbrush(\GdImage $image, \GdImage $brush): void /** - * imagesetclip sets the current clipping rectangle, i.e. - * the area beyond which no pixels will be drawn. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 * @throws ImageException * */ @@ -2287,119 +1370,8 @@ function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void /** - * Sets the interpolation method, setting an interpolation method affects the rendering - * of various functions in GD, such as the imagerotate function. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $method The interpolation method, which can be one of the following: - * - * - * - * IMG_BELL: Bell filter. - * - * - * - * - * IMG_BESSEL: Bessel filter. - * - * - * - * - * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * - * IMG_BLACKMAN: Blackman window function. - * - * - * - * - * IMG_BOX: Box blur filter. - * - * - * - * - * IMG_BSPLINE: Spline interpolation. - * - * - * - * - * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * - * IMG_GAUSSIAN: Gaussian function. - * - * - * - * - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * - * IMG_HERMITE: Hermite interpolation. - * - * - * - * - * IMG_HAMMING: Hamming filter. - * - * - * - * - * IMG_HANNING: Hanning filter. - * - * - * - * - * IMG_MITCHELL: Mitchell filter. - * - * - * - * - * IMG_POWER: Power interpolation. - * - * - * - * - * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * - * IMG_SINC: Sinc function. - * - * - * - * - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * - * IMG_WEIGHTED4: Weighting filter. - * - * - * - * - * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * @param \GdImage $image + * @param int $method * @throws ImageException * */ @@ -2414,14 +1386,10 @@ function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED /** - * imagesetpixel draws a pixel at the specified - * coordinate. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate. - * @param int $y y-coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -2436,18 +1404,8 @@ function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void /** - * imagesetstyle sets the style to be used by all - * line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * color IMG_COLOR_STYLED or lines of images with color - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * Note that style must not be an empty array. + * @param \GdImage $image + * @param array $style * @throws ImageException * */ @@ -2462,13 +1420,8 @@ function imagesetstyle(\GdImage $image, array $style): void /** - * imagesetthickness sets the thickness of the lines - * drawn when drawing rectangles, polygons, arcs etc. to - * thickness pixels. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $thickness Thickness, in pixels. + * @param \GdImage $image + * @param int $thickness * @throws ImageException * */ @@ -2483,19 +1436,8 @@ function imagesetthickness(\GdImage $image, int $thickness): void /** - * imagesettile sets the tile image to be - * used by all region filling functions (such as imagefill - * and imagefilledpolygon) when filling with the special - * color IMG_COLOR_TILED. - * - * A tile is an image used to fill an area with a repeated pattern. Any - * GD image can be used as a tile, and by setting the transparent color index of the tile - * image with imagecolortransparent, a tile allows certain parts - * of the underlying area to shine through can be created. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $tile The image object to be used as a tile. + * @param \GdImage $image + * @param \GdImage $tile * @throws ImageException * */ @@ -2510,17 +1452,12 @@ function imagesettile(\GdImage $image, \GdImage $tile): void /** - * Draws a string at the given coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the upper left corner. - * @param int $y y-coordinate of the upper left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2535,18 +1472,12 @@ function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, /** - * Draws a string vertically at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the bottom left corner. - * @param int $y y-coordinate of the bottom left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2561,11 +1492,8 @@ function imagestringup(\GdImage $image, int $font, int $x, int $y, string $strin /** - * Returns the width of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the width of the image. + * @param \GdImage $image + * @return int * */ function imagesx(\GdImage $image): int @@ -2577,11 +1505,8 @@ function imagesx(\GdImage $image): int /** - * Returns the height of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the height of the image. + * @param \GdImage $image + * @return int * */ function imagesy(\GdImage $image): int @@ -2593,21 +1518,9 @@ function imagesy(\GdImage $image): int /** - * imagetruecolortopalette converts a truecolor image - * to a palette image. The code for this function was originally drawn from - * the Independent JPEG Group library code, which is excellent. The code - * has been modified to preserve as much alpha channel information as - * possible in the resulting palette, in addition to preserving colors as - * well as possible. This does not work as well as might be hoped. It is - * usually best to simply produce a truecolor output image instead, which - * guarantees the highest output quality. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $dither Indicates if the image should be dithered - if it is TRUE then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * @param int $num_colors Sets the maximum number of colors that should be retained in the palette. + * @param \GdImage $image + * @param bool $dither + * @param int $num_colors * @throws ImageException * */ @@ -2622,87 +1535,12 @@ function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) /** - * This function calculates and returns the bounding box in pixels - * for a TrueType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be measured. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * @return array imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and FALSE on error. - * - * - * - * - * key - * contents - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. + * @return array * @throws ImageException * */ @@ -2718,68 +1556,16 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ /** - * Writes the given text into the image using TrueType - * fonts. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $text The text string in UTF-8 encoding. - * - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings. - * - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * @return array Returns an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. + * @return array * @throws ImageException * */ @@ -2795,15 +1581,9 @@ function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y /** - * imagewbmp outputs or save a WBMP - * version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. + * @param \GdImage $image + * @param null|resource|string $file + * @param int|null $foreground_color * @throws ImageException * */ @@ -2824,13 +1604,9 @@ function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) /** - * Outputs or saves a WebP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -2851,22 +1627,9 @@ function imagewebp(\GdImage $image, $file = null, int $quality = -1): void /** - * Outputs or save an XBM version of the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. - * - * The filename (without the .xbm extension) is also - * used for the C identifiers of the XBM, whereby non - * alphanumeric characters of the current locale are substituted by - * underscores. If filename is set to NULL, - * image is used to build the C identifiers. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. All other colors are treated as - * background. + * @param \GdImage $image + * @param null|resource|string $filename + * @param int|null $foreground_color * @throws ImageException * */ @@ -2885,13 +1648,10 @@ function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): vo /** - * Embeds binary IPTC data into a JPEG image. - * - * @param string $iptc_data The data to be written. - * @param string $filename Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be - * returned as a string. Otherwise the JPEG will be printed to STDOUT. - * @return bool|string If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @param string $iptc_data + * @param string $filename + * @param int $spool + * @return bool|string * @throws ImageException * */ @@ -2907,11 +1667,8 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) /** - * Parses an IPTC block into its single tags. - * - * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the - * value. It returns FALSE on error or if no IPTC data was found. + * @param string $iptc_block + * @return array * @throws ImageException * */ diff --git a/generated/8.4/imap.php b/generated/8.4/imap.php index 059998f4..05ac9f44 100644 --- a/generated/8.4/imap.php +++ b/generated/8.4/imap.php @@ -5,11 +5,8 @@ use Safe\Exceptions\ImapException; /** - * Convert an 8bit string to a quoted-printable string (according to - * RFC2045, section 6.7). - * - * @param string $string The 8bit string to convert - * @return string Returns a quoted-printable string. + * @param string $string + * @return string * @throws ImapException * */ @@ -25,19 +22,11 @@ function imap_8bit(string $string): string /** - * Appends a string message to the specified folder. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $folder The mailbox name, see imap_open for more - * information - * @param string $message The message to be append, as a string - * - * When talking to the Cyrus IMAP server, you must use "\r\n" as - * your end-of-line terminator instead of "\n" or the operation will - * fail - * @param null|string $options If provided, the options will also be written - * to the folder - * @param null|string $internal_date 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. + * @param \IMAP\Connection $imap + * @param string $folder + * @param string $message + * @param null|string $options + * @param null|string $internal_date * @throws ImapException * */ @@ -58,10 +47,8 @@ function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?s /** - * Decodes the given BASE-64 encoded string. - * - * @param string $string The encoded text - * @return string Returns the decoded message as a string. + * @param string $string + * @return string * @throws ImapException * */ @@ -77,10 +64,8 @@ function imap_base64(string $string): string /** - * Convert an 8bit string to a base64 string according to RFC2045, Section 6.8. - * - * @param string $string The 8bit string - * @return string Returns a base64 encoded string. + * @param string $string + * @return string * @throws ImapException * */ @@ -96,39 +81,10 @@ function imap_binary(string $string): string /** - * imap_body returns the body of the message, - * numbered message_num in the current - * mailbox. - * - * imap_body will only return a verbatim copy of the - * message body. To extract single parts of a multipart MIME-encoded - * message you have to use imap_fetchstructure to - * analyze its structure and imap_fetchbody to - * extract a copy of a single body component. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The optional flags are a bit mask - * with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if not already set - * - * - * - * - * FT_INTERNAL - The return string is in internal format, will - * not canonicalize to CRLF. - * - * - * - * @return string Returns the body of the specified message, as a string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -144,15 +100,10 @@ function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): st /** - * Read the structure of a specified body section of a specific message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param string $section The body section to read - * @return \stdClass Returns the information in an object. - * For a detailed description - * of the object structure and properties see - * imap_fetchstructure. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @return \stdClass * @throws ImapException * */ @@ -168,40 +119,8 @@ function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $secti /** - * Checks information about the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns 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 - * - * - * - * - * Mailbox - the mailbox name - * - * - * - * - * Nmsgs - number of messages in the mailbox - * - * - * - * - * Recent - number of recent messages in the mailbox - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -217,27 +136,11 @@ function imap_check(\IMAP\Connection $imap): \stdClass /** - * This function causes a store to delete the specified - * flag to the flags set for the - * messages in the specified sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", - * "\\Deleted", and "\\Draft" (as defined by RFC2060) - * @param int $options options are a bit mask and may contain - * the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options + * @return bool * */ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool @@ -249,14 +152,9 @@ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $f /** - * Closes the imap stream. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags 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 Always returns TRUE. + * @param \IMAP\Connection $imap + * @param int $flags + * @return bool * */ function imap_close(\IMAP\Connection $imap, int $flags = 0): bool @@ -268,12 +166,8 @@ function imap_close(\IMAP\Connection $imap, int $flags = 0): bool /** - * Creates a new mailbox specified by mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information. Names containing international characters should be - * encoded by imap_utf7_encode + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -288,11 +182,8 @@ function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void /** - * Deletes the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -307,108 +198,10 @@ function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void /** - * This function fetches mail headers for the given - * sequence and returns an overview of their - * contents. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A message sequence description. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param int $flags sequence will contain a sequence of message - * indices or UIDs, if this parameter is set to - * FT_UID. - * @return array Returns an array of objects describing one message header each. - * The object will only define a property if it exists. The possible - * properties are: - * - * - * - * subject - the messages subject - * - * - * - * - * from - who sent it - * - * - * - * - * to - recipient - * - * - * - * - * date - when was it sent - * - * - * - * - * message_id - Message-ID - * - * - * - * - * references - is a reference to this message id - * - * - * - * - * in_reply_to - is a reply to this message id - * - * - * - * - * size - size in bytes - * - * - * - * - * uid - UID the message has in the mailbox - * - * - * - * - * msgno - message sequence number in the mailbox - * - * - * - * - * recent - this message is flagged as recent - * - * - * - * - * flagged - this message is flagged - * - * - * - * - * answered - this message is flagged as answered - * - * - * - * - * deleted - this message is flagged for deletion - * - * - * - * - * seen - this message is flagged as already read - * - * - * - * - * draft - this message is flagged as being a draft - * - * - * - * - * udate - the UNIX timestamp of the arrival date - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param int $flags + * @return array * @throws ImapException * */ @@ -424,35 +217,11 @@ function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flag /** - * Fetch of a particular section of the body of the specified messages. - * Body parts are not decoded by this function. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -468,36 +237,10 @@ function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $sectio /** - * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified - * message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The possible flags are: - * - * - * - * FT_UID - The message_num - * argument is a UID - * - * - * - * - * FT_INTERNAL - The return string - * is in "internal" format, without any attempt to - * canonicalize to CRLF newlines - * - * - * - * - * FT_PREFETCHTEXT - The RFC822.TEXT - * should be pre-fetched at the same time. This avoids an - * extra RTT on an IMAP connection if a full message text is - * desired (e.g. in a "save to local file" operation) - * - * - * - * @return string Returns the header of the specified message as a text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -513,34 +256,11 @@ function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = /** - * Fetch the MIME headers of a particular section of the body of the specified messages. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns the MIME headers of a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -556,138 +276,10 @@ function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $sectio /** - * Fetches all the structured information for a given message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags This optional parameter only has a single option, - * FT_UID, which tells the function to treat the - * message_num argument as a - * UID. - * @return \stdClass Returns an object with properties listed in the table below. - * - * - * - * Returned Object for imap_fetchstructure - * - * - * - * - * type - * Primary body type - * - * - * encoding - * Body transfer encoding - * - * - * ifsubtype - * TRUE if there is a subtype string - * - * - * subtype - * MIME subtype - * - * - * ifdescription - * TRUE if there is a description string - * - * - * description - * Content description string - * - * - * ifid - * TRUE if there is an identification string - * - * - * id - * Identification string - * - * - * lines - * Number of lines - * - * - * bytes - * Number of bytes - * - * - * ifdisposition - * TRUE if there is a disposition string - * - * - * disposition - * Disposition string - * - * - * ifdparameters - * TRUE if the dparameters array exists - * - * - * dparameters - * An array of objects where each object has an - * "attribute" and a "value" - * property corresponding to the parameters on the - * Content-disposition MIME - * header. - * - * - * ifparameters - * TRUE if the parameters array exists - * - * - * parameters - * An array of objects where each object has an - * "attribute" and a "value" - * property. - * - * - * parts - * An array of objects identical in structure to the top-level - * object, each of which corresponds to a MIME body - * part. - * - * - * - * - * - * - * Primary body type (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 0textTYPETEXT - * 1multipartTYPEMULTIPART - * 2messageTYPEMESSAGE - * 3applicationTYPEAPPLICATION - * 4audioTYPEAUDIO - * 5imageTYPEIMAGE - * 6videoTYPEVIDEO - * 7modelTYPEMODEL - * 8otherTYPEOTHER - * - * - * - * - * - * Transfer encodings (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 07bitENC7BIT - * 18bitENC8BIT - * 2BinaryENCBINARY - * 3Base64ENCBASE64 - * 4Quoted-PrintableENCQUOTEDPRINTABLE - * 5otherENCOTHER - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -703,15 +295,9 @@ function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flag /** - * Purges the cache of entries of a specific type. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), - * IMAP_GC_ENV (envelope and bodies), - * IMAP_GC_TEXTS (texts). - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param int $flags + * @return bool * */ function imap_gc(\IMAP\Connection $imap, int $flags): bool @@ -723,12 +309,9 @@ function imap_gc(\IMAP\Connection $imap, int $flags): bool /** - * Gets the ACL for a given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @return array * @throws ImapException * */ @@ -744,78 +327,11 @@ function imap_getacl(\IMAP\Connection $imap, string $mailbox): array /** - * Gets information on the mailboxes. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox not contains, and may not contain any - * "children" (there are no mailboxes below this one). Calling - * imap_createmailbox will not work on this mailbox. - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. This means that it may - * contain new messages since the last time it was checked. Not provided by all IMAP - * servers. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked, does not contain new - * messages. If either MARKED or UNMARKED is - * provided, you can assume the IMAP server supports this feature for this mailbox. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. - * @throws ImapException + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array + * @throws ImapException * */ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array @@ -830,77 +346,10 @@ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pa /** - * Gets information about the subscribed mailboxes. - * - * Identical to imap_getmailboxes, except that it only - * returns mailboxes that the user is subscribed to. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox has no - * "children" (there are no mailboxes below this one). - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -916,216 +365,11 @@ function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $p /** - * Gets information about the given message number by reading its headers. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $from_length Number of characters for the fetchfrom property. - * Must be greater than or equal to zero. - * @param int $subject_length Number of characters for the fetchsubject property - * Must be greater than or equal to zero. - * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * - * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * - * reply_to - an array of objects from the Reply-To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * - * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and - * host - * - * - * - * - * remail - - * - * - * - * - * date - The message date as found in its headers - * - * - * - * - * Date - Same as date - * - * - * - * - * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * - * Recent - R if recent and seen, N - * if recent and not seen, ' ' if not recent. - * - * - * - * - * Unseen - U if not seen AND not recent, ' ' if seen - * OR not seen and recent - * - * - * - * - * Flagged - F if flagged, ' ' if not flagged - * - * - * - * - * Answered - A if answered, ' ' if unanswered - * - * - * - * - * Deleted - D if deleted, ' ' if not deleted - * - * - * - * - * Draft - X if draft, ' ' if not draft - * - * - * - * - * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * - * Size - The message size - * - * - * - * - * udate - mail message date in Unix time - * - * - * - * - * fetchfrom - from line formatted to fit from_length - * characters - * - * - * - * - * fetchsubject - subject line formatted to fit - * subject_length characters - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $from_length + * @param int $subject_length + * @return \stdClass * @throws ImapException * */ @@ -1141,12 +385,8 @@ function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_len /** - * Returns headers for all messages in a mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One - * element per mail message. - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return array * @throws ImapException * */ @@ -1162,33 +402,11 @@ function imap_headers(\IMAP\Connection $imap): array /** - * Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. - * - * This function is similar to imap_listmailbox, - * but it will additionally check for the presence of the string - * content inside the mailbox data. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @param string $content + * @return array * @throws ImapException * */ @@ -1204,26 +422,10 @@ function imap_listscan(\IMAP\Connection $imap, string $reference, string $patter /** - * Gets an array of all the mailboxes that you have subscribed. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -1239,109 +441,9 @@ function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): /** - * Create a MIME message based on the given envelope - * and bodies sections. - * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", - * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", - * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. - * To set additional headers, the key "custom_headers" is supported, which expects - * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; - * only if it has a type of TYPEMULTIPART, further bodies - * are processed; these bodies constitute the bodies of the parts. - * - * - * Body Array Structure - * - * - * - * Key - * Type - * Description - * - * - * - * - * type - * int - * - * The MIME type. - * One of TYPETEXT (default), TYPEMULTIPART, - * TYPEMESSAGE, TYPEAPPLICATION, - * TYPEAUDIO, TYPEIMAGE, - * TYPEMODEL or TYPEOTHER. - * - * - * - * encoding - * int - * - * The Content-Transfer-Encoding. - * One of ENC7BIT (default), ENC8BIT, - * ENCBINARY, ENCBASE64, - * ENCQUOTEDPRINTABLE or ENCOTHER. - * - * - * - * charset - * string - * The charset parameter of the MIME type. - * - * - * type.parameters - * array - * An associative array of Content-Type parameter names and their values. - * - * - * subtype - * string - * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. - * - * - * id - * string - * The Content-ID. - * - * - * description - * string - * The Content-Description. - * - * - * disposition.type - * string - * The Content-Disposition, e.g. 'attachment'. - * - * - * disposition - * array - * An associative array of Content-Disposition parameter names and values. - * - * - * contents.data - * string - * The payload. - * - * - * lines - * int - * The size of the payload in lines. - * - * - * bytes - * int - * The size of the payload in bytes. - * - * - * md5 - * string - * The MD5 checksum of the payload. - * - * - * - * - * @return string Returns the MIME message as string. + * @param array $envelope + * @param array $bodies + * @return string * @throws ImapException * */ @@ -1357,29 +459,10 @@ function imap_mail_compose(array $envelope, array $bodies): string /** - * Copies mail messages specified by message_nums - * to specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message - * numbers (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask of one or more of - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * - * - * CP_MOVE - Delete the messages from - * the current mailbox after copying. If this flag is set, the function - * behaves identically to imap_mail_move. - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1394,25 +477,10 @@ function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $ma /** - * Moves mail messages specified by message_nums to the - * specified mailbox. - * Note that the mail messages are actually copied to the - * mailbox, and the original messages are flagged for deletion. - * That implies that the messages in mailbox are assigned new UIDs. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message numbers - * (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask and may contain the single option: - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1427,22 +495,13 @@ function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $ma /** - * This function allows sending of emails with correct handling of - * Cc and Bcc receivers. - * - * The parameters to, cc - * and bcc are all strings and are all parsed - * as RFC822 address lists. - * - * @param string $to The receiver - * @param string $subject The mail subject - * @param string $message The mail body, see imap_mail_compose - * @param null|string $additional_headers As string with additional headers to be set on the mail + * @param string $to + * @param string $subject + * @param string $message + * @param null|string $additional_headers * @param null|string $cc - * @param null|string $bcc The receivers specified in bcc will get the - * mail, but are excluded from the headers. - * @param null|string $return_path Use this parameter to specify return path upon mail delivery failure. - * This is useful when using PHP as a mail client for multiple users. + * @param null|string $bcc + * @param null|string $return_path * @throws ImapException * */ @@ -1467,52 +526,8 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi /** - * Checks the current mailbox status on the server. It is similar to - * imap_status, but will additionally sum up the size of - * all messages in the mailbox, which will take some additional time to - * execute. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass|false Returns the information in an object with following properties: - * - * Mailbox properties - * - * - * - * Date - * date of last change (current datetime) - * - * - * Driver - * driver - * - * - * Mailbox - * name of the mailbox - * - * - * Nmsgs - * number of messages - * - * - * Recent - * number of recent messages - * - * - * Unread - * number of unread messages - * - * - * Deleted - * number of deleted messages - * - * - * Size - * mailbox size - * - * - * - * + * @param \IMAP\Connection $imap + * @return \stdClass|false * */ function imap_mailboxmsginfo(\IMAP\Connection $imap) @@ -1524,18 +539,8 @@ function imap_mailboxmsginfo(\IMAP\Connection $imap) /** - * Decodes MIME message header extensions that are non ASCII text (see RFC2047). - * - * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each - * object has two properties, charset and - * text. - * - * If the element hasn't been encoded, and in other words is in - * plain US-ASCII, the charset property of that element is - * set to default. - * - * The function returns FALSE on failure. + * @param string $string + * @return array * @throws ImapException * */ @@ -1551,10 +556,8 @@ function imap_mime_header_decode(string $string): array /** - * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * - * @param string $string A string encoded in modified UTF-7. - * @return string Returns string converted to UTF-8. + * @param string $string + * @return string * @throws ImapException * */ @@ -1570,10 +573,8 @@ function imap_mutf7_to_utf8(string $string): string /** - * Gets the number of messages in the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return int Return the number of messages in the current mailbox, as an integer. + * @param \IMAP\Connection $imap + * @return int * @throws ImapException * */ @@ -1589,206 +590,13 @@ function imap_num_msg(\IMAP\Connection $imap): int /** - * Opens an IMAP stream to a mailbox. - * - * This function can also be used to open streams to POP3 and - * NNTP servers, but some functions and features are only - * available on IMAP servers. - * - * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. - * The special name INBOX stands for the current users - * personal mailbox. Mailbox names that contain international characters - * besides those in the printable ASCII space have to be encoded with - * imap_utf7_encode. - * - * The server part, which is enclosed in '{' and '}', consists of the servers - * name or ip address, an optional port (prefixed by ':'), and an optional - * protocol specification (prefixed by '/'). - * - * The server part is mandatory in all mailbox - * 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. - * - * - * - * - * port - optional TCP port number, default is the - * default port for that service - * - * - * - * - * flags - optional flags, see following table. - * - * - * - * - * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * - * Optional flags for names - * - * - * - * Flag - * Description - * - * - * - * - * /service=service - * mailbox access service, default is "imap" - * - * - * /user=user - * remote user name for login on the server - * - * - * /authuser=user - * remote authentication user; if specified this is the user name - * whose password is used (e.g. administrator) - * - * - * /anonymous - * remote access as anonymous user - * - * - * /debug - * record protocol telemetry in application's debug log - * - * - * /secure - * do not transmit a plaintext password over the network - * - * - * /imap, /imap2, - * /imap2bis, /imap4, - * /imap4rev1 - * equivalent to /service=imap - * - * - * /pop3 - * equivalent to /service=pop3 - * - * - * /nntp - * equivalent to /service=nntp - * - * - * /norsh - * do not use rsh or ssh to establish a preauthenticated IMAP - * session - * - * - * /ssl - * use the Secure Socket Layer to encrypt the session - * - * - * /validate-cert - * validate certificates from TLS/SSL server (this is the default - * behavior) - * - * - * /novalidate-cert - * do not validate certificates from TLS/SSL server, needed if - * server uses self-signed certificates - * - * - * /tls - * force use of start-TLS to encrypt the session, and reject - * connection to servers that do not support it - * - * - * /notls - * do not do start-TLS to encrypt the session, even with servers - * that support it - * - * - * /readonly - * request read-only mailbox open (IMAP only; ignored on NNTP, and - * an error with SMTP and POP3) - * - * - * - * - * @param string $user The user name - * @param string $password The password associated with the user - * @param int $flags The flags are a bit mask with one or more of - * the following: - * - * - * - * OP_READONLY - Open mailbox read-only - * - * - * - * - * OP_ANONYMOUS - Don't use or update a - * .newsrc for news (NNTP only) - * - * - * - * - * OP_HALFOPEN - For IMAP - * and NNTP names, open a connection but - * don't open a mailbox. - * - * - * - * - * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close - * (see also imap_delete and - * imap_expunge) - * - * - * - * - * OP_DEBUG - Debug protocol negotiations - * - * - * - * - * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * - * OP_SILENT - Don't pass up events (internal use) - * - * - * - * - * OP_PROTOTYPE - Return driver prototype - * - * - * - * - * OP_SECURE - Don't do non-secure authentication - * - * - * - * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used - * to set one or more connection parameters: - * - * - * - * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * - * @return \IMAP\Connection Returns an IMAP\Connection instance on success. + * @param string $mailbox + * @param string $user + * @param string $password + * @param int $flags + * @param int $retries + * @param array $options + * @return \IMAP\Connection * @throws ImapException * */ @@ -1804,10 +612,8 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = /** - * Convert a quoted-printable string to an 8 bit string according to RFC2045, section 6.7. - * - * @param string $string A quoted-printable string - * @return string Returns an 8 bits string. + * @param string $string + * @return string * @throws ImapException * */ @@ -1823,15 +629,9 @@ function imap_qprint(string $string): string /** - * This function renames on old mailbox to new mailbox (see - * imap_open for the format of - * mbox names). - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $from The old mailbox name, see imap_open for more - * information - * @param string $to The new mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $from + * @param string $to * @throws ImapException * */ @@ -1846,13 +646,10 @@ function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): v /** - * Returns a properly formatted email address as defined in RFC2822 given the needed information. - * - * @param null|string $mailbox The mailbox name, see imap_open for more - * information - * @param null|string $hostname The email host part - * @param null|string $personal The name of the account owner - * @return string Returns a string properly formatted email address as defined in RFC2822. + * @param null|string $mailbox + * @param null|string $hostname + * @param null|string $personal + * @return string * @throws ImapException * */ @@ -1868,34 +665,11 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string /** - * Saves a part or the whole body of the specified message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int|resource|string $file The path to the saved file as a string, or a valid file descriptor - * returned by fopen. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * + * @param \IMAP\Connection $imap + * @param int|resource|string $file + * @param int $message_num + * @param string $section + * @param int $flags * @throws ImapException * */ @@ -1910,12 +684,9 @@ function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $ /** - * Sets an upper limit quota on a per mailbox basis. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard - * format for a mailbox: user.name. - * @param int $mailbox_size The maximum size (in KB) for the quota_root + * @param \IMAP\Connection $imap + * @param string $quota_root + * @param int $mailbox_size * @throws ImapException * */ @@ -1930,14 +701,10 @@ function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox /** - * Sets the ACL for a giving mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param string $user_id The user to give the rights to. - * @param string $rights The rights to give to the user. Passing an empty string will delete - * acl. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param string $user_id + * @param string $rights * @throws ImapException * */ @@ -1952,28 +719,11 @@ function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, s /** - * Causes a store to add the specified flag to the - * flags set for the messages in the specified - * sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, - * \Answered, \Flagged, - * \Deleted, and \Draft as - * defined by RFC2060. - * @param int $options A bit mask that may contain the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options + * @return bool * */ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool @@ -1985,67 +735,13 @@ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $fla /** - * Gets and sorts message numbers by the given parameters. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $criteria Criteria can be one (and only one) of the following: - * - * - * - * SORTDATE - message Date - * - * - * - * - * SORTARRIVAL - arrival date - * - * - * - * - * SORTFROM - mailbox in first From address - * - * - * - * - * SORTSUBJECT - message subject - * - * - * - * - * SORTTO - mailbox in first To address - * - * - * - * - * SORTCC - mailbox in first cc address - * - * - * - * - * SORTSIZE - size of message in octets - * - * - * - * @param int $reverse Whether to sort in reverse order. - * @param int $flags The flags are a bitmask of one or more of the - * following: - * - * - * - * SE_UID - Return UIDs instead of sequence numbers - * - * - * - * - * SE_NOPREFETCH - Don't prefetch searched messages - * - * - * - * @param null|string $search_criteria IMAP2-format search criteria string. For details see - * imap_search. - * @param null|string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given - * parameters. + * @param \IMAP\Connection $imap + * @param int $criteria + * @param int $reverse + * @param int $flags + * @param null|string $search_criteria + * @param null|string $charset + * @return array * @throws ImapException * */ @@ -2067,57 +763,10 @@ function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $fla /** - * Gets status information about the given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags Valid flags are: - * - * - * - * SA_MESSAGES - set $status->messages to the - * number of messages in the mailbox - * - * - * - * - * SA_RECENT - set $status->recent to the number - * of recent messages in the mailbox - * - * - * - * - * SA_UNSEEN - set $status->unseen to the number - * of unseen (new) messages in the mailbox - * - * - * - * - * SA_UIDNEXT - set $status->uidnext to the next - * uid to be used in the mailbox - * - * - * - * - * SA_UIDVALIDITY - set $status->uidvalidity to a - * constant that changes when uids for the mailbox may no longer be - * valid - * - * - * - * - * SA_ALL - set all of the above - * - * - * - * @return \stdClass This function returns an object containing status information. - * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. - * - * flags is also set, which contains a bitmask which can - * be checked against any of the above constants. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -2133,11 +782,8 @@ function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdC /** - * Subscribe to a new mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2152,26 +798,9 @@ function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Gets a tree of a threaded message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. + * @param \IMAP\Connection $imap * @param int $flags - * @return array imap_thread returns an associative array containing - * a tree of messages threaded by REFERENCES. - * - * Every message in the current mailbox will be represented by three entries - * in the resulting array: - * - * - * $thread["XX.num"] - current message number - * - * - * $thread["XX.next"] - * - * - * $thread["XX.branch"] - * - * + * @return array * @throws ImapException * */ @@ -2187,20 +816,9 @@ function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array /** - * Sets or fetches the imap timeout. - * - * @param int $timeout_type One of the following: - * IMAP_OPENTIMEOUT, - * IMAP_READTIMEOUT, - * IMAP_WRITETIMEOUT, or - * IMAP_CLOSETIMEOUT. - * @param int $timeout The timeout, in seconds. - * @return mixed If the timeout parameter is set, this function - * returns TRUE on success. - * - * If timeout is not provided or evaluates to -1, - * the current timeout value of timeout_type is - * returned as an integer. + * @param int $timeout_type + * @param int $timeout + * @return mixed * @throws ImapException * */ @@ -2216,15 +834,10 @@ function imap_timeout(int $timeout_type, int $timeout = -1) /** - * Removes the deletion flag for a specified message, which is set by - * imap_delete or imap_mail_move. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums A string representing one or more messages in IMAP4-style sequence format - * ("n", "n:m", or combination of these - * delimited by commas). + * @param \IMAP\Connection $imap + * @param string $message_nums * @param int $flags - * @return bool Always returns TRUE. + * @return bool * */ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0): bool @@ -2236,11 +849,8 @@ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags /** - * Unsubscribe from the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2255,10 +865,8 @@ function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * - * @param string $string A UTF-8 encoded string. - * @return string Returns string converted to modified UTF-7. + * @param string $string + * @return string * @throws ImapException * */ diff --git a/generated/8.4/info.php b/generated/8.4/info.php index 11be92d8..8c00eb74 100644 --- a/generated/8.4/info.php +++ b/generated/8.4/info.php @@ -5,113 +5,9 @@ use Safe\Exceptions\InfoException; /** - * Set the various assert control options or just query - * their current settings. - * * @param int $option - * Assert Options - * - * - * - * Option - * INI Setting - * Default value - * Description - * - * - * - * - * ASSERT_ACTIVE - * assert.active - * 1 - * enable assert evaluation - * - * - * ASSERT_EXCEPTION - * assert.exception - * 1 - * throws an AssertionError for each failed assertions - * - * - * ASSERT_WARNING - * assert.warning - * 1 - * issue a PHP warning for each failed assertion - * - * - * ASSERT_BAIL - * assert.bail - * 0 - * terminate execution on failed assertions - * - * - * ASSERT_QUIET_EVAL - * assert.quiet_eval - * 0 - * - * disable error_reporting during assertion expression - * evaluation. Removed as of PHP 8.0.0. - * - * - * - * ASSERT_CALLBACK - * assert.callback - * (NULL) - * Callback to call on failed assertions - * - * - * - * - * @param mixed $value An optional new value for the option. - * - * The callback function set via ASSERT_CALLBACK or - * assert.callback - * should have the following signature: - * - * voidassert_callback - * stringfile - * intline - * stringnullassertion - * stringdescription - * - * - * - * file - * - * - * The file where assert has been called. - * - * - * - * - * line - * - * - * The line where assert has been called. - * - * - * - * - * assertion - * - * - * Prior to PHP 8.0.0, the assertion which has been passed to assert, - * but only when the assertion is given as a string. - * (If the assertion is a boolean condition, this parameter will be an empty string.) - * As of PHP 8.0.0, this parameter is always NULL. - * - * - * - * - * description - * - * - * The description that has been passed to assert. - * - * - * - * - * @return mixed Returns the original setting of any option. + * @param mixed $value + * @return mixed * */ function assert_options(int $option, $value = null) @@ -127,11 +23,7 @@ function assert_options(int $option, $value = null) /** - * Sets the process title visible in tools such as top and - * ps. This function is available only in - * CLI mode. - * - * @param string $title The new title. + * @param string $title * @throws InfoException * */ @@ -146,56 +38,7 @@ function cli_set_process_title(string $title): void /** - * Loads the PHP extension given by the parameter - * extension_filename. - * - * Use extension_loaded to test whether a given - * extension is already available or not. This works on both built-in - * extensions and dynamically loaded ones (either through php.ini or - * dl). - * - * @param string $extension_filename This parameter is only the filename of the - * extension to load which also depends on your platform. For example, - * the sockets extension (if compiled - * as a shared module, not the default!) would be called - * sockets.so on Unix platforms whereas it is called - * php_sockets.dll on the Windows platform. - * - * The directory where the extension is loaded from depends on your - * platform: - * - * Windows - If not explicitly set in the php.ini, the extension is - * loaded from C:\php5\ by default. - * - * Unix - If not explicitly set in the php.ini, the default extension - * directory depends on - * - * - * - * whether PHP has been built with --enable-debug - * or not - * - * - * - * - * whether PHP has been built with ZTS (Zend Thread Safety) - * support or not - * - * - * - * - * the current internal ZEND_MODULE_API_NO (Zend - * internal module API number, which is basically the date on which a - * major module API change happened, e.g. 20010901) - * - * - * - * Taking into account the above, the directory then defaults to - * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, - * e.g. - * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 - * or - * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @param string $extension_filename * @throws InfoException * */ @@ -210,18 +53,8 @@ function dl(string $extension_filename): void /** - * Gets the value of a PHP configuration option. - * - * This function will not return configuration information set when the PHP - * was compiled, or read from an Apache configuration file. - * - * To check whether the system is using a configuration file, try retrieving the - * value of the cfg_file_path configuration setting. If this is available, a - * configuration file is being used. - * - * @param string $option The configuration option name. - * @return mixed Returns the current value of the PHP configuration variable specified by - * option, or FALSE if an error occurs. + * @param string $option + * @return mixed * @throws InfoException * */ @@ -237,10 +70,7 @@ function get_cfg_var(string $option) /** - * Gets the current include_path - * configuration option value. - * - * @return string Returns the path, as a string. + * @return string * @throws InfoException * */ @@ -256,14 +86,7 @@ function get_include_path(): string /** - * Gets the time of the last modification of the main script of execution. - * - * If you're interested in getting the last modification time - * of a different file, consider using filemtime. - * - * @return int Returns the time of the last modification of the current - * page. The value returned is a Unix timestamp, suitable for - * feeding to date. + * @return int * @throws InfoException * */ @@ -279,9 +102,7 @@ function getlastmod(): int /** - * Gets the group ID of the current script. - * - * @return int Returns the group ID of the current script. + * @return int * @throws InfoException * */ @@ -297,9 +118,7 @@ function getmygid(): int /** - * Gets the inode of the current script. - * - * @return int Returns the current script's inode as an integer. + * @return int * @throws InfoException * */ @@ -315,9 +134,7 @@ function getmyinode(): int /** - * Gets the current PHP process ID. - * - * @return int Returns the current PHP process ID. + * @return int * @throws InfoException * */ @@ -333,9 +150,7 @@ function getmypid(): int /** - * Gets the user ID of the current script. - * - * @return int Returns the user ID of the current script. + * @return int * @throws InfoException * */ @@ -351,25 +166,10 @@ function getmyuid(): int /** - * Parses options passed to the script. - * - * @param string $short_options Each character in this string will be used as option characters and - * matched against options passed to the script starting with a single - * hyphen (-). - * - * For example, an option string "x" recognizes an - * option -x. - * - * Only a-z, A-Z and 0-9 are allowed. - * @param array $long_options An array of options. Each element in this array will be used as option - * strings and matched against options passed to the script starting with - * two hyphens (--). - * - * For example, an longopts element "opt" recognizes an - * option --opt. - * @param int|null $rest_index If the rest_index parameter is present, then the - * index where argument parsing stopped will be written to this variable. - * @return array|array|array This function will return an array of option / argument pairs. + * @param string $short_options + * @param array $long_options + * @param int|null $rest_index + * @return array|array|array * @throws InfoException * */ @@ -385,14 +185,8 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind /** - * This is an interface to getrusage(2). It gets data returned - * from the system call. - * - * @param int $mode If mode is 1, getrusage will be called with - * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system - * call. All entries are accessible by using their documented field names. - * Returns FALSE on failure. + * @param int $mode + * @return array * @throws InfoException * */ @@ -408,12 +202,8 @@ function getrusage(int $mode = 0): array /** - * Returns the value of the configuration option on success. - * - * @param string $option The configuration option name. - * @return string Returns the value of the configuration option as a string on success, or an - * empty string for null values. Returns FALSE if the - * configuration option doesn't exist. + * @param string $option + * @return string * @throws InfoException * */ @@ -429,15 +219,9 @@ function ini_get(string $option): string /** - * Sets the value of the given configuration option. The configuration option - * will keep this new value during the script's execution, and will be restored - * at the script's ending. - * - * @param string $option Not all the available options can be changed using - * ini_set. There is a list of all available options - * in the appendix. - * @param bool|float|int|null|string $value The new value for the option. - * @return string Returns the old value on success. + * @param string $option + * @param bool|float|int|null|string $value + * @return string * @throws InfoException * */ @@ -453,22 +237,7 @@ function ini_set(string $option, $value): string /** - * Returns a lowercase string that describes the type of interface - * (the Server API, SAPI) that PHP is using. For example, in CLI PHP this - * string will be "cli" whereas with Apache it may have several different - * values depending on the exact SAPI used. Possible values are listed - * below. - * - * @return non-empty-string Returns the interface type, as a lowercase string. - * - * Although not exhaustive, the possible return values include - * apache, - * apache2handler, - * cgi (until PHP 5.3), - * cgi-fcgi, cli, cli-server, - * embed, fpm-fcgi, - * litespeed, - * phpdbg. + * @return non-empty-string * @throws InfoException * */ @@ -484,72 +253,8 @@ function php_sapi_name(): string /** - * This function prints out the credits listing the PHP developers, - * modules, etc. It generates the appropriate HTML codes to insert - * the information in a page. - * - * @param int $flags To generate a custom credits page, you may want to use the - * flags parameter. - * - * - * Pre-defined phpcredits flags - * - * - * - * name - * description - * - * - * - * - * CREDITS_ALL - * - * All the credits, equivalent to using: CREDITS_DOCS + - * CREDITS_GENERAL + CREDITS_GROUP + - * CREDITS_MODULES + CREDITS_FULLPAGE. - * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * - * CREDITS_DOCS - * The credits for the documentation team - * - * - * CREDITS_FULLPAGE - * - * Usually used in combination with the other flags. Indicates - * that a complete stand-alone HTML page needs to be - * printed including the information indicated by the other - * flags. - * - * - * - * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors - * and SAPI module. - * - * - * - * CREDITS_GROUP - * A list of the core developers - * - * - * CREDITS_MODULES - * - * A list of the extension modules for PHP, and their authors - * - * - * - * CREDITS_SAPI - * - * A list of the server API modules for PHP, and their authors - * - * - * - * - * - * @return bool Always returns TRUE. + * @param int $flags + * @return bool * */ function phpcredits(int $flags = CREDITS_ALL): bool @@ -561,103 +266,8 @@ function phpcredits(int $flags = CREDITS_ALL): bool /** - * Outputs a large amount of information about the current state of PHP. - * This includes information about PHP compilation options and extensions, - * the PHP version, server information and environment (if compiled as a - * module), the PHP environment, OS version information, paths, master and - * local values of configuration options, HTTP headers, and the PHP License. - * - * Because every system is setup differently, phpinfo is - * commonly used to check configuration settings and for available - * predefined variables - * on a given system. - * - * phpinfo is also a valuable debugging tool as it - * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * - * @param int $flags The output may be customized by passing one or more of the - * following constants bitwise values summed - * together in the optional flags parameter. - * One can also combine the respective constants or bitwise values - * together with the bitwise or operator. - * - * - * phpinfo options - * - * - * - * Name (constant) - * Value - * Description - * - * - * - * - * INFO_GENERAL - * 1 - * - * The configuration line, php.ini location, build date, Web - * Server, System and more. - * - * - * - * INFO_CREDITS - * 2 - * - * PHP Credits. See also phpcredits. - * - * - * - * INFO_CONFIGURATION - * 4 - * - * Current Local and Master values for PHP directives. See - * also ini_get. - * - * - * - * INFO_MODULES - * 8 - * - * Loaded modules and their respective settings. See also - * get_loaded_extensions. - * - * - * - * INFO_ENVIRONMENT - * 16 - * - * Environment Variable information that's also available in - * $_ENV. - * - * - * - * INFO_VARIABLES - * 32 - * - * Shows all - * predefined variables from EGPCS (Environment, GET, - * POST, Cookie, Server). - * - * - * - * INFO_LICENSE - * 64 - * - * PHP License information. See also the license FAQ. - * - * - * - * INFO_ALL - * -1 - * - * Shows all of the above. - * - * - * - * - * - * @return bool Always returns TRUE. + * @param int $flags + * @return bool * */ function phpinfo(int $flags = INFO_ALL): bool @@ -669,12 +279,7 @@ function phpinfo(int $flags = INFO_ALL): bool /** - * Adds assignment to the server environment. The - * environment variable will only exist for the duration of the current - * request. At the end of the request the environment is restored to its - * original state. - * - * @param string $assignment The setting, like "FOO=BAR" + * @param string $assignment * @throws InfoException * */ @@ -689,12 +294,8 @@ function putenv(string $assignment): void /** - * Sets the include_path - * configuration option for the duration of the script. - * - * @param string $include_path The new value for the include_path - * @return string Returns the old include_path on - * success. + * @param string $include_path + * @return string * @throws InfoException * */ @@ -710,19 +311,7 @@ function set_include_path(string $include_path): string /** - * Set the number of seconds a script is allowed to run. If this is reached, - * the script returns a fatal error. The default limit is 30 seconds or, if - * it exists, the max_execution_time value defined in the - * php.ini. - * - * When called, set_time_limit restarts the timeout - * counter from zero. In other words, if the timeout is the default 30 - * seconds, and 25 seconds into script execution a call such as - * set_time_limit(20) is made, the script will run for a - * total of 45 seconds before timing out. - * - * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit - * is imposed. + * @param int $seconds * @throws InfoException * */ diff --git a/generated/8.4/inotify.php b/generated/8.4/inotify.php index 166bde8c..71e70f7a 100644 --- a/generated/8.4/inotify.php +++ b/generated/8.4/inotify.php @@ -5,19 +5,10 @@ use Safe\Exceptions\InotifyException; /** - * inotify_add_watch adds a new watch or modify an - * existing watch for the file or directory specified in - * pathname. - * - * Using inotify_add_watch on a watched object replaces - * the existing watch. Using the IN_MASK_ADD constant - * adds (OR) events to the existing watch. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param string $pathname File or directory to watch - * @param int $mask Events to watch for. See Predefined Constants. - * @return int The return value is a unique (inotify instance wide) watch descriptor. + * @param resource $inotify_instance + * @param string $pathname + * @param int $mask + * @return int * @throws InotifyException * */ @@ -33,10 +24,7 @@ function inotify_add_watch($inotify_instance, string $pathname, int $mask): int /** - * Initialize an inotify instance for use with - * inotify_add_watch - * - * @return resource A stream resource. + * @return resource * @throws InotifyException * */ @@ -52,13 +40,8 @@ function inotify_init() /** - * inotify_rm_watch removes the watch - * watch_descriptor from the inotify instance - * inotify_instance. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param int $watch_descriptor Watch to remove from the instance + * @param resource $inotify_instance + * @param int $watch_descriptor * @throws InotifyException * */ diff --git a/generated/8.4/json.php b/generated/8.4/json.php index 2518fa1e..cafc2923 100644 --- a/generated/8.4/json.php +++ b/generated/8.4/json.php @@ -5,45 +5,10 @@ use Safe\Exceptions\JsonException; /** - * Returns a string containing the JSON representation of the supplied - * value. If the parameter is an array or object, - * it will be serialized recursively. - * - * If a value to be serialized is an object, then by default only publicly visible - * properties will be included. Alternatively, a class may implement JsonSerializable - * to control how its values are serialized to JSON. - * - * The encoding is affected by the supplied flags - * and additionally the encoding of float values depends on the value of - * serialize_precision. - * - * @param mixed $value The value being encoded. Can be any type except - * a resource. - * - * All string data must be UTF-8 encoded. - * - * PHP implements a superset of JSON as specified in the original - * RFC 7159. - * @param int $flags Bitmask consisting of - * JSON_FORCE_OBJECT, - * JSON_HEX_QUOT, - * JSON_HEX_TAG, - * JSON_HEX_AMP, - * JSON_HEX_APOS, - * JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, - * JSON_NUMERIC_CHECK, - * JSON_PARTIAL_OUTPUT_ON_ERROR, - * JSON_PRESERVE_ZERO_FRACTION, - * JSON_PRETTY_PRINT, - * JSON_UNESCAPED_LINE_TERMINATORS, - * JSON_UNESCAPED_SLASHES, - * JSON_UNESCAPED_UNICODE, - * JSON_THROW_ON_ERROR. - * The behaviour of these constants is described on the - * JSON constants page. - * @param positive-int $depth Set the maximum depth. Must be greater than zero. - * @return non-empty-string Returns a JSON encoded string on success. + * @param mixed $value + * @param int $flags + * @param positive-int $depth + * @return non-empty-string * @throws JsonException * */ diff --git a/generated/8.4/ldap.php b/generated/8.4/ldap.php index 55dd1e22..1d13a605 100644 --- a/generated/8.4/ldap.php +++ b/generated/8.4/ldap.php @@ -5,15 +5,8 @@ use Safe\Exceptions\LdapException; /** - * Translate ISO-8859 characters to t61 - * characters. - * - * This function is useful if you have to talk to a legacy - * LDAPv2 server. - * - * @param string $value The text to be translated. - * @return string Return the t61 translation of - * value. + * @param string $value + * @return string * @throws LdapException * */ @@ -29,21 +22,10 @@ function ldap_8859_to_t61(string $value): string /** - * Add entries in the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * - * - * ]]> - * - * - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -62,9 +44,7 @@ function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $cont /** - * Binds to the LDAP directory with specified RDN and password. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password * @throws LdapException @@ -87,16 +67,12 @@ function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password /** - * Compare value of attribute - * with value of same attribute in an LDAP directory entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $attribute The attribute name. - * @param string $value The compared value. - * @param array|null $controls Array of LDAP Controls to send with the request. - * @return bool Returns TRUE if value matches otherwise returns - * FALSE. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $attribute + * @param string $value + * @param array|null $controls + * @return bool * @throws LdapException * */ @@ -116,12 +92,10 @@ function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, str /** - * Retrieve the pagination information send by the server. - * - * @param resource $link An LDAP resource, returned by ldap_connect. + * @param resource $link * @param resource $result - * @param null|string $cookie An opaque structure sent by the server. - * @param int|null $estimated The estimated number of entries to retrieve. + * @param null|string $cookie + * @param int|null $estimated * @throws LdapException * */ @@ -136,15 +110,10 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n /** - * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * - * @param resource $link An LDAP resource, returned by ldap_connect. - * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. - * If true and if the server doesn't support pagination, the search - * will return no result. - * @param string $cookie An opaque structure sent by the server - * (ldap_control_paged_result_response). + * @param resource $link + * @param int $pagesize + * @param bool $iscritical + * @param string $cookie * @throws LdapException * */ @@ -159,12 +128,9 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** - * Returns the number of entries stored in the result of previous search - * operations. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return int Returns number of entries in the result. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return int * @throws LdapException * */ @@ -180,11 +146,9 @@ function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int /** - * Deletes a particular entry in LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array|null $controls * @throws LdapException * */ @@ -203,11 +167,8 @@ function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null /** - * Turns the specified dn, into a more user-friendly - * form, stripping off type names. - * - * @param string $dn The distinguished name of an LDAP entity. - * @return string Returns the user friendly name. + * @param string $dn + * @return string * @throws LdapException * */ @@ -223,17 +184,12 @@ function ldap_dn2ufn(string $dn): string /** - * Performs a PASSWD extended operation. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $user dn of the user to change the password of. - * @param string $old_password The old password of this user. May be ommited depending of server configuration. - * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @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. - * @return bool|string Returns the generated password if new_password is empty or omitted. - * Otherwise returns TRUE on success. + * @param \LDAP\Connection $ldap + * @param string $user + * @param string $old_password + * @param string $new_password + * @param array|null $controls + * @return bool|string * @throws LdapException * */ @@ -249,10 +205,8 @@ function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old /** - * Performs a WHOAMI extended operation and returns the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @return bool|string The data returned by the server. + * @param \LDAP\Connection $ldap + * @return bool|string * @throws LdapException * */ @@ -268,20 +222,13 @@ function ldap_exop_whoami(\LDAP\Connection $ldap) /** - * Performs an extended operation on the specified ldap with - * request_oid the OID of the operation and - * request_data the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, 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 null|string $request_data 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 Array of LDAP Controls to send with the request. - * @param null|string $response_data 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 null|string $response_oid Will be filled with the response OID if provided, usually equal to the request OID. - * @return bool|resource When used with response_data, returns TRUE on success. - * When used without response_data, returns a result identifier. + * @param \LDAP\Connection $ldap + * @param string $request_oid + * @param null|string $request_data + * @param array|null $controls + * @param null|string $response_data + * @param null|string $response_oid + * @return bool|resource * @throws LdapException * */ @@ -307,19 +254,9 @@ function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request /** - * Splits the DN returned by ldap_get_dn and breaks it - * up into its component parts. Each part is known as Relative Distinguished - * Name, or RDN. - * - * @param string $dn The distinguished name of an LDAP entity. - * @param int $with_attrib Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - * @return array Returns an array of all DN components. - * The first element in the array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. + * @param string $dn + * @param int $with_attrib + * @return array * @throws LdapException * */ @@ -335,16 +272,9 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** - * Gets the first attribute in the given entry. Remaining attributes are - * retrieved by calling ldap_next_attribute successively. - * - * Similar to reading entries, attributes are also read one by one from a - * particular entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the first attribute in the entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -360,17 +290,9 @@ function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Returns the entry identifier for first entry in the result. This entry - * identifier is then supplied to ldap_next_entry - * routine to get successive entries from the result. - * - * Entries in the LDAP result are read sequentially using the - * ldap_first_entry and - * ldap_next_entry functions. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return \LDAP\ResultEntry Returns an LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return \LDAP\ResultEntry * @throws LdapException * */ @@ -386,15 +308,7 @@ function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\R /** - * Frees up the memory allocated internally to store the result. All result - * memory will be automatically freed when the script terminates. - * - * Typically all the memory allocated for the LDAP result gets freed at the - * end of the script. In case the script is making successive searches which - * return large result sets, ldap_free_result could be - * called to keep the runtime memory usage by the script low. - * - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. + * @param \LDAP\Result $result * @throws LdapException * */ @@ -409,23 +323,9 @@ function ldap_free_result(\LDAP\Result $result): void /** - * Reads attributes and values from an entry in the search result. - * - * Having located a specific entry in the directory, you can find out what - * information is held for that entry by using this call. You would use this - * call for an application which "browses" directory entries and/or where you - * do not know the structure of the directory entries. In many applications - * you will be searching for a specific attribute such as an email address or - * a surname, and won't care what other data is held. - * - * - * - * - * - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return array * */ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): array @@ -437,11 +337,9 @@ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Finds out the DN of an entry in the result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the DN of the result entry and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -457,23 +355,9 @@ function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string /** - * Reads multiple entries from the given result, and then reading the - * attributes and multiple values. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on - * success. - * - * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - * - * - * - * - * + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return array * @throws LdapException * */ @@ -489,184 +373,9 @@ function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array /** - * Sets value to the value of the specified option. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_REFERRALS - * int - * - * - * - * LDAP_OPT_RESTART - * int - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_NONE - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_PEER - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_ALL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PACKAGE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * - * - * - * - * - * @param mixed $value This will be set to the option value. + * @param \LDAP\Connection $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -681,18 +390,10 @@ function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): v /** - * Reads all the values of the attribute in the entry in the result. - * - * This function is used exactly like ldap_get_values - * except that it handles binary data and not string data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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. + * @return array * @throws LdapException * */ @@ -708,35 +409,10 @@ function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, s /** - * Reads all the values of the attribute in the entry in the result. - * - * This call needs a entry, - * so needs to be preceded by one of the ldap search calls and one - * of the calls to get an individual entry. - * - * You application will either be hard coded to look for certain - * attributes (such as "surname" or "mail") or you will have to use - * the ldap_get_attributes call to work out - * what attributes exist for a given entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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 - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - * - * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * - * - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - * - * + * @return array * @throws LdapException * */ @@ -752,13 +428,10 @@ function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, strin /** - * Adds one or more attribute values to the specified dn. - * To add a whole new object see ldap_add function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -777,14 +450,10 @@ function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Removes one or more attribute values from the specified dn. - * Object deletions are done by the - * ldap_delete function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. + * @param \LDAP\Connection $ldap + * @param string $dn * @param array $entry - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param array|null $controls * @throws LdapException * */ @@ -803,13 +472,10 @@ function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Replaces one or more attributes from the specified dn. - * It may also add or remove attributes. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -828,87 +494,10 @@ function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?arr /** - * Modifies an existing entry in the LDAP directory. Allows detailed - * specification of the modifications to perform. - * - * @param \LDAP\Connection $ldap An LDAP resource, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An 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, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - * - * Possible values for modtype include: - * - * - * LDAP_MODIFY_BATCH_ADD - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE - * - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * - * - * - * LDAP_MODIFY_BATCH_REPLACE - * - * - * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - * - * - * - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * 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|null $controls Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $modifications_info + * @param array|null $controls * @throws LdapException * */ @@ -927,15 +516,9 @@ function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modificati /** - * Retrieves the attributes in an entry. The first call to - * ldap_next_attribute is made with the - * entry returned from - * ldap_first_attribute. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the next attribute in an entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -951,12 +534,10 @@ function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Parse LDAP extended operation data from result object result - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param null|string $response_data Will be filled by the response data. - * @param null|string $response_oid Will be filled by the response OID. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param null|string $response_data + * @param null|string $response_oid * @throws LdapException * */ @@ -971,20 +552,13 @@ function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string & /** - * Parses an LDAP search result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param int|null $error_code A reference to a variable that will be set to the LDAP error code in - * the result, or 0 if no error occurred. - * @param null|string $matched_dn A reference to a variable that will be set to a matched DN if one was - * recognised within the request, otherwise it will be set to NULL. - * @param null|string $error_message A reference to a variable that will be set to the LDAP error message in - * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set - * to all of the referral strings in the result, or an empty array if no - * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param int|null $error_code + * @param null|string $matched_dn + * @param null|string $error_message + * @param array|null $referrals + * @param array|null $controls * @throws LdapException * */ @@ -999,15 +573,12 @@ function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$ /** - * The entry specified by dn is renamed/moved. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $new_rdn The new RDN. - * @param string $new_parent The new parent/superior entry. - * @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|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $new_rdn + * @param string $new_parent + * @param bool $delete_old_rdn + * @param array|null $controls * @throws LdapException * */ @@ -1026,8 +597,6 @@ function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string /** - * - * * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password @@ -1066,180 +635,9 @@ function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $pas /** - * Sets the value of the specified option to be value. - * - * @param null|resource $ldap Either an LDAP\Connection instance, returned by - * ldap_connect, to set the option for that connection, - * or NULL to set the option globally. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * Available since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - * @param mixed $value The new value for the specified option. + * @param null|resource $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -1254,9 +652,7 @@ function ldap_set_option($ldap, int $option, $value): void /** - * Unbinds from the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @throws LdapException * */ diff --git a/generated/8.4/libxml.php b/generated/8.4/libxml.php index ea055ba1..aa6180a3 100644 --- a/generated/8.4/libxml.php +++ b/generated/8.4/libxml.php @@ -5,47 +5,7 @@ use Safe\Exceptions\LibxmlException; /** - * Changes the default external entity loader. - * This can be used to suppress the expansion of arbitrary external entities to avoid XXE attacks, - * even when LIBXML_NOENT has been set for the respective operation, - * and is usually preferable over calling libxml_disable_entity_loader. - * - * @param callable $resolver_function A callable with the following signature: - * - * resourcestringnullresolver - * stringnullpublic_id - * stringsystem_id - * arraycontext - * - * - * - * public_id - * - * - * The public ID. - * - * - * - * - * system_id - * - * - * The system ID. - * - * - * - * - * context - * - * - * An array with the four elements "directory", "intSubName", - * "extSubURI" and "extSubSystem". - * - * - * - * - * This callable should return a resource, a string from which a resource can be - * opened. If NULL is returned, the entity reference resolution will fail. + * @param callable $resolver_function * @throws LibxmlException * */ diff --git a/generated/8.4/lzf.php b/generated/8.4/lzf.php index 7ea98c4d..0e90111e 100644 --- a/generated/8.4/lzf.php +++ b/generated/8.4/lzf.php @@ -5,11 +5,8 @@ use Safe\Exceptions\LzfException; /** - * lzf_compress compresses the given - * data string using LZF encoding. - * - * @param string $data The string to compress. - * @return string Returns the compressed data. + * @param string $data + * @return string * @throws LzfException * */ @@ -25,11 +22,8 @@ function lzf_compress(string $data): string /** - * lzf_compress decompresses the given - * data string containing lzf encoded data. - * - * @param string $data The compressed string. - * @return string Returns the decompressed data. + * @param string $data + * @return string * @throws LzfException * */ diff --git a/generated/8.4/mailparse.php b/generated/8.4/mailparse.php index 82c75d63..66b6d383 100644 --- a/generated/8.4/mailparse.php +++ b/generated/8.4/mailparse.php @@ -5,24 +5,10 @@ use Safe\Exceptions\MailparseException; /** - * 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. - * - * @param resource $mimemail A valid MIME resource, created with - * mailparse_msg_create. - * @param mixed $filename Can be a file name or a valid stream resource. - * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the - * extracted section, or NULL to make this function return the - * extracted section. - * - * If not specified, the contents will be sent to "stdout". - * @return string If callbackfunc is not NULL returns TRUE on - * success. - * - * If callbackfunc is set to NULL, returns the - * extracted section as a string. + * @param resource $mimemail + * @param mixed $filename + * @param callable $callbackfunc + * @return string * @throws MailparseException * */ @@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba /** - * Frees a MIME resource. - * - * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or - * mailparse_msg_parse_file. + * @param resource $mimemail * @throws MailparseException * */ @@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void /** - * Parses a file. - * This is the optimal way of parsing a mail file that you have on disk. - * - * @param string $filename Path to the file holding the message. - * The file is opened and streamed through the parser. - * - * The message contained in filename is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. - * @return resource Returns a MIME resource representing the structure. + * @param string $filename + * @return resource * @throws MailparseException * */ @@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename) /** - * Incrementally parse data into the supplied mime mail resource. - * - * This function allow you to stream portions of a file at a time, rather - * than read and parse the whole thing. - * - * @param resource $mimemail A valid MIME resource. - * @param string $data The final chunk of data is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. + * @param resource $mimemail + * @param string $data * @throws MailparseException * */ @@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void /** - * Streams data from the source file pointer, apply - * encoding and write to the destination file pointer. - * - * @param resource $sourcefp A valid file handle. The file is streamed through the parser. - * @param resource $destfp The destination file handle in which the encoded data will be written. - * @param string $encoding One of the character encodings supported by the - * mbstring module. + * @param resource $sourcefp + * @param resource $destfp + * @param string $encoding * @throws MailparseException * */ diff --git a/generated/8.4/mbstring.php b/generated/8.4/mbstring.php index cfe06c81..055b21b2 100644 --- a/generated/8.4/mbstring.php +++ b/generated/8.4/mbstring.php @@ -5,17 +5,9 @@ use Safe\Exceptions\MbstringException; /** - * Returns a string containing the character specified by the Unicode code point value, - * encoded in the specified encoding. - * - * This function complements mb_ord. - * - * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return string A string containing the requested character, if it can be represented in the specified - * encoding. + * @param int $codepoint + * @param null|string $encoding + * @return string * @throws MbstringException * */ @@ -35,26 +27,10 @@ function mb_chr(int $codepoint, ?string $encoding = null): string /** - * Converts string from from_encoding, - * or the current internal encoding, to to_encoding. - * If string is an array, all its string values will be - * converted recursively. - * - * @param array|string $string The string or array to be converted. - * @param string $to_encoding The desired encoding of the result. - * @param mixed $from_encoding The current encoding used to interpret string. - * Multiple encodings may be specified as an array or comma separated - * list, in which case the correct encoding will be guessed using the - * same algorithm as mb_detect_encoding. - * - * If from_encoding is omitted or NULL, the - * mbstring.internal_encoding setting - * will be used if set, otherwise the default_charset setting. - * - * See supported encodings - * for valid values of to_encoding - * and from_encoding. - * @return array|string The encoded string or array on success. + * @param array|string $string + * @param string $to_encoding + * @param mixed $from_encoding + * @return array|string * @throws MbstringException * */ @@ -74,27 +50,11 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null /** - * Converts - * character encoding of variables var and vars in - * encoding from_encoding to encoding - * to_encoding. - * - * mb_convert_variables join strings in Array - * or Object to detect encoding, since encoding detection tends to - * fail for short strings. Therefore, it is impossible to mix - * encoding in single array or object. - * - * @param string $to_encoding The encoding that the string is being converted to. - * @param array|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 - * is omitted, detect_order is used. - * @param array|object|string $var var is the reference to the - * variable being converted. String, Array and Object are accepted. - * mb_convert_variables assumes all parameters - * have the same encoding. - * @param array|object|string $vars Additional vars. - * @return string The character encoding before conversion for success. + * @param string $to_encoding + * @param array|string $from_encoding + * @param array|object|string $var + * @param array|object|string $vars + * @return string * @throws MbstringException * */ @@ -110,31 +70,8 @@ function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$va /** - * Sets the automatic character - * encoding detection order to encoding. - * - * @param non-empty-list|non-falsy-string|null $encoding encoding is an array or - * comma separated list of character encoding. See supported encodings. - * - * If encoding is omitted or NULL, it returns - * the current character encoding detection order as array. - * - * This setting affects mb_detect_encoding and - * mb_send_mail. - * - * mbstring currently implements the following - * encoding detection filters. If there is an invalid byte sequence - * for the following encodings, encoding detection will fail. - * - * For ISO-8859-*, mbstring - * always detects as ISO-8859-*. - * - * For UTF-16, UTF-32, - * UCS2 and UCS4, encoding - * detection will fail always. - * @return bool|list When setting the encoding detection order, TRUE is returned on success. - * - * When getting the encoding detection order, an ordered array of the encodings is returned. + * @param non-empty-list|non-falsy-string|null $encoding + * @return bool|list * @throws MbstringException * */ @@ -154,10 +91,8 @@ function mb_detect_order($encoding = null) /** - * Returns an array of aliases for a known encoding type. - * - * @param string $encoding The encoding type being checked, for aliases. - * @return false|list Returns a numerically indexed array of encoding aliases. + * @param string $encoding + * @return false|list * */ function mb_encoding_aliases(string $encoding) @@ -169,36 +104,11 @@ function mb_encoding_aliases(string $encoding) /** - * Scans string for matches to - * pattern, then replaces the matched text - * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, - * except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the string string. The callback should - * return the replacement string. - * - * You'll often need the callback function - * for a mb_ereg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * mb_ereg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param callable(array):string $callback + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -218,19 +128,11 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param string $replacement The replacement text. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -250,17 +152,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, ? /** - * Retrieve the result from the last multibyte regular expression match - * - * @return array An array - * including the sub-string of matched part by last - * mb_ereg_search, - * mb_ereg_search_pos, - * mb_ereg_search_regs. If there are some - * matches, the first element will have the matched 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. + * @return array * @throws MbstringException * */ @@ -276,16 +168,9 @@ function mb_ereg_search_getregs(): array /** - * mb_ereg_search_init sets - * string and pattern - * for a multibyte regular expression. These values are used for - * mb_ereg_search, - * mb_ereg_search_pos, and - * mb_ereg_search_regs. - * - * @param string $string The search string. - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. + * @param string $string + * @param null|string $pattern + * @param null|string $options * @throws MbstringException * */ @@ -306,16 +191,9 @@ function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $o /** - * Returns the matched part of a multibyte regular expression. - * - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return array mb_ereg_search_regs executes the multibyte - * regular expression match, and if there are some matched part, it - * 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. + * @param null|string $pattern + * @param null|string $options + * @return array * @throws MbstringException * */ @@ -337,10 +215,7 @@ function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): /** - * mb_ereg_search_setpos sets the starting - * point of a match for mb_ereg_search. - * - * @param int $offset The position to set. If it is negative, it counts from the end of the string. + * @param int $offset * @throws MbstringException * */ @@ -355,17 +230,11 @@ function mb_ereg_search_setpos(int $offset): void /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement. - * - * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. - * @param string $replacement The replacement text. - * @param string $string The searched string. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return string The resultant string. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return string * @throws MbstringException * */ @@ -385,29 +254,8 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, /** - * mb_get_info returns the internal setting parameters of mbstring. - * - * @param string $type If type is not specified or is specified as "all", - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * and "strict_detection" - * will be returned. - * - * If type is specified as - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * or "strict_detection" - * the specified setting parameter will be returned. - * @return mixed An array of type information if type - * is not specified, otherwise a specific type. + * @param string $type + * @return mixed * @throws MbstringException * */ @@ -423,20 +271,8 @@ function mb_get_info(string $type = "all") /** - * Set/Get the HTTP output character encoding. - * Output after this function is called will be converted from the set internal encoding to encoding. - * - * @param null|string $encoding If encoding is set, - * mb_http_output sets the HTTP output character - * encoding to encoding. - * - * If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. - * @return bool|string If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. Otherwise, - * Returns TRUE on success. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -456,18 +292,8 @@ function mb_http_output(?string $encoding = null) /** - * Set/Get the internal character encoding - * - * @param null|string $encoding 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. - * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then - * the current character encoding name is returned. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -487,15 +313,9 @@ function mb_internal_encoding(?string $encoding = null) /** - * Returns the Unicode code point value of the given character. - * - * This function complements mb_chr. - * - * @param string $string A string - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return int The Unicode code point for the first character of string. + * @param string $string + * @param null|string $encoding + * @return int * @throws MbstringException * */ @@ -515,15 +335,8 @@ function mb_ord(string $string, ?string $encoding = null): int /** - * Parses GET/POST/COOKIE data and - * sets global variables. Since PHP does not provide raw POST/COOKIE - * data, it can only be used for GET data for now. It parses URL - * encoded data, detects encoding, converts coding to internal - * encoding and set values to the result array or - * global variables. - * - * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param string $string + * @param array|null $result * @throws MbstringException * */ @@ -538,16 +351,8 @@ function mb_parse_str(string $string, ?array &$result): void /** - * Set/Get character encoding for a multibyte regex. - * - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * 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. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -567,59 +372,11 @@ function mb_regex_encoding(?string $encoding = null) /** - * Sends email. Headers and messages are converted and encoded according - * to the mb_language setting. It's a wrapper function - * for mail, so see also mail for details. - * - * @param string $to The mail addresses being sent to. Multiple - * recipients may be specified by putting a comma between each - * address in to. - * This parameter is not automatically encoded. - * @param string $subject The subject of the mail. - * @param string $message The message of the mail. - * @param array|null|string $additional_headers String or array to be inserted at the end of the email header. - * - * This is typically used to add extra headers (From, Cc, and Bcc). - * Multiple extra headers should be separated with a CRLF (\r\n). - * Validate parameter not to be injected unwanted headers by attackers. - * - * If an array is passed, its keys are the header names and its - * values are the respective header values. - * - * When sending mail, the mail must contain - * a From header. This can be set with the - * additional_headers parameter, or a default - * can be set in php.ini. - * - * Failing to do this will result in an error - * message similar to Warning: mail(): "sendmail_from" not - * set in php.ini or custom "From:" header missing. - * The From header sets also - * Return-Path under Windows. - * - * If messages are not received, try using a LF (\n) only. - * Some Unix mail transfer agents (most notably - * qmail) replace LF by CRLF - * automatically (which leads to doubling CR if CRLF is used). - * This should be a last resort, as it does not comply with - * RFC 2822. - * @param null|string $additional_params additional_params is a MTA command line - * parameter. It is useful when setting the correct Return-Path - * header when using sendmail. - * - * This parameter is escaped by escapeshellcmd internally - * to prevent command execution. escapeshellcmd prevents - * command execution, but allows to add additional parameters. For security reason, - * this parameter should be validated. - * - * Since escapeshellcmd is applied automatically, some characters - * that are allowed as email addresses by internet RFCs cannot be used. Programs - * that are required to use these characters mail cannot be used. - * - * The user that the webserver runs as should be added as a trusted user to the - * sendmail configuration to prevent a 'X-Warning' header from being added - * to the message when the envelope sender (-f) is set using this method. - * For sendmail users, this file is /etc/mail/trusted-users. + * @param string $to + * @param string $subject + * @param string $message + * @param array|null|string $additional_headers + * @param null|string $additional_params * @throws MbstringException * */ @@ -638,17 +395,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ /** - * Split a multibyte - * string using regular expression - * pattern and returns the result as an - * array. - * - * @param string $pattern The regular expression pattern. - * @param string $string The string being split. - * @param int $limit If optional parameter limit is specified, - * it will be split in limit elements as - * maximum. - * @return list The result as an array. + * @param string $pattern + * @param string $string + * @param int $limit + * @return list * @throws MbstringException * */ diff --git a/generated/8.4/misc.php b/generated/8.4/misc.php index 20af6b18..f9a6bcb5 100644 --- a/generated/8.4/misc.php +++ b/generated/8.4/misc.php @@ -5,26 +5,9 @@ use Safe\Exceptions\MiscException; /** - * Defines a named constant at runtime. - * - * @param string $constant_name The name of the constant. - * - * It is possible to define constants with reserved or - * even invalid names, whose value can (only) be retrieved with - * constant. However, doing so is not recommended. - * @param mixed $value The value of the constant. In PHP 5, value must - * be a scalar value (int, - * float, string, bool, or - * NULL). In PHP 7, array values are also accepted. - * - * While it is possible to define resource constants, it is - * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive 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. - * - * Case-insensitive constants are stored as lower-case. + * @param string $constant_name + * @param mixed $value + * @param bool $case_insensitive * @throws MiscException * */ @@ -39,22 +22,9 @@ function define(string $constant_name, $value, bool $case_insensitive = false): /** - * Prints out or returns a syntax highlighted version of the code contained - * in filename using the colors defined in the - * built-in syntax highlighter for PHP. - * - * Many servers are configured to automatically highlight files - * with a phps extension. For example, - * example.phps when viewed will show the - * syntax highlighted source of the file. To enable this, add this - * line to the httpd.conf: - * - * @param string $filename Path to the PHP file to be highlighted. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $filename + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -70,15 +40,9 @@ function highlight_file(string $filename, bool $return = false) /** - * Outputs or returns html markup for a syntax highlighted version of the given PHP code - * using the colors defined in the built-in syntax highlighter for PHP. - * - * @param string $string The PHP code to be highlighted. This should include the opening tag. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. - * Otherwise, it will return TRUE. + * @param string $string + * @param bool $return + * @return bool|string * */ function highlight_string(string $string, bool $return = false) @@ -90,16 +54,8 @@ function highlight_string(string $string, bool $return = false) /** - * Returns the system's high resolution time, counted from an arbitrary point in time. - * The delivered timestamp is monotonic and can not be adjusted. - * - * @param bool $as_number Whether the high resolution time should be returned as array - * or number. - * @return array{0:int,1:int}|float|int Returns an array of integers in the form [seconds, nanoseconds], if the - * parameter as_number is false. Otherwise the nanoseconds - * are returned as int (64bit platforms) or float - * (32bit platforms). - * Returns FALSE on failure. + * @param bool $as_number + * @return array{0:int,1:int}|float|int * @throws MiscException * */ @@ -115,156 +71,9 @@ function hrtime(bool $as_number = false) /** - * Pack given arguments into a binary string according to - * format. - * - * The idea for this function was taken from Perl and all formatting codes - * work the same as in Perl. However, there are some formatting codes that are - * missing such as Perl's "u" format code. - * - * Note that the distinction between signed and unsigned values only - * affects the function unpack, where as - * function pack gives the same result for - * signed and unsigned format codes. - * - * @param string $format The format string consists of format codes - * followed by an optional repeater argument. The repeater argument can - * be either an integer value or * for repeating to - * the end of the input data. For a, A, h, H the repeat count specifies - * how many characters of one data argument are taken, for @ it is the - * absolute position where to put the next data, for everything else the - * repeat count specifies how many data arguments are consumed and packed - * into the resulting binary string. - * - * Currently implemented formats are: - * - * pack format characters - * - * - * - * Code - * Description - * - * - * - * - * a - * NUL-padded string - * - * - * A - * SPACE-padded string - * - * h - * Hex string, low nibble first - * - * H - * Hex string, high nibble first - * csigned char - * - * C - * unsigned char - * - * s - * signed short (always 16 bit, machine byte order) - * - * - * S - * unsigned short (always 16 bit, machine byte order) - * - * - * n - * unsigned short (always 16 bit, big endian byte order) - * - * - * v - * unsigned short (always 16 bit, little endian byte order) - * - * - * i - * signed integer (machine dependent size and byte order) - * - * - * I - * unsigned integer (machine dependent size and byte order) - * - * - * l - * signed long (always 32 bit, machine byte order) - * - * - * L - * unsigned long (always 32 bit, machine byte order) - * - * - * N - * unsigned long (always 32 bit, big endian byte order) - * - * - * V - * unsigned long (always 32 bit, little endian byte order) - * - * - * q - * signed long long (always 64 bit, machine byte order) - * - * - * Q - * unsigned long long (always 64 bit, machine byte order) - * - * - * J - * unsigned long long (always 64 bit, big endian byte order) - * - * - * P - * unsigned long long (always 64 bit, little endian byte order) - * - * - * f - * float (machine dependent size and representation) - * - * - * g - * float (machine dependent size, little endian byte order) - * - * - * G - * float (machine dependent size, big endian byte order) - * - * - * d - * double (machine dependent size and representation) - * - * - * e - * double (machine dependent size, little endian byte order) - * - * - * E - * double (machine dependent size, big endian byte order) - * - * - * x - * NUL byte - * - * - * X - * Back up one byte - * - * - * Z - * NUL-padded string - * - * - * @ - * NUL-fill to absolute position - * - * - * - * + * @param string $format * @param mixed $values - * @return string Returns a binary string containing data. + * @return string * */ function pack(string $format, ...$values): string @@ -280,15 +89,10 @@ function pack(string $format, ...$values): string /** - * Convert string from one codepage to another. - * - * @param int|string $in_codepage The codepage of the subject string. - * Either the codepage name or identifier. - * @param int|string $out_codepage The codepage to convert the subject string to. - * Either the codepage name or identifier. - * @param string $subject The string to convert. - * @return string The subject string converted to - * out_codepage. + * @param int|string $in_codepage + * @param int|string $out_codepage + * @param string $subject + * @return string * @throws MiscException * */ @@ -304,9 +108,7 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str /** - * Set the codepage of the current process. - * - * @param int $codepage A codepage identifier. + * @param int $codepage * @throws MiscException * */ @@ -321,13 +123,8 @@ function sapi_windows_cp_set(int $codepage): void /** - * Sends a CTRL event to another process in the same process group. - * - * @param int $event The CTRL event to send; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * @param int $pid The ID of the process to which to send the event to. If 0 - * is given, the event is sent to all processes of the process group. + * @param int $event + * @param int $pid * @throws MiscException * */ @@ -342,54 +139,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void /** - * Sets or removes a CTRL event handler, which allows Windows - * CLI processes to intercept or ignore CTRL+C and - * CTRL+BREAK events. Note that in multithreaded environments, - * this is only possible when called from the main thread. - * - * @param callable|null $handler A callback function to set or remove. If set, this function will be called - * whenever a - * - * CTRL - * C - * - * or - * - * CTRL - * BREAK - * - * event occurs. - * The function is supposed to have the following signature: - * - * voidhandler - * intevent - * - * - * - * event - * - * - * The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * - * - * - * - * Setting a NULL handler causes the process to ignore - * - * CTRL - * C - * - * events, but not - * - * CTRL - * BREAK - * - * events. - * @param bool $add The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param callable|null $handler + * @param bool $add * @throws MiscException * */ @@ -404,18 +155,8 @@ function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): vo /** - * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled. - * - * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. - * If the feature has been successfully enabled (or disabled). - * - * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * - * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. - * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. - * - * @param resource $stream The stream on which the function will operate. - * @param bool|null $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @param resource $stream + * @param bool|null $enable * @throws MiscException * */ @@ -434,18 +175,8 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): void /** - * Delays the program execution for the given number of - * seconds. - * - * @param int $seconds Halt time in seconds (must be greater than or equal to 0). - * @return false|int Returns zero on success. - * - * If the call was interrupted by a signal, sleep returns - * a non-zero value. On Windows, this value will always be - * 192 (the value of the - * WAIT_IO_COMPLETION constant within the Windows API). - * On other platforms, the return value will be the number of seconds left to - * sleep. + * @param int $seconds + * @return false|int * */ function sleep(int $seconds) @@ -457,29 +188,9 @@ function sleep(int $seconds) /** - * Delays program execution for the given number of - * seconds and nanoseconds. - * - * @param int $seconds Must be a non-negative integer. - * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool Returns TRUE on success. - * - * If the delay was interrupted by a signal, an associative array will be - * returned with the components: - * - * - * - * seconds - number of seconds remaining in - * the delay - * - * - * - * - * nanoseconds - number of nanoseconds - * remaining in the delay - * - * - * + * @param int $seconds + * @param int $nanoseconds + * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool * @throws MiscException * */ @@ -495,10 +206,7 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** - * Makes the script sleep until the specified - * timestamp. - * - * @param float $timestamp The timestamp when the script should wake. + * @param float $timestamp * @throws MiscException * */ @@ -513,35 +221,10 @@ function time_sleep_until(float $timestamp): void /** - * Unpacks from a binary string into an array according to the given - * format. - * - * The unpacked data is stored in an associative array. To - * accomplish this you have to name the different format codes and - * separate them by a slash /. If a repeater argument is present, - * then each of the array keys will have a sequence number behind - * the given name. - * - * Changes were made to bring this function into line with Perl: - * - * - * The "a" code now retains trailing NULL bytes. - * - * - * The "A" code now strips all trailing ASCII whitespace (spaces, tabs, - * newlines, carriage returns, and NULL bytes). - * - * - * The "Z" code was added for NULL-padded strings, and removes trailing - * NULL bytes. - * - * - * - * @param string $format See pack for an explanation of the format codes. - * @param string $string The packed data. - * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary - * string. + * @param string $format + * @param string $string + * @param int $offset + * @return array * @throws MiscException * */ diff --git a/generated/8.4/mysql.php b/generated/8.4/mysql.php index 559a8190..f96eb641 100644 --- a/generated/8.4/mysql.php +++ b/generated/8.4/mysql.php @@ -5,24 +5,7 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened - * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see - * freeing resources - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no connection is found or - * established, an E_WARNING level error is - * generated. + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -37,39 +20,12 @@ function mysql_close($link_identifier = null): void /** - * Opens or reuses a connection to a MySQL server. - * - * @param string $server 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 SQL safe mode, this parameter is ignored - * and value 'localhost:3306' is always used. - * @param string $username The username. Default value is defined by mysql.default_user. In - * SQL safe mode, this parameter is ignored and the name of the user that - * owns the server process is used. - * @param string $password The password. Default value is defined by mysql.default_password. In - * SQL safe mode, this parameter is ignored and empty password is used. - * @param bool $new_link If a second call is made to mysql_connect - * with the same arguments, no new link will be established, but - * instead, the link identifier of the already opened link will be - * returned. The new_link parameter modifies this - * behavior and makes mysql_connect always open - * a new link, even if mysql_connect was called - * before with the same parameters. - * In SQL safe mode, this parameter is ignored. - * @param int $client_flags The client_flags parameter can be a combination - * of the following constants: - * 128 (enable LOAD DATA LOCAL handling), - * MYSQL_CLIENT_SSL, - * MYSQL_CLIENT_COMPRESS, - * MYSQL_CLIENT_IGNORE_SPACE or - * MYSQL_CLIENT_INTERACTIVE. - * Read the section about for further information. - * In SQL safe mode, this parameter is ignored. - * @return resource Returns a MySQL link identifier on success. + * @param string $server + * @param string $username + * @param string $password + * @param bool $new_link + * @param int $client_flags + * @return resource * @throws MysqlException * */ @@ -97,17 +53,8 @@ function mysql_connect(?string $server = null, ?string $username = null, ?string /** - * mysql_create_db attempts to create a new - * database on the server associated with the specified link - * identifier. - * - * @param string $database_name The name of the database being created. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -122,23 +69,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void /** - * mysql_data_seek moves the internal row - * pointer of the MySQL result associated with the specified result - * identifier to point to the specified row number. The next call - * to a MySQL fetch function, such as mysql_fetch_assoc, - * would return that row. - * - * row_number starts at 0. The - * row_number should be a value in the range from 0 to - * mysql_num_rows - 1. However if the result set - * is empty (mysql_num_rows == 0), a seek to 0 will - * fail with an E_WARNING and - * mysql_data_seek will return FALSE. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row_number The desired row number of the new result pointer. + * @param resource $result + * @param int $row_number * @throws MysqlException * */ @@ -153,15 +85,10 @@ function mysql_data_seek($result, int $row_number): void /** - * Retrieve the database name from a call to - * mysql_list_dbs. - * - * @param resource $result The result pointer from a call to mysql_list_dbs. - * @param int $row The index into the result set. - * @param mixed $field The field name. - * @return string Returns the database name on success. If FALSE - * is returned, use mysql_error to determine the nature - * of the error. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -177,22 +104,10 @@ function mysql_db_name($result, int $row, $field = null): string /** - * mysql_db_query selects a database, and executes a - * query on it. - * - * @param string $database The name of the database that will be selected. - * @param string $query The MySQL query. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for - * INSERT/UPDATE/DELETE - * queries to indicate success/failure. + * @param string $database + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -208,19 +123,8 @@ function mysql_db_query(string $database, string $query, $link_identifier = null /** - * mysql_drop_db attempts to drop (remove) an - * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql - * DROP DATABASE statement instead. - * - * @param string $database_name The name of the database that will be deleted. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -235,21 +139,8 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void /** - * Returns an array that corresponds to the lengths of each field - * in the last row fetched by MySQL. - * - * mysql_fetch_lengths stores the lengths of - * each result column in the last row returned by - * mysql_fetch_row, - * mysql_fetch_assoc, - * mysql_fetch_array, and - * mysql_fetch_object in an array, starting at - * offset 0. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return array An array of lengths on success. + * @param resource $result + * @return array * @throws MysqlException * */ @@ -265,27 +156,9 @@ function mysql_fetch_lengths($result): array /** - * mysql_field_flags returns the field flags of - * the specified field. The flags are reported as a single word - * per flag separated by a single space, so that you can split the - * returned value using explode. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string Returns a string of flags associated with the result. - * - * 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", - * "unsigned", "zerofill", - * "binary", "enum", - * "auto_increment" and "timestamp". + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -301,17 +174,9 @@ function mysql_field_flags($result, int $field_offset): string /** - * mysql_field_len returns the length of the - * specified field. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return int The length of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return int * @throws MysqlException * */ @@ -327,17 +192,9 @@ function mysql_field_len($result, int $field_offset): int /** - * mysql_field_name returns the name of the - * specified field index. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string The name of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -353,18 +210,8 @@ function mysql_field_name($result, int $field_offset): string /** - * Seeks to the specified field offset. If the next call to - * mysql_fetch_field doesn't include a field - * offset, the field offset specified in - * mysql_field_seek will be returned. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. + * @param resource $result + * @param int $field_offset * @throws MysqlException * */ @@ -379,17 +226,7 @@ function mysql_field_seek($result, int $field_offset): void /** - * mysql_free_result will free all memory - * associated with the result identifier result. - * - * mysql_free_result only needs to be called if - * you are concerned about how much memory is being used for queries - * that return large result sets. All associated result memory is - * automatically freed at the end of the script's execution. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. + * @param resource $result * @throws MysqlException * */ @@ -404,17 +241,8 @@ function mysql_free_result($result): void /** - * Describes the type of connection in use for the connection, including the - * server host name. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns a string describing the type of MySQL connection in use for the - * connection. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -430,15 +258,8 @@ function mysql_get_host_info($link_identifier = null): string /** - * Retrieves the MySQL protocol. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int Returns the MySQL protocol on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -454,15 +275,8 @@ function mysql_get_proto_info($link_identifier = null): int /** - * Retrieves the MySQL server version. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the MySQL server version on success. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -478,17 +292,8 @@ function mysql_get_server_info($link_identifier = null): string /** - * Returns detailed information about the last query. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns information about the statement on success. See the example below for which statements provide information, - * and what the returned value may look like. Statements that are not listed - * will return FALSE. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -504,18 +309,8 @@ function mysql_info($link_identifier = null): string /** - * Returns a result pointer containing the databases available from the - * current mysql daemon. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse - * this result pointer, or any function for result tables, such as - * mysql_fetch_array. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -531,26 +326,10 @@ function mysql_list_dbs($link_identifier = null) /** - * Retrieves information about the given table name. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW COLUMNS FROM - * table [LIKE 'name'] statement instead. - * - * @param string $database_name The name of the database that's being queried. - * @param string $table_name The name of the table that's being queried. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * The returned result can be used with mysql_field_flags, - * mysql_field_len, - * mysql_field_name and - * mysql_field_type. + * @param string $database_name + * @param string $table_name + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -566,15 +345,8 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden /** - * Retrieves the current MySQL server threads. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -590,24 +362,9 @@ function mysql_list_processes($link_identifier = null) /** - * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param string $database The name of the database - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param string $database + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -623,13 +380,8 @@ function mysql_list_tables(string $database, $link_identifier = null) /** - * Retrieves the number of fields from a query. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int Returns the number of fields in the result set resource on - * success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -645,15 +397,8 @@ function mysql_num_fields($result): int /** - * Retrieves the number of rows from a result set. This command is only valid - * for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or - * DELETE query, use mysql_affected_rows. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int The number of rows in a result set on success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -669,41 +414,9 @@ function mysql_num_rows($result): int /** - * mysql_query sends a unique query (multiple queries - * are not supported) to the currently - * active database on the server that's associated with the - * specified link_identifier. - * - * @param string $query An SQL query - * - * The query string should not end with a semicolon. - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, - * mysql_query - * returns a resource on success. - * - * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, - * mysql_query returns TRUE on success. - * - * The returned result resource should be passed to - * mysql_fetch_array, and other - * functions for dealing with result tables, to access the returned data. - * - * Use mysql_num_rows to find out how many rows - * were returned for a SELECT statement or - * mysql_affected_rows to find out how many - * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - * statement. - * - * mysql_query will also fail and return FALSE - * if the user does not have permission to access the table(s) referenced by - * the query. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -719,28 +432,9 @@ function mysql_query(string $query, $link_identifier = null) /** - * Escapes special characters in the unescaped_string, - * taking into account the current character set of the connection so that it - * is safe to place it in a mysql_query. If binary data - * is to be inserted, this function must be used. - * - * mysql_real_escape_string calls MySQL's library function - * mysql_real_escape_string, which prepends backslashes to the following characters: - * \x00, \n, - * \r, \, ', - * " and \x1a. - * - * This function must always (with few exceptions) be used to make data - * safe before sending a query to MySQL. - * - * @param string $unescaped_string The string that is to be escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the escaped string. + * @param string $unescaped_string + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -756,28 +450,10 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n /** - * Retrieves the contents of one cell from a MySQL result set. - * - * When working on large result sets, you should consider using one - * of the functions that fetch an entire row (specified below). As - * these functions return the contents of multiple cells in one - * function call, they're MUCH quicker than - * mysql_result. Also, note that specifying a - * numeric offset for the field argument is much quicker than - * specifying a fieldname or tablename.fieldname argument. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row The row number from the result that's being retrieved. Row numbers - * start at 0. - * @param mixed $field 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 - * dot field name (tablename.fieldname). If the column name has been - * 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. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -793,17 +469,8 @@ function mysql_result($result, int $row, $field = 0): string /** - * Sets the current active database on the server that's associated with the - * specified link identifier. Every subsequent call to - * mysql_query will be made on the active database. - * - * @param string $database_name The name of the database that is to be selected. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -818,15 +485,8 @@ function mysql_select_db(string $database_name, $link_identifier = null): void /** - * Sets the default character set for the current connection. - * - * @param string $charset A valid character set name. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $charset + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -841,20 +501,9 @@ function mysql_set_charset(string $charset, $link_identifier = null): void /** - * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from - * mysql_list_tables. - * @param int $i The integer index (row/table number) - * @return string The name of the table on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param resource $result + * @param int $i + * @return string * @throws MysqlException * */ @@ -870,17 +519,8 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will - * change. This means only retrieve the thread ID when needed. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int The thread ID on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -896,34 +536,9 @@ function mysql_thread_id($link_identifier = null): int /** - * mysql_unbuffered_query sends the SQL query - * query to MySQL without automatically - * fetching and buffering the result rows as - * mysql_query does. This saves a considerable - * amount of memory with SQL queries that produce large result sets, - * and you can start working on the result set immediately after the - * first row has been retrieved as you don't have to wait until the - * complete SQL query has been performed. To use - * mysql_unbuffered_query while multiple database - * connections are open, you must specify the optional parameter - * link_identifier to identify which connection - * you want to use. - * - * @param string $query The SQL query to execute. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query - * returns a resource on success. - * - * For other type of SQL statements, UPDATE, DELETE, DROP, etc, - * mysql_unbuffered_query returns TRUE on success. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ diff --git a/generated/8.4/mysqli.php b/generated/8.4/mysqli.php index 8eb49159..b6c6660f 100644 --- a/generated/8.4/mysqli.php +++ b/generated/8.4/mysqli.php @@ -5,9 +5,7 @@ use Safe\Exceptions\MysqliException; /** - * Returns client per-process statistics. - * - * @return array|false Returns an array with client stats. + * @return array|false * */ function mysqli_get_client_stats() diff --git a/generated/8.4/network.php b/generated/8.4/network.php index 3812b5d1..8aad282e 100644 --- a/generated/8.4/network.php +++ b/generated/8.4/network.php @@ -5,10 +5,7 @@ use Safe\Exceptions\NetworkException; /** - * closelog closes the descriptor being used to write to - * the system logger. The use of closelog is optional. - * - * @return bool Always returns TRUE. + * @return bool * */ function closelog(): bool @@ -20,212 +17,12 @@ function closelog(): bool /** - * Fetch DNS Resource Records associated with the given - * hostname. - * - * @param string $hostname hostname should be a valid DNS hostname such - * as "www.example.com". Reverse lookups can be generated - * using in-addr.arpa notation, but - * gethostbyaddr is more suitable for - * the majority of reverse lookups. - * - * Per DNS standards, email addresses are given in user.host format (for - * example: hostmaster.example.com as opposed to hostmaster@example.com), - * be sure to check this value and modify if necessary before using it - * with a functions such as mail. - * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. - * To limit the query, use one of the - * DNS_* - * constants. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource - * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any - * Additional Records. - * @param bool $raw The type will be interpreted as a raw DNS type ID - * (the DNS_* constants cannot be used). - * The return value will contain a data key, which needs - * to be manually parsed. - * @return list This function returns an array of associative arrays. Each associative array contains - * at minimum the following keys: - * - * Basic DNS attributes - * - * - * - * Attribute - * Meaning - * - * - * - * - * host - * - * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * - * class - * - * dns_get_record only returns Internet class records and as - * such this parameter will always return IN. - * - * - * - * type - * - * String containing the record type. Additional attributes will also be contained - * in the resulting array dependant on the value of type. See table below. - * - * - * - * ttl - * - * "Time To Live" remaining for this record. This will not equal - * the record's original ttl, but will rather equal the original ttl minus whatever - * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * - * Other keys in associative arrays dependent on type - * - * - * - * Type - * Extra Columns - * - * - * - * - * A - * - * ip: An IPv4 addresses in dotted decimal notation. - * - * - * - * MX - * - * pri: Priority of mail exchanger. - * Lower numbers indicate greater priority. - * target: FQDN of the mail exchanger. - * See also dns_get_mx. - * - * - * - * CNAME - * - * target: FQDN of location in DNS namespace to which - * the record is aliased. - * - * - * - * NS - * - * target: FQDN of the name server which is authoritative - * for this hostname. - * - * - * - * PTR - * - * target: Location within the DNS namespace to which - * this record points. - * - * - * - * TXT - * - * txt: Arbitrary string data associated with this record. - * - * - * - * HINFO - * - * cpu: IANA number designating the CPU of the machine - * referenced by this record. - * os: IANA number designating the Operating System on - * the machine referenced by this record. - * See IANA's Operating System - * Names for the meaning of these values. - * - * - * - * CAA - * - * flags: A one-byte bitfield; currently only bit 0 is defined, - * meaning 'critical'; other bits are reserved and should be ignored. - * tag: The CAA tag name (alphanumeric ASCII string). - * value: The CAA tag value (binary string, may use subformats). - * For additional information see: RFC 6844 - * - * - * - * SOA - * - * mname: FQDN of the machine from which the resource - * records originated. - * rname: Email address of the administrative contact - * for this domain. - * serial: Serial # of this revision of the requested - * domain. - * refresh: Refresh interval (seconds) secondary name - * servers should use when updating remote copies of this domain. - * retry: Length of time (seconds) to wait after a - * failed refresh before making a second attempt. - * expire: Maximum length of time (seconds) a secondary - * DNS server should retain remote copies of the zone data without a - * successful refresh before discarding. - * minimum-ttl: Minimum length of time (seconds) a - * client can continue to use a DNS resolution before it should request - * a new resolution from the server. Can be overridden by individual - * resource records. - * - * - * - * AAAA - * - * ipv6: IPv6 address - * - * - * - * A6 - * - * masklen: Length (in bits) to inherit from the target - * specified by chain. - * ipv6: Address for this specific record to merge with - * chain. - * chain: Parent record to merge with - * ipv6 data. - * - * - * - * SRV - * - * pri: (Priority) lowest priorities should be used first. - * weight: Ranking to weight which of commonly prioritized - * targets should be chosen at random. - * target and port: hostname and port - * where the requested service can be found. - * For additional information see: RFC 2782 - * - * - * - * NAPTR - * - * order and pref: Equivalent to - * pri and weight above. - * flags, services, regex, - * and replacement: Parameters as defined by - * RFC 2915. - * - * - * - * - * + * @param string $hostname + * @param int $type + * @param array|null $authoritative_name_servers + * @param array|null $additional_records + * @param bool $raw + * @return list * @throws NetworkException * */ @@ -241,51 +38,12 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authorit /** - * Initiates a socket connection to the resource specified by - * hostname. - * - * PHP supports targets in the Internet and Unix domains as described in - * . A list of supported transports can also be - * retrieved using stream_get_transports. - * - * The socket will by default be opened in blocking mode. You can - * switch it to non-blocking mode by using - * stream_set_blocking. - * - * The function stream_socket_client is similar but - * provides a richer set of options, including non-blocking connection and the - * ability to provide a stream context. - * - * @param string $hostname If OpenSSL support is - * installed, you may prefix the hostname - * with either ssl:// or tls:// to - * use an SSL or TLS client connection over TCP/IP to connect to the - * remote host. - * @param int $port The port number. This can be omitted and skipped with - * -1 for transports that do not use ports, such as - * unix://. - * @param int|null $error_code If provided, holds the system level error number that occurred in the - * system-level connect() call. - * - * If the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the - * connect() call. This is most likely due to a - * problem initializing the socket. - * @param null|string $error_message The error message as a string. - * @param float|null $timeout The connection timeout, in seconds. When NULL, the - * default_socket_timeout php.ini setting is used. - * - * If you need to set a timeout for reading/writing data over the - * socket, use stream_set_timeout, as the - * timeout parameter to - * fsockopen only applies while connecting the - * socket. - * @return resource fsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). If the call fails, it will return FALSE + * @param string $hostname + * @param int $port + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @return resource * @throws NetworkException * */ @@ -305,11 +63,7 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? /** - * gethostname gets the standard host name for - * the local machine. - * - * @return string Returns a string with the hostname on success, otherwise FALSE is - * returned. + * @return string * @throws NetworkException * */ @@ -325,12 +79,8 @@ function gethostname(): string /** - * getprotobyname returns the protocol number - * associated with the protocol protocol as per - * /etc/protocols. - * - * @param string $protocol The protocol name. - * @return int Returns the protocol number. + * @param string $protocol + * @return int * @throws NetworkException * */ @@ -346,12 +96,8 @@ function getprotobyname(string $protocol): int /** - * getprotobynumber returns the protocol name - * associated with protocol protocol as per - * /etc/protocols. - * - * @param int $protocol The protocol number. - * @return string Returns the protocol name as a string. + * @param int $protocol + * @return string * @throws NetworkException * */ @@ -367,14 +113,9 @@ function getprotobynumber(int $protocol): string /** - * getservbyport returns the Internet service - * associated with port for the specified - * protocol as per /etc/services. - * - * @param int $port The port number. - * @param string $protocol protocol is either "tcp" - * or "udp" (in lowercase). - * @return string Returns the Internet service name as a string. + * @param int $port + * @param string $protocol + * @return string * @throws NetworkException * */ @@ -390,14 +131,7 @@ function getservbyport(int $port, string $protocol): string /** - * Registers a function that will be called when PHP starts sending output. - * - * The callback is executed just after PHP prepares all - * headers to be sent, and before any other output is sent, creating a window - * to manipulate the outgoing headers before being sent. - * - * @param callable $callback Function called just before the headers are sent. It gets no parameters - * and the return value is ignored. + * @param callable $callback * @throws NetworkException * */ @@ -412,12 +146,8 @@ function header_register_callback(callable $callback): void /** - * This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * string representation. - * - * @param string $ip A 32bit IPv4, or 128bit IPv6 address. - * @return string Returns a string representation of the address. + * @param string $ip + * @return string * @throws NetworkException * */ @@ -433,15 +163,8 @@ function inet_ntop(string $ip): string /** - * This function converts a human readable IPv4 or IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * 32bit or 128bit binary structure. - * - * @param string $ip A human readable IPv4 or IPv6 address. - * @return string Returns the in_addr representation of the given - * ip, or FALSE if a syntactically invalid - * ip is given (for example, an IPv4 address - * without dots or an IPv6 address without colons). + * @param string $ip + * @return string * @throws NetworkException * */ @@ -457,12 +180,8 @@ function inet_pton(string $ip): string /** - * The function long2ip generates an Internet address - * in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer - * representation. - * - * @param int $ip A proper address representation in long integer. - * @return false|string Returns the Internet IP address as a string. + * @param int $ip + * @return false|string * */ function long2ip(int $ip) @@ -474,96 +193,7 @@ function long2ip(int $ip) /** - * Returns an enumeration of network interfaces (adapters) on the local machine. - * - * @return array Returns an associative array where the key is the name of the interface and - * the value an associative array of interface attributes. - * - * Each interface associative array contains: - * - * Interface attributes - * - * - * - * Name - * Description - * - * - * - * - * description - * - * Optional string value for description of the interface. - * Windows only. - * - * - * - * mac - * - * Optional string value for MAC address of the interface. - * Windows only. - * - * - * - * mtu - * - * Integer value for Maximum transmission unit (MTU) of the interface. - * Windows only. - * - * - * - * unicast - * - * Array of associative arrays, see Unicast attributes below. - * - * - * - * up - * - * Boolean status (on/off) for interface. - * - * - * - * - * - * - * - * Unicast attributes - * - * - * - * Name - * Description - * - * - * - * - * flags - * - * Integer value. - * - * - * - * family - * - * Integer value. - * - * - * - * address - * - * String value for address in either IPv4 or IPv6. - * - * - * - * netmask - * - * String value for netmask in either IPv4 or IPv6. - * - * - * - * - * + * @return array * @throws NetworkException * */ @@ -579,44 +209,10 @@ function net_get_interfaces(): array /** - * openlog opens a connection to the system - * logger for a program. - * - * The use of openlog is optional. It - * will automatically be called by syslog if - * necessary, in which case prefix will default - * to the empty string. - * - * @param string $prefix The string prefix is added to each message. - * @param int $flags Bitmask of the following constants: - * - * LOG_CONS - * LOG_NDELAY - * LOG_ODELAY - * LOG_NOWAIT - * LOG_PERROR - * LOG_PID - * - * @param int $facility The facility argument is used to specify - * what type of program is logging the message. - * This lets the configuration file specify that messages from different - * facilities will be handled differently. - * Must be one of the following constants: - * - * LOG_AUTH - * LOG_AUTHPRIV - * LOG_CRON - * LOG_DAEMON - * LOG_KERN - * LOG_LOCAL[0-7] - * LOG_LPR - * LOG_MAIL - * LOG_NEWS - * LOG_SYSLOG - * LOG_USER - * LOG_UUCP - * - * @return bool Always returns TRUE. + * @param string $prefix + * @param int $flags + * @param int $facility + * @return bool * */ function openlog(string $prefix, int $flags, int $facility): bool @@ -628,20 +224,12 @@ function openlog(string $prefix, int $flags, int $facility): bool /** - * This function behaves exactly as fsockopen with the - * difference that the connection is not closed after the script finishes. - * It is the persistent version of fsockopen. - * * @param string $hostname * @param int $port * @param int|null $error_code * @param null|string $error_message * @param float|null $timeout - * @return resource pfsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @return resource * @throws NetworkException * */ @@ -661,30 +249,9 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, /** - * syslog generates a log message that will be - * distributed by the system logger. - * - * For information on setting up a user defined log handler, see the - * syslog.conf - * 5 Unix manual page. More - * information on the syslog facilities and option can be found in the man - * pages for syslog - * 3 on Unix machines. - * - * @param int $priority One of the - * - * LOG_EMERG - * LOG_ALERT - * LOG_CRIT - * LOG_ERR - * LOG_WARNING - * LOG_NOTICE - * LOG_INFO - * LOG_DEBUG - * - * constants. - * @param string $message The message to send. - * @return bool Always returns TRUE. + * @param int $priority + * @param string $message + * @return bool * */ function syslog(int $priority, string $message): bool diff --git a/generated/8.4/oci8.php b/generated/8.4/oci8.php index 1dce25ed..e1235f27 100644 --- a/generated/8.4/oci8.php +++ b/generated/8.4/oci8.php @@ -5,99 +5,12 @@ use Safe\Exceptions\Oci8Exception; /** - * Binds the PHP array var to the Oracle - * placeholder param, which points to an Oracle PL/SQL - * array. Whether it will be used for input or output will be determined at - * run-time. - * - * @param resource $statement A valid OCI statement identifier. - * @param string $param The Oracle placeholder. - * @param array $var An array. - * @param int $max_array_length Sets the maximum length both for incoming and result arrays. - * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, - * oci_bind_array_by_name will find the longest - * element in the incoming array and will use it as the maximum length. - * @param int $type Should be used to set the type of PL/SQL array items. See list of - * available types below: - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * - * - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * - * - * - * SQLT_FLT - for arrays of FLOAT. - * - * - * - * - * SQLT_AFC - for arrays of CHAR. - * - * - * - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * - * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * - * SQLT_AVC - for arrays of CHARZ. - * - * - * - * - * SQLT_STR - for arrays of STRING. - * - * - * - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * - * SQLT_ODT - for arrays of DATE. - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * SQLT_FLT - for arrays of FLOAT. - * - * SQLT_AFC - for arrays of CHAR. - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * SQLT_VCS - for arrays of VARCHAR. - * - * SQLT_AVC - for arrays of CHARZ. - * - * SQLT_STR - for arrays of STRING. - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * SQLT_ODT - for arrays of DATE. + * @param resource $statement + * @param string $param + * @param array $var + * @param int $max_array_length + * @param int $max_item_length + * @param int $type * @throws Oci8Exception * */ @@ -112,198 +25,11 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max /** - * Binds a PHP variable var to the Oracle - * bind variable placeholder param. Binding - * is important for Oracle database performance and also as a way to - * avoid SQL Injection security issues. - * - * Binding allows the database to reuse the statement context and - * caches from previous executions of the statement, even if another - * user or process originally executed it. Binding reduces SQL - * Injection concerns because the data associated with a bind - * variable is never treated as part of the SQL statement. It does - * not need quoting or escaping. - * - * PHP variables that have been bound can be changed and the - * statement re-executed without needing to re-parse the statement or - * re-bind. - * - * In Oracle, bind variables are commonly divided - * into IN binds for values that are passed into - * the database, and OUT binds for values that are - * returned to PHP. A bind variable may be - * both IN and OUT. Whether a - * bind variable will be used for input or output is determined at - * run-time. - * - * You must specify max_length when using - * an OUT bind so that PHP allocates enough memory - * to hold the returned value. - * - * For IN binds it is recommended to set - * the max_length length if the statement is - * re-executed multiple times with different values for the PHP - * variable. Otherwise Oracle may truncate data to the length of the - * initial PHP variable value. If you don't know what the maximum - * length will be, then re-call oci_bind_by_name - * with the current data size prior to - * each oci_execute call. Binding an - * unnecessarily large length will have an impact on process memory - * in the database. - * - * A bind call tells Oracle which memory address to read data from. - * For IN binds that address needs to contain - * valid data when oci_execute is called. This - * means that the variable bound must remain in scope until - * execution. If it doesn't, unexpected results or errors such as - * "ORA-01460: unimplemented or unreasonable conversion requested" - * may occur. For OUT binds one symptom is no - * value being set in the PHP variable. - * - * For a statement that is repeatedly executed, binding values that - * never change may reduce the ability of the Oracle optimizer to - * choose the best statement execution plan. Long running statements - * that are rarely re-executed may not benefit from binding. However - * in both cases, binding might be safer than joining strings into a - * SQL statement, as this can be a security risk if unfiltered user - * text is concatenated. - * - * @param resource $statement A valid OCI8 statement identifier. - * @param string $param The colon-prefixed bind variable placeholder used in the - * statement. The colon is optional - * in param. Oracle does not use question - * marks for placeholders. - * @param mixed $var The PHP variable to be associated with param - * @param int $max_length Sets the maximum length for the data. If you set it to -1, this - * function will use the current length - * of var to set the maximum - * length. In this case the var must - * exist and contain data - * when oci_bind_by_name is called. - * @param int $type The datatype that Oracle will treat the data as. The - * default type used - * is SQLT_CHR. Oracle will convert the data - * between this type and the database column (or PL/SQL variable - * type), when possible. - * - * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - * need to allocate it first using the - * oci_new_descriptor function. The - * length is not used for abstract datatypes - * and should be set to -1. - * - * Possible values for type are: - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * - * - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * - * - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * - * - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * - * - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * - * - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * - * - * - * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * - * SQLT_CHR - for VARCHARs; - * - * - * - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * - * - * - * SQLT_LNG - for LONG columns; - * - * - * - * - * SQLT_LBI - for LONG RAW columns; - * - * - * - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * - * - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires Oracle Database 12c) - * - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * SQLT_INT or OCI_B_INT - for integers; - * - * SQLT_CHR - for VARCHARs; - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * SQLT_LNG - for LONG columns; - * - * SQLT_LBI - for LONG RAW columns; - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires Oracle Database 12c) + * @param resource $statement + * @param string $param + * @param mixed $var + * @param int $max_length + * @param int $type * @throws Oci8Exception * */ @@ -318,10 +44,7 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 /** - * Invalidates a cursor, freeing all associated resources and cancels the - * ability to read from it. - * - * @param resource $statement An OCI statement. + * @param resource $statement * @throws Oci8Exception * */ @@ -336,24 +59,7 @@ function oci_cancel($statement): void /** - * Commits the outstanding transaction for the - * Oracle connection. A commit ends the - * current transaction and makes permanent all changes. It releases - * all locks held. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -368,98 +74,12 @@ function oci_commit($connection): void /** - * Returns a connection identifier needed for most other OCI8 operations. - * - * For performance, most applications should use persistent connections - * with oci_pconnect instead - * of oci_connect. - * See Connection Handling for general - * information on connection management and connection pooling. - * - * The second and subsequent calls to oci_connect - * with the same parameters will return the connection handle returned - * from the first call. This means that transactions in one handle are - * also in the other handles, because they use the - * same underlying database connection. If two - * handles need to be transactionally isolated from each other, use - * oci_new_connect instead. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -483,28 +103,10 @@ function oci_connect(string $username, string $password, ?string $connection_str /** - * Associates a PHP variable with a column for query fetches using oci_fetch. - * - * The oci_define_by_name call must occur before - * executing oci_execute. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param string $column The column name used in the query. - * - * Use uppercase for Oracle's default, non-case sensitive column - * names. Use the exact column name case for case-sensitive - * column names. - * @param mixed $var The PHP variable that will contain the returned column value. - * @param int $type The data type to be returned. Generally not needed. Note that - * Oracle-style data conversions are not performed. For example, - * SQLT_INT will be ignored and the returned - * data type will still be SQLT_CHR. - * - * You can optionally use oci_new_descriptor - * to allocate LOB/ROWID/BFILE descriptors. + * @param resource $statement + * @param string $column + * @param mixed $var + * @param int $type * @throws Oci8Exception * */ @@ -519,76 +121,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v /** - * Executes a statement previously returned - * from oci_parse. - * - * After execution, statements like INSERT will - * have data committed to the database by default. For statements - * like SELECT, execution performs the logic of the - * query. Query results can subsequently be fetched in PHP with - * functions like oci_fetch_array. - * - * Each parsed statement may be executed multiple times, saving the - * cost of re-parsing. This is commonly used - * for INSERT statements when data is bound - * with oci_bind_by_name. - * - * @param resource $statement A valid OCI statement identifier. - * @param int $mode An optional second parameter can be one of the following constants: - * - * Execution Modes - * - * - * - * Constant - * Description - * - * - * - * - * OCI_COMMIT_ON_SUCCESS - * Automatically commit all outstanding changes for - * this connection when the statement has succeeded. This - * is the default. - * - * - * OCI_DESCRIBE_ONLY - * Make query meta data available to functions - * like oci_field_name but do not - * create a result set. Any subsequent fetch call such - * as oci_fetch_array will - * fail. - * - * - * OCI_NO_AUTO_COMMIT - * Do not automatically commit changes. - * - * - * - * - * - * Using OCI_NO_AUTO_COMMIT mode starts or continues a - * transaction. Transactions are automatically rolled back when - * the connection is closed, or when the script ends. Explicitly - * call oci_commit to commit a transaction, - * or oci_rollback to abort it. - * - * When inserting or updating data, using transactions is - * recommended for relational data consistency and for performance - * reasons. - * - * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and - * oci_commit - * or oci_rollback is not subsequently - * called, then OCI8 will perform a rollback at the end of the - * script even if no data was changed. To avoid an unnecessary - * rollback, many scripts do not - * use OCI_NO_AUTO_COMMIT mode for queries or - * PL/SQL. Be careful to ensure the appropriate transactional - * consistency for the application when - * using oci_execute with different modes in - * the same script. + * @param resource $statement + * @param int $mode * @throws Oci8Exception * */ @@ -603,11 +137,9 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** - * Returns the name of the column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return string Returns the name as a string + * @param resource $statement + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -623,15 +155,9 @@ function oci_field_name($statement, $column): string /** - * Returns precision of the column. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the precision as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -647,15 +173,9 @@ function oci_field_precision($statement, $column): int /** - * Returns the scale of the column with column index. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the scale as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -671,11 +191,9 @@ function oci_field_scale($statement, $column): int /** - * Returns the size of a column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the size of a column in bytes + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -691,13 +209,9 @@ function oci_field_size($statement, $column): int /** - * Returns Oracle's raw "SQLT" data type of the column. - * - * If you want a field's type name, then use oci_field_type instead. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns Oracle's raw data type as a number + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -713,11 +227,9 @@ function oci_field_type_raw($statement, $column): int /** - * Returns a field's data type name. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return mixed Returns the field data type as a string or an integer + * @param resource $statement + * @param mixed $column + * @return mixed * @throws Oci8Exception * */ @@ -733,9 +245,7 @@ function oci_field_type($statement, $column) /** - * Frees a descriptor allocated by oci_new_descriptor. - * - * @param \OCILob $lob Descriptor allocated by oci_new_descriptor. + * @param \OCILob $lob * @throws Oci8Exception * */ @@ -750,11 +260,7 @@ function oci_free_descriptor(\OCILob $lob): void /** - * Frees resources associated with Oracle's cursor or statement, which was - * received from as a result of oci_parse or obtained - * from Oracle. - * - * @param resource $statement A valid OCI statement identifier. + * @param resource $statement * @throws Oci8Exception * */ @@ -769,14 +275,10 @@ function oci_free_statement($statement): void /** - * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param string $type_name Should be a valid named type (uppercase). - * @param null|string $schema Should point to the scheme, where the named type was created. The name - * of the current user is used when NULL is passed. - * @return \OCI-Collection Returns a new OCICollection object. + * @param resource $connection + * @param string $type_name + * @param null|string $schema + * @return \OCI-Collection * @throws Oci8Exception * */ @@ -796,90 +298,12 @@ function oci_new_collection($connection, string $type_name, ?string $schema = nu /** - * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and - * oci_pconnect, oci_new_connect - * does not cache connections and will always return a brand-new freshly - * opened connection handle. This is useful if your application needs - * transactional isolation between two sets of queries. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -903,11 +327,8 @@ function oci_new_connect(string $username, string $password, ?string $connection /** - * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @return resource Returns a new statement handle. + * @param resource $connection + * @return resource * @throws Oci8Exception * */ @@ -923,14 +344,9 @@ function oci_new_cursor($connection) /** - * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: - * OCI_DTYPE_FILE, OCI_DTYPE_LOB and - * OCI_DTYPE_ROWID. - * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success. + * @param resource $connection + * @param int $type + * @return \OCI-Lob|false * @throws Oci8Exception * */ @@ -946,10 +362,8 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** - * Gets the number of rows affected during statement execution. - * - * @param resource $statement A valid OCI statement identifier. - * @return 0|positive-int Returns the number of rows affected as an integer + * @param resource $statement + * @return 0|positive-int * @throws Oci8Exception * */ @@ -965,24 +379,9 @@ function oci_num_rows($statement): int /** - * Prepares sql using - * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, - * oci_execute and other functions. - * - * Statement identifiers can be freed - * with oci_free_statement or by setting the - * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. - * @param string $sql The SQL or PL/SQL statement. - * - * SQL statements should not end with a - * semi-colon (";"). PL/SQL - * statements should end with a semi-colon - * (";"). - * @return resource Returns a statement handle on success. + * @param resource $connection + * @param string $sql + * @return resource * @throws Oci8Exception * */ @@ -998,91 +397,12 @@ function oci_parse($connection, string $sql) /** - * Creates a persistent connection to an Oracle server and logs on. - * - * Persistent connections are cached and re-used between requests, resulting in - * reduced overhead on each page load; a typical PHP application will have a - * single persistent connection open against an Oracle server per Apache child - * process (or PHP FPM process). See the OCI8 - * Connection Handling and Connection Pooling section for more - * information. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -1106,30 +426,8 @@ function oci_pconnect(string $username, string $password, ?string $connection_st /** - * Registers a user-defined callback function to connection. - * If connection fails due to instance or network failure, - * the registered callback function will be invoked for several times during - * failover. See OCI8 Transparent Application Failover - * (TAF) Support for information. - * - * When oci_register_taf_callback is called multiple times, - * each registration overwrites the previous one. - * - * Use oci_unregister_taf_callback to explicitly unregister a - * user-defined callback. - * - * TAF callback registration will NOT be saved across - * persistent connections, therefore the callback needs to be re-registered for - * a new persistent connection. - * - * @param resource $connection An Oracle connection identifier. - * @param callable $callback A user-defined callback to register for Oracle TAF. It can be a - * string of the function name or a Closure (anonymous function). - * - * The interface of a TAF user-defined callback function is as follows: - * - * See the parameter description and an example on - * OCI8 Transparent Application Failover (TAF) Support page. + * @param resource $connection + * @param callable $callback * @throws Oci8Exception * */ @@ -1144,20 +442,9 @@ function oci_register_taf_callback($connection, callable $callback): void /** - * Returns the data from column in the current row, - * fetched by oci_fetch. - * - * For details on the data type mapping performed by - * the OCI8 extension, see the datatypes - * supported by the driver - * * @param resource $statement - * @param mixed $column Can be either use the column number (1-based) or the column name. - * The case of the column name must be the case that Oracle meta data - * describes the column as, which is uppercase for columns created - * case insensitively. - * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and - * FILEs). + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -1173,25 +460,7 @@ function oci_result($statement, $column): string /** - * Reverts all uncommitted changes for the Oracle - * connection and ends the transaction. It - * releases all locks held. All Oracle SAVEPOINTS - * are erased. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect - * or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -1206,10 +475,8 @@ function oci_rollback($connection): void /** - * Returns a string with the Oracle Database version and available options - * * @param resource $connection - * @return string Returns the version information as a string. + * @return string * @throws Oci8Exception * */ @@ -1225,23 +492,8 @@ function oci_server_version($connection): string /** - * Sets the action name for Oracle tracing. - * - * The action name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The action name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string up to 32 bytes long. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1256,34 +508,8 @@ function oci_set_action($connection, string $action): void /** - * Sets a timeout limiting the maximum time a database round-trip using this connection may take. - * - * Each OCI8 operation may make zero or more calls to Oracle's client - * library. These internal calls may then may make zero or more - * round-trips to Oracle Database. If any one of those round-trips - * takes more than time_out milliseconds, then the - * operation is cancelled and an error is returned to the application. - * - * The time_out value applies to each round-trip - * individually, not to the sum of all round-trips. Time spent - * processing in PHP OCI8 before or after the completion of each - * round-trip is not counted. - * - * When a call is interrupted, Oracle will attempt to clean up the - * connection for reuse. This operation is allowed to run for - * another time_out period. Depending on the - * outcome of the cleanup, the connection may or may not be reusable. - * - * When persistent connections are used, the timeout value will be - * retained across PHP requests. - * - * The oci_set_call_timeout function is available - * when OCI8 uses Oracle 18 (or later) Client libraries. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @param resource $connection + * @param int $timeout * @throws Oci8Exception * */ @@ -1298,27 +524,8 @@ function oci_set_call_timeout($connection, int $timeout): void /** - * Sets the client identifier used by various database components to - * identify lightweight application users who authenticate as the same - * database user. - * - * The client identifier is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The identifier can subsequently be queried, for example - * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') - * FROM DUAL. Database administration views such - * as V$SESSION will also contain the value. It - * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE - * for tracing and can also be used for auditing. - * - * The value may be retained across page requests that use the same persistent connection. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_id User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_id * @throws Oci8Exception * */ @@ -1333,21 +540,8 @@ function oci_set_client_identifier($connection, string $client_id): void /** - * Sets the client information for Oracle tracing. - * - * The client information is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The client information can subsequently be queried from database - * administration views such as V$SESSION. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_info User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_info * @throws Oci8Exception * */ @@ -1362,22 +556,8 @@ function oci_set_client_info($connection, string $client_info): void /** - * Sets the DBOP for Oracle tracing. - * - * The database operation name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when a SQL - * statement is executed. - * - * The database operation can subsequently be queried from database administration - * views such as V$SQL_MONITOR. - * - * The oci_set_db_operation function is available - * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1392,26 +572,7 @@ function oci_set_db_operation($connection, string $action): void /** - * Sets the database "edition" of objects to be used by a subsequent - * connections. - * - * Oracle Editions allow concurrent versions of applications to run - * using the same schema and object names. This is useful for - * upgrading live systems. - * - * Call oci_set_edition before calling - * oci_connect, oci_pconnect - * or oci_new_connect. - * - * If an edition is set that is not valid in the database, connection - * will fail even if oci_set_edition returns success. - * - * When using persistent connections, if a connection with the - * requested edition setting already exists, it is reused. Otherwise, - * a different persistent connection is created - * - * @param string $edition Oracle Database edition name previously created with the SQL - * "CREATE EDITION" command. + * @param string $edition * @throws Oci8Exception * */ @@ -1426,23 +587,8 @@ function oci_set_edition(string $edition): void /** - * Sets the module name for Oracle tracing. - * - * The module name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $name User chosen string up to 48 bytes long. + * @param resource $connection + * @param string $name * @throws Oci8Exception * */ @@ -1457,28 +603,8 @@ function oci_set_module_name($connection, string $name): void /** - * Sets the internal buffer size used to fetch each CLOB or BLOB value when the - * implementation gets the internal Oracle LOB locator from the database after - * a successful query call to oci_execute and for each - * subsequent internal fetch request to the database. Increasing this value - * can improve the performance of fetching smaller LOBs by reducing round-trips - * between PHP and the database. Memory usage will change. - * - * The value affects LOBs returned as OCILob instances and also those returned - * using OCI_RETURN_LOBS. - * - * Call oci_set_prefetch_lob before - * calling oci_execute. If it is not called, the value - * of oci8.prefetch_lob_size - * is used. - * - * The LOB prefetch value should only be set with Oracle Database 12.2 or later. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $prefetch_lob_size The number of bytes of each LOB to be prefetched, >= 0 + * @param resource $statement + * @param int $prefetch_lob_size * @throws Oci8Exception * */ @@ -1493,56 +619,8 @@ function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void /** - * Sets the number of rows to be buffered by the Oracle Client - * libraries after a successful query call - * to oci_execute and for each subsequent - * internal fetch request to the database. For queries returning a - * large number of rows, performance can be significantly improved by - * increasing the prefetch count above the - * default oci8.default_prefetch - * value. - * - * Prefetching is Oracle's efficient way of returning more than one - * data row from the database in each network request. This can - * result in better network and CPU utilization. The buffering of - * rows is internal to OCI8 and the behavior of OCI8 fetching - * functions is unchanged regardless of the prefetch count. For - * example, oci_fetch_row will always return one - * row. The prefetch buffer is per-statement and is not used by - * re-executed statements or by other connections. - * - * Call oci_set_prefetch before - * calling oci_execute. - * - * A tuning goal is to set the prefetch value to a reasonable size for - * the network and database to handle. For queries returning a very - * large number of rows, overall system efficiency might be better if - * rows are retrieved from the database in several chunks (i.e set the - * prefetch value smaller than the number of rows). This allows the - * database to handle other users' statements while the PHP script is - * processing the current set of rows. - * - * Query prefetching was introduced in Oracle 8i. REF CURSOR - * prefetching was introduced in Oracle 11gR2 and occurs when PHP is - * linked with Oracle 11gR2 (or later) Client libraries. - * Nested cursor prefetching was - * introduced in Oracle 11gR2 and requires both the Oracle Client - * libraries and the database to be version 11gR2 or greater. - * - * Prefetching is not supported when queries contain LONG or LOB - * columns. The prefetch value is ignored and single-row fetches will - * be used in all the situations when prefetching is not supported. - * - * When using Oracle Database 12c, the prefetch - * value set by PHP can be overridden by Oracle's - * client oraaccess.xml configuration file. Refer - * to Oracle documentation for more detail. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $rows The number of rows to be prefetched, >= 0 + * @param resource $statement + * @param int $rows * @throws Oci8Exception * */ @@ -1557,64 +635,8 @@ function oci_set_prefetch($statement, int $rows): void /** - * Returns a keyword identifying the type of the - * OCI8 statement. - * - * @param resource $statement A valid OCI8 statement identifier from oci_parse. - * @return string Returns the type of statement as one of the - * following strings. - * - * Statement type - * - * - * - * Return String - * Notes - * - * - * - * - * ALTER - * - * - * - * BEGIN - * - * - * - * CALL - * - * - * - * CREATE - * - * - * - * DECLARE - * - * - * - * DELETE - * - * - * - * DROP - * - * - * - * INSERT - * - * - * - * SELECT - * - * - * - * UPDATE - * - * - * - * UNKNOW. + * @param resource $statement + * @return string * @throws Oci8Exception * */ @@ -1630,12 +652,7 @@ function oci_statement_type($statement): string /** - * Unregister the user-defined callback function registered to connection - * by oci_register_taf_callback. See - * OCI8 Transparent Application Failover (TAF) Support - * for information. - * - * @param resource $connection An Oracle connection identifier. + * @param resource $connection * @throws Oci8Exception * */ diff --git a/generated/8.4/opcache.php b/generated/8.4/opcache.php index 88d1c435..df3d1999 100644 --- a/generated/8.4/opcache.php +++ b/generated/8.4/opcache.php @@ -5,11 +5,7 @@ use Safe\Exceptions\OpcacheException; /** - * This function compiles a PHP script and adds it to the opcode cache without - * executing it. This can be used to prime the cache after a Web server - * restart by pre-caching files that will be included in later requests. - * - * @param string $filename The path to the PHP script to be compiled. + * @param string $filename * @throws OpcacheException * */ @@ -24,11 +20,8 @@ function opcache_compile_file(string $filename): void /** - * This function returns state information about the in-memory cache instance. It will not return any - * information about the file cache. - * - * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @param bool $include_scripts + * @return array * @throws OpcacheException * */ diff --git a/generated/8.4/openssl.php b/generated/8.4/openssl.php index 4e25852f..59559d01 100644 --- a/generated/8.4/openssl.php +++ b/generated/8.4/openssl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\OpensslException; /** - * Gets the cipher initialization vector (iv) length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -24,10 +22,8 @@ function openssl_cipher_iv_length(string $cipher_algo): int /** - * Gets the cipher key length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -43,14 +39,11 @@ function openssl_cipher_key_length(string $cipher_algo): int /** - * Decrypts a CMS message. - * - * @param string $input_filename The name of a file containing encrypted content. - * @param string $output_filename The name of the file to deposit the decrypted content. - * @param \OpenSSLCertificate|string $certificate The name of the file containing a certificate of the recipient. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key The name of the file containing a PKCS#8 key. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key + * @param int $encoding * @throws OpensslException * */ @@ -71,17 +64,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c /** - * This function encrypts content to one or more recipients, - * based on the certificates that are passed to it. - * - * @param string $input_filename The file to be encrypted. - * @param string $output_filename The output file. - * @param \OpenSSLCertificate|array|string $certificate Recipients to encrypt to. - * @param array|null $headers Headers to include when S/MIME is used. - * @param int $flags Flags to be passed to CMS_sign. - * @param int $encoding An encoding to output. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param int $cipher_algo A cypher to use. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|array|string $certificate + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param int $cipher_algo * @throws OpensslException * */ @@ -96,8 +85,6 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c /** - * Performs the exact analog to openssl_pkcs7_read. - * * @param string $input_filename * @param array $certificates * @throws OpensslException @@ -114,19 +101,14 @@ function openssl_cms_read(string $input_filename, array &$certificates): void /** - * This function signs a file with an X.509 certificate and key. - * - * @param string $input_filename The name of the file to be signed. - * @param string $output_filename The name of the file to deposit the results. - * @param \OpenSSLCertificate|string $certificate The signing certificate. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The key associated with certificate. - * See Key/Certificate parameters for a list of valid values. - * @param array|null $headers An array of headers to be included in S/MIME output. - * @param int $flags Flags to be passed to cms_sign. - * @param int $encoding The encoding of the output file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param null|string $untrusted_certificates_filename Intermediate certificates to be included in the signature. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -145,18 +127,15 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert /** - * This function verifies a CMS signature, either attached or detached, with the specified encoding. - * - * @param string $input_filename The input file. - * @param int $flags Flags to pass to cms_verify. - * @param null|string $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. - * @param null|string $untrusted_certificates_filename A file containing additional intermediate certificates. - * @param null|string $content A file pointing to the content when signatures are detached. + * @param string $input_filename + * @param int $flags + * @param null|string $certificates + * @param array $ca_info + * @param null|string $untrusted_certificates_filename + * @param null|string $content * @param null|string $pk7 - * @param null|string $sigfile A file to save the signature to. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param null|string $sigfile + * @param int $encoding * @throws OpensslException * */ @@ -187,18 +166,9 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $cer /** - * openssl_csr_export_to_file takes the Certificate - * Signing Request represented by csr and saves it - * in PEM format into the file named by - * output_filename. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -213,19 +183,9 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text /** - * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in - * PEM format in output, which is passed by - * reference. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param null|string $output on success, this string will contain the PEM - * encoded CSR + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -240,12 +200,9 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void /** - * openssl_csr_get_public_key extracts the public key - * from csr and prepares it for use by other functions. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names This parameter is ignored - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -261,16 +218,9 @@ function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsy /** - * openssl_csr_get_subject returns subject - * distinguished name information encoded in the csr - * including fields commonName (CN), organizationName (O), countryName (C) etc. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names short_names controls how the data is indexed in the - * array - if short_names is TRUE (the default) then - * fields will be indexed with the short name form, otherwise, the long name - * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return array * @throws OpensslException * */ @@ -286,115 +236,11 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array /** - * openssl_csr_new generates a new CSR - * based on the information provided by distinguished_names. - * - * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. - * @param \OpenSSLAsymmetricKey|null $private_key private_key should be set to a private key that - * was previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions), or - * NULL variable. If its value is NULL variable, a new private key is - * generated based on the supplied options and - * assigned to supplied variable. The corresponding public portion of the - * key will be used to sign the CSR. - * @param array|null $options By default, the information in your system openssl.conf - * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key in - * options. You can also specify an alternative - * OpenSSL configuration file by setting the value of the - * config key to the path of the file you want to use. - * The following keys, if present in options - * behave as their equivalents in the openssl.conf, as - * listed in the table below. - * - * Configuration overrides - * - * - * - * options key - * type - * openssl.conf equivalent - * description - * - * - * - * - * digest_alg - * string - * default_md - * Digest method or signature hash, usually one of openssl_get_md_methods - * - * - * x509_extensions - * string - * x509_extensions - * Selects which extensions should be used when creating an x509 - * certificate - * - * - * req_extensions - * string - * req_extensions - * Selects which extensions should be used when creating a CSR - * - * - * private_key_bits - * int - * default_bits - * Specifies how many bits should be used to generate a private key - * - * - * private_key_type - * int - * none - * Specifies the type of private key to create. This can be one - * of OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_RSA or - * OPENSSL_KEYTYPE_EC. - * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * - * encrypt_key - * bool - * encrypt_key - * Should an exported key (with passphrase) be encrypted? - * - * - * encrypt_key_cipher - * int - * none - * - * One of cipher constants. - * - * - * - * curve_name - * string - * none - * - * One of openssl_get_curve_names. - * - * - * - * config - * string - * N/A - * - * Path to your own alternative openssl.conf file. - * - * - * - * - * - * @param array|null $extra_attributes extra_attributes is used to specify additional - * configuration options for the CSR. Both - * distinguished_names and - * extra_attributes are associative arrays, whose keys - * are converted to OIDs and applied to the relevant part of the request. - * @return \OpenSSLCertificateSigningRequest|bool Returns the CSR on success, TRUE if CSR creation is - * successful but signing fails. + * @param array $distinguished_names + * @param \OpenSSLAsymmetricKey|null $private_key + * @param array|null $options + * @param array|null $extra_attributes + * @return \OpenSSLCertificateSigningRequest|bool * @throws OpensslException * */ @@ -416,26 +262,14 @@ function openssl_csr_new(array $distinguished_names, ?\OpenSSLAsymmetricKey &$pr /** - * openssl_csr_sign generates an x509 certificate from the given CSR. - * - * @param \OpenSSLCertificateSigningRequest|string $csr A CSR previously generated by openssl_csr_new. - * It can also be the path to a PEM encoded CSR when specified as - * file://path/to/csr or an exported string generated - * by openssl_csr_export. - * @param \OpenSSLCertificate|null|string $ca_certificate The generated certificate will be signed by ca_certificate. - * If ca_certificate is NULL, the generated certificate - * will be a self-signed certificate. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key that corresponds to - * ca_certificate. - * @param int $days days specifies the length of time for which the - * generated certificate will be valid, in days. - * @param array|null $options You can finetune the CSR signing by options. - * See openssl_csr_new for more information about - * options. - * @param int $serial An optional the serial number of issued certificate. If not specified - * it will default to 0. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param \OpenSSLCertificate|null|string $ca_certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $days + * @param array|null $options + * @param int $serial * @param null|string $serial_hex - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @return \OpenSSLCertificate * @throws OpensslException * */ @@ -459,24 +293,14 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array /** - * Takes a raw or base64 encoded string and decrypts it using a given method and passphrase. - * - * @param string $data The encrypted message to be decrypted. - * @param string $cipher_algo The cipher method. For a list of available cipher methods, use - * openssl_get_cipher_methods. - * @param string $passphrase The passphrase. If the passphrase is shorter than expected, it is silently padded with - * NUL characters; if the passphrase is longer than expected, it is - * silently truncated. - * @param int $options options can be one of - * OPENSSL_RAW_DATA, - * OPENSSL_ZERO_PADDING - * or OPENSSL_DONT_ZERO_PAD_KEY. - * @param string $iv A non-NULL Initialization Vector. If the IV is shorter than expected, it is padded with - * NUL characters and warning is emitted; if the passphrase is longer - * than expected, it is truncated and warning is emitted. - * @param null|string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. - * @param string $aad Additional authenticated data. - * @return string The decrypted string on success. + * @param string $data + * @param string $cipher_algo + * @param string $passphrase + * @param int $options + * @param string $iv + * @param null|string $tag + * @param string $aad + * @return string * @throws OpensslException * */ @@ -498,13 +322,9 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, /** - * The shared secret returned by openssl_dh_compute_key is - * often used as an encryption key to secretly communicate with a remote party. - * This is known as the Diffie-Hellman key exchange. - * - * @param string $public_key DH Public key of the remote party. - * @param \OpenSSLAsymmetricKey $private_key A local DH private key, corresponding to the public key to be shared with the remote party. - * @return string Returns shared secret on success. + * @param string $public_key + * @param \OpenSSLAsymmetricKey $private_key + * @return string * @throws OpensslException * */ @@ -520,14 +340,10 @@ function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $priva /** - * Computes a digest hash value for the given data using a given method, - * and returns a raw or binhex encoded string. - * - * @param string $data The data. - * @param string $digest_algo The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. - * @param bool $binary Setting to TRUE will return as raw output data, otherwise the return - * value is binhex encoded. - * @return string Returns the digested hash value on success. + * @param string $data + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -543,53 +359,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) /** - * Gets the list of available curve names for use in Elliptic curve - * cryptography (ECC) for public/private key operations. The two most widely - * standardized/supported curves are prime256v1 - * (NIST P-256) and secp384r1 (NIST P-384). - * - * Approximate Equivalancies of AES, RSA, DSA and ECC Keysizes - * - * - * - * AES Symmetric Keysize (Bits) - * RSA and DSA Keysize (Bits) - * ECC Keysize (Bits) - * - * - * - * - * 80 - * 1024 - * 160 - * - * - * 112 - * 2048 - * 224 - * - * - * 128 - * 3072 - * 256 - * - * - * 192 - * 7680 - * 384 - * - * - * 256 - * 15360 - * 512 - * - * - * - * - * NIST - * recommends using ECC curves with at least 256 bits. - * - * @return list An array of available curve names. + * @return list * @throws OpensslException * */ @@ -605,29 +375,12 @@ function openssl_get_curve_names(): array /** - * openssl_open opens (decrypts) data using an envelope - * key that is decrypted from encrypted_key using - * private_key. The decryption is done using - * cipher_algo and iv. The IV is required only if the - * cipher method requires it. The function fills output with the decrypted - * data. The envelope key is usually generated when the data are sealed using a public key that is - * associated with the private key. See openssl_seal for more information. - * - * @param string $data The sealed data. - * @param null|string $output If the call is successful the opened data is returned in this parameter. - * @param string $encrypted_key The encrypted symmetric key that can be decrypted using private_key. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The private key used for decrypting encrypted_key. - * @param string $cipher_algo The cipher method used for decryption of data. - * - * - * The default value for PHP versions prior to 8.0 is ('RC4') which is - * considered insecure. It is strongly recommended to explicitly specify a secure cipher - * method. - * - * - * @param null|string $iv The initialization vector used for decryption of data. It is required - * if the cipher method requires IV. This can be found out by calling - * openssl_cipher_iv_length with cipher_algo. + * @param string $data + * @param null|string $output + * @param string $encrypted_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $cipher_algo + * @param null|string $iv * @throws OpensslException * */ @@ -646,19 +399,12 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr /** - * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), - * a key derivation function defined in PKCS5 v2. - * - * @param string $password Password from which the derived key is generated. - * @param string $salt PBKDF2 recommends a crytographic salt of at least 128 bits (16 bytes). - * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. - * NIST - * recommends at least 1,000. As of 2023, OWASP recommends 600,000 iterations for - * PBKDF2-HMAC-SHA256 and 210,000 for PBKDF2-HMAC-SHA512. - * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults - * to SHA-1. It is recommended to set it to SHA-256 or SHA-512. - * @return string Returns raw binary string. + * @param string $password + * @param string $salt + * @param int $key_length + * @param int $iterations + * @param string $digest_algo + * @return string * @throws OpensslException * */ @@ -674,36 +420,11 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it /** - * openssl_pkcs12_export_to_file stores - * certificate into a file named by - * output_filename in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendly_name" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -718,36 +439,11 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p /** - * openssl_pkcs12_export stores - * certificate into a string named by - * output in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PKCS#12. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendly_name" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -762,13 +458,9 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str /** - * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by - * pkcs12 into a array named - * certificates. - * - * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. + * @param string $pkcs12 + * @param array|null $certificates + * @param string $passphrase * @throws OpensslException * */ @@ -783,14 +475,8 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass /** - * Decrypts the S/MIME encrypted message contained in the file specified by - * input_filename using the certificate and its - * associated private key specified by certificate and - * private_key. - * * @param string $input_filename - * @param string $output_filename The decrypted message is written to the file specified by - * output_filename. + * @param string $output_filename * @param \OpenSSLCertificate|string $certificate * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key * @throws OpensslException @@ -811,24 +497,12 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, /** - * openssl_pkcs7_encrypt takes the contents of the - * file named input_filename and encrypts them using an RC2 - * 40-bit cipher so that they can only be read by the intended recipients - * specified by certificate. - * * @param string $input_filename * @param string $output_filename - * @param \OpenSSLCertificate|array|string $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been encrypted. - * - * headers can be either an associative array - * keyed by header name, or an indexed array, where each element contains - * a single header line. - * @param int $flags flags can be used to specify options that affect - * the encoding process - see PKCS7 - * constants. - * @param int $cipher_algo One of cipher constants. + * @param \OpenSSLCertificate|array|string $certificate + * @param array $headers + * @param int $flags + * @param int $cipher_algo * @throws OpensslException * */ @@ -843,10 +517,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, /** - * - * - * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param string $data + * @param array|null $certificates * @throws OpensslException * */ @@ -861,26 +533,13 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void /** - * openssl_pkcs7_sign takes the contents of the file - * named input_filename and signs them using the - * certificate and its matching private key specified by - * certificate and private_key - * parameters. - * - * @param string $input_filename The input file you are intending to digitally sign. - * @param string $output_filename The file which the digital signature will be written to. - * @param \OpenSSLCertificate|string $certificate The X.509 certificate used to digitally sign input_filename. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key corresponding to certificate. - * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been signed (see - * openssl_pkcs7_encrypt for more information about - * the format of this parameter). - * @param int $flags flags can be used to alter the output - see PKCS7 constants. - * @param null|string $untrusted_certificates_filename untrusted_certificates_filename specifies the name of a file containing - * a bunch of extra certificates to include in the signature which can for - * example be used to help the recipient to verify the certificate that you used. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array $headers + * @param int $flags + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -899,15 +558,10 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce /** - * openssl_pkey_derive takes a set of a public_key - * and private_key and derives a shared secret, for either DH or EC keys. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key is the public key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param int $key_length If not zero, will attempt to set the desired length of the derived secret. - * @return string The derived secret on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $key_length + * @return string * @throws OpensslException * */ @@ -923,18 +577,10 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** - * openssl_pkey_export_to_file saves an ascii-armoured - * (PEM encoded) rendition of key into the file named - * by output_filename. - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key - * @param string $output_filename Path to the output file. - * @param null|string $passphrase The key can be optionally protected by a - * passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param string $output_filename + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -955,17 +601,10 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas /** - * openssl_pkey_export exports - * key as a PEM encoded string and stores it into - * output (which is passed by reference). - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key * @param null|string $output - * @param null|string $passphrase The key is optionally protected by passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -986,20 +625,8 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, /** - * This function returns the key details (bits, key, type). - * - * @param \OpenSSLAsymmetricKey $key Resource holding the key. - * @return array Returns an array with the key details on success. - * Returned array has indexes bits (number of bits), - * key (string representation of the public key) and - * type (type of the key which is one of - * OPENSSL_KEYTYPE_RSA, - * OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_EC or -1 meaning unknown). - * - * Depending on the key type used, additional details may be returned. Note that - * some elements may not always be available. + * @param \OpenSSLAsymmetricKey $key + * @return array * @throws OpensslException * */ @@ -1015,21 +642,9 @@ function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array /** - * openssl_pkey_get_private parses - * private_key and prepares it for use by other functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key can be one of the following: - * - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/private key (it may contain both). - * - * - * A PEM formatted private key. - * - * @param null|string $passphrase The optional parameter passphrase must be used - * if the specified key is encrypted (protected by a passphrase). - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param null|string $passphrase + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1049,21 +664,8 @@ function openssl_pkey_get_private($private_key, ?string $passphrase = null): \Op /** - * openssl_pkey_get_public extracts the public key from - * public_key and prepares it for use by other - * functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key can be one of the following: - * - * an OpenSSLAsymmetricKey instance - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/public key (it may contain both). - * - * - * A PEM formatted public key. - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1079,16 +681,8 @@ function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey /** - * openssl_pkey_new generates a new private - * key. - * How to obtain the public component of the key is shown in an example below. - * - * @param array|null $options You can finetune the key generation (such as specifying the number of - * bits) using options. See - * openssl_csr_new for more information about - * options. - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance for - * the pkey on success. + * @param array|null $options + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1108,22 +702,10 @@ function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey /** - * openssl_private_decrypt decrypts - * data that was previously encrypted via - * openssl_public_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key that corresponds - * to the public key that was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1138,21 +720,10 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat /** - * openssl_private_encrypt encrypts data - * with private private_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_public_decrypt. - * - * This function can be used e.g. to sign data (or its hash) to prove that it - * is not written by someone else. - * * @param string $data * @param null|string $encrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key that corresponds - * to the public key that will be used to decrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1167,21 +738,10 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat /** - * openssl_public_decrypt decrypts - * data that was previous encrypted via - * openssl_private_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to check if the message was written by the - * owner of the private key. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key that corresponds - * to the private key that was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1196,24 +756,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ /** - * openssl_public_encrypt encrypts data - * with public public_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_private_decrypt. - * - * This function can be used e.g. to encrypt message which can be then read - * only by owner of the private key. It can be also used to store secure data - * in database. - * * @param string $data - * @param null|string $encrypted_data This will hold the result of the encryption. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key that corresponds - * to the private key that will be used to decrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param null|string $encrypted_data + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1228,19 +774,9 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ /** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer less than or equal to 2147483647. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes. + * @param int $length + * @param bool|null $strong_result + * @return string * */ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string @@ -1252,34 +788,13 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): /** - * openssl_seal seals (encrypts) data using the - * specified cipher_algo with a randomly generated secret key. The key is - * then encrypted with each of the public keys in public_key array, - * and each encrypted envelope key is returned in encrypted_keys. This allows - * sealed data to be sent to multiple recipients (provided their public keys are available). Each - * recipient must receive both the sealed data and the envelope key that was encrypted with the - * recipient's public key. The IV (Initialization Vector) is generated, and its value is returned in - * iv. - * - * @param string $data The data to seal. - * @param null|string $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. - * @param string $cipher_algo The cipher method. - * - * - * The default value for PHP versions prior to 8.0 is ('RC4') which is - * considered insecure. It is strongly recommended to explicitly specify a secure cipher - * method. - * - * - * @param null|string $iv The initialization vector for decryption of data. It is required if - * the cipher method requires IV. This can be found out by calling - * openssl_cipher_iv_length with cipher_algo. - * @return int Returns the length of the sealed data on success. - * If successful the sealed data is returned in - * sealed_data, and the envelope keys in - * encrypted_keys. + * @param string $data + * @param null|string $sealed_data + * @param array|null $encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param null|string $iv + * @return int * @throws OpensslException * */ @@ -1295,21 +810,10 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke /** - * openssl_sign computes a signature for the - * specified data by generating a cryptographic - * digital signature using the private key associated with - * private_key. Note that the data itself is - * not encrypted. - * - * @param string $data The string of data you wish to sign - * @param null|string $signature If the call was successful the signature is returned in - * signature. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey - * - * string - a PEM formatted key - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @param string $data + * @param null|string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int|string $algorithm * @throws OpensslException * */ @@ -1324,10 +828,8 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith /** - * Exports challenge from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated challenge string. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1343,10 +845,8 @@ function openssl_spki_export_challenge(string $spki): ?string /** - * Exports PEM formatted public key from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated PEM formatted public key. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1362,16 +862,10 @@ function openssl_spki_export(string $spki): ?string /** - * Generates a signed public key and challenge using specified hashing algorithm - * - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param string $challenge The challenge associated to associate with the SPKAC - * @param int $digest_algo The digest algorithm. See openssl_get_md_method(). - * @return null|string Returns a signed public key and challenge string. + * @param \OpenSSLAsymmetricKey $private_key + * @param string $challenge + * @param int $digest_algo + * @return null|string * @throws OpensslException * */ @@ -1387,9 +881,7 @@ function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, /** - * Validates the supplied signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge + * @param string $spki * @throws OpensslException * */ @@ -1404,23 +896,11 @@ function openssl_spki_verify(string $spki): void /** - * openssl_verify verifies that the - * signature is correct for the specified - * data using the public key associated with - * public_key. This must be the public key - * corresponding to the private key used for signing. - * - * @param string $data The string of data used to generate the signature previously - * @param string $signature A raw binary string, generated by openssl_sign or similar means - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key OpenSSLAsymmetricKey - a key, returned by openssl_get_publickey - * - * string - a PEM formatted key (e.g. -----BEGIN PUBLIC KEY----- - * MIIBCgK...) - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". - * @return -1|0|1 Returns 1 if the signature is correct, 0 if it is incorrect, and - * -1. + * @param string $data + * @param string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int|string $algorithm + * @return -1|0|1 * @throws OpensslException * */ @@ -1436,63 +916,11 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm /** - * openssl_x509_checkpurpose examines a certificate to - * see if it can be used for the specified purpose. - * - * @param \OpenSSLCertificate|string $certificate The examined certificate. + * @param \OpenSSLCertificate|string $certificate * @param int $purpose - * openssl_x509_checkpurpose purposes - * - * - * - * Constant - * Description - * - * - * - * - * X509_PURPOSE_SSL_CLIENT - * Can the certificate be used for the client side of an SSL - * connection? - * - * - * X509_PURPOSE_SSL_SERVER - * Can the certificate be used for the server side of an SSL - * connection? - * - * - * X509_PURPOSE_NS_SSL_SERVER - * Can the cert be used for Netscape SSL server? - * - * - * X509_PURPOSE_SMIME_SIGN - * Can the cert be used to sign S/MIME email? - * - * - * X509_PURPOSE_SMIME_ENCRYPT - * Can the cert be used to encrypt S/MIME email? - * - * - * X509_PURPOSE_CRL_SIGN - * Can the cert be used to sign a certificate revocation list - * (CRL)? - * - * - * X509_PURPOSE_ANY - * Can the cert be used for Any/All purposes? - * - * - * - * - * These options are not bitfields - you may specify one only! - * @param array $ca_info ca_info should be an array of trusted CA files/dirs - * as described in Certificate - * Verification. - * @param null|string $untrusted_certificates_file If specified, this should be the name of a PEM encoded file holding - * certificates that can be used to help verify the certificate, although - * no trust is placed in the certificates that come from that file. - * @return bool|int Returns TRUE if the certificate can be used for the intended purpose, - * FALSE if it cannot. + * @param array $ca_info + * @param null|string $untrusted_certificates_file + * @return bool|int * @throws OpensslException * */ @@ -1512,17 +940,9 @@ function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = /** - * openssl_x509_export_to_file stores - * certificate into a file named by - * output_filename in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1537,17 +957,9 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool /** - * openssl_x509_export stores - * certificate into a string named by - * output in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PEM. + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1562,15 +974,10 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru /** - * openssl_x509_fingerprint returns the digest of - * certificate as a string. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $digest_algo The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. - * @param bool $binary When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless binary is set to TRUE in which case the raw binary representation of the message digest is returned. - * - * Returns FALSE on failure. + * @param \OpenSSLCertificate|string $certificate + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -1586,12 +993,8 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo /** - * openssl_x509_read parses the certificate supplied by - * certificate and returns an OpenSSLCertificate object for - * it. - * - * @param \OpenSSLCertificate|string $certificate X509 certificate. See Key/Certificate parameters for a list of valid values. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificate|string $certificate + * @return \OpenSSLCertificate * @throws OpensslException * */ diff --git a/generated/8.4/outcontrol.php b/generated/8.4/outcontrol.php index 2fd5378a..74144aa9 100644 --- a/generated/8.4/outcontrol.php +++ b/generated/8.4/outcontrol.php @@ -5,18 +5,6 @@ use Safe\Exceptions\OutcontrolException; /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN flag), - * discards it's return value - * and cleans (erases) the contents of the active output buffer. - * - * This function does not turn off the active output buffer like - * ob_end_clean or ob_get_clean does. - * - * ob_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * * @throws OutcontrolException * */ @@ -31,22 +19,6 @@ function ob_clean(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN and - * PHP_OUTPUT_HANDLER_FINAL flags), - * discards it's return value, - * discards the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_end_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_end_clean - * will discard the contents of the active output buffer - * even if it was started without the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * * @throws OutcontrolException * */ @@ -61,21 +33,6 @@ function ob_end_clean(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FINAL flag), - * flushes (sends) it's return value, - * discards the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_end_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_end_flush will flush (send) - * the return value of the output handler - * even if the active output buffer was started without the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * * @throws OutcontrolException * */ @@ -90,18 +47,6 @@ function ob_end_flush(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FLUSH flag), - * flushes (sends) its return value - * and discards the contents of the active output buffer. - * - * This function does not turn off the active output buffer like - * ob_end_flush or ob_get_flush does. - * - * ob_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * * @throws OutcontrolException * */ @@ -116,23 +61,7 @@ function ob_flush(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN and - * PHP_OUTPUT_HANDLER_FINAL flags), - * discards it's return value, - * returns the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_get_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_get_clean - * will discard the contents of the active output buffer - * even if it was started without the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * - * @return string Returns the contents of the active output buffer on success. + * @return string * @throws OutcontrolException * */ @@ -148,22 +77,7 @@ function ob_get_clean(): string /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FINAL flag), - * flushes (sends) it's return value, - * returns the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_get_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_get_flush will flush (send) - * the return value of the output handler - * even if the active output buffer was started without the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * - * @return string Returns the contents of the active output buffer on success. + * @return string * @throws OutcontrolException * */ @@ -179,77 +93,9 @@ function ob_get_flush(): string /** - * This function will turn output buffering on. - * While output buffering is active no output is sent from the script, - * instead the output is stored in an internal buffer. - * See - * on exactly what output is affected. - * - * Output buffers are stackable, that is, - * ob_start may be called while another buffer is active. - * If multiple output buffers are active, - * output is being filtered sequentially - * through each of them in nesting order. - * See for more details. - * - * See - * for a detailed description of output buffers. - * - * @param array|callable|null|string $callback An optional callback callable may be - * specified. It can also be bypassed by passing NULL. - * - * callback is invoked when the output buffer is - * flushed (sent), cleaned, or when the output buffer is flushed - * at the end of the script. - * - * The signature of the callback is as follows: - * - * - * stringhandler - * stringbuffer - * intphase - * - * - * - * buffer - * - * - * Contents of the output buffer. - * - * - * - * - * phase - * - * - * Bitmask of - * - * PHP_OUTPUT_HANDLER_* - * constants - * . - * See - * for more details. - * - * - * - * - * - * If callback returns FALSE - * the contents of the buffer are returned. - * See - * for more details. - * - * See - * and - * for more details on callbacks (output handlers). - * @param int $chunk_size Contents of the output buffer. - * @param int $flags Bitmask of - * - * PHP_OUTPUT_HANDLER_* - * constants - * . - * See - * for more details. + * @param array|callable|null|string $callback + * @param int $chunk_size + * @param int $flags * @throws OutcontrolException * */ @@ -272,31 +118,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT /** - * This function starts the 'URL-Rewriter' output buffer handler - * if it is not active, - * stores the name and value parameters, - * and when the buffer is flushed rewrites the URLs - * and forms based on the applicable ini settings. - * Subsequent calls to this function will store all additional name/value pairs - * until the handler is turned off. - * - * When the output buffer is flushed - * (by calling ob_flush, ob_end_flush, - * ob_get_flush or at the end of the script) - * the 'URL-Rewriter' handler adds the name/value pairs - * as query parameters to URLs in attributes of HTML tags - * and adds hidden fields to forms based on the values of the - * url_rewriter.tags and - * url_rewriter.hosts - * configuration directives. - * - * Each name/value pair added to the 'URL-Rewriter' handler - * is added to the URLs and/or forms - * even if this results in duplicate URL query parameters - * or elements with the same name attributes. - * - * @param string $name The variable name. - * @param string $value The variable value. + * @param string $name + * @param string $value * @throws OutcontrolException * */ @@ -311,9 +134,6 @@ function output_add_rewrite_var(string $name, string $value): void /** - * This function removes all rewrite variables previously set by - * the output_add_rewrite_var function. - * * @throws OutcontrolException * */ diff --git a/generated/8.4/pcntl.php b/generated/8.4/pcntl.php index 5105a993..85bf4966 100644 --- a/generated/8.4/pcntl.php +++ b/generated/8.4/pcntl.php @@ -5,17 +5,9 @@ use Safe\Exceptions\PcntlException; /** - * pcntl_getpriority gets the priority of - * process_id. Because priority levels can differ between - * system types and kernel versions, please see your system's getpriority(2) - * man page for specific details. - * - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. - * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable - * scheduling. + * @param int|null $process_id + * @param int $mode + * @return int * @throws PcntlException * */ @@ -37,19 +29,9 @@ function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): i /** - * pcntl_setpriority sets the priority of - * process_id. - * - * @param int $priority priority is generally a value in the range - * -20 to 20. The default priority - * is 0 while a lower numerical value causes more - * favorable scheduling. Because priority levels can differ between - * system types and kernel versions, please see your system's setpriority(2) - * man page for specific details. - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. + * @param int $priority + * @param int|null $process_id + * @param int $mode * @throws PcntlException * */ @@ -70,10 +52,6 @@ function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = P /** - * The pcntl_signal_dispatch function calls the signal - * handlers installed by pcntl_signal for each pending - * signal. - * * @throws PcntlException * */ @@ -88,47 +66,9 @@ function pcntl_signal_dispatch(): void /** - * The pcntl_signal function installs a new - * signal handler or replaces the current signal handler for the signal indicated by signal. - * - * @param int $signal The signal number. - * @param callable|int $handler The signal handler. This may be either a callable, which - * will be invoked to handle the signal, or either of the two global - * constants SIG_IGN or SIG_DFL, - * which will ignore the signal or restore the default signal handler - * respectively. - * - * If a callable is given, it must implement the following - * signature: - * - * - * voidhandler - * intsigno - * mixedsiginfo - * - * - * - * signal - * - * - * The signal being handled. - * - * - * - * - * siginfo - * - * - * If operating systems supports siginfo_t structures, this will be an array of signal information dependent on the signal. - * - * - * - * - * - * Note that when you set a handler to an object method, that object's - * reference count is increased which makes it persist until you either - * change the handler to something else, or your script ends. - * @param bool $restart_syscalls The signal being handled. + * @param int $signal + * @param callable|int $handler + * @param bool $restart_syscalls * @throws PcntlException * */ @@ -143,22 +83,9 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi /** - * The pcntl_sigprocmask function adds, removes or sets blocked - * signals, depending on the mode parameter. - * - * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible - * values: - * - * SIG_BLOCK: Add the signals to the - * currently blocked signals. - * SIG_UNBLOCK: Remove the signals from the - * currently blocked signals. - * SIG_SETMASK: Replace the currently - * blocked signals by the given list of signals. - * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array - * containing the list of the previously blocked signals. + * @param int $mode + * @param array $signals + * @param array|null $old_signals * @throws PcntlException * */ @@ -173,19 +100,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul /** - * The pcntl_sigtimedwait function operates in exactly - * the same way as pcntl_sigwaitinfo except that it takes - * two additional parameters, seconds and - * nanoseconds, which enable an upper bound to be placed - * on the time for which the script is suspended. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing - * information about the signal. See - * pcntl_sigwaitinfo. - * @param int $seconds Timeout in seconds. - * @param int $nanoseconds Timeout in nanoseconds. - * @return int pcntl_sigtimedwait returns a signal number on success. + * @param array $signals + * @param array|null $info + * @param int $seconds + * @param int $nanoseconds + * @return int * @throws PcntlException * */ @@ -201,46 +120,9 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 /** - * The pcntl_sigwaitinfo function suspends execution of the - * calling script until one of the signals given in signals - * are delivered. If one of the signal is already pending (e.g. blocked by - * pcntl_sigprocmask), - * pcntl_sigwaitinfo will return immediately. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing - * information about the signal. - * - * The following elements are set for all signals: - * - * signo: Signal number - * errno: An error number - * code: Signal code - * - * - * The following elements may be set for the SIGCHLD signal: - * - * status: Exit value or signal - * utime: User time consumed - * stime: System time consumed - * pid: Sending process ID - * uid: Real user ID of sending process - * - * - * The following elements may be set for the SIGILL, - * SIGFPE, SIGSEGV and - * SIGBUS signals: - * - * addr: Memory location which caused fault - * - * - * The following element may be set for the SIGPOLL - * signal: - * - * band: Band event - * fd: File descriptor number - * - * @return int Returns a signal number on success. + * @param array $signals + * @param array|null $info + * @return int * @throws PcntlException * */ diff --git a/generated/8.4/pcre.php b/generated/8.4/pcre.php index c482ddcf..1e15de35 100644 --- a/generated/8.4/pcre.php +++ b/generated/8.4/pcre.php @@ -5,17 +5,10 @@ use Safe\Exceptions\PcreException; /** - * Returns the array consisting of the elements of the - * array array that match the given - * pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. - * @param int $flags If set to PREG_GREP_INVERT, this function returns - * the elements of the input array that do not match - * the given pattern. - * @return array Returns an array indexed using the keys from the - * array array. + * @param string $pattern + * @param array $array + * @param int $flags + * @return array * @throws PcreException * */ @@ -31,345 +24,12 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array /** - * Searches subject for all matches to the regular - * expression given in pattern and puts them in - * matches in the order specified by - * flags. - * - * After the first match is found, the subsequent searches are continued - * on from end of the last match. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to - * flags. - * @param int $flags Can be a combination of the following flags (note that it doesn't make - * sense to use PREG_PATTERN_ORDER together with - * PREG_SET_ORDER): - * - * - * PREG_PATTERN_ORDER - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * - * - * - * PREG_SET_ORDER - * - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * If no order flag is given, PREG_PATTERN_ORDER is - * assumed. - * @param int $offset Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|positive-int Returns the number of full pattern matches (which might be zero). + * @param string $pattern + * @param string $subject + * @param array|null $matches + * @param int $flags + * @param int $offset + * @return 0|positive-int * @throws PcreException * */ @@ -385,228 +45,12 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul /** - * Searches subject for a match to the regular - * expression given in pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param null|string[] $matches If matches is provided, then it is filled with - * the results of search. $matches[0] will contain the - * text that matched the full pattern, $matches[1] - * will have the text that matched the first captured parenthesized - * subpattern, and so on. - * @param int $flags flags can be a combination of the following flags: - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * - * - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * The above example will output: - * @param int $offset If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|1 preg_match returns 1 if the pattern - * matches given subject, 0 if it does not. + * @param string $pattern + * @param string $subject + * @param null|string[] $matches + * @param int $flags + * @param int $offset + * @return 0|1 * @throws PcreException * */ @@ -622,28 +66,12 @@ function preg_match(string $pattern, string $subject, ?array &$matches = null, i /** - * The behavior of this function is similar to - * preg_replace_callback, except that callbacks are - * executed on a per-pattern basis. - * - * @param array $pattern An associative array mapping patterns (keys) to callables (values). - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback_array returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array $pattern + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -659,57 +87,13 @@ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, /** - * The behavior of this function is almost identical to - * preg_replace, except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param array|string $pattern The pattern to search for. It can be either a string or an array with - * strings. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. This is the callback signature: - * - * - * stringhandler - * arraymatches - * - * - * You'll often need the callback function - * for a preg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * preg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * - * - * preg_replace_callback and - * anonymous function - * - * - * ]]> - * - * - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array|string $pattern + * @param callable(array):string $callback + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -725,55 +109,11 @@ function preg_replace_callback($pattern, callable $callback, $subject, int $limi /** - * Split the given string by a regular expression. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param int|null $limit If specified, then only substrings up to limit - * are returned with the rest of the string being placed in the last - * substring. A limit of -1 or 0 means "no limit". - * @param int $flags flags can be any combination of the following - * flags (combined with the | bitwise operator): - * - * - * PREG_SPLIT_NO_EMPTY - * - * - * If this flag is set, only non-empty pieces will be returned by - * preg_split. - * - * - * - * - * PREG_SPLIT_DELIM_CAPTURE - * - * - * If this flag is set, parenthesized expression in the delimiter pattern - * will be captured and returned as well. - * - * - * - * - * PREG_SPLIT_OFFSET_CAPTURE - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * - * - * - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * @return list Returns an array containing substrings of subject - * split along boundaries matched by pattern. + * @param string $pattern + * @param string $subject + * @param int|null $limit + * @param int $flags + * @return list * @throws PcreException * */ diff --git a/generated/8.4/pgsql.php b/generated/8.4/pgsql.php index 0a7a4ba5..9c5c4cee 100644 --- a/generated/8.4/pgsql.php +++ b/generated/8.4/pgsql.php @@ -5,12 +5,7 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with - * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using - * pg_query. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -25,49 +20,9 @@ function pg_cancel_query(\PgSql\Connection $connection): void /** - * pg_connect opens a connection to a - * PostgreSQL database specified by the - * connection_string. - * - * If a second call is made to pg_connect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * The old syntax with multiple parameters - * $conn = pg_connect("host", "port", "options", "tty", "dbname") - * has been deprecated. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname (defaults to value of user), - * user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * - * The options parameter can be used to set command line parameters - * to be invoked by the server. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * - * If PGSQL_CONNECT_ASYNC is given, then the - * connection is established asynchronously. The state of the connection - * can then be checked via pg_connect_poll or - * pg_connection_status. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -83,10 +38,7 @@ function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connectio /** - * pg_connection_reset resets the connection. - * It is useful for error recovery. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -101,22 +53,11 @@ function pg_connection_reset(\PgSql\Connection $connection): void /** - * pg_convert checks and converts the values in - * values into suitable values for use in an SQL - * statement. Precondition for pg_convert is the - * existence of a table table_name which has at least - * as many columns as values has elements. The - * fieldnames in table_name must match the indices in - * values and the corresponding datatypes must be - * compatible. Returns an array with the converted values on success. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. - * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, - * PGSQL_CONV_FORCE_NULL or - * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return array * @throws PgsqlException * */ @@ -132,20 +73,11 @@ function pg_convert(\PgSql\Connection $connection, string $table_name, array $va /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command - * internally to insert records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. - * Each value in rows becomes a row in table_name. - * Each value in rows should be a delimited string of the values - * to insert into each field. Values should be linefeed terminated. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $rows + * @param string $separator + * @param string $null_as * @throws PgsqlException * */ @@ -160,17 +92,11 @@ function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $ /** - * pg_copy_to copies a table to an array. It - * issues COPY TO SQL command internally to - * retrieve records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to copy the data into rows. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param string $separator + * @param string $null_as + * @return array * @throws PgsqlException * */ @@ -186,37 +112,11 @@ function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $s /** - * pg_delete deletes records from a table - * specified by the keys and values in conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_delete passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be deleted. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -232,18 +132,7 @@ function pg_delete(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_end_copy syncs the PostgreSQL frontend - * (usually a web server process) with the PostgreSQL server after - * doing a copy operation performed by - * pg_put_line. pg_end_copy - * must be issued, otherwise the PostgreSQL server may get out of - * sync with the frontend and will report an error. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -262,37 +151,10 @@ function pg_end_copy(?\PgSql\Connection $connection = null): void /** - * Sends a request to execute a prepared statement with given parameters, and - * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. - * pg_execute is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a - * prepared statement is given instead of a query string. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name of the prepared statement to execute. if - * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, - * pg_send_prepare or a PREPARE SQL - * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Elements are converted to strings by calling this function. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -316,16 +178,9 @@ function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_field_num will return the number of the - * field number that corresponds to the - * field in the given result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param string $field The name of the field. - * The given name is treated like an identifier in an SQL command, - * that is, it is downcased unless double-quoted. - * @return int The field number (numbered from 0). + * @param \PgSql\Result $result + * @param string $field + * @return int * @throws PgsqlException * */ @@ -341,16 +196,10 @@ function pg_field_num(\PgSql\Result $result, string $field): int /** - * pg_field_table returns the name of the table that field - * belongs to, or the table's oid if oid_only is TRUE. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field Field number, starting from 0. - * @param bool $oid_only By default the tables name that field belongs to is returned but - * if oid_only is set to TRUE, then the - * oid will instead be returned. - * @return mixed On success either the fields table name or oid. + * @param \PgSql\Result $result + * @param int $field + * @param bool $oid_only + * @return mixed * @throws PgsqlException * */ @@ -366,13 +215,8 @@ function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = fals /** - * pg_flush flushes any outbound query data waiting to be - * sent on the connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return mixed Returns TRUE if the flush was successful or no data was waiting to be - * flushed, 0 if part of the pending data was flushed but - * more remains. + * @param \PgSql\Connection $connection + * @return mixed * @throws PgsqlException * */ @@ -388,15 +232,7 @@ function pg_flush(\PgSql\Connection $connection) /** - * pg_free_result frees the memory and data associated with the - * specified PgSql\Result instance. - * - * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will - * be automatically freed when the script ends. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). + * @param \PgSql\Result $result * @throws PgsqlException * */ @@ -411,17 +247,8 @@ function pg_free_result(\PgSql\Result $result): void /** - * pg_host returns the host name of the given - * PostgreSQL connection instance is - * connected to. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @return string A string containing the name of the host the - * connection is to. + * @param \PgSql\Connection|null $connection + * @return string * @throws PgsqlException * */ @@ -441,39 +268,11 @@ function pg_host(?\PgSql\Connection $connection = null): string /** - * pg_insert inserts the values - * of values into the table specified - * by table_name. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_insert passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to insert rows. The table table_name must at least - * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be inserted. - * @param int $flags Any number of PGSQL_CONV_OPTS, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -489,30 +288,8 @@ function pg_insert(\PgSql\Connection $connection, string $table_name, array $val /** - * pg_last_oid is used to retrieve the - * OID assigned to an inserted row. - * - * OID field became an optional field from PostgreSQL 7.2 and will - * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use - * pg_result_status to check for successful - * insertion. - * - * To get the value of a SERIAL field in an inserted - * row, it is necessary to use the PostgreSQL CURRVAL - * function, naming the sequence whose last value is required. If the - * name of the sequence is unknown, the pg_get_serial_sequence - * PostgreSQL 8.0 function is necessary. - * - * PostgreSQL 8.1 has a function LASTVAL that returns - * the value of the most recently used sequence in the session. This avoids - * the need for naming the sequence, table or column altogether. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @return string An int or string containing the OID assigned to the most recently inserted - * row in the specified connection or - * no available OID. + * @param \PgSql\Result $result + * @return string * @throws PgsqlException * */ @@ -528,12 +305,7 @@ function pg_last_oid(\PgSql\Result $result): string /** - * pg_lo_close closes a large object. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. + * @param \PgSql\Lob $lob * @throws PgsqlException * */ @@ -548,21 +320,9 @@ function pg_lo_close(\PgSql\Lob $lob): void /** - * pg_lo_export takes a large object in a - * PostgreSQL database and saves its contents to a file on the local - * filesystem. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $pathname The full path and file name of the file in which to write the - * large object on the client filesystem. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $pathname * @throws PgsqlException * */ @@ -585,26 +345,10 @@ function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ? /** - * pg_lo_import creates a new large object - * in the database using a file on the filesystem as its data - * source. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $pathname The full path and file name of the file on the client - * filesystem from which to read the large object data. - * @param $object_id If an object_id is given the function - * will try to create a large object with this id, else a free - * object id is assigned by the server. The parameter - * relies on functionality that first - * appeared in PostgreSQL 8.1. - * @return int The OID of the newly created large object. + * @param \PgSql\Connection $connection + * @param string $pathname + * @param $object_id + * @return int * @throws PgsqlException * */ @@ -628,21 +372,10 @@ function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = /** - * pg_lo_open opens a large object in the database - * and returns an PgSql\Lob instance so that it can be manipulated. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and - * write. - * @return \PgSql\Lob An PgSql\Lob instance. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $mode + * @return \PgSql\Lob * @throws PgsqlException * */ @@ -658,17 +391,9 @@ function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgS /** - * pg_lo_read reads at most - * length bytes from a large object and - * returns it as a string. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $length An optional maximum number of bytes to return. - * @return string A string containing length bytes from the - * large object. + * @param \PgSql\Lob $lob + * @param int $length + * @return string * @throws PgsqlException * */ @@ -684,16 +409,9 @@ function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string /** - * pg_lo_seek seeks a position within an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), - * PGSQL_SEEK_CUR (seek from current position) - * or PGSQL_SEEK_END (seek from object end) . + * @param \PgSql\Lob $lob + * @param int $offset + * @param int $whence * @throws PgsqlException * */ @@ -708,13 +426,8 @@ function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void /** - * pg_lo_truncate truncates an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $size The number of bytes to truncate. + * @param \PgSql\Lob $lob + * @param int $size * @throws PgsqlException * */ @@ -729,18 +442,8 @@ function pg_lo_truncate(\PgSql\Lob $lob, int $size): void /** - * pg_lo_unlink deletes a large object with the - * oid. Returns TRUE on success. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. + * @param \PgSql\Connection $connection + * @param int $oid * @throws PgsqlException * */ @@ -755,20 +458,10 @@ function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void /** - * pg_lo_write writes data into a large object - * at the current seek position. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param string $data The data to be written to the large object. If length is - * an int and is less than the length of data, only - * length bytes will be written. - * @param int|null $length An optional maximum number of bytes to write. Must be greater than zero - * and no greater than the length of data. Defaults to - * the length of data. - * @return int The number of bytes written to the large object. + * @param \PgSql\Lob $lob + * @param string $data + * @param int|null $length + * @return int * @throws PgsqlException * */ @@ -788,13 +481,10 @@ function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int /** - * pg_meta_data returns table definition for - * table_name as an array. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name The name of the table. - * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param bool $extended + * @return array * @throws PgsqlException * */ @@ -810,41 +500,9 @@ function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $e /** - * Looks up a current parameter setting of the server. - * - * Certain parameter values are reported by the server automatically at - * connection startup or whenever their values change. pg_parameter_status can be - * used to interrogate these settings. It returns the current value of a - * parameter if known, or FALSE if the parameter is not known. - * - * Parameters reported as of PostgreSQL 8.0 include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and integer_datetimes. - * (server_encoding, TimeZone, and - * integer_datetimes were not reported by releases before 8.0.) Note that - * server_version, server_encoding and integer_datetimes - * cannot change after PostgreSQL startup. - * - * PostgreSQL 7.3 or lower servers do not report parameter settings, - * pg_parameter_status - * includes logic to obtain values for server_version and - * client_encoding - * anyway. Applications are encouraged to use pg_parameter_status rather than ad - * hoc code to determine these values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $param_name Possible param_name values include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and - * integer_datetimes. Note that this value is case-sensitive. - * @return string A string containing the value of the parameter or invalid - * param_name. + * @param \PgSql\Connection $connection + * @param string $param_name + * @return string * @throws PgsqlException * */ @@ -866,46 +524,9 @@ function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $par /** - * pg_pconnect opens a connection to a - * PostgreSQL database. It returns an PgSql\Connection instance that is - * needed by other PostgreSQL functions. - * - * If a second call is made to pg_pconnect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * To enable persistent connection, the pgsql.allow_persistent - * php.ini directive must be set to "On" (which is the default). - * The maximum number of persistent connection can be defined with the pgsql.max_persistent - * php.ini directive (defaults to -1 for no limit). The total number - * of connections can be set with the pgsql.max_links - * php.ini directive. - * - * pg_close will not close persistent links - * generated by pg_pconnect. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname, user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -921,14 +542,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connecti /** - * pg_ping pings a database connection and tries to - * reconnect it if it is broken. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -947,39 +561,10 @@ function pg_ping(?\PgSql\Connection $connection = null): void /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * pg_prepare is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters - * are used, they are referred to in the query as $1, - * $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is - * more flexible since it does not require parameter types to be pre-specified.) Also, - * although there is no PHP function for deleting a prepared statement, the - * SQL DEALLOCATE statement can be used for that purpose. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If - * "" is specified, then an unnamed statement is created, overwriting any - * previously defined unnamed statement. - * @param string $query The parameterized SQL statement. Must contain only a single statement - * (multiple statements separated by semi-colons are not allowed). If any parameters - * are used, they are referred to as $1, $2, etc. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1003,25 +588,8 @@ function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_put_line sends a NULL-terminated string - * to the PostgreSQL backend server. This is needed in conjunction - * with PostgreSQL's COPY FROM command. - * - * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, - * and in a single transaction. - * - * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler - * interface. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL - * terminator is added automatically. + * @param \PgSql\Connection $connection + * @param string $data * @throws PgsqlException * */ @@ -1042,53 +610,10 @@ function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null /** - * Submits a command to the server and waits for the result, with the ability - * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. - * pg_query_params is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * If parameters are used, they are referred to in the - * query string as $1, $2, etc. The same parameter may - * appear more than once in the query; the same value - * will be used in that case. params specifies the - * actual values of the parameters. A NULL value in this array means the - * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, - * but not more than one nonempty command.) - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * - * User-supplied values should always be passed as parameters, not - * interpolated into the query string, where they form possible - * SQL injection - * attack vectors and introduce bugs when handling data containing quotes. - * If for some reason you cannot use a parameter, ensure that interpolated - * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Values intended for bytea fields are not supported as - * parameters. Use pg_escape_bytea instead, or use the - * large object functions. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1112,42 +637,9 @@ function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = /** - * pg_query executes the query - * on the specified database connection. - * pg_query_params should be preferred - * in most cases. - * - * If an error occurs, and FALSE is returned, details of the error can - * be retrieved using the pg_last_error - * function if the connection is valid. - * - * - * - * Although connection can be omitted, it - * is not recommended, since it can be the cause of hard to find - * bugs in scripts. - * - * - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, - * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands - * included in the query string. However, using multiple transactions in one function call is not recommended. - * - * String interpolation of user-supplied data is extremely dangerous and is - * likely to lead to SQL - * injection vulnerabilities. In most cases - * pg_query_params should be preferred, passing - * user-supplied values as parameters rather than substituting them into - * the query string. - * - * Any user-supplied data substituted directly into a query string should - * be properly escaped. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1169,31 +661,9 @@ function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): /** - * pg_result_error_field returns one of the detailed error message - * fields associated with result instance. It is only available - * against a PostgreSQL 7.4 or above server. The error field is specified by - * the field_code. - * - * Because pg_query and pg_query_params return FALSE if the query fails, - * you must use pg_send_query and - * pg_get_result to get the result handle. - * - * If you need to get additional error information from failed pg_query queries, - * use pg_set_error_verbosity and pg_last_error - * and then parse the result. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field_code Possible field_code values are: PGSQL_DIAG_SEVERITY, - * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, - * PGSQL_DIAG_MESSAGE_DETAIL, - * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, - * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), - * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), - * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, - * PGSQL_DIAG_SOURCE_LINE or - * PGSQL_DIAG_SOURCE_FUNCTION. - * @return null|string A string containing the contents of the error field, NULL if the field does not exist. + * @param \PgSql\Result $result + * @param int $field_code + * @return null|string * @throws PgsqlException * */ @@ -1209,13 +679,8 @@ function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string /** - * pg_result_seek sets the internal row offset in - * the result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $row Row to move the internal offset to in the PgSql\Result instance. - * Rows are numbered starting from zero. + * @param \PgSql\Result $result + * @param int $row * @throws PgsqlException * */ @@ -1230,55 +695,12 @@ function pg_result_seek(\PgSql\Result $result, int $row): void /** - * pg_select selects records specified by - * conditions which has - * field=>value. For a successful query, it returns an - * array containing all records and fields that match the condition - * specified by conditions. - * - * If flags is set, - * pg_convert is applied to - * conditions with the specified flags. - * - * If mode is set, - * the return value will be in the form of an array - * with PGSQL_NUM, an associative array - * with PGSQL_ASSOC (default) or both - * with PGSQL_BOTH. - * - * By default pg_select passes raw values. Values - * must be escaped or PGSQL_DML_ESCAPE option must be - * specified. PGSQL_DML_ESCAPE quotes and escapes - * parameters/identifiers. Therefore, table/column names became case - * sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be retrieved. - * As of PHP 8.4.0, when an empty array is provided, no conditions will apply. - * Previously, the function failed with an empty conditions argument. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then the query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @param int $mode Any number of PGSQL_ASSOC, - * PGSQL_NUM or - * PGSQL_BOTH - * If PGSQL_ASSOC is set the return value will be an associative array, - * with PGSQL_NUM the return value will be an array, and - * with PGSQL_BOTH the return value will be both an associative and - * numerically indexed array. - * @return mixed Returns string if PGSQL_DML_STRING is passed - * via flags, otherwise it returns an array on success. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @param int $mode + * @return mixed * @throws PgsqlException * */ @@ -1294,14 +716,8 @@ function pg_select(\PgSql\Connection $connection, string $table_name, array $con /** - * Set the query results to be retrieved in chunk mode. - * The query results returned afterward will be divided into multiple chunks, - * each containing up to size rows. - * This function must be called before retrieving results with pg_get_result. - * This function is only available when libpq is version 17 or higher. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param int $size The number of rows to be retrieved in each chunk. + * @param \PgSql\Connection $connection + * @param int $size * @throws PgsqlException * */ @@ -1316,11 +732,8 @@ function pg_set_chunked_rows_size(\PgSql\Connection $connection, int $size): voi /** - * pg_socket returns a read only resource - * corresponding to the socket underlying the given PostgreSQL connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return resource A socket resource on success. + * @param \PgSql\Connection $connection + * @return resource * @throws PgsqlException * */ @@ -1336,29 +749,10 @@ function pg_socket(\PgSql\Connection $connection) /** - * pg_trace enables tracing of the PostgreSQL - * frontend/backend communication to a file. To fully understand the results, - * one needs to be familiar with the internals of PostgreSQL - * communication protocol. - * - * For those who are not, it can still be - * useful for tracing errors in queries sent to the server, you - * could do for example grep '^To backend' - * trace.log and see what queries actually were sent to the - * PostgreSQL server. For more information, refer to the - * PostgreSQL Documentation. - * - * @param string $filename The full path and file name of the file in which to write the - * trace log. Same as in fopen. - * @param string $mode An optional file access mode, same as for fopen. - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $trace_mode An optional trace mode with the following constants - * PGSQL_TRACE_SUPPRESS_TIMESTAMPS and - * PGSQL_TRACE_REGRESS_MODE + * @param string $filename + * @param string $mode + * @param \PgSql\Connection|null $connection + * @param int $trace_mode * @throws PgsqlException * */ @@ -1379,39 +773,12 @@ function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $conn /** - * pg_update updates records that matches - * conditions with values. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_update passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be updated. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ diff --git a/generated/8.4/posix.php b/generated/8.4/posix.php index da588465..ef0da47d 100644 --- a/generated/8.4/posix.php +++ b/generated/8.4/posix.php @@ -5,18 +5,8 @@ use Safe\Exceptions\PosixException; /** - * posix_access checks the user's permission of a file. - * - * @param string $filename The name of the file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -31,18 +21,8 @@ function posix_access(string $filename, int $flags = 0): void /** - * posix_eaccess checks the effective user's permission of a file - * - * @param string $filename The name of a file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -57,55 +37,8 @@ function posix_eaccess(string $filename, int $flags = 0): void /** - * Gets information about a group provided its id. - * - * @param int $group_id The group id. - * @return array{name: string, passwd: string, gid: int, members: list} The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID, should be the same as the - * group_id parameter used when calling the - * function, and hence redundant. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $group_id + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -121,55 +54,8 @@ function posix_getgrgid(int $group_id): array /** - * Gets information about a group provided its name. - * - * @param string $name The name of the group - * @return array{name: string, passwd: string, gid: int, members: list} Returns an array on success. - * The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. This should be the same as - * the name parameter used when - * calling the function, and hence redundant. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID of the group in numeric form. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * + * @param string $name + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -185,10 +71,7 @@ function posix_getgrnam(string $name): array /** - * Gets the group set of the current process. - * - * @return list Returns an array of integers containing the numeric group ids of the group - * set of the current process. + * @return list * @throws PosixException * */ @@ -204,9 +87,7 @@ function posix_getgroups(): array /** - * Returns the login name of the user owning the current process. - * - * @return string Returns the login name of the user, as a string. + * @return string * @throws PosixException * */ @@ -222,83 +103,8 @@ function posix_getlogin(): string /** - * Returns an array of information about the user - * referenced by the given user ID. - * - * @param int $user_id The user identifier. - * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} Returns an associative array with the following elements: - * - * The user information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the username of the user. This is - * a short, usually less than 16 character "handle" of the - * user, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the user's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * uid - * - * User ID, should be the same as the - * user_id parameter used when calling the - * function, and hence redundant. - * - * - * - * gid - * - * The group ID of the user. Use the function - * posix_getgrgid to resolve the group - * name and a list of its members. - * - * - * - * gecos - * - * GECOS is an obsolete term that refers to the finger - * information field on a Honeywell batch processing system. - * The field, however, lives on, and its contents have been - * formalized by POSIX. The field contains a comma separated - * list containing the user's full name, office phone, office - * number, and home phone number. On most systems, only the - * user's full name is available. - * - * - * - * dir - * - * This element contains the absolute path to the - * home directory of the user. - * - * - * - * shell - * - * The shell element contains the absolute path to the - * executable of the user's default shell. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $user_id + * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} * @throws PosixException * */ @@ -314,103 +120,8 @@ function posix_getpwuid(int $user_id): array /** - * posix_getrlimit returns an array - * of information about the current resource's soft and hard limits. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int|null $resource If NULL all resource limits will be fetched. - * Otherwise, the only limits of the resource type provided will be returned. - * @return array Returns an associative array of elements for each - * limit that is defined. Each limit has a soft and a hard limit. - * - * List of possible limits returned - * - * - * - * Limit name - * Limit description - * - * - * - * - * core - * - * The maximum size of the core file. When 0, not core files are - * created. When core files are larger than this size, they will - * be truncated at this size. - * - * - * - * totalmem - * - * The maximum size of the memory of the process, in bytes. - * - * - * - * virtualmem - * - * The maximum size of the virtual memory for the process, in bytes. - * - * - * - * data - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * stack - * - * The maximum size of the process stack, in bytes. - * - * - * - * rss - * - * The maximum number of virtual pages resident in RAM - * - * - * - * maxproc - * - * The maximum number of processes that can be created for the - * real user ID of the calling process. - * - * - * - * memlock - * - * The maximum number of bytes of memory that may be locked into RAM. - * - * - * - * cpu - * - * The amount of time the process is allowed to use the CPU. - * - * - * - * filesize - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * openfiles - * - * One more than the maximum number of open file descriptors. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int|null $resource + * @return array * @throws PosixException * */ @@ -430,14 +141,8 @@ function posix_getrlimit(?int $resource = null): array /** - * Return the session id of the process process_id. - * The session id of a process is the process group id of the session leader. - * - * @param int $process_id The process identifier. If set to 0, the current process is - * assumed. If an invalid process_id is - * specified, then FALSE is returned and an error is set which - * can be checked with posix_get_last_error. - * @return int Returns the identifier, as an int. + * @param int $process_id + * @return int * @throws PosixException * */ @@ -453,10 +158,8 @@ function posix_getsid(int $process_id): int /** - * Calculates the group access list for the user specified in name. - * - * @param string $username The user to calculate the list for. - * @param int $group_id Typically the group number from the password file. + * @param string $username + * @param int $group_id * @throws PosixException * */ @@ -471,11 +174,8 @@ function posix_initgroups(string $username, int $group_id): void /** - * Send the signal signal to the process with - * the process identifier process_id. - * - * @param int $process_id The process identifier. - * @param int $signal One of the PCNTL signals constants. + * @param int $process_id + * @param int $signal * @throws PosixException * */ @@ -490,16 +190,8 @@ function posix_kill(int $process_id, int $signal): void /** - * posix_mkfifo creates a special - * FIFO file which exists in the file system and acts as - * a bidirectional communication endpoint for processes. - * - * @param string $filename Path to the FIFO file. - * @param int $permissions The second parameter permissions has to be given in - * octal notation (e.g. 0644). The permission of the newly created - * FIFO also depends on the setting of the current - * umask. The permissions of the created file are - * (mode & ~umask). + * @param string $filename + * @param int $permissions * @throws PosixException * */ @@ -514,17 +206,10 @@ function posix_mkfifo(string $filename, int $permissions): void /** - * Creates a special or ordinary file. - * - * @param string $filename The file to create - * @param int $flags This parameter is constructed by a bitwise OR between file type (one of - * the following constants: POSIX_S_IFREG, - * POSIX_S_IFCHR, POSIX_S_IFBLK, - * POSIX_S_IFIFO or - * POSIX_S_IFSOCK) and permissions. - * @param int $major The major device kernel identifier (required to pass when using - * S_IFCHR or S_IFBLK). - * @param int $minor The minor device kernel identifier. + * @param string $filename + * @param int $flags + * @param int $major + * @param int $minor * @throws PosixException * */ @@ -539,11 +224,7 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = /** - * Set the effective group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -558,11 +239,7 @@ function posix_setegid(int $group_id): void /** - * Set the effective user ID of the current process. This is a privileged - * function and needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -577,14 +254,7 @@ function posix_seteuid(int $user_id): void /** - * Set the real group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. The - * appropriate order of function calls is - * posix_setgid first, - * posix_setuid last. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -599,11 +269,8 @@ function posix_setgid(int $group_id): void /** - * Let the process process_id join the process group - * process_group_id. - * - * @param int $process_id The process id. - * @param int $process_group_id The process group id. + * @param int $process_id + * @param int $process_group_id * @throws PosixException * */ @@ -618,23 +285,9 @@ function posix_setpgid(int $process_id, int $process_group_id): void /** - * posix_setrlimit sets the soft and hard limits for a - * given system resource. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int $resource The - * resource limit constant - * corresponding to the limit that is being set. - * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. - * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. + * @param int $resource + * @param int $soft_limit + * @param int $hard_limit * @throws PosixException * */ @@ -649,9 +302,7 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void /** - * Make the current process a session leader. - * - * @return int Returns the session ids. + * @return int * @throws PosixException * */ @@ -667,11 +318,7 @@ function posix_setsid(): int /** - * Set the real user ID of the current process. This is a privileged - * function that needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -686,39 +333,7 @@ function posix_setuid(int $user_id): void /** - * Gets information about the current CPU usage. - * - * @return array Returns a hash of strings with information about the current - * process CPU usage. The indices of the hash are: - * - * - * - * ticks - the number of clock ticks that have elapsed since - * reboot. - * - * - * - * - * utime - user time used by the current process. - * - * - * - * - * stime - system time used by the current process. - * - * - * - * - * cutime - user time used by current process and children. - * - * - * - * - * cstime - system time used by current process and children. - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -734,41 +349,7 @@ function posix_times(): array /** - * Gets information about the system. - * - * Posix requires that assumptions must not be made about the - * format of the values, e.g. the assumption that a release may contain - * three digits or anything else returned by this function. - * - * @return array Returns a hash of strings with information about the - * system. The indices of the hash are - * - * - * sysname - operating system name (e.g. Linux) - * - * - * nodename - system name (e.g. valiant) - * - * - * release - operating system release (e.g. 2.2.10) - * - * - * version - operating system version (e.g. #4 Tue Jul 20 - * 17:01:36 MEST 1999) - * - * - * machine - system architecture (e.g. i586) - * - * - * domainname - DNS domainname (e.g. example.com) - * - * - * - * domainname is a GNU extension and not part of POSIX.1, so this - * field is only available on GNU systems or when using the GNU - * libc. - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ diff --git a/generated/8.4/ps.php b/generated/8.4/ps.php index 1eaa9774..912fbb4e 100644 --- a/generated/8.4/ps.php +++ b/generated/8.4/ps.php @@ -5,23 +5,12 @@ use Safe\Exceptions\PsException; /** - * Places a hyperlink at the given position pointing to a file program - * which is being started when clicked on. The hyperlink's source position - * is a rectangle - * with its lower left corner at (llx, lly) and its upper right corner at - * (urx, ury). The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The path of the program to be started, when the link is clicked on. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename * @throws PsException * */ @@ -36,30 +25,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur /** - * Places a hyperlink at the given position pointing to a page in the same - * document. Clicking on the link will jump to the given page. The first page - * in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param int $page The number of the page displayed when clicking on the link. - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param int $page + * @param string $dest * @throws PsException * */ @@ -74,31 +46,15 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury /** - * Adds a note at a certain position on the page. Notes are like little - * rectangular sheets with text on it, which can be placed anywhere on - * a page. They - * are shown either folded or unfolded. If folded, the specified icon - * is used as a placeholder. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $contents The text of the note. - * @param string $title The title of the note as displayed in the header of the note. - * @param string $icon The icon shown if the note is folded. This parameter can be set - * to comment, insert, - * note, paragraph, - * newparagraph, key, or - * help. - * @param int $open If open is unequal to zero the note will - * be shown unfolded after opening the document with a pdf viewer. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open * @throws PsException * */ @@ -113,32 +69,14 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str /** - * Places a hyperlink at the given position pointing to a second pdf document. - * Clicking on the link will branch to the document at the given page. The - * first page in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The name of the pdf document to be opened when clicking on - * this link. - * @param int $page The page number of the destination pdf document - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param int $page + * @param string $dest * @throws PsException * */ @@ -153,25 +91,12 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Places a hyperlink at the given position pointing to a web page. The - * hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and - * its upper right corner at (urx, - * ury). The rectangle has by default a thin - * blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $url The url of the hyperlink to be opened when clicking on - * this link, e.g. http://www.php.net. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $url * @throws PsException * */ @@ -186,21 +111,12 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn counterclockwise (use - * ps_arcn to draw clockwise). The subpath added - * to the current path starts on the arc at angle alpha - * and ends on the arc at angle beta. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The start angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -215,21 +131,12 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn clockwise (use - * ps_arc to draw counterclockwise). The subpath added to - * the current path starts on the arc at angle beta and - * ends on the arc at angle alpha. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The starting angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -244,43 +151,9 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float /** - * Starts a new page. Although the parameters width - * and height imply a different page size for each - * page, this is not possible in PostScript. The first call of - * ps_begin_page will set the page size for the whole - * document. Consecutive calls will have no effect, except for creating a new - * page. The situation is different if you intent to convert the PostScript - * document into PDF. This function places pdfmarks into the document which - * can set the size for each page indiviually. The resulting PDF document will - * have different page sizes. - * - * Though PostScript does not know different page sizes, pslib places - * a bounding box for each page into the document. This size is evaluated - * by some PostScript viewers and will have precedence over the BoundingBox - * in the Header of the document. This can lead to unexpected results when - * you set a BoundingBox whose lower left corner is not (0, 0), because the - * bounding box of the page will always have a lower left corner (0, 0) - * and overwrites the global setting. - * - * Each page is encapsulated into save/restore. This means, that most of the - * settings made on one page will not be retained on the next page. - * - * If there is up to the first call of ps_begin_page no - * call of ps_findfont, then the header of the PostScript - * document will be output and the bounding box will be set to the size of - * the first page. The lower left corner of the bounding box is set to (0, 0). - * If ps_findfont was called before, then the - * header has been output already, and the document will not have a valid - * bounding box. In order to prevent this, one should call - * ps_set_info to set the info field - * BoundingBox and possibly Orientation - * before any ps_findfont or - * ps_begin_page calls. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the page in pixel, e.g. 596 for A4 format. - * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @param resource $psdoc + * @param float $width + * @param float $height * @throws PsException * */ @@ -295,21 +168,13 @@ function ps_begin_page($psdoc, float $width, float $height): void /** - * Starts a new pattern. A pattern is like a page containing e.g. a drawing - * which can be used for filling areas. It is used like a color by calling - * ps_setcolor and setting the color space to - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the pattern in pixel. - * @param float $height The height of the pattern in pixel. - * @param float $xstep The distance in pixel of placements of the pattern in - * horizontal direction. - * @param float $ystep The distance in pixel of placements of the pattern in - * vertical direction. - * @param int $painttype Must be 1 or 2. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param float $width + * @param float $height + * @param float $xstep + * @param float $ystep + * @param int $painttype + * @return int * @throws PsException * */ @@ -325,18 +190,10 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo /** - * Starts a new template. A template is called a form in the postscript - * language. It is created similar to a pattern but used like an image. - * Templates are often used for drawings which are placed several times - * through out the document, e.g. like a company logo. All drawing functions - * may be used within a template. The template will not be drawn until - * it is placed by ps_place_image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the template in pixel. - * @param float $height The height of the template in pixel. - * @return int Returns TRUE on success. + * @param resource $psdoc + * @param float $width + * @param float $height + * @return int * @throws PsException * */ @@ -352,20 +209,10 @@ function ps_begin_template($psdoc, float $width, float $height): int /** - * Draws a circle with its middle point at (x, - * y). The circle starts and ends at position - * (x+radius, - * y). If this function is called outside a path it - * will start a new path. If it is called within a path it will add the circle - * as a subpath. If the last drawing operation does not end in point - * (x+radius, - * y) then there will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius * @throws PsException * */ @@ -380,11 +227,7 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** - * Takes the current path and uses it to define the border of a clipping area. - * Everything drawn outside of that area will not be visible. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -399,14 +242,8 @@ function ps_clip($psdoc): void /** - * Closes an image and frees its resources. Once an image is closed - * it cannot be used anymore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid Resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. + * @param resource $psdoc + * @param int $imageid * @throws PsException * */ @@ -421,17 +258,7 @@ function ps_close_image($psdoc, int $imageid): void /** - * Closes the PostScript document. - * - * This function writes the trailer of the PostScript document. - * It also writes the bookmark tree. ps_close does - * not free any resources, which is done by ps_delete. - * - * This function is also called by ps_delete if it - * has not been called before. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -446,11 +273,7 @@ function ps_close($psdoc): void /** - * Connects the last point with first point of a path and draws the resulting - * closed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -465,11 +288,7 @@ function ps_closepath_stroke($psdoc): void /** - * Connects the last point with the first point of a path. The resulting - * path can be used for stroking, filling, clipping, etc.. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -484,15 +303,8 @@ function ps_closepath($psdoc): void /** - * Output a text one line below the last line. The line spacing is - * taken from the value "leading" which must be set with - * ps_set_value. The actual position of the - * text is determined by the values "textx" and "texty" which can be requested - * with ps_get_value - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -507,17 +319,13 @@ function ps_continue_text($psdoc, string $text): void /** - * Add a section of a cubic Bézier curve described by the three given control - * points to the current path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x1 x-coordinate of first control point. - * @param float $y1 y-coordinate of first control point. - * @param float $x2 x-coordinate of second control point. - * @param float $y2 y-coordinate of second control point. - * @param float $x3 x-coordinate of third control point. - * @param float $y3 y-coordinate of third control point. + * @param resource $psdoc + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PsException * */ @@ -532,15 +340,7 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x /** - * Mainly frees memory used by the document. Also closes a file, if it was not - * closed before with ps_close. You should in any case - * close the file with ps_close before, because - * ps_close not just closes the file but also outputs a - * trailor containing PostScript comments like the number of pages in the - * document and adding the bookmark hierarchy. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -555,13 +355,7 @@ function ps_delete($psdoc): void /** - * Ends a page which was started with ps_begin_page. - * Ending a page will leave the current drawing context, which e.g. requires - * to reload fonts if they were loading within the page, and to set many - * other drawing parameters like the line width, or color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -576,12 +370,7 @@ function ps_end_page($psdoc): void /** - * Ends a pattern which was started with ps_begin_pattern. - * Once a pattern has been ended, it can be used like a color to fill - * areas. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -596,11 +385,7 @@ function ps_end_pattern($psdoc): void /** - * Ends a template which was started with ps_begin_template. - * Once a template has been ended, it can be used like an image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -615,11 +400,7 @@ function ps_end_template($psdoc): void /** - * Fills and draws the path constructed with previously called drawing - * functions like ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -634,11 +415,7 @@ function ps_fill_stroke($psdoc): void /** - * Fills the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -653,128 +430,10 @@ function ps_fill($psdoc): void /** - * Gets several parameters which were directly set by - * ps_set_parameter or indirectly by one of the other - * functions. Parameters are by definition string - * values. This function cannot be used to retrieve resources which were also - * set by ps_set_parameter. - * - * The parameter name can have the following values. - * - * - * - * fontname - * - * - * The name of the currently active font or the font whose - * identifier is passed in parameter modifier. - * - * - * - * - * fontencoding - * - * - * The encoding of the currently active font. - * - * - * - * - * dottedversion - * - * - * The version of the underlying pslib library in the format - * <major>.<minor>.<subminor> - * - * - * - * - * scope - * - * - * The current drawing scope. Can be object, document, null, page, - * pattern, path, template, prolog, font, glyph. - * - * - * - * - * ligaturedisolvechar - * - * - * The character which dissolves a ligature. If your are using a font - * which contains the ligature `ff' and `|' is the char to dissolve the - * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * - * imageencoding - * - * - * The encoding used for encoding images. Can be either - * hex or 85. hex encoding - * uses two bytes in the postscript file each byte in the image. - * 85 stand for Ascii85 encoding. - * - * - * - * - * linenumbermode - * - * - * Set to paragraph if lines are numbered - * within a paragraph or box if they are - * numbered within the surrounding box. - * - * - * - * - * linebreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will add a line - * break. - * - * - * - * - * parbreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will start - * a new paragraph. - * - * - * - * - * hyphenation - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE the paragraph will be hyphenated - * if a hypen dictionary is set and exists. - * - * - * - * - * hyphendict - * - * - * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name Name of the parameter. - * @param float $modifier An identifier needed if a parameter of a resource is requested, - * e.g. the size of an image. In such a case the resource id is - * passed. - * @return string Returns the value of the parameter. + * @param resource $psdoc + * @param string $name + * @param float $modifier + * @return string * @throws PsException * */ @@ -794,23 +453,9 @@ function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string /** - * Hyphenates the passed word. ps_hyphenate evaluates the - * value hyphenminchars (set by ps_set_value) and - * the parameter hyphendict (set by ps_set_parameter). - * hyphendict must be set before calling this function. - * - * This function requires the locale category LC_CTYPE to be set properly. - * This is done when the extension is initialized by using the environment - * variables. On Unix systems read the man page of locale for more information. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text text should not contain any non alpha - * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in - * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in - * the text. + * @param resource $psdoc + * @param string $text + * @return array * @throws PsException * */ @@ -826,12 +471,7 @@ function ps_hyphenate($psdoc, string $text): array /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param string $file * @throws PsException * @@ -847,14 +487,9 @@ function ps_include_file($psdoc, string $file): void /** - * Adds a straight line from the current point to the given coordinates to the - * current path. Use ps_moveto to set the starting point - * of the line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the end point of the line. - * @param float $y y-coordinate of the end point of the line. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -869,15 +504,9 @@ function ps_lineto($psdoc, float $x, float $y): void /** - * Sets the current point to new coordinates. If this is the first call of - * ps_moveto after a previous path has been ended then it - * will start a new path. If this function is called in the middle of a path - * it will just set the current point and start a subpath. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the point to move to. - * @param float $y y-coordinate of the point to move to. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -892,13 +521,7 @@ function ps_moveto($psdoc, float $x, float $y): void /** - * Creates a new document instance. It does not create the file on disk or in - * memory, it just sets up everything. ps_new is usually - * followed by a call of ps_open_file to actually create - * the postscript document. - * - * @return resource Resource of PostScript document. The return value - * is passed to all other functions as the first argument. + * @return resource * @throws PsException * */ @@ -914,14 +537,8 @@ function ps_new() /** - * Creates a new file on disk and writes the PostScript document into it. The - * file will be closed when ps_close is called. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $filename The name of the postscript file. - * If filename is not passed the document will be - * created in memory and all output will go straight to the browser. + * @param resource $psdoc + * @param string $filename * @throws PsException * */ @@ -940,20 +557,11 @@ function ps_open_file($psdoc, ?string $filename = null): void /** - * Places a formerly loaded image on the page. The image can be scaled. - * If the image shall be rotated as well, you will have to rotate the - * coordinate system before with ps_rotate. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. - * @param float $x x-coordinate of the lower left corner of the image. - * @param float $y y-coordinate of the lower left corner of the image. - * @param float $scale The scaling factor for the image. A scale of 1.0 will result - * in a resolution of 72 dpi, because each pixel is equivalent to - * 1 point. + * @param resource $psdoc + * @param int $imageid + * @param float $x + * @param float $y + * @param float $scale * @throws PsException * */ @@ -968,19 +576,11 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): /** - * Draws a rectangle with its lower left corner at (x, - * y). The rectangle starts and ends in its lower left - * corner. If this function is called outside a path it will start a new path. - * If it is called within a path it will add the rectangle as a subpath. If - * the last drawing operation does not end in the lower left corner then there - * will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the lower left corner of the rectangle. - * @param float $y y-coordinate of the lower left corner of the rectangle. - * @param float $width The width of the image. - * @param float $height The height of the image. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PsException * */ @@ -995,14 +595,7 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void /** - * Restores a previously saved graphics context. Any call of - * ps_save must be accompanied by a call to - * ps_restore. All coordinate transformations, line - * style settings, color settings, etc. are being restored to the state - * before the call of ps_save. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1017,11 +610,8 @@ function ps_restore($psdoc): void /** - * Sets the rotation of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $rot Angle of rotation in degree. + * @param resource $psdoc + * @param float $rot * @throws PsException * */ @@ -1036,12 +626,7 @@ function ps_rotate($psdoc, float $rot): void /** - * Saves the current graphics context, containing colors, translation and - * rotation settings and some more. A saved context can be restored with - * ps_restore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1056,12 +641,9 @@ function ps_save($psdoc): void /** - * Sets horizontal and vertical scaling of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x Scaling factor in horizontal direction. - * @param float $y Scaling factor in vertical direction. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1076,18 +658,10 @@ function ps_scale($psdoc, float $x, float $y): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the color of the rectangle's border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $red The red component of the border color. - * @param float $green The green component of the border color. - * @param float $blue The blue component of the border color. + * @param resource $psdoc + * @param float $red + * @param float $green + * @param float $blue * @throws PsException * */ @@ -1102,18 +676,9 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the length of the black and white portion of a - * dashed border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $black The length of the dash. - * @param float $white The length of the gap between dashes. + * @param resource $psdoc + * @param float $black + * @param float $white * @throws PsException * */ @@ -1128,18 +693,9 @@ function ps_set_border_dash($psdoc, float $black, float $white): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the appearance and width of the border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $style style can be solid or - * dashed. - * @param float $width The line width of the border. + * @param resource $psdoc + * @param string $style + * @param float $width * @throws PsException * */ @@ -1154,39 +710,9 @@ function ps_set_border_style($psdoc, string $style, float $width): void /** - * Sets certain information fields of the document. This fields will be shown - * as a comment in the header of the PostScript file. If the document is - * converted to pdf this fields will also be used for the document - * information. - * - * The BoundingBox is usually set to the value given to the - * first page. This only works if ps_findfont has not - * been called before. In such cases the BoundingBox would be left unset - * unless you set it explicitly with this function. - * - * This function will have no effect anymore when the header of the postscript - * file has been already written. It must be called before the first page - * or the first call of ps_findfont. - * - * @param resource $p Resource identifier of the postscript file - * as returned by ps_new. - * @param string $key The name of the information field to set. The values which can be - * set are Keywords, Subject, - * Title, Creator, - * Author, BoundingBox, and - * Orientation. Be aware that some of them has a - * meaning to PostScript viewers. - * @param string $val The value of the information field. The field - * Orientation can be set to either - * Portrait or Landscape. The - * BoundingBox is a string consisting of four numbers. - * The first two numbers are the coordinates of the lower left corner of - * the page. The last two numbers are the coordinates of the upper - * right corner. - * - * Up to version 0.2.6 of pslib, the BoundingBox and Orientation - * will be overwritten by ps_begin_page, - * unless ps_findfont has been called before. + * @param resource $p + * @param string $key + * @param string $val * @throws PsException * */ @@ -1201,13 +727,9 @@ function ps_set_info($p, string $key, string $val): void /** - * Sets several parameters which are used by many functions. Parameters are by - * definition string values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name For a list of possible names see ps_get_parameter. - * @param string $value The value of the parameter. + * @param resource $psdoc + * @param string $name + * @param string $value * @throws PsException * */ @@ -1222,19 +744,9 @@ function ps_set_parameter($psdoc, string $name, string $value): void /** - * Set the position for the next text output. You may alternatively set the x - * and y value separately by calling ps_set_value and - * choosing textx respectively texty as - * the value name. - * - * If you want to output text at a certain position it is more convenient - * to use ps_show_xy instead of setting the text position - * and calling ps_show. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the new text position. - * @param float $y y-coordinate of the new text position. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1249,65 +761,9 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** - * Sets several values which are used by many functions. Parameters are by - * definition float values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name The name can be one of the following: - * - * - * textrendering - * - * - * The way how text is shown. - * - * - * - * - * textx - * - * - * The x coordinate for text output. - * - * - * - * - * texty - * - * - * The y coordinate for text output. - * - * - * - * - * wordspacing - * - * - * The distance between words relative to the width of a space. - * - * - * - * - * leading - * - * - * The distance between lines in pixels. - * - * - * - * - * - * The way how text is shown. - * - * The x coordinate for text output. - * - * The y coordinate for text output. - * - * The distance between words relative to the width of a space. - * - * The distance between lines in pixels. - * @param float $value The way how text is shown. + * @param resource $psdoc + * @param string $name + * @param float $value * @throws PsException * */ @@ -1322,27 +778,13 @@ function ps_set_value($psdoc, string $name, float $value): void /** - * Sets the color for drawing, filling, or both. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The parameter type can be - * both, fill, or - * fillstroke. - * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, - * spot, pattern. Depending on the - * colorspace either only the first, the first three or all parameters - * will be used. - * @param float $c1 Depending on the colorspace this is either the red component (rgb), - * the cyan component (cmyk), the gray value (gray), the identifier of - * the spot color or the identifier of the pattern. - * @param float $c2 Depending on the colorspace this is either the green component (rgb), - * the magenta component (cmyk). - * @param float $c3 Depending on the colorspace this is either the blue component (rgb), - * the yellow component (cmyk). - * @param float $c4 This must only be set in cmyk colorspace and specifies the black - * component. + * @param resource $psdoc + * @param string $type + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PsException * */ @@ -1357,12 +799,9 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** - * Sets the length of the black and white portions of a dashed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $on The length of the dash. - * @param float $off The length of the gap between dashes. + * @param resource $psdoc + * @param float $on + * @param float $off * @throws PsException * */ @@ -1377,13 +816,8 @@ function ps_setdash($psdoc, float $on, float $off): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The value must be between 0.2 and 1. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1398,14 +832,9 @@ function ps_setflat($psdoc, float $value): void /** - * Sets a font, which has to be loaded before with - * ps_findfont. Outputting text without setting a font - * results in an error. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $fontid The font identifier as returned by ps_findfont. - * @param float $size The size of the font. + * @param resource $psdoc + * @param int $fontid + * @param float $size * @throws PsException * */ @@ -1420,11 +849,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** - * Sets the gray value for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $gray The value must be between 0 (white) and 1 (black). + * @param resource $psdoc + * @param float $gray * @throws PsException * */ @@ -1439,14 +865,8 @@ function ps_setgray($psdoc, float $gray): void /** - * Sets how line ends look like. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The type of line ends. Possible values are - * PS_LINECAP_BUTT, - * PS_LINECAP_ROUND, or - * PS_LINECAP_SQUARED. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1461,14 +881,8 @@ function ps_setlinecap($psdoc, int $type): void /** - * Sets how lines are joined. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The way lines are joined. Possible values are - * PS_LINEJOIN_MITER, - * PS_LINEJOIN_ROUND, or - * PS_LINEJOIN_BEVEL. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1483,11 +897,8 @@ function ps_setlinejoin($psdoc, int $type): void /** - * Sets the line width for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of lines in points. + * @param resource $psdoc + * @param float $width * @throws PsException * */ @@ -1502,16 +913,8 @@ function ps_setlinewidth($psdoc, float $width): void /** - * If two lines join in a small angle and the line join is set to - * PS_LINEJOIN_MITER, then - * the resulting spike will be very long. The miter limit is the maximum - * ratio of the miter length (the length of the spike) and the line width. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The maximum ratio between the miter length and the line width. Larger - * values (> 10) will result in very long spikes when two lines meet - * in a small angle. Keep the default unless you know what you are doing. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1526,12 +929,7 @@ function ps_setmiterlimit($psdoc, float $value): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param int $mode * @throws PsException * @@ -1547,14 +945,8 @@ function ps_setoverprintmode($psdoc, int $mode): void /** - * Sets the length of the black and white portions of a dashed line. - * ps_setpolydash is used to set more complicated dash - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $arr arr is a list of length elements alternately for - * the black and white portion. + * @param resource $psdoc + * @param float $arr * @throws PsException * */ @@ -1569,16 +961,10 @@ function ps_setpolydash($psdoc, float $arr): void /** - * Creates a pattern based on a shading, which has to be created before with - * ps_shading. Shading patterns can be used like regular - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. - * @param string $optlist This argument is not currently used. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param int $shadingid + * @param string $optlist + * @return int * @throws PsException * */ @@ -1594,36 +980,18 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** - * Creates a shading, which can be used by ps_shfill or - * ps_shading_pattern. - * - * The color of the shading can be in any color space except for - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The type of shading can be either radial or - * axial. Each shading starts with the current fill - * color and ends with the given color values passed in the parameters - * c1 to c4 - * (see ps_setcolor for their meaning). - * @param float $x0 The coordinates x0, y0, - * x1, y1 are the start and - * end point of the shading. If the type of shading is - * radial the two points are the middle points of - * a starting and ending circle. - * @param float $y0 See ps_setcolor for their meaning. - * @param float $x1 If the shading is of type radial the - * optlist must also contain the parameters - * r0 and r1 with the radius of the - * start and end circle. + * @param resource $psdoc + * @param string $type + * @param float $x0 + * @param float $y0 + * @param float $x1 * @param float $y1 * @param float $c1 * @param float $c2 * @param float $c3 * @param float $c4 * @param string $optlist - * @return int Returns the identifier of the pattern. + * @return int * @throws PsException * */ @@ -1639,15 +1007,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float /** - * Fills an area with a shading, which has to be created before with - * ps_shading. This is an alternative way to creating - * a pattern from a shading ps_shading_pattern and using - * the pattern as the filling color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. + * @param resource $psdoc + * @param int $shadingid * @throws PsException * */ @@ -1662,13 +1023,10 @@ function ps_shfill($psdoc, int $shadingid): void /** - * Output a text at the given text position. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param float $x x-coordinate of the lower left corner of the box surrounding the text. - * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @param resource $psdoc + * @param string $text + * @param float $x + * @param float $y * @throws PsException * */ @@ -1683,10 +1041,6 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param resource $psdoc * @param string $text * @param int $len @@ -1706,19 +1060,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) /** - * Output a text at the current text position. The text position can be set - * by storing the x and y coordinates into the values textx - * and texty with the function - * ps_set_value. The function will issue an - * error if a font was not set before with ps_setfont. - * - * ps_show evaluates the following parameters and values - * as set by ps_set_parameter and - * ps_set_value. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -1733,12 +1076,9 @@ function ps_show($psdoc, string $text): void /** - * Output text at the current position. Do not print more than len characters. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param int $len The maximum number of characters to print. + * @param resource $psdoc + * @param string $text + * @param int $len * @throws PsException * */ @@ -1753,11 +1093,7 @@ function ps_show2($psdoc, string $text, int $len): void /** - * Draws the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1772,13 +1108,8 @@ function ps_stroke($psdoc): void /** - * Output the glyph at position ord in the font - * encoding vector of the current font. The font encoding for a font can be - * set when loading the font with ps_findfont. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $ord The position of the glyph in the font encoding vector. + * @param resource $psdoc + * @param int $ord * @throws PsException * */ @@ -1793,12 +1124,9 @@ function ps_symbol($psdoc, int $ord): void /** - * Sets a new initial point of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the origin of the translated coordinate system. - * @param float $y y-coordinate of the origin of the translated coordinate system. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ diff --git a/generated/8.4/pspell.php b/generated/8.4/pspell.php index b06330ba..36db793d 100644 --- a/generated/8.4/pspell.php +++ b/generated/8.4/pspell.php @@ -5,14 +5,8 @@ use Safe\Exceptions\PspellException; /** - * pspell_add_to_personal adds a word to the personal - * wordlist. If you used pspell_new_config with - * pspell_config_personal to open the dictionary, - * you can save the wordlist later with - * pspell_save_wordlist. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -27,12 +21,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void /** - * pspell_add_to_session adds a word to the wordlist - * associated with the current session. It is very similar to - * pspell_add_to_personal - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -47,11 +37,7 @@ function pspell_add_to_session(int $dictionary, string $word): void /** - * pspell_clear_session clears the current session. - * The current wordlist becomes blank, and, for example, if you try to save - * it with pspell_save_wordlist, nothing happens. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -66,35 +52,11 @@ function pspell_clear_session(int $dictionary): void /** - * Create a config used to open a dictionary. - * - * pspell_config_create has a very similar syntax to - * pspell_new. In fact, using - * pspell_config_create immediately followed by - * pspell_new_config will produce the exact same result. - * However, after creating a new config, you can also use - * pspell_config_* functions before calling - * pspell_new_config to take advantage of some - * advanced functionality. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @return false|int Returns an PSpell\Config instance. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @return false|int * */ function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "") @@ -106,10 +68,6 @@ function pspell_config_create(string $language, string $spelling = "", string $j /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -126,10 +84,6 @@ function pspell_config_data_dir(int $config, string $directory): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -146,12 +100,8 @@ function pspell_config_dict_dir(int $config, string $directory): void /** - * pspell_config_ignore should be used on a config - * before calling pspell_new_config. This function - * allows short words to be skipped by the spell checker. - * - * @param int $config An PSpell\Config instance. - * @param int $min_length Words less than min_length characters will be skipped. + * @param int $config + * @param int $min_length * @throws PspellException * */ @@ -166,33 +116,8 @@ function pspell_config_ignore(int $config, int $min_length): void /** - * pspell_config_mode should be used on a config - * before calling pspell_new_config. This function - * determines how many suggestions will be returned by - * pspell_suggest. - * - * @param int $config An PSpell\Config instance. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * + * @param int $config + * @param int $mode * @throws PspellException * */ @@ -207,17 +132,8 @@ function pspell_config_mode(int $config, int $mode): void /** - * Set a file that contains personal wordlist. The personal wordlist will be - * loaded and used in addition to the standard one after you call - * pspell_new_config. The file is also the file where - * pspell_save_wordlist will save personal wordlist to. - * - * pspell_config_personal should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The personal wordlist. If the file does not exist, it will be created. - * The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -232,19 +148,8 @@ function pspell_config_personal(int $config, string $filename): void /** - * Set a file that contains replacement pairs. - * - * The replacement pairs improve the quality of the spellchecker. When a word - * is misspelled, and a proper suggestion was not found in the list, - * pspell_store_replacement can be used to store a - * replacement pair and then pspell_save_wordlist to - * save the wordlist along with the replacement pairs. - * - * pspell_config_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -259,18 +164,8 @@ function pspell_config_repl(int $config, string $filename): void /** - * This function determines whether run-together words will be treated as - * legal compounds. That is, "thecat" will be a legal compound, although - * there should be a space between the two words. Changing this setting only - * affects the results returned by pspell_check; - * pspell_suggest will still return suggestions. - * - * pspell_config_runtogether should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $allow TRUE if run-together words should be treated as legal compounds, - * FALSE otherwise. + * @param int $config + * @param bool $allow * @throws PspellException * */ @@ -285,19 +180,8 @@ function pspell_config_runtogether(int $config, bool $allow): void /** - * pspell_config_save_repl determines whether - * pspell_save_wordlist will save the replacement pairs - * along with the wordlist. Usually there is no need to use this function - * because if pspell_config_repl is used, the - * replacement pairs will be saved by - * pspell_save_wordlist anyway, and if it is not, - * the replacement pairs will not be saved. - * - * pspell_config_save_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise. + * @param int $config + * @param bool $save * @throws PspellException * */ @@ -312,17 +196,8 @@ function pspell_config_save_repl(int $config, bool $save): void /** - * pspell_new_config opens up a new dictionary with - * settings specified in a config, created with - * pspell_config_create and modified with - * pspell_config_* functions. This method provides you - * with the most flexibility and has all the functionality provided by - * pspell_new and - * pspell_new_personal. - * - * @param int $config The config parameter is the one returned by - * pspell_config_create when the config was created. - * @return int Returns an PSpell\Dictionary instance on success + * @param int $config + * @return int * @throws PspellException * */ @@ -338,61 +213,13 @@ function pspell_new_config(int $config): int /** - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $filename The file where words added to the personal list will be stored. - * It should be an absolute filename beginning with '/' because otherwise - * it will be relative to $HOME, which is "/root" for most systems, and - * is probably not what you want. - * @param string $language The language code which consists of the two letter ISO 639 language - * code and an optional two letter ISO 3166 country code after a dash - * or underscore. - * @param string $spelling The requested spelling for languages with more than one spelling such - * as English. Known values are 'american', 'british', and 'canadian'. - * @param string $jargon Extra information to distinguish two different words lists that have - * the same language and spelling parameters. - * @param string $encoding The encoding that words are expected to be in. Valid values are - * utf-8, iso8859-*, - * koi8-r, viscii, - * cp1252, machine unsigned 16, - * machine unsigned 32. - * @param int $mode The mode in which spellchecker will work. There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $filename + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -408,64 +235,12 @@ function pspell_new_personal(string $filename, string $language, string $spellin /** - * pspell_new opens up a new dictionary and - * returns an PSpell\Dictionary instance for use in other pspell - * functions. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -481,12 +256,7 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" /** - * pspell_save_wordlist saves the personal wordlist from - * the current session. The location of files to be saved specified with - * pspell_config_personal and (optionally) - * pspell_config_repl. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -501,20 +271,9 @@ function pspell_save_wordlist(int $dictionary): void /** - * pspell_store_replacement stores a replacement pair for - * a word, so that replacement can be returned by - * pspell_suggest later. In order to be able to take - * advantage of this function, you have to use - * pspell_new_personal to open the dictionary. In order - * to permanently save the replacement pair, you have to - * use pspell_config_personal and - * pspell_config_repl to set the path where to save your - * custom wordlists, and then use pspell_save_wordlist - * for the changes to be written to disk. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $misspelled The misspelled word. - * @param string $correct The fixed spelling for the misspelled word. + * @param int $dictionary + * @param string $misspelled + * @param string $correct * @throws PspellException * */ diff --git a/generated/8.4/readline.php b/generated/8.4/readline.php index 892a9f95..cef74337 100644 --- a/generated/8.4/readline.php +++ b/generated/8.4/readline.php @@ -5,10 +5,8 @@ use Safe\Exceptions\ReadlineException; /** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. - * @return bool Always returns TRUE. + * @param string $prompt + * @return bool * */ function readline_add_history(string $prompt): bool @@ -20,20 +18,9 @@ function readline_add_history(string $prompt): bool /** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. - * @return bool Always returns TRUE. + * @param string $prompt + * @param callable $callback + * @return bool * */ function readline_callback_handler_install(string $prompt, callable $callback): bool @@ -45,9 +32,7 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** - * This function clears the entire command line history. - * - * @return bool Always returns TRUE. + * @return bool * */ function readline_clear_history(): bool @@ -59,11 +44,7 @@ function readline_clear_history(): bool /** - * This function registers a completion function. This is the same kind of - * functionality you'd get if you hit your tab key while using Bash. - * - * @param callable $callback You must supply the name of an existing function which accepts a - * partial command line and returns an array of possible matches. + * @param callable $callback * @throws ReadlineException * */ @@ -78,9 +59,7 @@ function readline_completion_function(callable $callback): void /** - * This function reads a command history from a file. - * - * @param null|string $filename Path to the filename containing the command history. + * @param null|string $filename * @throws ReadlineException * */ @@ -99,9 +78,7 @@ function readline_read_history(?string $filename = null): void /** - * This function writes the command history to a file. - * - * @param null|string $filename Path to the saved file. + * @param null|string $filename * @throws ReadlineException * */ diff --git a/generated/8.4/rnp.php b/generated/8.4/rnp.php index 2c9f3edd..c38882fc 100644 --- a/generated/8.4/rnp.php +++ b/generated/8.4/rnp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\RnpException; /** - * Private keys used for decryption should be loaded into the FFI object before calling this function. - * If password encryption was used, then password provider should be set by calling - * rnp_ffi_set_pass_provider. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input Encrypted message. - * @return string Decrypted message on success. + * @param \RnpFFI $ffi + * @param string $input + * @return string * @throws RnpException * */ @@ -27,11 +23,9 @@ function rnp_decrypt(\RnpFFI $ffi, string $input): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_JSON_DUMP_* predefined constants. - * @return string JSON string with dump. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -47,11 +41,9 @@ function rnp_dump_packets_to_json(string $input, int $flags): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_DUMP_* predefined constants. - * @return string Text describing packet sequence. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -67,13 +59,9 @@ function rnp_dump_packets(string $input, int $flags): string /** - * - * - * @param string $pub_format the format of the public keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant. - * @param string $sec_format the format of the secret keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant - * @return \RnpFFI Returns RnpFFI object on success. + * @param string $pub_format + * @param string $sec_format + * @return \RnpFFI * @throws RnpException * */ @@ -89,25 +77,8 @@ function rnp_ffi_create(string $pub_format, string $sec_format): \RnpFFI /** - * Sets password provider function. This function can ask for the password on a standard input - * (if PHP script is executed in a command line environment), display GUI dialog or provide - * password in any other possible ways. Requested passwords are used to encrypt or decrypt - * secret keys or perform symmetric encryption/decryption operations. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param callable $password_callback The function that is to be called for every password request. It has the following signature: - * - * boolpassword_callback - * stringkey_fp - * stringpgp_context - * stringpassword - * - * - * $key_fp - The key fingerprint, if any. Can be empty. - * $pgp_context - String describing why the key is being requested. - * $password - Password string reference where provided password should be stored to. - * - * Callback function should return TRUE if password was successfully set or FALSE on failure. + * @param \RnpFFI $ffi + * @param callable $password_callback * @throws RnpException * */ @@ -122,12 +93,10 @@ function rnp_ffi_set_pass_provider(\RnpFFI $ffi, callable $password_callback): v /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* predefined constants. - * @return string JSON string with information about new and updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -143,12 +112,10 @@ function rnp_import_keys(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing signatures to be imported. Can be either binary or ASCII armored. - * @param int $flags Currently must be 0. - * @return string JSON string with information about updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -164,17 +131,12 @@ function rnp_import_signatures(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Primary key fingerprint. - * @param string $subkey_fp Subkey to export. Can be an empty string - * to pick the first suitable subkey. - * @param string $uid User ID to export. Can be an empty string - * if exported key has only one uid. - * @param int $flags Only RNP_KEY_EXPORT_BASE64 is currently supported. Enabling - * it would export base64-encoded key data instead of binary. - * @return string OpenPGP packets of exported key on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param string $subkey_fp + * @param string $uid + * @param int $flags + * @return string * @throws RnpException * */ @@ -190,14 +152,11 @@ function rnp_key_export_autocrypt(\RnpFFI $ffi, string $key_fp, string $subkey_f /** - * Note: to revoke a key you'll need to import this signature into the keystore or use - * rnp_key_revoke function. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint of the primary key to be revoked. - * @param int $flags RNP_KEY_EXPORT_ARMORED or 0. - * @param array $options An associative array with options. - * @return string Exported revocation signature on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options + * @return string * @throws RnpException * */ @@ -217,13 +176,10 @@ function rnp_key_export_revocation(\RnpFFI $ffi, string $key_fp, int $flags, ?ar /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_EXPORT_* predefined constants - * (except RNP_KEY_EXPORT_BASE64). - * @return string OpenPGP packets of exported key (binary or ASCII-armored) on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @return string * @throws RnpException * */ @@ -239,11 +195,9 @@ function rnp_key_export(\RnpFFI $ffi, string $key_fp, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @return array An associative array with information about the key. + * @param \RnpFFI $ffi + * @param string $key_fp + * @return array * @throws RnpException * */ @@ -259,12 +213,9 @@ function rnp_key_get_info(\RnpFFI $ffi, string $key_fp): array /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_REMOVE_* constants. Flag RNP_KEY_REMOVE_SUBKEYS will work only for - * the primary key and will remove all of its subkeys as well. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags * @throws RnpException * */ @@ -279,12 +230,10 @@ function rnp_key_remove(\RnpFFI $ffi, string $key_fp, int $flags): void /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags Currently must be 0. - * @param array $options An associative array with options. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options * @throws RnpException * */ @@ -303,11 +252,9 @@ function rnp_key_revoke(\RnpFFI $ffi, string $key_fp, int $flags, ?array $option /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Key identifier type ("userid", "keyid", "grip", "fingerprint"). - * @return array An associative array where key is an identifier string and value is a PGP key fingerprint. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @return array * @throws RnpException * */ @@ -323,12 +270,10 @@ function rnp_list_keys(\RnpFFI $ffi, string $identifier_type): array /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input_path file or directory containing the keys. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input_path + * @param int $flags * @throws RnpException * */ @@ -343,12 +288,10 @@ function rnp_load_keys_from_path(\RnpFFI $ffi, string $format, string $input_pat /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input + * @param int $flags * @throws RnpException * */ @@ -363,13 +306,10 @@ function rnp_load_keys(\RnpFFI $ffi, string $format, string $input, int $flags): /** - * Note: only valid userids are checked while searching by userid. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Identifier type string: "userid", "keyid", "fingerprint", "grip". - * @param string $identifier PGP User ID (name and email) for "userid" type, hexadecimal string - * that represents key id, fingerprint or key grip correspondingly. - * @return string Returns hexadecimal fingerprint of the key found on success. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @param string $identifier + * @return string * @throws RnpException * */ @@ -385,13 +325,11 @@ function rnp_locate_key(\RnpFFI $ffi, string $identifier_type, string $identifie /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $message Message to be encrypted. - * @param array $recipient_keys_fp Array with fingerprints of recipient's keys. At least one key must be present. - * @param array $options An associative array with options. - * @return string Encrypted data on success. + * @param \RnpFFI $ffi + * @param string $message + * @param array $recipient_keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -411,18 +349,12 @@ function rnp_op_encrypt(\RnpFFI $ffi, string $message, array $recipient_keys_fp, /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $userid PGP User ID - text that is intended to represent - * the name and email address of the key holder. - * @param string $key_alg Primary key algorithm (i.e. 'RSA', 'DSA', etc). - * @param string $sub_alg Subkey algorithm. If not set, subkey will not be generated. - * @param array $options An associative array with options. - * @return string Fingerprint of the generated primary key. This fingerprint can be used - * later to reference the key in sign and encrypt operations. The key data is stored in FFI - * memory context and can be saved using - * rnp_save_keys or rnp_save_keys_to_path. + * @param \RnpFFI $ffi + * @param string $userid + * @param string $key_alg + * @param string $sub_alg + * @param array $options + * @return string * @throws RnpException * */ @@ -444,15 +376,11 @@ function rnp_op_generate_key(\RnpFFI $ffi, string $userid, string $key_alg, ?str /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Cleartext signed message containing source data with - * additional headers and ASCII-armored signature on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -472,14 +400,11 @@ function rnp_op_sign_cleartext(\RnpFFI $ffi, string $data, array $keys_fp, ?arra /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Detached signature(s) data on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -499,14 +424,11 @@ function rnp_op_sign_detached(\RnpFFI $ffi, string $data, array $keys_fp, ?array /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Data with embedded signature(s) on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -526,14 +448,10 @@ function rnp_op_sign(\RnpFFI $ffi, string $data, array $keys_fp, ?array $options /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Source data. - * @param string $signature Detached signature data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @param string $signature + * @return array * @throws RnpException * */ @@ -549,13 +467,9 @@ function rnp_op_verify_detached(\RnpFFI $ffi, string $data, string $signature): /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Signed data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @return array * @throws RnpException * */ @@ -571,12 +485,10 @@ function rnp_op_verify(\RnpFFI $ffi, string $data): array /** - * Saves keys present in the FFI object (loaded or generated) to the specified file or directory. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output_path File or directory path where keys should be saved to. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output_path + * @param int $flags * @throws RnpException * */ @@ -591,12 +503,10 @@ function rnp_save_keys_to_path(\RnpFFI $ffi, string $format, string $output_path /** - * Note that for G10, the output must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output key packets will be saved to the string referenced by output. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output + * @param int $flags * @throws RnpException * */ @@ -611,10 +521,8 @@ function rnp_save_keys(\RnpFFI $ffi, string $format, string &$output, int $flags /** - * Get the JSON formatted string containing array of supported rnp feature values (algorithms, curves, etc) by type. - * - * @param string $type See RNP_FEATURE_* constants for supported values. - * @return string String containing JSON formatted array of supported algorithms, curves, etc. + * @param string $type + * @return string * @throws RnpException * */ diff --git a/generated/8.4/rpminfo.php b/generated/8.4/rpminfo.php index 2cd42fa6..4e620f8a 100644 --- a/generated/8.4/rpminfo.php +++ b/generated/8.4/rpminfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\RpminfoException; /** - * Add an additional retrieved tag in subsequent queries. - * - * @param int $tag One of RPMTAG_* constant, see the rpminfo constants page. + * @param int $tag * @throws RpminfoException * */ diff --git a/generated/8.4/rrd.php b/generated/8.4/rrd.php index a68379af..d8dc2b4c 100644 --- a/generated/8.4/rrd.php +++ b/generated/8.4/rrd.php @@ -5,11 +5,8 @@ use Safe\Exceptions\RrdException; /** - * Creates the rdd database file. - * - * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -24,11 +21,9 @@ function rrd_create(string $filename, array $options): void /** - * Returns the first data sample from the specified RRA of the RRD file. - * - * @param string $file RRD database file name. - * @param int $raaindex The index number of the RRA that is to be examined. Default value is 0. - * @return int Integer number of unix timestamp. + * @param string $file + * @param int $raaindex + * @return int * @throws RrdException * */ @@ -44,15 +39,9 @@ function rrd_first(string $file, int $raaindex = 0): int /** - * Creates image for a particular data from RRD file. - * - * @param string $filename The filename to output the graph to. This will generally end in either - * .png, .svg or - * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all - * possible options. All options (data definitions, variable definitions, etc.) - * are allowed. - * @return array Array with information about generated image is returned. + * @param string $filename + * @param array $options + * @return array * @throws RrdException * */ @@ -68,10 +57,8 @@ function rrd_graph(string $filename, array $options): array /** - * Returns information about particular RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @param string $filename + * @return array * @throws RrdException * */ @@ -87,11 +74,8 @@ function rrd_info(string $filename): array /** - * Gets array of the UNIX timestamp and the values stored for each date in the - * most recent update of the RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @param string $filename + * @return array * @throws RrdException * */ @@ -107,11 +91,9 @@ function rrd_lastupdate(string $filename): array /** - * Restores the RRD file from the XML dump. - * - * @param string $xml_file XML filename with the dump of the original RRD database file. - * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param string $xml_file + * @param string $rrd_file + * @param array $options * @throws RrdException * */ @@ -130,12 +112,8 @@ function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null) /** - * Change some options in the RRD dabase header file. E.g. renames the source for - * the data etc. - * - * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See - * rrd tune man page for details. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -150,12 +128,8 @@ function rrd_tune(string $filename, array $options): void /** - * Updates the RRD database file. The input data is time interpolated according to the - * properties of the RRD database file. - * - * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -170,12 +144,8 @@ function rrd_update(string $filename, array $options): void /** - * Exports the information about RRD database file. This data can be converted - * to XML file via user space PHP script and then restored back as RRD database - * file. - * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param array $options + * @return array * @throws RrdException * */ diff --git a/generated/8.4/sem.php b/generated/8.4/sem.php index 5ca166d3..949771db 100644 --- a/generated/8.4/sem.php +++ b/generated/8.4/sem.php @@ -5,19 +5,9 @@ use Safe\Exceptions\SemException; /** - * msg_get_queue returns an id that can be used to - * access the System V message queue with the given - * key. The first call creates the message queue with - * the optional permissions. - * A second call to msg_get_queue for the same - * key will return a different message queue - * identifier, but both identifiers access the same underlying message - * queue. - * - * @param int $key Message queue numeric ID - * @param int $permissions Queue permissions. Default to 0666. If the message queue already - * exists, the permissions will be ignored. - * @return \SysvMessageQueue Returns SysvMessageQueue instance that can be used to access the System V message queue. + * @param int $key + * @param int $permissions + * @return \SysvMessageQueue * @throws SemException * */ @@ -33,9 +23,7 @@ function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue /** - * Checks whether the message queue key exists. - * - * @param int $key Queue key. + * @param int $key * @throws SemException * */ @@ -50,73 +38,14 @@ function msg_queue_exists(int $key): void /** - * msg_receive will receive the first message from the - * specified queue of the type specified by - * desired_message_type. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $desired_message_type If desired_message_type is 0, the message from the front - * of the queue is returned. If desired_message_type is - * greater than 0, then the first message of that type is returned. - * If desired_message_type is less than 0, the first - * message on the queue with a type less than or equal to the - * absolute value of desired_message_type will be read. - * If no messages match the criteria, your script will wait until a suitable - * message arrives on the queue. You can prevent the script from blocking - * by specifying MSG_IPC_NOWAIT in the - * flags parameter. - * @param int|null $received_message_type The type of the message that was received will be stored in this - * parameter. - * @param int $max_message_size The maximum size of message to be accepted is specified by the - * max_message_size; if the message in the queue is larger - * than this size the function will fail (unless you set - * flags as described below). - * @param mixed $message The received message will be stored in message, - * unless there were errors receiving the message. - * @param bool $unserialize If set to - * TRUE, the message is treated as though it was serialized using the - * same mechanism as the session module. The message will be unserialized - * and then returned to your script. This allows you to easily receive - * arrays or complex object structures from other PHP scripts, or if you - * are using the WDDX serializer, from any WDDX compatible source. - * - * If unserialize is FALSE, the message will be - * returned as a binary-safe string. - * @param int $flags The optional flags allows you to pass flags to the - * low-level msgrcv system call. It defaults to 0, but you may specify one - * or more of the following values (by adding or ORing them together). - * - * Flag values for msg_receive - * - * - * - * MSG_IPC_NOWAIT - * If there are no messages of the - * desired_message_type, return immediately and do not - * wait. The function will fail and return an integer value - * corresponding to MSG_ENOMSG. - * - * - * - * MSG_EXCEPT - * Using this flag in combination with a - * desired_message_type greater than 0 will cause the - * function to receive the first message that is not equal to - * desired_message_type. - * - * - * MSG_NOERROR - * - * If the message is longer than max_message_size, - * setting this flag will truncate the message to - * max_message_size and will not signal an error. - * - * - * - * - * - * @param int|null $error_code If the function fails, the optional error_code - * will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $desired_message_type + * @param int|null $received_message_type + * @param int $max_message_size + * @param mixed $message + * @param bool $unserialize + * @param int $flags + * @param int|null $error_code * @throws SemException * */ @@ -131,12 +60,7 @@ function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int & /** - * msg_remove_queue destroys the message queue specified - * by the queue. Only use this function when all - * processes have finished working with the message queue and you need to - * release the system resources held by it. - * - * @param \SysvMessageQueue $queue The message queue. + * @param \SysvMessageQueue $queue * @throws SemException * */ @@ -151,35 +75,12 @@ function msg_remove_queue(\SysvMessageQueue $queue): void /** - * msg_send sends a message of type - * message_type (which MUST be greater than 0) to - * the message queue specified by queue. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $message_type The type of the message (MUST be greater than 0) - * @param mixed $message The body of the message. - * - * If serialize set to FALSE is supplied, - * MUST be of type: string, int, float - * or bool. In other case a warning will be issued. - * @param bool $serialize The optional serialize controls how the - * message is sent. serialize - * defaults to TRUE which means that the message is - * serialized using the same mechanism as the session module before being - * sent to the queue. This allows complex arrays and objects to be sent to - * other PHP scripts, or if you are using the WDDX serializer, to any WDDX - * compatible client. - * @param bool $blocking If the message is too large to fit in the queue, your script will wait - * until another process reads messages from the queue and frees enough - * space for your message to be sent. - * This is called blocking; you can prevent blocking by setting the - * optional blocking parameter to FALSE, in which - * case msg_send will immediately return FALSE if the - * message is too big for the queue, and set the optional - * error_code to MSG_EAGAIN, - * indicating that you should try to send your message again a little - * later on. - * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $message_type + * @param mixed $message + * @param bool $serialize + * @param bool $blocking + * @param int|null $error_code * @throws SemException * */ @@ -194,19 +95,8 @@ function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $s /** - * msg_set_queue allows you to change the values of the - * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - * underlying message queue data structure. - * - * Changing the data structure will require that PHP be running as the same - * user that created the queue, owns the queue (as determined by the - * existing msg_perm.xxx fields), or be running with root privileges. - * root privileges are required to raise the msg_qbytes values above the - * system defined limit. - * - * @param \SysvMessageQueue $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys - * that you require in the data array. + * @param \SysvMessageQueue $queue + * @param array $data * @throws SemException * */ @@ -221,85 +111,8 @@ function msg_set_queue(\SysvMessageQueue $queue, array $data): void /** - * msg_stat_queue returns the message queue meta data - * for the message queue specified by the queue. - * This is useful, for example, to determine which process sent the message - * that was just received. - * - * @param \SysvMessageQueue $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following - * meanings: - * - * Array structure for msg_stat_queue - * - * - * - * msg_perm.uid - * - * The uid of the owner of the queue. - * - * - * - * msg_perm.gid - * - * The gid of the owner of the queue. - * - * - * - * msg_perm.mode - * - * The file access mode of the queue. - * - * - * - * msg_stime - * - * The time that the last message was sent to the queue. - * - * - * - * msg_rtime - * - * The time that the last message was received from the queue. - * - * - * - * msg_ctime - * - * The time that the queue was last changed. - * - * - * - * msg_qnum - * - * The number of messages waiting to be read from the queue. - * - * - * - * msg_qbytes - * - * The maximum number of bytes allowed in one message queue. On - * Linux, this value may be read and modified via - * /proc/sys/kernel/msgmnb. - * - * - * - * msg_lspid - * - * The pid of the process that sent the last message to the queue. - * - * - * - * msg_lrpid - * - * The pid of the process that received the last message from the queue. - * - * - * - * - * - * - * Returns FALSE on failure. + * @param \SysvMessageQueue $queue + * @return array * @throws SemException * */ @@ -315,21 +128,8 @@ function msg_stat_queue(\SysvMessageQueue $queue): array /** - * sem_acquire by default blocks (if necessary) until the - * semaphore can be acquired. A process attempting to acquire a semaphore which - * it has already acquired will block forever if acquiring the semaphore would - * cause its maximum number of semaphore to be exceeded. - * - * After processing a request, any semaphores acquired by the process but not - * explicitly released will be released automatically and a warning will be - * generated. - * - * @param \SysvSemaphore $semaphore semaphore is a semaphore - * obtained from sem_get. - * @param bool $non_blocking Specifies if the process shouldn't wait for the semaphore to be acquired. - * If set to TRUE, the call will return - * FALSE immediately if a semaphore cannot be immediately - * acquired. + * @param \SysvSemaphore $semaphore + * @param bool $non_blocking * @throws SemException * */ @@ -344,25 +144,11 @@ function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): voi /** - * sem_get returns an id that can be used to - * access the System V semaphore with the given key. - * - * A second call to sem_get for the same key - * will return a different semaphore identifier, but both - * identifiers access the same underlying semaphore. - * - * If key is 0, a new private semaphore - * is created for each call to sem_get. - * * @param int $key - * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously - * is set to max_acquire. - * @param int $permissions The semaphore permissions. Actually this value is - * set only if the process finds it is the only process currently - * attached to the semaphore. - * @param bool $auto_release Specifies if the semaphore should be automatically released on request - * shutdown. - * @return \SysvSemaphore Returns a positive semaphore identifier on success. + * @param int $max_acquire + * @param int $permissions + * @param bool $auto_release + * @return \SysvSemaphore * @throws SemException * */ @@ -378,15 +164,7 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ /** - * sem_release releases the semaphore if it - * is currently acquired by the calling process, otherwise - * a warning is generated. - * - * After releasing the semaphore, sem_acquire - * may be called to re-acquire it. - * - * @param \SysvSemaphore $semaphore A Semaphore as returned by - * sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -401,12 +179,7 @@ function sem_release(\SysvSemaphore $semaphore): void /** - * sem_remove removes the given semaphore. - * - * After removing the semaphore, it is no longer accessible. - * - * @param \SysvSemaphore $semaphore A semaphore as returned - * by sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -421,24 +194,10 @@ function sem_remove(\SysvSemaphore $semaphore): void /** - * shm_attach returns an id that can be used to access - * the System V shared memory with the given key, the - * first call creates the shared memory segment with - * size and the optional perm-bits - * permissions. - * - * A second call to shm_attach for the same - * key will return a different SysvSharedMemory - * instance, but both instances access the same underlying - * shared memory. size and - * permissions will be ignored. - * - * @param int $key A numeric shared memory segment ID - * @param int|null $size The memory size. If not provided, default to the - * sysvshm.init_mem in the php.ini, otherwise 10000 - * bytes. - * @param int $permissions The optional permission bits. Default to 0666. - * @return \SysvSharedMemory Returns a SysvSharedMemory instance on success. + * @param int $key + * @param int|null $size + * @param int $permissions + * @return \SysvSharedMemory * @throws SemException * */ @@ -460,12 +219,7 @@ function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \Sysv /** - * shm_detach disconnects from the shared memory given - * by the shm created by - * shm_attach. Remember, that shared memory still exist - * in the Unix system and the data is still present. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ @@ -480,21 +234,9 @@ function shm_detach(\SysvSharedMemory $shm): void /** - * shm_put_var inserts or updates the - * value with the given - * key. - * - * Warnings (E_WARNING level) will be issued if - * shm is not a valid SysV shared memory - * index or if there was not enough shared memory remaining to complete your - * request. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. - * @param mixed $value The variable. All variable types - * that serialize supports may be used: generally - * this means all types except for resources and some internal objects - * that cannot be serialized. + * @param \SysvSharedMemory $shm + * @param int $key + * @param mixed $value * @throws SemException * */ @@ -509,11 +251,8 @@ function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void /** - * Removes a variable with a given key - * and frees the occupied memory. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. + * @param \SysvSharedMemory $shm + * @param int $key * @throws SemException * */ @@ -528,10 +267,7 @@ function shm_remove_var(\SysvSharedMemory $shm, int $key): void /** - * shm_remove removes the shared memory - * shm. All data will be destroyed. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ diff --git a/generated/8.4/session.php b/generated/8.4/session.php index e7fde767..2628b174 100644 --- a/generated/8.4/session.php +++ b/generated/8.4/session.php @@ -5,9 +5,6 @@ use Safe\Exceptions\SessionException; /** - * session_abort finishes session without saving - * data. Thus the original values in session data are kept. - * * @throws SessionException * */ @@ -22,27 +19,8 @@ function session_abort(): void /** - * session_cache_expire returns the current setting of - * session.cache_expire. - * - * The cache expire is reset to the default value of 180 stored in - * session.cache_expire - * at request startup time. Thus, - * you need to call session_cache_expire for every - * request (and before session_start is called). - * - * @param int|null $value If value is given and not NULL, the current cache - * expire is replaced with value. - * - * - * - * Setting value is of value only, if - * session.cache_limiter is set to a value - * different from nocache. - * - * - * @return int Returns the current setting of session.cache_expire. - * The value returned should be read in minutes, defaults to 180. + * @param int|null $value + * @return int * @throws SessionException * */ @@ -62,34 +40,8 @@ function session_cache_expire(?int $value = null): int /** - * session_cache_limiter returns the name of the - * current cache limiter. - * - * The cache limiter defines which cache control HTTP headers are sent to - * the client. These headers determine the rules by which the page content - * may be cached by the client and intermediate proxies. Setting the cache - * limiter to nocache disallows any client/proxy caching. - * A value of public permits caching by proxies and the - * client, whereas private disallows caching by proxies - * and permits the client to cache the contents. - * - * In private mode, the Expire header sent to the client - * may cause confusion for some browsers, including Mozilla. - * You can avoid this problem by using private_no_expire mode. The - * Expire header is never sent to the client in this mode. - * - * Setting the cache limiter to '' will turn off automatic sending - * of cache headers entirely. - * - * The cache limiter is reset to the default value stored in - * session.cache_limiter - * at request startup time. Thus, you need to call - * session_cache_limiter for every - * request (and before session_start is called). - * - * @param null|string $value If value is specified and not NULL, the name of the - * current cache limiter is changed to the new value. - * @return string Returns the name of the current cache limiter. + * @param null|string $value + * @return string * @throws SessionException * */ @@ -109,26 +61,8 @@ function session_cache_limiter(?string $value = null): string /** - * session_create_id is used to create new - * session id for the current session. It returns collision free - * session id. - * - * If session is not active, collision check is omitted. - * - * Session ID is created according to php.ini settings. - * - * It is important to use the same user ID of your web server for GC - * task script. Otherwise, you may have permission problems especially - * with files save handler. - * - * @param string $prefix If prefix is specified, new session id - * is prefixed by prefix. Not all - * characters are allowed within the session id. Characters in - * the range [a-zA-Z0-9,-] are allowed. Maximum length is 256 characters. - * @return string session_create_id returns new collision free - * session id for the current session. If it is used without active - * session, it omits collision check. - * On failure, FALSE is returned. + * @param string $prefix + * @return string * @throws SessionException * */ @@ -144,14 +78,7 @@ function session_create_id(string $prefix = ""): string /** - * session_decode decodes the serialized session data provided in - * $data, and populates the $_SESSION superglobal - * with the result. - * - * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. - * The serialization method can be set using session.serialize_handler. - * - * @param string $data The encoded data to be stored. + * @param string $data * @throws SessionException * */ @@ -166,18 +93,6 @@ function session_decode(string $data): void /** - * In order to kill the session altogether, the - * session ID must also be unset. If a cookie is used to propagate the - * session ID (default behavior), then the session cookie must be deleted. - * setcookie may be used for that. - * - * When session.use_strict_mode - * is enabled. You do not have to remove obsolete session ID cookie because - * session module will not accept session ID cookie when there is no - * data associated to the session ID and set new session ID cookie. - * Enabling session.use_strict_mode - * is recommended for all sites. - * * @throws SessionException * */ @@ -192,13 +107,7 @@ function session_destroy(): void /** - * session_encode returns a serialized string of the - * contents of the current session data stored in the $_SESSION superglobal. - * - * By default, the serialization method used is internal to PHP, and is not the same as serialize. - * The serialization method can be set using session.serialize_handler. - * - * @return string Returns the contents of the current session encoded. + * @return string * @throws SessionException * */ @@ -214,28 +123,7 @@ function session_encode(): string /** - * session_gc is used to perform session data - * GC (garbage collection). PHP does probability based session GC by - * default. - * - * Probability based GC works somewhat but it has few problems. 1) Low - * traffic sites' session data may not be deleted within the preferred - * duration. 2) High traffic sites' GC may be too frequent GC. 3) GC is - * performed on the user's request and the user will experience a GC - * delay. - * - * Therefore, it is recommended to execute GC periodically for - * production systems using, e.g., "cron" for UNIX-like systems. - * Make sure to disable probability based GC by setting - * session.gc_probability - * to 0. - * - * @return int session_gc returns number of deleted session - * data for success. - * - * Old save handlers do not return number of deleted session data, but - * only success/failure flag. If this is the case, number of deleted - * session data became 1 regardless of actually deleted data. + * @return int * @throws SessionException * */ @@ -251,24 +139,8 @@ function session_gc(): int /** - * session_id is used to get or set the session id for - * the current session. - * - * The constant SID can also be used to - * retrieve the current name and session id as a string suitable for - * adding to URLs. See also Session - * handling. - * - * @param null|string $id If id is specified and not NULL, it will replace the current - * session id. session_id needs to be called before - * session_start for that purpose. Depending on the - * session handler, not all characters are allowed within the session id. - * For example, the file session handler only allows characters in the - * range [a-zA-Z0-9,-]! - * @return string session_id returns the session id for the current - * session or the empty string ("") if there is no current - * session (no current session id exists). - * On failure, FALSE is returned. + * @param null|string $id + * @return string * @throws SessionException * */ @@ -288,16 +160,8 @@ function session_id(?string $id = null): string /** - * session_module_name gets the name of the current - * session module, which is also known as - * session.save_handler. - * - * @param null|string $module If module is specified and not NULL, that module will be - * used instead. - * Passing "user" to this parameter is forbidden. Instead - * session_set_save_handler has to be called to set a user - * defined session handler. - * @return string Returns the name of the current session module. + * @param null|string $module + * @return string * @throws SessionException * */ @@ -317,44 +181,8 @@ function session_module_name(?string $module = null): string /** - * session_name returns the name of the current - * session. If name is given, - * session_name will update the session name and return - * the old session name. - * - * If a new session name is - * supplied, session_name modifies the HTTP cookie - * (and outputs the content when session.use_trans_sid is - * enabled). Once the HTTP cookie has been - * sent, calling session_name raises an E_WARNING. - * session_name must be called - * before session_start for the session to work - * properly. - * - * The session name is reset to the default value stored in - * session.name at request startup time. Thus, you need to - * call session_name for every request (and before - * session_start is called). - * - * @param null|string $name The session name references the name of the session, which is - * used in cookies and URLs (e.g. PHPSESSID). It - * should contain only alphanumeric characters; it should be short and - * descriptive (i.e. for users with enabled cookie warnings). - * If name is specified and not NULL, the name of the current - * session is changed to its value. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * @return non-falsy-string Returns the name of the current session. If name is given - * and function updates the session name, name of the old session - * is returned. + * @param null|string $name + * @return non-falsy-string * @throws SessionException * */ @@ -374,17 +202,7 @@ function session_name(?string $name = null): string /** - * session_regenerate_id will replace the current - * session id with a new one, and keep the current session information. - * - * When session.use_trans_sid - * is enabled, output must be started after session_regenerate_id - * call. Otherwise, old session ID is used. - * - * @param bool $delete_old_session Whether to delete the old associated session file or not. - * You should not delete old session if you need to avoid - * races caused by deletion or detect/avoid session hijack - * attacks. + * @param bool $delete_old_session * @throws SessionException * */ @@ -399,10 +217,6 @@ function session_regenerate_id(bool $delete_old_session = false): void /** - * session_reset reinitializes a session with - * original values stored in session storage. This function requires an active session and - * discards changes in $_SESSION. - * * @throws SessionException * */ @@ -417,23 +231,8 @@ function session_reset(): void /** - * session_save_path returns the path of the current - * directory used to save session data. - * - * @param null|string $path Session data path. If specified and not NULL, the path to which data is saved will - * be changed. session_save_path needs to be called - * before session_start for that purpose. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. - * @return string Returns the path of the current directory used for data storage. + * @param null|string $path + * @return string * @throws SessionException * */ @@ -453,41 +252,7 @@ function session_save_path(?string $path = null): string /** - * session_start creates a session or resumes the - * current one based on a session identifier passed via a GET or POST - * request, or passed via a cookie. - * - * When session_start is called or when a session auto starts, - * PHP will call the open and read session save handlers. These will either be a built-in - * save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be - * custom handler as defined by session_set_save_handler. - * The read callback will retrieve any existing session data (stored in a special serialized format) - * and will be unserialized and used to automatically populate the $_SESSION superglobal when the - * read callback returns the saved session data back to PHP session handling. - * - * To use a named session, call - * session_name before calling - * session_start. - * - * When session.use_trans_sid - * is enabled, the session_start function will - * register an internal output handler for URL rewriting. - * - * If a user uses ob_gzhandler or similar with - * ob_start, the function order is important for - * proper output. For example, - * ob_gzhandler must be registered before starting the session. - * - * @param array $options If provided, this is an associative array of options that will override - * the currently set - * session configuration directives. - * The keys should not include the session. prefix. - * - * In addition to the normal set of configuration directives, a - * read_and_close option may also be provided. If set to - * TRUE, this will result in the session being closed immediately after - * being read, thereby avoiding unnecessary locking if the session data - * won't be changed. + * @param array $options * @throws SessionException * */ @@ -502,9 +267,6 @@ function session_start(array $options = []): void /** - * The session_unset function frees all session variables - * currently registered. - * * @throws SessionException * */ @@ -519,16 +281,6 @@ function session_unset(): void /** - * End the current session and store session data. - * - * Session data is usually stored after your script terminated without the - * need to call session_write_close, but as session data - * is locked to prevent concurrent writes only one script may operate on a - * session at any time. When using framesets together with sessions you will - * experience the frames loading one by one due to this locking. You can - * reduce the time needed to load all the frames by ending the session as - * soon as all changes to session variables are done. - * * @throws SessionException * */ diff --git a/generated/8.4/shmop.php b/generated/8.4/shmop.php index b375234c..51d385bd 100644 --- a/generated/8.4/shmop.php +++ b/generated/8.4/shmop.php @@ -5,10 +5,7 @@ use Safe\Exceptions\ShmopException; /** - * shmop_delete is used to delete a shared memory block. - * - * @param \Shmop $shmop The shared memory block resource created by - * shmop_open + * @param \Shmop $shmop * @throws ShmopException * */ @@ -23,17 +20,10 @@ function shmop_delete(\Shmop $shmop): void /** - * shmop_read will read a string from shared memory block. - * - * @param \Shmop $shmop The shared memory block identifier created by - * shmop_open - * @param int $offset Offset from which to start reading; must be greater than or equal to zero - * and less than or equal to the actual size of the shared memory segment. - * @param int $size The number of bytes to read; must be greater than or equal to zero, - * and the sum of offset and size - * must be less than or equal to the actual size of the shared memory segment. - * 0 reads shmop_size($shmid) - $start bytes. - * @return string Returns the data. + * @param \Shmop $shmop + * @param int $offset + * @param int $size + * @return string * @throws ShmopException * */ diff --git a/generated/8.4/sockets.php b/generated/8.4/sockets.php index 00e59c4f..61eb049e 100644 --- a/generated/8.4/sockets.php +++ b/generated/8.4/sockets.php @@ -5,32 +5,8 @@ use Safe\Exceptions\SocketsException; /** - * After the socket socket has been created - * using socket_create, bound to a name with - * socket_bind, and told to listen for connections - * with socket_listen, this function will accept - * incoming connections on that socket. Once a successful connection - * is made, a new Socket instance is returned, - * which may be used for communication. If there are multiple connections - * queued on the socket, the first will be used. If there are no pending - * connections, socket_accept will block until - * a connection becomes present. If socket - * has been made non-blocking using - * socket_set_blocking or - * socket_set_nonblock, FALSE will be returned. - * - * The Socket instance returned by - * socket_accept may not be used to accept new - * connections. The original listening socket - * socket, however, remains open and may be - * reused. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @return \Socket Returns a new Socket instance on success. The actual - * error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param \Socket $socket + * @return \Socket * @throws SocketsException * */ @@ -46,11 +22,8 @@ function socket_accept(\Socket $socket): \Socket /** - * Create a Socket instance, and bind it to the provided AddressInfo. The return - * value of this function may be used with socket_listen. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -66,11 +39,8 @@ function socket_addrinfo_bind(\AddressInfo $address): \Socket /** - * Create a Socket instance, and connect it to the provided AddressInfo instance. The return - * value of this function may be used with the rest of the socket functions. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -86,17 +56,10 @@ function socket_addrinfo_connect(\AddressInfo $address): \Socket /** - * Lookup different ways we can connect to host. The returned array contains - * a set of AddressInfo instances that we can bind to using socket_addrinfo_bind. - * - * @param string $host Hostname to search. - * @param mixed $service The service to connect to. If service is a numeric string, it designates the port. - * Otherwise it designates a network service name, which is mapped to a port by the operating system. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the - * hints as defined by getaddrinfo. - * @return \AddressInfo[] Returns an array of AddressInfo instances that can be used with - * the socket_addrinfo_* family of functions. - * On failure, FALSE is returned. + * @param string $host + * @param mixed $service + * @param array $hints + * @return \AddressInfo[] * @throws SocketsException * */ @@ -118,9 +81,7 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] /** - * Determines whether socket is at out-of-band mark. - * - * @param \Socket $socket A Socket instance created with socket_create. + * @param \Socket $socket * @throws SocketsException * */ @@ -135,22 +96,9 @@ function socket_atmark(\Socket $socket): void /** - * Binds the name given in address to the socket - * described by socket. This has to be done before - * a connection is established using socket_connect - * or socket_listen. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param string $address If the socket is of the AF_INET family, the - * address is an IP in dotted-quad notation - * (e.g. 127.0.0.1). - * - * If the socket is of the AF_UNIX family, the - * address is the path of a - * Unix-domain socket (e.g. /tmp/my.sock). - * @param int $port The port parameter is only used when - * binding an AF_INET socket, and designates - * the port on which to listen for connections. + * @param \Socket $socket + * @param string $address + * @param int $port * @throws SocketsException * */ @@ -165,23 +113,9 @@ function socket_bind(\Socket $socket, string $address, int $port = 0): void /** - * Initiate a connection to address using the Socket instance - * socket, which must be Socket - * instance created with socket_create. - * - * @param \Socket $socket A Socket instance created with - * socket_create. - * @param string $address The address parameter is either an IPv4 address - * in dotted-quad notation (e.g. 127.0.0.1) if - * socket is AF_INET, a valid - * IPv6 address (e.g. ::1) if IPv6 support is enabled and - * socket is AF_INET6 - * or the pathname of a Unix domain socket, if the socket family is - * AF_UNIX. - * @param int|null $port The port parameter is only used and is mandatory - * when connecting to an AF_INET or an - * AF_INET6 socket, and designates - * the port on the remote host to which a connection should be made. + * @param \Socket $socket + * @param string $address + * @param int|null $port * @throws SocketsException * */ @@ -200,24 +134,9 @@ function socket_connect(\Socket $socket, string $address, ?int $port = null): vo /** - * socket_create_listen creates a new Socket instance of - * type AF_INET listening on all - * local interfaces on the given port waiting for new connections. - * - * This function is meant to ease the task of creating a new socket which - * only listens to accept new connections. - * - * @param int $port The port on which to listen on all interfaces. - * @param int $backlog The backlog parameter defines the maximum length - * the queue of pending connections may grow to. - * SOMAXCONN may be passed as - * backlog parameter, see - * socket_listen for more information. - * @return \Socket socket_create_listen returns a new Socket instance - * on success. The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $port + * @param int $backlog + * @return \Socket * @throws SocketsException * */ @@ -233,27 +152,10 @@ function socket_create_listen(int $port, int $backlog = SOMAXCONN): \Socket /** - * socket_create_pair creates two connected and - * indistinguishable sockets, and stores them in pair. - * This function is commonly used in IPC (InterProcess Communication). - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. See socket_create - * for the full list. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the - * full list. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be retrieved by - * name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * - * See socket_create for the full list of supported - * protocols. - * @param \Socket[]|null $pair Reference to an array in which the two Socket instances will be inserted. + * @param int $domain + * @param int $type + * @param int $protocol + * @param \Socket[]|null $pair * @throws SocketsException * */ @@ -268,25 +170,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair /** - * Creates and returns a Socket instance, also referred to as an endpoint - * of communication. A typical network connection is made up of 2 sockets, one - * performing the role of the client, and another performing the role of the server. - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be - * retrieved by name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * @return \Socket socket_create returns a Socket instance on success. The actual error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $domain + * @param int $type + * @param int $protocol + * @return \Socket * @throws SocketsException * */ @@ -302,10 +189,8 @@ function socket_create(int $domain, int $type, int $protocol): \Socket /** - * - * * @param \Socket $socket - * @return resource Return resource. + * @return resource * @throws SocketsException * */ @@ -321,38 +206,10 @@ function socket_export_stream(\Socket $socket) /** - * The socket_get_option function retrieves the value for - * the option specified by the option parameter for the - * specified socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by - * specifying the protocol number of that level. Protocol numbers can be - * found by using the getprotobyname function. - * @param int $option Reports whether the socket lingers on - * socket_close if data is present. By default, - * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, - * socket_close will wait for its peer to - * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the - * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is - * non-zero and l_linger is non-zero, - * socket_close will block until all the data - * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, - * socket_close will fail and return an error. - * @return mixed Returns the value of the given option. + * @param \Socket $socket + * @param int $level + * @param int $option + * @return mixed * @throws SocketsException * */ @@ -368,25 +225,9 @@ function socket_get_option(\Socket $socket, int $level, int $option) /** - * Queries the remote side of the given socket which may either result in - * host/port or in a Unix filesystem path, dependent on its type. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET or - * AF_INET6, socket_getpeername - * will return the peers (remote) IP address in - * appropriate notation (e.g. 127.0.0.1 or - * fe80::1) in the address - * parameter and, if the optional port parameter is - * present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getpeername will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If given, this will hold the port associated to - * address. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -401,22 +242,9 @@ function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = nu /** - * - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET - * or AF_INET6, socket_getsockname - * will return the local IP address in appropriate notation (e.g. - * 127.0.0.1 or fe80::1) in the - * address parameter and, if the optional - * port parameter is present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getsockname will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If provided, this will hold the associated port. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -431,10 +259,8 @@ function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = nu /** - * Imports a stream that encapsulates a socket into a socket extension resource. - * - * @param resource $stream The stream resource to import. - * @return \Socket Returns FALSE on failure. + * @param resource $stream + * @return \Socket * @throws SocketsException * */ @@ -450,30 +276,8 @@ function socket_import_stream($stream): \Socket /** - * After the socket socket has been created - * using socket_create and bound to a name with - * socket_bind, it may be told to listen for incoming - * connections on socket. - * - * socket_listen is applicable only to sockets of - * type SOCK_STREAM or - * SOCK_SEQPACKET. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_addrinfo_bind - * @param int $backlog A maximum of backlog incoming connections will be - * queued for processing. If a connection request arrives with the queue - * full the client may receive an error with an indication of - * ECONNREFUSED, or, if the underlying protocol supports - * retransmission, the request may be ignored so that retries may succeed. - * - * The maximum number passed to the backlog - * parameter highly depends on the underlying platform. On Linux, it is - * silently truncated to SOMAXCONN. On win32, if - * passed SOMAXCONN, the underlying service provider - * responsible for the socket will set the backlog to a maximum - * reasonable value. There is no standard provision to - * find out the actual backlog value on this platform. + * @param \Socket $socket + * @param int $backlog * @throws SocketsException * */ @@ -488,38 +292,10 @@ function socket_listen(\Socket $socket, int $backlog = 0): void /** - * The function socket_read reads from the Socket instance - * socket created by the - * socket_create or - * socket_accept functions. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $length The maximum number of bytes read is specified by the - * length parameter. Otherwise you can use - * \r, \n, - * or \0 to end reading (depending on the mode - * parameter, see below). - * @param int $mode Optional mode parameter is a named constant: - * - * - * - * PHP_BINARY_READ (Default) - use the system - * recv() function. Safe for reading binary data. - * - * - * - * - * PHP_NORMAL_READ - reading stops at - * \n or \r. - * - * - * - * @return string socket_read returns the data as a string on success (including if the remote host has closed the - * connection). The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual representation of - * the error. + * @param \Socket $socket + * @param int $length + * @param int $mode + * @return string * @throws SocketsException * */ @@ -535,52 +311,11 @@ function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): /** - * The function socket_send sends - * length bytes to the socket - * socket from data. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param string $data A buffer containing the data that will be sent to the remote host. - * @param int $length The number of bytes that will be sent to the remote host from - * data. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @return int socket_send returns the number of bytes sent. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @return int * @throws SocketsException * */ @@ -596,12 +331,10 @@ function socket_send(\Socket $socket, string $data, int $length, int $flags): in /** - * - * * @param \Socket $socket * @param array $message * @param int $flags - * @return int Returns the number of bytes sent. + * @return int * @throws SocketsException * */ @@ -617,56 +350,13 @@ function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int /** - * The function socket_sendto sends - * length bytes from data - * through the socket socket to the - * port at the address address. - * - * @param \Socket $socket A Socket instance created using socket_create. - * @param string $data The sent data will be taken from buffer data. - * @param int $length length bytes from data will be - * sent. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @param string $address IP address of the remote host. - * @param int|null $port port is the remote port number at which the data - * will be sent. - * @return int socket_sendto returns the number of bytes sent to the - * remote host. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @param string $address + * @param int|null $port + * @return int * @throws SocketsException * */ @@ -686,16 +376,7 @@ function socket_sendto(\Socket $socket, string $data, int $length, int $flags, s /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the - * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a blocking socket, the script will pause its execution until it receives - * a signal or it can perform the operation. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -710,17 +391,7 @@ function socket_set_block(\Socket $socket): void /** - * The socket_set_nonblock function sets the - * O_NONBLOCK flag on the socket specified by - * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a - * signal or it can perform the operation. Rather, if the operation would result - * in a block, the called function will fail. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -735,24 +406,10 @@ function socket_set_nonblock(\Socket $socket): void /** - * The socket_set_option function sets the option - * specified by the option parameter, at the - * specified protocol level, to the value pointed to - * by the value parameter for the - * socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to set options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the - * getprotobyname function. - * @param int $option The available socket options are the same as those for the - * socket_get_option function. - * @param array|int|string $value The option value. + * @param \Socket $socket + * @param int $level + * @param int $option + * @param array|int|string $value * @throws SocketsException * */ @@ -767,37 +424,8 @@ function socket_set_option(\Socket $socket, int $level, int $option, $value): vo /** - * The socket_shutdown function allows you to stop - * incoming, outgoing or all data (the default) from being sent through the - * socket - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param int $mode The value of mode can be one of the following: - * - * possible values for mode - * - * - * - * 0 - * - * Shutdown socket reading - * - * - * - * 1 - * - * Shutdown socket writing - * - * - * - * 2 - * - * Shutdown socket reading and writing - * - * - * - * - * + * @param \Socket $socket + * @param int $mode * @throws SocketsException * */ @@ -812,13 +440,9 @@ function socket_shutdown(\Socket $socket, int $mode = 2): void /** - * Exports the WSAPROTOCOL_INFO structure into shared memory and returns - * an identifier to be used with socket_wsaprotocol_info_import. The - * exported ID is only valid for the given process_id. - * - * @param \Socket $socket A Socket instance. - * @param int $process_id The ID of the process which will import the socket. - * @return string Returns an identifier to be used for the import + * @param \Socket $socket + * @param int $process_id + * @return string * @throws SocketsException * */ @@ -834,11 +458,8 @@ function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): strin /** - * Imports a socket which has formerly been exported from another process. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. - * @return \Socket Returns a Socket instance on success + * @param string $info_id + * @return \Socket * @throws SocketsException * */ @@ -854,10 +475,7 @@ function socket_wsaprotocol_info_import(string $info_id): \Socket /** - * Releases the shared memory corresponding to the given info_id. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. + * @param string $info_id * @throws SocketsException * */ diff --git a/generated/8.4/sodium.php b/generated/8.4/sodium.php index 0f2649bb..ea4a955b 100644 --- a/generated/8.4/sodium.php +++ b/generated/8.4/sodium.php @@ -5,14 +5,11 @@ use Safe\Exceptions\SodiumException; /** - * Verify then decrypt a message with AEGIS-128L. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aegis128l_encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. - * @param string $key Encryption key (128-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -28,14 +25,11 @@ function sodium_crypto_aead_aegis128l_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt a message with AEGIS-256. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aegis256_encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -51,16 +45,11 @@ function sodium_crypto_aead_aegis256_decrypt(string $ciphertext, string $additio /** - * Verify then decrypt with AES-256-GCM. - * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aes256gcm_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -76,15 +65,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt with ChaCha20-Poly1305. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -100,14 +85,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string /** - * Encrypt then authenticate with ChaCha20-Poly1305. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -123,17 +105,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad /** - * Verify then decrypt with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -149,16 +125,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st /** - * Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -174,18 +145,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin /** - * Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -201,17 +165,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s /** - * Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -227,15 +185,9 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri /** - * Verify the authentication tag is valid for a given message and key. - * - * Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached), - * any party capable of verifying a message is also capable of authenticating - * their own messages. (Hence, symmetric authentication.) - * - * @param string $mac Authentication tag produced by sodium_crypto_auth - * @param string $message Message - * @param string $key Authentication key + * @param string $mac + * @param string $message + * @param string $key * @throws SodiumException * */ @@ -250,14 +202,10 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v /** - * Decrypt a message using asymmetric (public key) cryptography. - * - * @param string $ciphertext The encrypted message to attempt to decrypt. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key_pair See sodium_crypto_box_keypair_from_secretkey_and_publickey. - * This should include the sender's public key and the recipient's secret key. - * @return string Returns the plaintext message on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -273,11 +221,9 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p /** - * Decrypt a message that was encrypted with sodium_crypto_box_seal - * - * @param string $ciphertext The encrypted message - * @param string $key_pair The keypair of the recipient. Must include the secret key. - * @return string The plaintext on success. + * @param string $ciphertext + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -293,11 +239,9 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri /** - * Appends a message to the internal hash state. - * - * @param non-empty-string $state The return value of sodium_crypto_generichash_init. - * @param string $message Data to append to the hashing state. - * @return bool Always returns TRUE. + * @param non-empty-string $state + * @param string $message + * @return bool * */ function sodium_crypto_generichash_update(string &$state, string $message): bool @@ -309,14 +253,10 @@ function sodium_crypto_generichash_update(string &$state, string $message): bool /** - * Decrypt an encrypted message with a symmetric (shared) key. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_secretbox - * (ciphertext and tag, concatenated). - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string The decrypted string on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -332,11 +272,9 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string /** - * Verify the signature attached to a message and return the message - * - * @param string $signed_message A message signed with sodium_crypto_sign - * @param non-empty-string $public_key An Ed25519 public key - * @return string Returns the original signed message on success. + * @param string $signed_message + * @param non-empty-string $public_key + * @return string * @throws SodiumException * */ @@ -352,11 +290,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st /** - * Verify signature for the message - * - * @param non-empty-string $signature The cryptographic signature obtained from sodium_crypto_sign_detached - * @param string $message The message being verified - * @param non-empty-string $public_key Ed25519 public key + * @param non-empty-string $signature + * @param string $message + * @param non-empty-string $public_key * @throws SodiumException * */ @@ -371,15 +307,11 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message, /** - * The function is similar to sodium_crypto_stream_xchacha20_xor - * but adds the ability to set the initial value of the block counter to a non-zero value. - * This permits direct access to any block without having to compute the previous ones. - * - * @param string $message The message to encrypt. - * @param string $nonce 24-byte nonce. - * @param int $counter The initial value of the block counter. - * @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen. - * @return string Encrypted message. + * @param string $message + * @param string $nonce + * @param int $counter + * @param string $key + * @return string * @throws SodiumException * */ diff --git a/generated/8.4/solr.php b/generated/8.4/solr.php index 0c4260a0..e5e269d0 100644 --- a/generated/8.4/solr.php +++ b/generated/8.4/solr.php @@ -5,9 +5,7 @@ use Safe\Exceptions\SolrException; /** - * This function returns the current version of the extension as a string. - * - * @return string It returns a string on success. + * @return string * @throws SolrException * */ diff --git a/generated/8.4/spl.php b/generated/8.4/spl.php index c357e2dd..7c012526 100644 --- a/generated/8.4/spl.php +++ b/generated/8.4/spl.php @@ -5,13 +5,9 @@ use Safe\Exceptions\SplException; /** - * This function returns an array with the names of the interfaces that the - * given object_or_class and its parents implement. - * - * @param object|string $object_or_class An object (class instance) or a string (class or interface name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -27,13 +23,9 @@ function class_implements($object_or_class, bool $autoload = true): array /** - * This function returns an array with the name of the parent classes of - * the given object_or_class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -49,14 +41,9 @@ function class_parents($object_or_class, bool $autoload = true): array /** - * This function returns an array with the names of the traits that the - * given object_or_class uses. This does however not include - * any traits used by a parent class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -72,38 +59,9 @@ function class_uses($object_or_class, bool $autoload = true): array /** - * Register a function with the spl provided __autoload queue. If the queue - * is not yet activated it will be activated. - * - * If your code has an existing __autoload function then - * this function must be explicitly registered on the __autoload queue. This - * is because spl_autoload_register will effectively - * replace the engine cache for the __autoload function - * by either spl_autoload or - * spl_autoload_call. - * - * If there must be multiple autoload functions, spl_autoload_register - * allows for this. It effectively creates a queue of autoload functions, and - * runs through each of them in the order they are defined. By contrast, - * __autoload may only be defined once. - * - * @param callable(string):void|null $callback The autoload function being registered. - * If NULL, then the default implementation of - * spl_autoload will be registered. - * - * The class will not contain the leading - * backslash of a fully-qualified identifier. - * @param bool $throw This parameter specifies whether - * spl_autoload_register should throw - * exceptions when the callback - * cannot be registered. - * - * This parameter is ignored as of PHP 8.0.0, and a notice will be - * emitted if set to FALSE. spl_autoload_register - * will now always throw a TypeError on invalid - * arguments. - * @param bool $prepend If TRUE, spl_autoload_register will prepend - * the autoloader on the autoload queue instead of appending it. + * @param callable(string):void|null $callback + * @param bool $throw + * @param bool $prepend * @throws SplException * */ @@ -126,14 +84,7 @@ function spl_autoload_register(?callable $callback = null, bool $throw = true, b /** - * Removes a function from the autoload queue. If the queue - * is activated and empty after removing the given function then it will - * be deactivated. - * - * When this function results in the queue being deactivated, any - * __autoload function that previously existed will not be reactivated. - * - * @param mixed $callback The autoload function being unregistered. + * @param mixed $callback * @throws SplException * */ diff --git a/generated/8.4/sqlsrv.php b/generated/8.4/sqlsrv.php index fd85b774..2fc4fbfa 100644 --- a/generated/8.4/sqlsrv.php +++ b/generated/8.4/sqlsrv.php @@ -5,16 +5,7 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and commit/roll - * back transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ @@ -29,14 +20,7 @@ function sqlsrv_begin_transaction($conn): void /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been - * consumed. - * - * @param resource $stmt The statement resource to be cancelled. + * @param resource $stmt * @throws SqlsrvException * */ @@ -51,39 +35,8 @@ function sqlsrv_cancel($stmt): void /** - * Returns information about the client and specified connection - * - * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. - * - * Array returned by sqlsrv_client_info - * - * - * - * Key - * Description - * - * - * - * - * DriverDllName - * SQLNCLI10.DLL - * - * - * DriverODBCVer - * ODBC version (xx.yy) - * - * - * DriverVer - * SQL Server Native Client DLL version (10.5.xxx) - * - * - * ExtensionVer - * php_sqlsrv.dll version (2.0.xxx.x) - * - * - * - * + * @param resource $conn + * @return array * @throws SqlsrvException * */ @@ -99,9 +52,7 @@ function sqlsrv_client_info($conn): array /** - * Closes an open connection and releases resourses associated with the connection. - * - * @param resource $conn The connection to be closed. + * @param resource $conn * @throws SqlsrvException * */ @@ -116,16 +67,7 @@ function sqlsrv_close($conn): void /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and commit/roll back - * transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection on which the transaction is to be committed. + * @param resource $conn * @throws SqlsrvException * */ @@ -140,44 +82,8 @@ function sqlsrv_commit($conn): void /** - * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are - * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". - * @param mixed $value The value of the specified setting. The following table shows possible values: - * - * Error and Logging Setting Options - * - * - * - * Setting - * Options - * - * - * - * - * WarningsReturnAsErrors - * 1 (TRUE) or 0 (FALSE) - * - * - * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) - * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * - * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) - * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * @param string $setting + * @param mixed $value * @throws SqlsrvException * */ @@ -192,11 +98,7 @@ function sqlsrv_configure(string $setting, $value): void /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with - * different parameter values. - * - * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @param resource $stmt * @throws SqlsrvException * */ @@ -211,29 +113,11 @@ function sqlsrv_execute($stmt): void /** - * Returns the next available row of data as an associative array, a numeric - * array, or both (the default). - * - * @param resource $stmt A statement resource returned by sqlsrv_query or sqlsrv_prepare. - * @param int $fetchType A predefined constant specifying the type of array to return. Possible - * values are SQLSRV_FETCH_ASSOC, - * SQLSRV_FETCH_NUMERIC, and - * SQLSRV_FETCH_BOTH (the default). - * - * A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a - * result set with multiple columns of the same name. - * @param int $row Specifies the row to access in a result set that uses a scrollable cursor. - * Possible values are SQLSRV_SCROLL_NEXT, - * SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, - * SQLSRV_SCROLL_LAST, SQLSRV_SCROLL_ABSOLUTE and, - * SQLSRV_SCROLL_RELATIVE (the default). When this parameter - * is specified, the fetchType must be explicitly defined. - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return array|null Returns an array on success, NULL if there are no more rows to return, and - * FALSE if an error occurs. + * @param resource $stmt + * @param int $fetchType + * @param int $row + * @param int $offset + * @return array|null * @throws SqlsrvException * */ @@ -257,34 +141,12 @@ function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?in /** - * Retrieves the next row of data in a result set as an instance of the specified - * class with properties that match the row field names and values that correspond - * to the row field values. - * - * @param resource $stmt A statement resource created by sqlsrv_query or - * sqlsrv_execute. - * @param string $className The name of the class to instantiate. If no class name is specified, - * stdClass is instantiated. - * @param array $ctorParams Values passed to the constructor of the specified class. If the constructor - * of the specified class takes parameters, the ctorParams array must be - * supplied. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return null|object Returns an object on success, NULL if there are no more rows to return, - * and FALSE if an error occurs or if the specified class does not exist. + * @param resource $stmt + * @param string $className + * @param array $ctorParams + * @param int $row + * @param int $offset + * @return null|object * @throws SqlsrvException * */ @@ -310,28 +172,10 @@ function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParam /** - * Makes the next row in a result set available for reading. Use - * sqlsrv_get_field to read the fields of the row. - * - * @param resource $stmt A statement resource created by executing sqlsrv_query - * or sqlsrv_execute. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return bool|null Returns TRUE if the next row of a result set was successfully retrieved, - * FALSE if an error occurs, and NULL if there are no more rows in the result set. + * @param resource $stmt + * @param int $row + * @param int $offset + * @return bool|null * @throws SqlsrvException * */ @@ -353,15 +197,7 @@ function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement - * is rolled back. - * - * @param resource $stmt The statement for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be - * called multiple times in a script. + * @param resource $stmt * @throws SqlsrvException * */ @@ -376,20 +212,10 @@ function sqlsrv_free_stmt($stmt): void /** - * Gets field data from the currently selected row. Fields must be accessed in - * order. Field indices start at 0. - * - * @param resource $stmt A statement resource returned by sqlsrv_query or - * sqlsrv_execute. - * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields - * must be accessed in order. i.e. If you access field index 1, then field - * index 0 will not be available. - * @param int $getAsType The PHP data type for the returned field data. If this parameter is not - * set, the field data will be returned as its default PHP data type. - * For information about default PHP data types, see - * Default PHP Data Types - * in the Microsoft SQLSRV documentation. - * @return mixed Returns data from the specified field on success. + * @param resource $stmt + * @param int $fieldIndex + * @param int $getAsType + * @return mixed * @throws SqlsrvException * */ @@ -409,12 +235,8 @@ function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null) /** - * Makes the next result of the specified statement active. Results include result - * sets, row counts, and output parameters. - * - * @param resource $stmt The statement on which the next result is being called. - * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error - * occurred, and NULL if there are no more results to retrieve. + * @param resource $stmt + * @return bool|null * @throws SqlsrvException * */ @@ -430,12 +252,8 @@ function sqlsrv_next_result($stmt): ?bool /** - * Retrieves the number of fields (columns) on a statement. - * - * @param resource $stmt The statement for which the number of fields is returned. - * sqlsrv_num_fields can be called on a statement before - * or after statement execution. - * @return int Returns the number of fields on success. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -451,19 +269,8 @@ function sqlsrv_num_fields($stmt): int /** - * Retrieves the number of rows in a result set. This function requires that the - * statement resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statement resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * @return int Returns the number of rows retrieved on success. - * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -479,23 +286,11 @@ function sqlsrv_num_rows($stmt): int /** - * Prepares a query for execution. This function is ideal for preparing a query - * that will be executed multiple times with different parameter values. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized - * query. Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -517,22 +312,11 @@ function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $optio /** - * Prepares and executes a query. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. - * Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -554,10 +338,7 @@ function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction - * and returns the connection to auto-commit mode. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ diff --git a/generated/8.4/ssdeep.php b/generated/8.4/ssdeep.php index 2c09aea9..8d93d77a 100644 --- a/generated/8.4/ssdeep.php +++ b/generated/8.4/ssdeep.php @@ -5,14 +5,9 @@ use Safe\Exceptions\SsdeepException; /** - * Calculates the match score between signature1 - * and signature2 using - * context-triggered piecewise hashing, and returns the match - * score. - * - * @param string $signature1 The first fuzzy hash signature string. - * @param string $signature2 The second fuzzy hash signature string. - * @return int Returns an integer from 0 to 100 on success. + * @param string $signature1 + * @param string $signature2 + * @return int * @throws SsdeepException * */ @@ -28,13 +23,8 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int /** - * ssdeep_fuzzy_hash_filename calculates the hash - * of the file specified by file_name using - * context-triggered piecewise - * hashing, and returns that hash. - * - * @param string $file_name The filename of the file to hash. - * @return string Returns a string on success. + * @param string $file_name + * @return string * @throws SsdeepException * */ @@ -50,12 +40,8 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string /** - * ssdeep_fuzzy_hash calculates the hash of - * to_hash using - * context-triggered piecewise hashing, and returns that hash. - * - * @param string $to_hash The input string. - * @return string Returns a string on success. + * @param string $to_hash + * @return string * @throws SsdeepException * */ diff --git a/generated/8.4/ssh2.php b/generated/8.4/ssh2.php index 04882b11..c9d72f28 100644 --- a/generated/8.4/ssh2.php +++ b/generated/8.4/ssh2.php @@ -5,11 +5,8 @@ use Safe\Exceptions\Ssh2Exception; /** - * Authenticate over SSH using the ssh agent - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. + * @param resource $session + * @param string $username * @throws Ssh2Exception * */ @@ -24,18 +21,13 @@ function ssh2_auth_agent($session, string $username): void /** - * Authenticate using a public hostkey read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username * @param string $hostname * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. - * @param string $local_username If local_username is omitted, then the value - * for username will be used for it. + * @param string $passphrase + * @param string $local_username * @throws Ssh2Exception * */ @@ -56,13 +48,9 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** - * Authenticate over SSH using a plain password. Since version 0.12 this function - * also supports keyboard_interactive method. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. - * @param string $password Password for username + * @param resource $session + * @param string $username + * @param string $password * @throws Ssh2Exception * */ @@ -77,17 +65,11 @@ function ssh2_auth_password($session, string $username, string $password): void /** - * Authenticate using a public key read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username - * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * - * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. + * @param string $passphrase * @throws Ssh2Exception * */ @@ -106,201 +88,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** - * Establish a connection to a remote SSH server. - * - * Once connected, the client should verify the server's hostkey using - * ssh2_fingerprint, then authenticate using either - * password or public key. - * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters - * as described below. - * - * - * methods may be an associative array - * with any or all of the following parameters. - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * kex - * - * List of key exchange methods to advertise, comma separated - * in order of preference. - * - * - * diffie-hellman-group1-sha1, - * diffie-hellman-group14-sha1, and - * diffie-hellman-group-exchange-sha1 - * - * - * - * hostkey - * - * List of hostkey methods to advertise, comma separated - * in order of preference. - * - * - * ssh-rsa and - * ssh-dss - * - * - * - * client_to_server - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from client to server. - * - * - * - * - * server_to_client - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from server to client. - * - * - * - * - * - * - * - * * - Supported Values are dependent on methods supported by underlying library. - * See libssh2 documentation for additional - * information. - * - * - * - * client_to_server and - * server_to_client may be an associative array - * with any or all of the following parameters. - * - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * crypt - * List of crypto methods to advertise, comma separated - * in order of preference. - * - * rijndael-cbc@lysator.liu.se, - * aes256-cbc, - * aes192-cbc, - * aes128-cbc, - * 3des-cbc, - * blowfish-cbc, - * cast128-cbc, - * arcfour, and - * none** - * - * - * - * comp - * List of compression methods to advertise, comma separated - * in order of preference. - * - * zlib and - * none - * - * - * - * mac - * List of MAC methods to advertise, comma separated - * in order of preference. - * - * hmac-sha1, - * hmac-sha1-96, - * hmac-ripemd160, - * hmac-ripemd160@openssh.com, and - * none** - * - * - * - * - * - * - * - * Crypt and MAC method "none" - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * - * - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any - * or all of the following parameters. - * - * - * Callbacks parameters - * - * - * - * - * Index - * Meaning - * Prototype - * - * - * - * - * ignore - * - * Name of function to call when an - * SSH2_MSG_IGNORE packet is received - * - * void ignore_cb($message) - * - * - * debug - * - * Name of function to call when an - * SSH2_MSG_DEBUG packet is received - * - * void debug_cb($message, $language, $always_display) - * - * - * macerror - * - * Name of function to call when a packet is received but the - * message authentication code failed. If the callback returns - * TRUE, the mismatch will be ignored, otherwise the connection - * will be terminated. - * - * bool macerror_cb($packet) - * - * - * disconnect - * - * Name of function to call when an - * SSH2_MSG_DISCONNECT packet is received - * - * void disconnect_cb($reason, $message, $language) - * - * - * - * - * @return resource Returns a resource on success. + * @param array $methods + * @param array $callbacks + * @return resource * @throws Ssh2Exception * */ @@ -322,10 +114,7 @@ function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?arr /** - * Close a connection to a remote SSH server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @throws Ssh2Exception * */ @@ -340,20 +129,14 @@ function ssh2_disconnect($session): void /** - * Execute a command at the remote end and allocate a channel for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream on success. + * @param array $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ @@ -381,10 +164,8 @@ function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = /** - * Accepts a connection created by a listener. - * - * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen. - * @return resource Returns a stream resource. + * @param resource $listener + * @return resource * @throws Ssh2Exception * */ @@ -400,13 +181,11 @@ function ssh2_forward_accept($listener) /** - * Binds a port on the remote server and listen for connections. - * - * @param resource $session An SSH Session resource, obtained from a call to ssh2_connect. - * @param int $port The port of the remote server. + * @param resource $session + * @param int $port * @param string $host * @param int $max_connections - * @return resource Returns an SSH2 Listener. + * @return resource * @throws Ssh2Exception * */ @@ -428,17 +207,11 @@ function ssh2_forward_listen($session, int $port, ?string $host = null, int $max /** - * - * - * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data - * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. - * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. - * To mark an attribute as mandatory, precede its name with an asterisk. - * If the server is unable to support an attribute marked mandatory, - * it will abort the add process. + * @param resource $pkey + * @param string $algoname + * @param string $blob + * @param bool $overwrite + * @param array $attributes * @throws Ssh2Exception * */ @@ -457,17 +230,8 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** - * Request the Publickey subsystem from an already connected SSH2 server. - * - * The publickey subsystem allows an already connected and authenticated - * client to manage the list of authorized public keys stored on the - * target server in an implementation agnostic manner. - * If the remote server does not support the publickey subsystem, - * the ssh2_publickey_init function will return FALSE. - * * @param resource $session - * @return resource Returns an SSH2 Publickey Subsystem resource for use - * with all other ssh2_publickey_*() methods. + * @return resource * @throws Ssh2Exception * */ @@ -483,11 +247,9 @@ function ssh2_publickey_init($session) /** - * Removes an authorized publickey. - * - * @param resource $pkey Publickey Subsystem Resource - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data + * @param resource $pkey + * @param string $algoname + * @param string $blob * @throws Ssh2Exception * */ @@ -502,12 +264,9 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** - * Copy a file from the remote server to the local filesystem using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $remote_file Path to the remote file. - * @param string $local_file Path to the local file. + * @param resource $session + * @param string $remote_file + * @param string $local_file * @throws Ssh2Exception * */ @@ -522,14 +281,10 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** - * Copy a file from the local filesystem to the remote server using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $local_file Path to the local file. - * @param string $remote_file Path to the remote file. - * @param int $create_mode The file will be created with the mode specified by - * create_mode. + * @param resource $session + * @param string $local_file + * @param string $remote_file + * @param int $create_mode * @throws Ssh2Exception * */ @@ -544,13 +299,7 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** - * Sends an EOF to the stream; this is typically used to close standard input, - * while keeping output and error alive. For example, one can send a remote - * process some data over standard input, close it to start processing, and - * still be able to read out the results without creating additional files. - * - * @param resource $channel An SSH stream; can be acquired through functions like ssh2_fetch_stream - * or ssh2_connect. + * @param resource $channel * @throws Ssh2Exception * */ @@ -565,12 +314,9 @@ function ssh2_send_eof($channel): void /** - * Attempts to change the mode of the specified file to that given in - * mode. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename Path to the file. - * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @param resource $sftp + * @param string $filename + * @param int $mode * @throws Ssh2Exception * */ @@ -585,18 +331,10 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** - * Creates a directory on the remote file server with permissions set to - * mode. - * - * This function is similar to using mkdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname Path of the new directory. - * @param int $mode Permissions on the new directory. - * The actual mode is affected by the current umask. - * @param bool $recursive If recursive is TRUE any parent directories - * required for dirname will be automatically created as well. + * @param resource $sftp + * @param string $dirname + * @param int $mode + * @param bool $recursive * @throws Ssh2Exception * */ @@ -611,11 +349,9 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** - * Renames a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $from The current file that is being renamed. - * @param string $to The new file name that replaces from. + * @param resource $sftp + * @param string $from + * @param string $to * @throws Ssh2Exception * */ @@ -630,12 +366,7 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** - * Removes a directory from the remote file server. - * - * This function is similar to using rmdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $dirname * @throws Ssh2Exception * @@ -651,11 +382,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** - * Creates a symbolic link named link on the remote - * filesystem pointing to target. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $target Target of the symbolic link. + * @param resource $sftp + * @param string $target * @param string $link * @throws Ssh2Exception * @@ -671,9 +399,7 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** - * Deletes a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $filename * @throws Ssh2Exception * @@ -689,13 +415,8 @@ function ssh2_sftp_unlink($sftp, string $filename): void /** - * Request the SFTP subsystem from an already connected SSH2 server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @return resource This method returns an SSH2 SFTP resource for use with - * all other ssh2_sftp_*() methods and the - * ssh2.sftp:// fopen wrapper. + * @param resource $session + * @return resource * @throws Ssh2Exception * */ @@ -711,20 +432,13 @@ function ssh2_sftp($session) /** - * Open a shell at the remote end and allocate a stream for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $termtype termtype should correspond to one of the - * entries in the target system's /etc/termcap file. - * @param array|null $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream resource on success. + * @param resource $session + * @param string $termtype + * @param array|null $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ diff --git a/generated/8.4/stream.php b/generated/8.4/stream.php index b363236a..2de7af20 100644 --- a/generated/8.4/stream.php +++ b/generated/8.4/stream.php @@ -5,18 +5,9 @@ use Safe\Exceptions\StreamException; /** - * Sets options on the specified context. - * - * @param resource $context The stream or context resource to apply the options to. - * @param array $options The options to set for context. - * - * options must be an associative - * array of associative arrays in the format - * $array['wrapper']['option'] = $value. - * - * Refer to context options and parameters - * for a listing of stream options. - * @return true Returns TRUE on success. + * @param resource $context + * @param array $options + * @return true * @throws StreamException * */ @@ -31,11 +22,8 @@ function stream_context_set_options($context, array $options): void /** - * Sets parameters on the specified context. - * - * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: - * $params['paramname'] = "paramvalue";. + * @param resource $context + * @param array $params * @throws StreamException * */ @@ -50,18 +38,11 @@ function stream_context_set_params($context, array $params): void /** - * Makes a copy of up to length bytes - * of data from the current position (or from the - * offset position, if specified) in - * from to to. If - * length is NULL, all remaining content in - * from will be copied. - * - * @param resource $from The source stream - * @param resource $to The destination stream - * @param int|null $length Maximum bytes to copy. By default all bytes left are copied. - * @param int $offset The offset where to start to copy data - * @return int Returns the total count of bytes copied. + * @param resource $from + * @param resource $to + * @param int|null $length + * @param int $offset + * @return int * @throws StreamException * */ @@ -83,33 +64,11 @@ function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_append will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified - * params to the end of - * the list and will therefore be called last during stream operations. - * To add a filter to the beginning of the list, use - * stream_filter_prepend. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -131,34 +90,11 @@ function stream_filter_append($stream, string $filtername, ?int $read_write = nu /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_prepend will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * See stream_filter_append for an example of - * using this parameter. - * @param mixed $params This filter will be added with the specified params - * to the beginning of the list and will therefore be - * called first during stream operations. To add a filter to the end of the - * list, use stream_filter_append. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -180,20 +116,8 @@ function stream_filter_prepend($stream, string $filtername, ?int $read_write = n /** - * stream_filter_register allows you to implement - * your own filter on any registered stream used with all the other - * filesystem functions (such as fopen, - * fread etc.). - * - * @param string $filter_name The filter name to be registered. - * @param string $class To implement a filter, you need to define a class as an extension of - * php_user_filter with a number of member - * functions. When performing read/write operations on the stream - * to which your filter is attached, PHP will pass the data through your - * filter (and any other filters attached to that stream) so that the - * data may be modified as desired. You must implement the methods - * exactly as described in php_user_filter - doing - * otherwise will lead to undefined behaviour. + * @param string $filter_name + * @param string $class * @throws StreamException * */ @@ -208,13 +132,7 @@ function stream_filter_register(string $filter_name, string $class): void /** - * Removes a stream filter previously added to a stream with - * stream_filter_prepend or - * stream_filter_append. Any data remaining in the - * filter's internal buffer will be flushed through to the next filter before - * removing it. - * - * @param resource $stream_filter The stream filter to be removed. + * @param resource $stream_filter * @throws StreamException * */ @@ -229,18 +147,10 @@ function stream_filter_remove($stream_filter): void /** - * Identical to file_get_contents, except that - * stream_get_contents operates on an already open - * stream resource and returns the remaining contents in a string, up to - * length bytes and starting at the specified - * offset. - * - * @param resource $stream A stream resource (e.g. returned from fopen) - * @param int|null $length The maximum bytes to read. Defaults to NULL (read all the remaining - * buffer). - * @param int $offset Seek to the specified offset before reading. If this number is negative, - * no seeking will occur and reading will start from the current position. - * @return string Returns a string. + * @param resource $stream + * @param int|null $length + * @param int $offset + * @return string * @throws StreamException * */ @@ -262,25 +172,10 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st /** - * Gets a line from the given handle. - * - * Reading ends when length bytes have been read, when - * the non-empty string specified by ending is found (which is - * not included in the return value), or on EOF - * (whichever comes first). - * - * This function is nearly identical to fgets except in - * that it allows end of line delimiters other than the standard \n, \r, and - * \r\n, and does not return the delimiter itself. - * - * @param resource $stream A valid file handle. - * @param int $length The maximum number of bytes to read from the handle. - * Negative values are not supported. - * Zero (0) means the default socket chunk size, - * i.e. 8192 bytes. - * @param string $ending An optional string delimiter. - * @return string Returns a string of up to length bytes read from the file - * pointed to by stream. + * @param resource $stream + * @param int $length + * @param string $ending + * @return string * @throws StreamException * */ @@ -296,9 +191,6 @@ function stream_get_line($stream, int $length, string $ending = ""): string /** - * Determines if stream stream refers to a valid terminal type device. - * This is a more portable version of posix_isatty, since it works on Windows systems too. - * * @param resource $stream * @throws StreamException * @@ -314,10 +206,8 @@ function stream_isatty($stream): void /** - * Resolve filename against the include path according to the same rules as fopen/include. - * - * @param string $filename The filename to resolve. - * @return string Returns a string containing the resolved absolute filename. + * @param string $filename + * @return string * @throws StreamException * */ @@ -333,20 +223,8 @@ function stream_resolve_include_path(string $filename): string /** - * Sets blocking or non-blocking mode on a stream. - * - * This function works for any stream that supports non-blocking mode - * (currently, regular files and socket streams). - * - * @param resource $stream The stream. - * @param bool $enable If enable is FALSE, the given stream - * will be switched to non-blocking mode, and if TRUE, it - * will be switched to blocking mode. This affects calls like - * fgets and fread - * that read from the stream. In non-blocking mode an - * fgets call will always return right away - * while in blocking mode it will wait for data to become available - * on the stream. + * @param resource $stream + * @param bool $enable * @throws StreamException * */ @@ -361,17 +239,9 @@ function stream_set_blocking($stream, bool $enable): void /** - * Sets the timeout value on stream, - * expressed in the sum of seconds and - * microseconds. - * - * When the stream times out, the 'timed_out' key of the array returned by - * stream_get_meta_data is set to TRUE, although no - * error/warning is generated. - * - * @param resource $stream The target stream. - * @param int $seconds The seconds part of the timeout to be set. - * @param int $microseconds The microseconds part of the timeout to be set. + * @param resource $stream + * @param int $seconds + * @param int $microseconds * @throws StreamException * */ @@ -386,19 +256,10 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** - * Accept a connection on a socket previously created by - * stream_socket_server. - * - * @param resource $socket The server socket to accept a connection from. - * @param float|null $timeout Override the default socket accept timeout. Time should be given in - * seconds. By default, default_socket_timeout - * is used. - * @param null|string $peer_name Will be set to the name (address) of the client which connected, if - * included and available from the selected transport. - * - * Can also be determined later using - * stream_socket_get_name. - * @return resource Returns a stream to the accepted socket connection. + * @param resource $socket + * @param float|null $timeout + * @param null|string $peer_name + * @return resource * @throws StreamException * */ @@ -420,52 +281,13 @@ function stream_socket_accept($socket, ?float $timeout = null, ?string &$peer_na /** - * Initiates a stream or datagram connection to the destination specified - * by address. The type of socket created - * is determined by the transport specified using standard URL formatting: - * transport://target. For Internet Domain sockets - * (AF_INET) such as TCP and UDP, the target portion - * of the address parameter should consist of - * a hostname or IP address followed by a colon and a port number. For Unix - * domain sockets, the target portion should point - * to the socket file on the filesystem. - * - * @param string $address Address to the socket to connect to. - * @param int|null $error_code Will be set to the system level error number if connection fails. - * @param null|string $error_message Will be set to the system level error message if the connection fails. - * @param float|null $timeout Number of seconds until the connect() system call - * should timeout. By default, default_socket_timeout - * is used. - * - * - * This parameter only applies when not making asynchronous - * connection attempts. - * - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * @param int-mask $flags Bitmask field which may be set to any combination of connection flags. - * Currently the select of connection flags is limited to - * STREAM_CLIENT_CONNECT (default), - * STREAM_CLIENT_ASYNC_CONNECT and - * STREAM_CLIENT_PERSISTENT. - * @param null|resource $context A valid context resource created with stream_context_create. - * @return resource On success a stream resource is returned which may - * be used together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @param int-mask $flags + * @param null|resource $context + * @return resource * @throws StreamException * */ @@ -489,12 +311,9 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string /** - * Returns the local or remote name of a given socket connection. - * - * @param resource $socket The socket to get the name of. - * @param bool $remote If set to TRUE the remote socket name will be returned, if set - * to FALSE the local socket name will be returned. - * @return string The name of the socket. + * @param resource $socket + * @param bool $remote + * @return string * @throws StreamException * */ @@ -510,25 +329,10 @@ function stream_socket_get_name($socket, bool $remote): string /** - * stream_socket_pair creates a pair of connected, - * indistinguishable socket streams. This function is commonly used in IPC - * (Inter-Process Communication). - * - * @param int $domain The protocol family to be used: STREAM_PF_INET, - * STREAM_PF_INET6 or - * STREAM_PF_UNIX - * @param int $type The type of communication to be used: - * STREAM_SOCK_DGRAM, - * STREAM_SOCK_RAW, - * STREAM_SOCK_RDM, - * STREAM_SOCK_SEQPACKET or - * STREAM_SOCK_STREAM - * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, - * STREAM_IPPROTO_IP, - * STREAM_IPPROTO_RAW, - * STREAM_IPPROTO_TCP or - * STREAM_IPPROTO_UDP - * @return resource[] Returns an array with the two socket resources on success. + * @param int $domain + * @param int $type + * @param int $protocol + * @return resource[] * @throws StreamException * */ @@ -544,38 +348,11 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array /** - * stream_socket_recvfrom accepts - * data from a remote socket up to length bytes. - * - * @param resource $socket The remote socket. - * @param int $length The number of bytes to receive from the socket. - * @param int $flags The value of flags can be any combination - * of the following: - * - * Possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * STREAM_PEEK - * - * Retrieve data from the socket, but do not consume the buffer. - * Subsequent calls to fread or - * stream_socket_recvfrom will see - * the same data. - * - * - * - * - * - * @param null|string $address If address is provided it will be populated with - * the address of the remote socket. - * @return string Returns the read data, as a string. + * @param resource $socket + * @param int $length + * @param int $flags + * @param null|string $address + * @return string * @throws StreamException * */ @@ -591,31 +368,11 @@ function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$ /** - * Sends the specified data through the - * socket. - * - * @param resource $socket The socket to send data to. - * @param string $data The data to be sent. - * @param int $flags The value of flags can be any combination - * of the following: - * - * possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * - * - * @param string $address The address specified when the socket stream was created will be used - * unless an alternate address is specified in address. - * - * If specified, it must be in dotted quad (or [ipv6]) format. - * @return int Returns a result code, as an integer. + * @param resource $socket + * @param string $data + * @param int $flags + * @param string $address + * @return int * @throws StreamException * */ @@ -631,44 +388,12 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** - * Creates a stream or datagram socket on the specified - * address. - * - * This function only creates a socket, to begin accepting connections - * use stream_socket_accept. - * - * @param string $address The type of socket created is determined by the transport specified - * using standard URL formatting: transport://target. - * - * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the - * remote_socket parameter should consist of a - * hostname or IP address followed by a colon and a port number. For - * Unix domain sockets, the target portion should - * point to the socket file on the filesystem. - * - * Depending on the environment, Unix domain sockets may not be available. - * A list of available transports can be retrieved using - * stream_get_transports. See - * for a list of bulitin transports. - * @param int|null $error_code If the optional error_code and error_message - * arguments are present they will be set to indicate the actual system - * level error that occurred in the system-level socket(), - * bind(), and listen() calls. If - * the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. - * Note that the error_code and - * error_message arguments will always be passed by reference. - * @param null|string $error_message See error_code description. - * @param int $flags A bitmask field which may be set to any combination of socket creation - * flags. - * - * For UDP sockets, you must use STREAM_SERVER_BIND as - * the flags parameter. + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param int $flags * @param null|resource $context - * @return resource Returns the created stream. + * @return resource * @throws StreamException * */ @@ -688,15 +413,8 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string /** - * Shutdowns (partially or not) a full-duplex connection. - * - * @param resource $stream An open stream (opened with stream_socket_client, - * for example) - * @param int $mode One of the following constants: STREAM_SHUT_RD - * (disable further receptions), STREAM_SHUT_WR - * (disable further transmissions) or - * STREAM_SHUT_RDWR (disable further receptions and - * transmissions). + * @param resource $stream + * @param int $mode * @throws StreamException * */ @@ -711,10 +429,7 @@ function stream_socket_shutdown($stream, int $mode): void /** - * Tells whether the stream supports locking through - * flock. - * - * @param resource $stream The stream to check. + * @param resource $stream * @throws StreamException * */ @@ -729,16 +444,9 @@ function stream_supports_lock($stream): void /** - * Allows you to implement your own protocol handlers and streams for use - * with all the other filesystem functions (such as fopen, - * fread etc.). - * - * @param string $protocol The wrapper name to be registered. - * Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. - * @param string $class The classname which implements the protocol. - * @param int $flags Should be set to STREAM_IS_URL if - * protocol is a URL protocol. Default is 0, local - * stream. + * @param string $protocol + * @param string $class + * @param int $flags * @throws StreamException * */ @@ -753,9 +461,6 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 /** - * Restores a built-in wrapper previously unregistered with - * stream_wrapper_unregister. - * * @param string $protocol * @throws StreamException * @@ -771,11 +476,6 @@ function stream_wrapper_restore(string $protocol): void /** - * Allows you to disable an already defined stream wrapper. Once the wrapper - * has been disabled you may override it with a user-defined wrapper using - * stream_wrapper_register or reenable it later on with - * stream_wrapper_restore. - * * @param string $protocol * @throws StreamException * diff --git a/generated/8.4/strings.php b/generated/8.4/strings.php index 4b673a75..a9f7e651 100644 --- a/generated/8.4/strings.php +++ b/generated/8.4/strings.php @@ -5,10 +5,8 @@ use Safe\Exceptions\StringsException; /** - * convert_uudecode decodes a uuencoded string. - * - * @param string $string The uuencoded data. - * @return string Returns the decoded data as a string. + * @param string $string + * @return string * @throws StringsException * */ @@ -24,10 +22,8 @@ function convert_uudecode(string $string): string /** - * Decodes a hexadecimally encoded binary string. - * - * @param string $string Hexadecimal representation of data. - * @return string Returns the binary representation of the given data. + * @param string $string + * @return string * @throws StringsException * */ @@ -43,16 +39,9 @@ function hex2bin(string $string): string /** - * Calculates the MD5 hash of the file specified by the - * filename parameter using the - * RSA Data Security, Inc. - * MD5 Message-Digest Algorithm, and returns that hash. - * The hash is a 32-character hexadecimal number. - * - * @param string $filename The filename - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 16. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ @@ -68,15 +57,9 @@ function md5_file(string $filename, bool $binary = false): string /** - * Calculates the sha1 hash of the file specified by - * filename using the - * US Secure Hash Algorithm 1, - * and returns that hash. The hash is a 40-character hexadecimal number. - * - * @param string $filename The filename of the file to hash. - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 20. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ diff --git a/generated/8.4/swoole.php b/generated/8.4/swoole.php index 3e9d4dc5..f9500d37 100644 --- a/generated/8.4/swoole.php +++ b/generated/8.4/swoole.php @@ -5,12 +5,8 @@ use Safe\Exceptions\SwooleException; /** - * - * - * @param string $hostname The host name. - * @param callable $callback The host name. - * - * The IP address. + * @param string $hostname + * @param callable $callback * @throws SwooleException * */ @@ -25,12 +21,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void /** - * - * - * @param string $filename The filename of the file being read. - * @param string $callback The name of the file. - * - * The content read from the file. + * @param string $filename + * @param string $callback * @throws SwooleException * */ @@ -45,11 +37,9 @@ function swoole_async_readfile(string $filename, string $callback): void /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. - * @param int $offset The offset. + * @param string $filename + * @param string $content + * @param int $offset * @param callable $callback * @throws SwooleException * @@ -71,10 +61,8 @@ function swoole_async_write(string $filename, string $content, ?int $offset = nu /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. + * @param string $filename + * @param string $content * @param callable $callback * @param int $flags * @throws SwooleException @@ -97,8 +85,6 @@ function swoole_async_writefile(string $filename, string $content, ?callable $ca /** - * - * * @param callable $callback * @throws SwooleException * @@ -114,8 +100,6 @@ function swoole_event_defer(callable $callback): void /** - * - * * @param int $fd * @throws SwooleException * @@ -131,8 +115,6 @@ function swoole_event_del(int $fd): void /** - * - * * @param int $fd * @param string $data * @throws SwooleException diff --git a/generated/8.4/uodbc.php b/generated/8.4/uodbc.php index f2b0092e..5a50fa9d 100644 --- a/generated/8.4/uodbc.php +++ b/generated/8.4/uodbc.php @@ -5,24 +5,9 @@ use Safe\Exceptions\UodbcException; /** - * Toggles autocommit behaviour. - * - * By default, auto-commit is on for a connection. Disabling - * auto-commit is equivalent with starting a transaction. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param bool|null $enable If enable is TRUE, auto-commit is enabled, if - * it is FALSE auto-commit is disabled. - * If NULL is passed, this function returns the auto-commit status for - * odbc. - * @return mixed With a NULL enable parameter, this function returns - * auto-commit status for odbc. Non-zero is - * returned if auto-commit is on, 0 if it is off, or FALSE if an error - * occurs. - * - * If enable is non-null, this function returns TRUE on - * success. + * @param \Odbc\Connection $odbc + * @param bool|null $enable + * @return mixed * @throws UodbcException * */ @@ -42,99 +27,9 @@ function odbc_autocommit(\Odbc\Connection $odbc, ?bool $enable = null) /** - * Controls handling of binary column data. ODBC SQL types affected are - * BINARY, VARBINARY, and - * LONGVARBINARY. - * The default mode can be set using the - * uodbc.defaultbinmode php.ini directive. - * - * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte - * (8 bits) of source data is represented as two ASCII characters. - * These characters are the ASCII character representation of the - * number in its hexadecimal form. For example, a binary - * 00000001 is converted to - * "01" and a binary 11111111 - * is converted to "FF". - * - * While the handling of BINARY and VARBINARY - * columns only depend on the binmode, the handling of LONGVARBINARY - * columns also depends on the longreadlen as well: - * - * LONGVARBINARY handling - * - * - * - * binmode - * longreadlen - * result - * - * - * - * - * ODBC_BINMODE_PASSTHRU - * 0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * 0 - * passthru - * - * - * ODBC_BINMODE_CONVERT - * 0 - * passthru - * - * - * ODBC_BINMODE_PASSTHRU - * >0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * >0 - * return as is - * - * - * ODBC_BINMODE_CONVERT - * >0 - * return as char - * - * - * - * - * - * If odbc_fetch_into is used, passthru means that an - * empty string is returned for these columns. - * If odbc_result is used, passthru means that the data are - * sent directly to the client (i.e. printed). - * - * @param int $statement The ODBC result object. - * @param int $mode Possible values for mode are: - * - * - * - * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * - * ODBC_BINMODE_RETURN: Return as is - * - * - * - * - * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * - * - * - * Handling of binary long - * columns is also affected by odbc_longreadlen. - * - * - * @return bool Always returns TRUE. + * @param int $statement + * @param int $mode + * @return bool * */ function odbc_binmode(int $statement, int $mode): bool @@ -146,39 +41,12 @@ function odbc_binmode(int $statement, int $mode): bool /** - * Lists columns and associated privileges for the given table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * This result object can be used to fetch a list of columns and - * associated privileges. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param string $column + * @return \Odbc\Result|false * */ function odbc_columnprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, string $column) @@ -190,47 +58,12 @@ function odbc_columnprivileges(\Odbc\Connection $odbc, string $catalog, string $ /** - * Lists all columns in the requested range. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $column + * @return \Odbc\Result|false * */ function odbc_columns(\Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) @@ -252,10 +85,7 @@ function odbc_columns(\Odbc\Connection $odbc, ?string $catalog = null, ?string $ /** - * Commits all pending transactions on the connection. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. + * @param \Odbc\Connection $odbc * @throws UodbcException * */ @@ -270,44 +100,11 @@ function odbc_commit(\Odbc\Connection $odbc): void /** - * The connection id returned by this functions is needed by other - * ODBC functions. You can have multiple connections open at once as long as - * they either use different db or different credentials. - * - * With some ODBC drivers, executing a complex stored procedure may - * fail with an error similar to: "Cannot open a cursor on a stored - * procedure that has anything other than a single select statement - * in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some - * drivers don't support the optional row_number parameter in - * odbc_fetch_row. SQL_CUR_USE_ODBC might help - * in that case, too. - * - * @param string $dsn The database source name for the connection. Alternatively, a - * DSN-less connection string can be used. - * @param string $user The username. - * @param string $password The password. - * @param int $cursor_option This sets the type of cursor to be used - * for this connection. This parameter is not normally needed, but - * can be useful for working around problems with some ODBC drivers. - * - * - * - * - * SQL_CUR_USE_IF_NEEDED - * - * - * - * - * SQL_CUR_USE_ODBC - * - * - * - * - * SQL_CUR_USE_DRIVER - * - * - * - * @return \Odbc\Connection Returns an ODBC connection. + * @param string $dsn + * @param string $user + * @param string $password + * @param int $cursor_option + * @return \Odbc\Connection * @throws UodbcException * */ @@ -323,10 +120,8 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o /** - * Gets the cursorname for the given result_id. - * - * @param \Odbc\Result $statement The ODBC result object. - * @return string Returns the cursor name, as a string. + * @param \Odbc\Result $statement + * @return string * @throws UodbcException * */ @@ -342,17 +137,9 @@ function odbc_cursor(\Odbc\Result $statement): string /** - * This function will return the list of available DSN (after calling it - * several times). - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $fetch_type The fetch_type can be one of two constant types: - * SQL_FETCH_FIRST, SQL_FETCH_NEXT. - * Use SQL_FETCH_FIRST the first time this function is - * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching - * the last available DSN. + * @param \Odbc\Connection $odbc + * @param int $fetch_type + * @return array * @throws UodbcException * */ @@ -368,13 +155,9 @@ function odbc_data_source(\Odbc\Connection $odbc, int $fetch_type): array /** - * Sends an SQL statement to the database server. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The SQL statement. - * @return \Odbc\Result Returns an ODBC result object if the SQL command was executed - * successfully. + * @param \Odbc\Connection $odbc + * @param string $query + * @return \Odbc\Result * @throws UodbcException * */ @@ -390,18 +173,8 @@ function odbc_exec(\Odbc\Connection $odbc, string $query): \Odbc\Result /** - * Executes a statement prepared with odbc_prepare. - * - * @param \Odbc\Result $statement The ODBC result object from odbc_prepare. - * @param array $params Parameters in params will be - * substituted for placeholders in the prepared statement in order. - * Elements of this array will be converted to strings by calling this - * function. - * - * Any parameters in params which - * start and end with single quotes will be taken as the name of a - * file to read and send to the database server as the data for the - * appropriate placeholder. + * @param \Odbc\Result $statement + * @param array $params * @throws UodbcException * */ @@ -416,16 +189,10 @@ function odbc_execute(\Odbc\Result $statement, array $params = []): void /** - * Fetch one result row into array. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param array|null $array The result array - * that can be of any type since it will be converted to type - * array. The array will contain the column values starting at array - * index 0. - * @param int|null $row The row number. - * @return int Returns the number of columns in the result; - * FALSE on error. + * @param \Odbc\Result $statement + * @param array|null $array + * @param int|null $row + * @return int * @throws UodbcException * */ @@ -445,12 +212,9 @@ function odbc_fetch_into(\Odbc\Result $statement, ?array &$array, ?int $row = nu /** - * Gets the length of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field length. + * @param \Odbc\Result $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -466,12 +230,9 @@ function odbc_field_len(\Odbc\Result $statement, int $field): int /** - * Gets the name of the field occupying the given column number in the given - * result object. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field name as a string. + * @param \Odbc\Result $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -487,13 +248,9 @@ function odbc_field_name(\Odbc\Result $statement, int $field): string /** - * Gets the number of the column slot that corresponds to the named field in - * the given result object. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param string $field The field name. - * @return int Returns the field number as a integer. - * Field numbering starts at 1. + * @param \Odbc\Result $statement + * @param string $field + * @return int * @throws UodbcException * */ @@ -509,12 +266,9 @@ function odbc_field_num(\Odbc\Result $statement, string $field): int /** - * Gets the scale of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field scale as a integer. + * @param \Odbc\Result $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -530,12 +284,9 @@ function odbc_field_scale(\Odbc\Result $statement, int $field): int /** - * Gets the SQL type of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field type as a string. + * @param \Odbc\Result $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -551,38 +302,14 @@ function odbc_field_type(\Odbc\Result $statement, int $field): string /** - * Retrieves a list of foreign keys in the specified table or a list of - * foreign keys in other tables that refer to the primary key in the - * specified table - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. - * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. - * @param string $pk_table The primary key table. - * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_table The foreign key table. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * PKTABLE_CAT - * PKTABLE_SCHEM - * PKTABLE_NAME - * PKCOLUMN_NAME - * FKTABLE_CAT - * FKTABLE_SCHEM - * FKTABLE_NAME - * FKCOLUMN_NAME - * KEY_SEQ - * UPDATE_RULE - * DELETE_RULE - * FK_NAME - * PK_NAME - * DEFERRABILITY - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $pk_catalog + * @param string $pk_schema + * @param string $pk_table + * @param string $fk_catalog + * @param string $fk_schema + * @param string $fk_table + * @return \Odbc\Result|false * */ function odbc_foreignkeys(\Odbc\Connection $odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) @@ -594,34 +321,9 @@ function odbc_foreignkeys(\Odbc\Connection $odbc, string $pk_catalog, string $pk /** - * Retrieves information about data types supported by the data source. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $data_type The data type, which can be used to restrict the information to a - * single data type. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TYPE_NAME - * DATA_TYPE - * PRECISION - * LITERAL_PREFIX - * LITERAL_SUFFIX - * CREATE_PARAMS - * NULLABLE - * CASE_SENSITIVE - * SEARCHABLE - * UNSIGNED_ATTRIBUTE - * MONEY - * AUTO_INCREMENT - * LOCAL_TYPE_NAME - * MINIMUM_SCALE - * MAXIMUM_SCALE - * - * - * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @param \Odbc\Connection $odbc + * @param int $data_type + * @return \Odbc\Result|false * */ function odbc_gettypeinfo(\Odbc\Connection $odbc, int $data_type = 0) @@ -633,15 +335,9 @@ function odbc_gettypeinfo(\Odbc\Connection $odbc, int $data_type = 0) /** - * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. - * The default length can be set using the - * uodbc.defaultlrl php.ini directive. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $length The number of bytes returned to PHP is controlled by the parameter - * length. If it is set to 0, long column data is passed through to the - * client (i.e. printed) when retrieved with odbc_result. - * @return bool Always returns TRUE. + * @param \Odbc\Result $statement + * @param int $length + * @return bool * */ function odbc_longreadlen(\Odbc\Result $statement, int $length): bool @@ -653,10 +349,8 @@ function odbc_longreadlen(\Odbc\Result $statement, int $length): bool /** - * Gets the number of fields (columns) in an ODBC result. - * - * @param \Odbc\Result $statement The ODBC result object returned by odbc_exec. - * @return int Returns the number of fields. + * @param \Odbc\Result $statement + * @return int * @throws UodbcException * */ @@ -672,22 +366,11 @@ function odbc_num_fields(\Odbc\Result $statement): int /** - * Opens a persistent database connection. - * - * This function is much like - * odbc_connect, except that the connection is - * not really closed when the script has finished. Future requests - * for a connection with the same dsn, - * user, password - * combination (via odbc_connect and - * odbc_pconnect) can reuse the persistent - * connection. - * * @param string $dsn * @param string $user * @param string $password * @param int $cursor_option - * @return \Odbc\Connection Returns an ODBC connection. + * @return \Odbc\Connection * @throws UodbcException * */ @@ -703,19 +386,9 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ /** - * Prepares a statement for execution. The ODBC result object can be used - * later to execute the statement with odbc_execute. - * - * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support - * stored procedures that accept parameters of type IN, INOUT, and OUT as - * defined by the ODBC specification. However, the Unified ODBC driver - * currently only supports parameters of type IN to stored procedures. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The query string statement being prepared. - * @return \Odbc\Result Returns an ODBC result object if the SQL command was prepared - * successfully. + * @param \Odbc\Connection $odbc + * @param string $query + * @return \Odbc\Result * @throws UodbcException * */ @@ -731,26 +404,11 @@ function odbc_prepare(\Odbc\Connection $odbc, string $query): \Odbc\Result /** - * Returns a result object that can be used to fetch the column names - * that comprise the primary key for a table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema * @param string $table - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * KEY_SEQ - * PK_NAME - * - * Drivers can report additional columns. + * @return \Odbc\Result|false * */ function odbc_primarykeys(\Odbc\Connection $odbc, string $catalog, string $schema, string $table) @@ -762,50 +420,12 @@ function odbc_primarykeys(\Odbc\Connection $odbc, string $catalog, string $schem /** - * Retrieve information about parameters to procedures. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The proc. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns the list of input and output parameters, as well as the - * columns that make up the result set for the specified procedures. - * Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * COLUMN_NAME - * COLUMN_TYPE - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @param null|string $column + * @return \Odbc\Result|false * */ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) @@ -827,33 +447,11 @@ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = /** - * Lists all procedures in the requested range. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result Returns an ODBC result object containing the information. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * NUM_INPUT_PARAMS - * NUM_OUTPUT_PARAMS - * NUM_RESULT_SETS - * REMARKS - * PROCEDURE_TYPE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @return \Odbc\Result * @throws UodbcException * */ @@ -877,16 +475,9 @@ function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, /** - * Prints all rows from a result object produced by - * odbc_exec. The result is printed in HTML table format. - * The data is not escaped. - * - * This function is not supposed to be used in production environments; it is - * merely meant for development purposes, to get a result set quickly rendered. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param string $format Additional overall table formatting. - * @return int Returns the number of rows in the result. + * @param \Odbc\Result $statement + * @param string $format + * @return int * @throws UodbcException * */ @@ -902,14 +493,9 @@ function odbc_result_all(\Odbc\Result $statement, string $format = ""): int /** - * Get result data - * - * @param \Odbc\Result $statement The ODBC result object. - * @param mixed $field The field name being retrieved. It can either be an integer containing - * the column number of the field you want; or it can be a string - * containing the name of the field. - * @return mixed Returns the string contents of the field, FALSE on error, NULL for - * NULL data, or TRUE for binary data. + * @param \Odbc\Result $statement + * @param mixed $field + * @return mixed * @throws UodbcException * */ @@ -925,10 +511,7 @@ function odbc_result(\Odbc\Result $statement, $field) /** - * Rolls back all pending statements on the connection. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. + * @param \Odbc\Connection $odbc * @throws UodbcException * */ @@ -943,32 +526,10 @@ function odbc_rollback(\Odbc\Connection $odbc): void /** - * This function allows fiddling with the ODBC options for a - * particular connection or query result. It was written to help - * find work around to problems in quirky ODBC drivers. You should - * probably only use this function if you are an ODBC programmer and - * understand the effects the various options will have. You will - * certainly need a good ODBC reference to explain all the different - * options and values that can be used. Different driver versions - * support different options. - * - * Because the effects may vary depending on the ODBC driver, use of - * this function in scripts to be made publicly available is - * strongly discouraged. Also, some ODBC options are not available - * to this function because they must be set before the connection - * is established or the query is prepared. However, if on a - * particular job it can make PHP work so your boss doesn't tell you - * to use a commercial product, that's all that really - * matters. - * - * @param \Odbc\Connection|\Odbc\Result $odbc Is a connection id or result id on which to change the settings. - * For SQLSetConnectOption(), this is a connection id. - * For SQLSetStmtOption(), this is a result id. - * @param int $which Is the ODBC function to use. The value should be - * 1 for SQLSetConnectOption() and - * 2 for SQLSetStmtOption(). - * @param int $option The option to set. - * @param int $value The value for the given option. + * @param \Odbc\Connection|\Odbc\Result $odbc + * @param int $which + * @param int $option + * @param int $value * @throws UodbcException * */ @@ -983,42 +544,14 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void /** - * Retrieves either the optimal set of columns that uniquely identifies a - * row in the table, or columns that are automatically updated when any - * value in the row is updated by a transaction. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $type When the type argument is SQL_BEST_ROWID, - * odbc_specialcolumns returns the - * column or columns that uniquely identify each row in the table. - * - * When the type argument is SQL_ROWVER, - * odbc_specialcolumns returns the column or columns in the - * specified table, if any, that are automatically updated by the data source - * when any value in the row is updated by any transaction. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table. - * @param int $scope The scope, which orders the result set. - * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION - * or SQL_SCOPE_SESSION. - * @param int $nullable Determines whether to return special columns that can have a NULL value. - * One of SQL_NO_NULLS or SQL_NULLABLE. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * SCOPE - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * PSEUDO_COLUMN - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param int $type + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $scope + * @param int $nullable + * @return \Odbc\Result|false * */ function odbc_specialcolumns(\Odbc\Connection $odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable) @@ -1030,37 +563,13 @@ function odbc_specialcolumns(\Odbc\Connection $odbc, int $type, string $catalog, /** - * Get statistics about a table and its indexes. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table name. - * @param int $unique The type of the index. - * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. - * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. - * The latter requests that the driver retrieve the CARDINALITY and - * PAGES only if they are readily available from the server. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * NON_UNIQUE - * INDEX_QUALIFIER - * INDEX_NAME - * TYPE - * ORDINAL_POSITION - * COLUMN_NAME - * ASC_OR_DESC - * CARDINALITY - * PAGES - * FILTER_CONDITION - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $unique + * @param int $accuracy + * @return \Odbc\Result|false * */ function odbc_statistics(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy) @@ -1072,33 +581,11 @@ function odbc_statistics(\Odbc\Connection $odbc, string $catalog, string $schema /** - * Lists tables in the requested range and the privileges associated - * with each table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @return \Odbc\Result|false * */ function odbc_tableprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table) @@ -1110,75 +597,12 @@ function odbc_tableprivileges(\Odbc\Connection $odbc, string $catalog, string $s /** - * Lists all tables in the requested range. - * - * To support enumeration of qualifiers, owners, and table types, - * the following special semantics for the - * catalog, schema, - * table, and - * table_type are available: - * - * - * - * If catalog is a single percent - * character (%) and schema and - * table are empty strings, then the result - * set contains a list of valid qualifiers for the data - * source. (All columns except the TABLE_QUALIFIER column contain - * NULLs.) - * - * - * - * - * If schema is a single percent character - * (%) and catalog and - * table are empty strings, then the result - * set contains a list of valid owners for the data source. (All - * columns except the TABLE_OWNER column contain - * NULLs.) - * - * - * - * - * If table_type is a single percent - * character (%) and catalog, - * schema and table - * are empty strings, then the result set contains a list of - * valid table types for the data source. (All columns except the - * TABLE_TYPE column contain NULLs.) - * - * - * - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $types If table_type is not an empty string, it - * must contain a list of comma-separated values for the types of - * interest; each value may be enclosed in single quotes (') or - * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the - * data source does not support a specified table type, - * odbc_tables does not return any results for - * that type. - * @return \Odbc\Result Returns an ODBC result object containing the information. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * TABLE_TYPE - * REMARKS - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $types + * @return \Odbc\Result * @throws UodbcException * */ diff --git a/generated/8.4/uopz.php b/generated/8.4/uopz.php index 17d2e760..de1a0dc9 100644 --- a/generated/8.4/uopz.php +++ b/generated/8.4/uopz.php @@ -5,10 +5,8 @@ use Safe\Exceptions\UopzException; /** - * Makes class extend parent - * - * @param string $class The name of the class to extend - * @param string $parent The name of the class to inherit + * @param string $class + * @param string $parent * @throws UopzException * */ @@ -23,8 +21,6 @@ function uopz_extend(string $class, string $parent): void /** - * Makes class implement interface - * * @param string $class * @param string $interface * @throws UopzException diff --git a/generated/8.4/url.php b/generated/8.4/url.php index a6d06093..f65c527b 100644 --- a/generated/8.4/url.php +++ b/generated/8.4/url.php @@ -5,15 +5,9 @@ use Safe\Exceptions\UrlException; /** - * Decodes a base64 encoded string. - * - * @param string $string The encoded data. - * @param bool $strict If the strict parameter is set to TRUE - * then the base64_decode function will return - * FALSE if the input contains character from outside the base64 - * alphabet. Otherwise invalid characters will be silently discarded. - * @return string Returns the decoded data. The returned data may be - * binary. + * @param string $string + * @param bool $strict + * @return string * @throws UrlException * */ @@ -29,17 +23,10 @@ function base64_decode(string $string, bool $strict = false): string /** - * get_headers returns an array with the headers sent - * by the server in response to a HTTP request. - * - * @param string $url The target URL. - * @param bool $associative If the optional associative parameter is set to true, - * get_headers parses the response and sets the - * array's keys. - * @param null|resource $context A valid context resource created with - * stream_context_create, or NULL to use the - * default context. - * @return array Returns an indexed or associative array with the headers. + * @param string $url + * @param bool $associative + * @param null|resource $context + * @return array * @throws UrlException * */ @@ -59,38 +46,9 @@ function get_headers(string $url, bool $associative = false, $context = null): a /** - * Opens filename and parses it line by line for - * <meta> tags in the file. The parsing stops at - * </head>. - * - * @param string $filename The path to the HTML file, as a string. This can be a local file or an - * URL. - * - * - * What get_meta_tags parses - * - * - * - * - * - * - * ]]> - * - * - * @param bool $use_include_path Setting use_include_path to TRUE will result - * in PHP trying to open the file along the standard include path as per - * the include_path directive. - * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. - * - * The value of the name property becomes the key, the value of the content - * property becomes the value of the returned array, so you can easily use - * standard array functions to traverse it or access single values. - * Special characters in the value of the name property are substituted with - * '_', the rest is converted to lower case. If two meta tags have the same - * name, only the last one is returned. - * - * Returns FALSE on failure. + * @param string $filename + * @param bool $use_include_path + * @return array * @throws UrlException * */ @@ -106,90 +64,9 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array /** - * This function parses a URL and returns an associative array containing any - * of the various components of the URL that are present. - * The values of the array elements are not URL decoded. - * - * This function is not meant to validate - * the given URL, it only breaks it up into the parts listed below. Partial and invalid - * URLs are also accepted, parse_url tries its best to - * parse them correctly. - * - * @param string $url The URL to parse. - * @param int $component Specify one of PHP_URL_SCHEME, - * PHP_URL_HOST, PHP_URL_PORT, - * PHP_URL_USER, PHP_URL_PASS, - * PHP_URL_PATH, PHP_URL_QUERY - * or PHP_URL_FRAGMENT to retrieve just a specific - * URL component as a string (except when - * PHP_URL_PORT is given, in which case the return - * value will be an int). - * @return array|int|null|string On seriously malformed URLs, parse_url. - * - * If the component parameter is omitted, an - * associative array is returned. At least one element will be - * present within the array. Potential keys within this array are: - * - * - * - * scheme - e.g. http - * - * - * - * - * host - * - * - * - * - * port - * - * - * - * - * user - * - * - * - * - * pass - * - * - * - * - * path - * - * - * - * - * query - after the question mark ? - * - * - * - * - * fragment - after the hashmark # - * - * - * - * - * If the component parameter is specified, - * parse_url returns a string (or an - * int, in the case of PHP_URL_PORT) - * instead of an array. If the requested component doesn't exist - * within the given URL, NULL will be returned. - * As of PHP 8.0.0, parse_url distinguishes absent and empty - * queries and fragments: - * - * - * - * - * - * - * - * Previously all cases resulted in query and fragment being NULL. - * - * Note that control characters (cf. ctype_cntrl) in the - * components are replaced with underscores (_). + * @param string $url + * @param int $component + * @return array|int|null|string * @throws UrlException * */ diff --git a/generated/8.4/var.php b/generated/8.4/var.php index 70f048df..48e3f889 100644 --- a/generated/8.4/var.php +++ b/generated/8.4/var.php @@ -5,48 +5,8 @@ use Safe\Exceptions\VarException; /** - * Set the type of variable var to - * type. - * - * @param mixed $var The variable being converted. - * @param string $type Possibles values of type are: - * - * - * - * "boolean" or "bool" - * - * - * - * - * "integer" or "int" - * - * - * - * - * "float" or "double" - * - * - * - * - * "string" - * - * - * - * - * "array" - * - * - * - * - * "object" - * - * - * - * - * "null" - * - * - * + * @param mixed $var + * @param string $type * @throws VarException * */ diff --git a/generated/8.4/xdiff.php b/generated/8.4/xdiff.php index dab92fce..4ed412cd 100644 --- a/generated/8.4/xdiff.php +++ b/generated/8.4/xdiff.php @@ -5,14 +5,9 @@ use Safe\Exceptions\XdiffException; /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -27,14 +22,9 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * and xdiff_file_rabdiff functions or their string counterparts. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -49,16 +39,9 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -73,20 +56,11 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest /** - * Makes an unified diff containing differences between old_file and - * new_file and stores it in dest file. The - * resulting file is human-readable. An optional context parameter - * specifies how many lines of context should be added around each change. - * Setting minimal parameter to true will result in outputting the shortest - * patch file possible (can take a long time). - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. - * @param int $context Indicates how many lines of context you want to include in diff - * result. - * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result - * (can take a long time). + * @param string $old_file + * @param string $new_file + * @param string $dest + * @param int $context + * @param bool $minimal * @throws XdiffException * */ @@ -101,16 +75,9 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * or xdiff_file_rabdiff functions or their string counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -125,19 +92,9 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi /** - * Makes a binary diff of two files and stores the result in a patch file. - * The difference between this function and xdiff_file_bdiff is different - * algorithm used which should result in faster execution and smaller diff produced. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff - * website. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -152,13 +109,9 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -174,15 +127,9 @@ function xdiff_string_bpatch(string $str, string $patch): string /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -198,24 +145,11 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. - * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if - * it is provided. - * - * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, - * xdiff_file_diff functions or compatible tools. - * @param int $flags flags can be either - * XDIFF_PATCH_NORMAL (default mode, normal patch) - * or XDIFF_PATCH_REVERSE (reversed patch). - * - * Starting from version 1.5.0, you can also use binary OR to enable - * XDIFF_PATCH_IGNORESPACE flag. - * @param null|string $error If provided then rejected parts are stored inside this variable. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @param int $flags + * @param null|string $error + * @return string * @throws XdiffException * */ diff --git a/generated/8.4/xml.php b/generated/8.4/xml.php index 7eb056fc..a0d58eb8 100644 --- a/generated/8.4/xml.php +++ b/generated/8.4/xml.php @@ -5,9 +5,7 @@ use Safe\Exceptions\XmlException; /** - * Frees the given XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to free. + * @param \XMLParser $parser * @throws XmlException * */ @@ -22,71 +20,9 @@ function xml_parser_free(\XMLParser $parser): void /** - * Sets an option in an XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to set an option in. - * @param int $option Which option to set. See below. - * - * The following options are available: - * - * XML parser options - * - * - * - * Option constant - * Data type - * Description - * - * - * - * - * XML_OPTION_CASE_FOLDING - * bool - * - * Controls whether case-folding is enabled for this - * XML parser. Enabled by default. - * - * - * - * XML_OPTION_PARSE_HUGE - * bool - * - * Allows parsing documents larger than 10 MB. - * This option should only be enabled when the document size is - * bounded because this could otherwise lead to a DoS. - * This option is only available when using libxml2. - * - * - * - * XML_OPTION_SKIP_TAGSTART - * integer - * - * Specify how many characters should be skipped in the beginning of a - * tag name. - * - * - * - * XML_OPTION_SKIP_WHITE - * bool - * - * Whether to skip values consisting of whitespace characters. - * - * - * - * XML_OPTION_TARGET_ENCODING - * string - * - * Sets which target encoding to - * use in this XML parser.By default, it is set to the same as the - * source encoding used by xml_parser_create. - * Supported target encodings are ISO-8859-1, - * US-ASCII and UTF-8. - * - * - * - * - * - * @param mixed $value The option's new value. + * @param \XMLParser $parser + * @param int $option + * @param mixed $value * @throws XmlException * */ @@ -101,62 +37,9 @@ function xml_parser_set_option(\XMLParser $parser, int $option, $value): void /** - * Sets the character data handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * data - * - * - * Character data as a string. - * - * - * - * - * - * Character data handler is called for every piece of a text in the XML - * document. It can be called multiple times inside each fragment (e.g. - * for non-ASCII strings). - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): bool @@ -168,62 +51,9 @@ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): /** - * Sets the default handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * - * data - * - * - * - * data contains the character data. - * This may be the XML declaration, document type declaration, - * entities or other data for which no other handler exists. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_default_handler(\XMLParser $parser, callable $handler): bool @@ -235,84 +65,10 @@ function xml_set_default_handler(\XMLParser $parser, callable $handler): bool /** - * Sets the element handler functions for the XML parser. - * - * start_handler is called when a new XML element is - * opened. end_handler is called when an XML element - * is closed. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $start_handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidstart_element_handler - * XMLParserparser - * stringname - * arrayattributes - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * name - * - * - * Contains the name of the element for which this handler is called. - * If case-folding is in effect - * for this parser, the element name will be in uppercase letters. - * - * - * - * - * attributes - * - * - * An associative array with the element's attributes. - * The array is empty if the element has no attributes. - * The keys of this array are the attribute names, - * the values are the attribute values. - * Attribute names are - * case-folded - * on the same criteria as element names. - * Attribute values are not case-folded. - * - * - * The order in which attributes is traversed - * is identical to the order in which the attributes were declared. - * - * - * - * - * @param callable $end_handler The XML parser calling the handler. - * @return bool Always returns TRUE. + * @param callable $end_handler + * @return bool * */ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, callable $end_handler): bool @@ -324,61 +80,9 @@ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, ca /** - * Set a handler to be called when leaving the scope of a namespace - * declaration. This will be called, for each namespace declaration, after - * the handler for the end tag of the element in which the namespace was - * declared. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * handler - * XMLParserparser - * stringfalseprefix - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * FALSE if no prefix exists. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handler): bool @@ -390,97 +94,9 @@ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handle /** - * Sets the external entity reference handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * boolhandler - * XMLParserparser - * stringopen_entity_names - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * open_entity_names - * - * - * A space-separated list of the names of the entities that are open for - * the parse of this entity (including the name of the referenced - * entity). - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (system_id) of the external entity. - * - * - * - * - * system_id - * - * - * The system identifier as specified in the entity declaration. - * - * - * - * - * public_id - * - * - * The public identifier as specified in the entity declaration, or - * an empty string if none was specified; the whitespace in the - * public identifier will have been normalized as required by - * the XML spec. - * - * - * - * - * - * The handler should return TRUE if the entity was handled, - * FALSE otherwise. - * When returning FALSE the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handler): bool @@ -492,101 +108,9 @@ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handl /** - * Sets the notation declaration handler function for the XML parser - * parser. - * - * A notation declaration is part of the document's DTD and has the - * following format: - * - * name - * { systemId | publicId?> - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringnotation_name - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): bool @@ -598,14 +122,9 @@ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): b /** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param \XMLParser $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. - * @return bool Always returns TRUE. + * @param \XMLParser $parser + * @param object $object + * @return bool * */ function xml_set_object(\XMLParser $parser, object $object): bool @@ -617,73 +136,9 @@ function xml_set_object(\XMLParser $parser, object $object): bool /** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * - * ]]> - * - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * target - * - * - * The processing instruction target. - * - * - * - * - * data - * - * - * The processing instruction data. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $handler): bool @@ -695,70 +150,9 @@ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $ha /** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringfalseprefix - * stringuri - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * FALSE if no prefix exists. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $handler): bool @@ -770,109 +164,9 @@ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $hand /** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringentity_name - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * stringfalsenotation_name - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * - * - * - * notation_name - * - * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, callable $handler): bool diff --git a/generated/8.4/xmlrpc.php b/generated/8.4/xmlrpc.php index 3007ab7d..38243a14 100644 --- a/generated/8.4/xmlrpc.php +++ b/generated/8.4/xmlrpc.php @@ -5,10 +5,8 @@ use Safe\Exceptions\XmlrpcException; /** - * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * - * @param \DateTime|string $value Value to set the type - * @param string $type 'base64' or 'datetime' + * @param \DateTime|string $value + * @param string $type * @throws XmlrpcException * */ diff --git a/generated/8.4/yaml.php b/generated/8.4/yaml.php index 52466e27..8e6b196f 100644 --- a/generated/8.4/yaml.php +++ b/generated/8.4/yaml.php @@ -5,21 +5,11 @@ use Safe\Exceptions\YamlException; /** - * Convert all or part of a YAML document stream read from a file to a PHP variable. - * - * @param string $filename Path to the file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in filename in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $filename + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -39,24 +29,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?a /** - * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * - * @param string $url url should be of the form "scheme://...". PHP - * will search for a protocol handler (also known as a wrapper) for that - * scheme. If no wrappers for that protocol are registered, PHP will emit - * a notice to help you track potential problems in your script and then - * continue as though filename specifies a regular file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more details. - * @return mixed Returns the value encoded in url in appropriate - * PHP type. If pos is - * -1 an array will be returned with one entry - * for each document found in the stream. + * @param string $url + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -76,21 +53,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $ /** - * Convert all or part of a YAML document stream to a PHP variable. - * - * @param string $input The string to parse as a YAML document stream. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $input + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ diff --git a/generated/8.4/yaz.php b/generated/8.4/yaz.php index ce5dd4d0..1832141f 100644 --- a/generated/8.4/yaz.php +++ b/generated/8.4/yaz.php @@ -5,45 +5,9 @@ use Safe\Exceptions\YazException; /** - * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search - * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf - * prior to this function. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array - * containing the valid RPN query under the key rpn. - * - * Upon failure, three indexes are set in this array to indicate the cause - * of failure: - * - * - * - * errorcode - the CCL error code (integer) - * - * - * - * - * errorstring - the CCL error string - * - * - * - * - * errorpos - approximate position in query of failure - * (integer is character position) - * - * - * - * - * errorcode - the CCL error code (integer) - * - * errorstring - the CCL error string - * - * errorpos - approximate position in query of failure - * (integer is character position) + * @param resource $id + * @param string $query + * @param array|null $result * @throws YazException * */ @@ -58,9 +22,7 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void /** - * Closes the connection given by parameter id. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -75,193 +37,9 @@ function yaz_close($id): void /** - * This function returns a connection resource on success, zero on - * failure. - * - * yaz_connect prepares for a connection to a - * Z39.50 server. - * This function is non-blocking and does not attempt to establish - * a connection - it merely prepares a connect to be performed later when - * yaz_wait is called. - * - * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted - * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication - * string (OpenAuth). - * - * If given as an array, the contents of the array serves as options. - * - * - * user - * - * - * Username for authentication. - * - * - * - * - * group - * - * - * Group for authentication. - * - * - * - * - * password - * - * - * Password for authentication. - * - * - * - * - * cookie - * - * - * Cookie for session (YAZ proxy). - * - * - * - * - * proxy - * - * - * Proxy for connection (YAZ proxy). - * - * - * - * - * persistent - * - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * - * - * - * - * piggyback - * - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * - * - * - * charset - * - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * - * preferredMessageSize - * - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * maximumRecordSize - * - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * - * Username for authentication. - * - * Group for authentication. - * - * Password for authentication. - * - * Cookie for session (YAZ proxy). - * - * Proxy for connection (YAZ proxy). - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * @return mixed A connection resource on success, FALSE on error. + * @param string $zurl + * @param mixed $options + * @return mixed * @throws YazException * */ @@ -281,14 +59,8 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by - * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to - * yaz_connect. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are - * separated by a plus sign +. + * @param resource $id + * @param string $databases * @throws YazException * */ @@ -303,15 +75,8 @@ function yaz_database($id, string $databases): void /** - * This function sets the element set name for retrieval. - * - * Call this function before yaz_search or - * yaz_present to specify the element set name for - * records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $elementset Most servers support F (for full records) and - * B (for brief records). + * @param resource $id + * @param string $elementset * @throws YazException * */ @@ -326,12 +91,7 @@ function yaz_element($id, string $elementset): void /** - * This function prepares for retrieval of records after a successful search. - * - * The yaz_range function should be called prior to this - * function to specify the range of records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -346,32 +106,9 @@ function yaz_present($id): void /** - * yaz_search prepares for a search on the given - * connection. - * - * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when - * yaz_wait is called. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 - * query in prefix query notation. - * @param string $query The RPN query is a textual representation of the Type-1 query as - * defined by the Z39.50 standard. However, in the text representation - * as used by YAZ a prefix notation is used, that is the operator - * precedes the operands. The query string is a sequence of tokens where - * white space is ignored unless surrounded by double quotes. Tokens beginning - * with an at-character (@) are considered operators, - * otherwise they are treated as search terms. - * - * You can find information about attributes at the - * Z39.50 Maintenance Agency - * site. - * - * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and - * yaz_ccl_parse. + * @param resource $id + * @param string $type + * @param string $query * @throws YazException * */ @@ -386,44 +123,8 @@ function yaz_search($id, string $type, string $query): void /** - * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and - * yaz_itemorder. - * - * yaz_wait returns when all servers have either - * completed all requests or aborted (in case of errors). - * - * @param array $options An associative array of options: - * - * - * timeout - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * - * - * - * event - * - * - * A boolean. - * - * - * - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * A boolean. - * @return mixed Returns TRUE on success. - * In event mode, returns resource. + * @param array $options + * @return mixed * @throws YazException * */ diff --git a/generated/8.4/zip.php b/generated/8.4/zip.php index d1a628eb..7cbf1cce 100644 --- a/generated/8.4/zip.php +++ b/generated/8.4/zip.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ZipException; /** - * Closes the specified directory entry. - * - * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @param resource $zip_entry * @throws ZipException * */ @@ -22,10 +20,8 @@ function zip_entry_close($zip_entry): void /** - * Returns the compressed size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The compressed size. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -41,11 +37,8 @@ function zip_entry_compressedsize($zip_entry): int /** - * Returns the compression method of the directory entry specified - * by zip_entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The compression method. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -61,10 +54,8 @@ function zip_entry_compressionmethod($zip_entry): string /** - * Returns the actual size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The size of the directory entry. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -80,10 +71,8 @@ function zip_entry_filesize($zip_entry): int /** - * Returns the name of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The name of the directory entry. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -99,16 +88,9 @@ function zip_entry_name($zip_entry): string /** - * Opens a directory entry in a zip file for reading. - * - * @param resource $zip_dp A valid resource handle returned by zip_open. - * @param resource $zip_entry A directory entry returned by zip_read. - * @param string $mode Any of the modes specified in the documentation of - * fopen. - * - * Currently, mode is ignored and is always - * "rb". This is due to the fact that zip support - * in PHP is read only access. + * @param resource $zip_dp + * @param resource $zip_entry + * @param string $mode * @throws ZipException * */ @@ -123,13 +105,9 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void /** - * Reads from an open directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $len The number of bytes to return. - * - * This should be the uncompressed length you wish to read. - * @return string Returns the data read, empty string on end of a file. + * @param resource $zip_entry + * @param int $len + * @return string * @throws ZipException * */ diff --git a/generated/8.4/zlib.php b/generated/8.4/zlib.php index 61bc6ed4..bca09e85 100644 --- a/generated/8.4/zlib.php +++ b/generated/8.4/zlib.php @@ -5,20 +5,10 @@ use Safe\Exceptions\ZlibException; /** - * Incrementally deflates data in the specified context. - * - * @param \DeflateContext $context A context created with deflate_init. - * @param string $data A chunk of data to compress. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of compressed data. + * @param \DeflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -34,92 +24,9 @@ function deflate_add(\DeflateContext $context, string $data, int $flush_mode = Z /** - * Initializes an incremental deflate context using the specified - * encoding. - * - * Note that the window option here only sets the window size - * of the algorithm, differently from the zlib filters where the same parameter - * also sets the encoding to use; the encoding must be set with the - * encoding parameter. - * - * Limitation: there is currently no way to set the header information on a GZIP - * compressed stream, which are set as follows: GZIP signature - * (\x1f\x8B); compression method (\x08 - * == DEFLATE); 6 zero bytes; the operating system set to the current system - * (\x00 = Windows, \x03 = Unix, etc.) - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \DeflateContext Returns a deflate context resource (zlib.deflate) on - * success. + * @param int $encoding + * @param array $options + * @return \DeflateContext * @throws ZlibException * */ @@ -135,10 +42,7 @@ function deflate_init(int $encoding, array $options = []): \DeflateContext /** - * Closes the given gz-file pointer. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -153,20 +57,10 @@ function gzclose($stream): void /** - * This function compresses the given string using the ZLIB - * data format. - * - * For details on the ZLIB compression algorithm see the document - * "ZLIB Compressed Data Format - * Specification version 3.3" (RFC 1950). - * - * @param string $data The data to compress. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. - * - * If -1 is used, the default compression of the zlib library is used which is 6. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The compressed string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -182,12 +76,9 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** - * This function returns a decoded version of the input - * data. - * - * @param string $data The data to decode, encoded by gzencode. - * @param int $max_length The maximum length of data to decode. - * @return string The decoded string, or. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -203,19 +94,10 @@ function gzdecode(string $data, int $max_length = 0): string /** - * This function compresses the given string using the DEFLATE - * data format. - * - * For details on the DEFLATE compression algorithm see the document - * "DEFLATE Compressed Data Format - * Specification version 1.3" (RFC 1951). - * - * @param string $data The data to deflate. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The deflated string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -231,25 +113,10 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ /** - * This function returns a compressed version of the input - * data compatible with the output of the - * gzip program. - * - * For more information on the GZIP file format, see the document: - * GZIP file format specification - * version 4.3 (RFC 1952). - * - * @param string $data The data to encode. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default) - * or FORCE_DEFLATE. - * - * FORCE_DEFLATE generates - * RFC 1950 compliant output, consisting of a zlib header, the deflated - * data, and an Adler checksum. - * @return string The encoded string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -265,13 +132,9 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G /** - * This function is identical to readgzfile, except that - * it returns the file in an array. - * - * @param string $filename The file name. - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return list An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @param string $filename + * @param int $use_include_path + * @return list * @throws ZlibException * */ @@ -287,14 +150,9 @@ function gzfile(string $filename, int $use_include_path = 0): array /** - * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a - * newline, or on EOF (whichever comes first). - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int|null $length The length of data to get. - * @return string The uncompressed string. + * @param resource $stream + * @param int|null $length + * @return string * @throws ZlibException * */ @@ -314,15 +172,9 @@ function gzgets($stream, ?int $length = null): string /** - * This function inflates a deflated string. - * - * @param string $data The data compressed by gzdeflate. - * @param int $max_length The maximum length of decoded data. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or, unless max_length is 0, more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -338,28 +190,10 @@ function gzinflate(string $data, int $max_length = 0): string /** - * Opens a gzip (.gz) file for reading or writing. - * - * gzopen can be used to read a file which is - * not in gzip format; in this case gzread will - * directly read from the file without decompression. - * - * @param string $filename The file name. - * @param string $mode As in fopen (rb or - * wb) but can also include a compression level - * (wb9) or a strategy: f for - * filtered data as in wb6f, h for - * Huffman only compression as in wb1h. - * (See the description of deflateInit2 - * in zlib.h for - * more information about the strategy parameter.) - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return resource Returns a file pointer to the file opened, after that, everything you read - * from this file descriptor will be transparently decompressed and what you - * write gets compressed. - * - * If the open fails, the function returns FALSE. + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return resource * @throws ZlibException * */ @@ -375,13 +209,8 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) /** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return false|int The number of uncompressed characters read from gz - * and passed through to the input. + * @param resource $stream + * @return false|int * */ function gzpassthru($stream) @@ -393,15 +222,9 @@ function gzpassthru($stream) /** - * gzread reads up to length bytes - * from the given gz-file pointer. Reading stops when - * length (uncompressed) bytes have been read - * or EOF is reached, whichever comes first. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int $length The number of bytes to read. - * @return string The data that have been read. + * @param resource $stream + * @param int $length + * @return string * @throws ZlibException * */ @@ -417,11 +240,7 @@ function gzread($stream, int $length): string /** - * Sets the file position indicator of the given gz-file pointer to the - * beginning of the file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -436,12 +255,8 @@ function gzrewind($stream): void /** - * Gets the position of the given file pointer; i.e., its offset into the - * uncompressed file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The position of the file pointer or FALSE if an error occurs. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -457,15 +272,9 @@ function gztell($stream): int /** - * This function uncompress a compressed string. - * - * @param string $data The data compressed by gzcompress. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -481,18 +290,10 @@ function gzuncompress(string $data, int $max_length = 0): string /** - * gzwrite writes the contents of - * data to the given gz-file. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param string $data The string to write. - * @param int|null $length The number of uncompressed bytes to write. If supplied, writing will - * stop after length (uncompressed) bytes have been - * written or the end of data is reached, - * whichever comes first. - * @return int Returns the number of (uncompressed) bytes written to the given gz-file - * stream. + * @param resource $stream + * @param string $data + * @param int|null $length + * @return int * @throws ZlibException * */ @@ -512,10 +313,8 @@ function gzwrite($stream, string $data, ?int $length = null): int /** - * - * * @param \InflateContext $context - * @return int Returns number of bytes read so far. + * @return int * @throws ZlibException * */ @@ -531,10 +330,8 @@ function inflate_get_read_len(\InflateContext $context): int /** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * * @param \InflateContext $context - * @return false|int Returns decompression status. + * @return false|int * */ function inflate_get_status(\InflateContext $context) @@ -546,23 +343,10 @@ function inflate_get_status(\InflateContext $context) /** - * Incrementally inflates encoded data in the specified context. - * - * Limitation: header information from GZIP compressed data are not made - * available. - * - * @param \InflateContext $context A context created with inflate_init. - * @param string $data A chunk of compressed data. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of uncompressed data. + * @param \InflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -578,73 +362,9 @@ function inflate_add(\InflateContext $context, string $data, int $flush_mode = Z /** - * Initialize an incremental inflate context with the specified - * encoding. - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \InflateContext Returns an inflate context resource (zlib.inflate) on - * success. + * @param int $encoding + * @param array $options + * @return \InflateContext * @throws ZlibException * */ @@ -660,17 +380,9 @@ function inflate_init(int $encoding, array $options = []): \InflateContext /** - * Reads a file, decompresses it and writes it to standard output. - * - * readgzfile can be used to read a file which is not in - * gzip format; in this case readgzfile will directly - * read from the file without decompression. - * - * @param string $filename The file name. This file will be opened from the filesystem and its - * contents written to standard output. - * @param $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return 0|positive-int Returns the number of (uncompressed) bytes read from the file on success + * @param string $filename + * @param $use_include_path + * @return 0|positive-int * @throws ZlibException * */ @@ -686,11 +398,9 @@ function readgzfile(string $filename, $use_include_path = 0): int /** - * Uncompress any raw/gzip/zlib encoded data. - * * @param string $data * @param int $max_length - * @return string Returns the uncompressed data. + * @return string * @throws ZlibException * */ diff --git a/generated/8.5/apache.php b/generated/8.5/apache.php index e4e25b69..56bba47d 100644 --- a/generated/8.5/apache.php +++ b/generated/8.5/apache.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ApacheException; /** - * Fetch the Apache version. - * - * @return string Returns the Apache version on success. + * @return string * @throws ApacheException * */ @@ -23,12 +21,9 @@ function apache_get_version(): string /** - * Retrieve an Apache environment variable specified by - * variable. - * - * @param string $variable The Apache environment variable - * @param bool $walk_to_top Whether to get the top-level variable available to all Apache layers. - * @return string The value of the Apache environment variable on success + * @param string $variable + * @param bool $walk_to_top + * @return string * @throws ApacheException * */ @@ -44,39 +39,8 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string /** - * This performs a partial request for a URI. It goes just far - * enough to obtain all the important information about the given - * resource. - * - * @param string $filename The filename (URI) that's being requested. - * @return object An object of related URI information. The properties of - * this object are: - * - * - * status - * the_request - * status_line - * method - * content_type - * handler - * uri - * filename - * path_info - * args - * boundary - * no_cache - * no_local_copy - * allowed - * send_bodyct - * bytes_sent - * byterange - * clength - * unparsed_uri - * mtime - * request_time - * - * - * Returns FALSE on failure. + * @param string $filename + * @return object * @throws ApacheException * */ @@ -92,10 +56,7 @@ function apache_lookup_uri(string $filename): object /** - * Fetches all HTTP request headers from the current request. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array|false An associative array of all the HTTP headers in the current request. + * @return array|false * */ function apache_request_headers() @@ -107,10 +68,7 @@ function apache_request_headers() /** - * Fetch all HTTP response headers. Works in the - * Apache, FastCGI, CLI, and FPM webservers. - * - * @return array|false An array of all Apache response headers on success. + * @return array|false * */ function apache_response_headers() @@ -122,13 +80,9 @@ function apache_response_headers() /** - * apache_setenv sets the value of the Apache - * environment variable specified by - * variable. - * - * @param string $variable The environment variable that's being set. - * @param string $value The new variable value. - * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. + * @param string $variable + * @param string $value + * @param bool $walk_to_top * @throws ApacheException * */ @@ -143,13 +97,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals /** - * Fetches all HTTP headers from the current request. - * - * This function is an alias for apache_request_headers. - * Please read the apache_request_headers - * documentation for more information on how this function works. - * - * @return array An associative array of all the HTTP headers in the current request. + * @return array * */ function getallheaders(): array @@ -161,19 +109,7 @@ function getallheaders(): array /** - * virtual is an Apache-specific function which - * is similar to <!--#include virtual...--> in - * mod_include. - * It performs an Apache sub-request. It is useful for including - * CGI scripts or .shtml files, or anything else that you would - * parse through Apache. Note that for a CGI script, the script - * must generate valid CGI headers. At the minimum that means it - * must generate a Content-Type header. - * - * To run the sub-request, all buffers are terminated and flushed to the - * browser, pending headers are sent too. - * - * @param string $uri The file that the virtual command will be performed on. + * @param string $uri * @throws ApacheException * */ diff --git a/generated/8.5/apcu.php b/generated/8.5/apcu.php index a8ec70b4..f47fec43 100644 --- a/generated/8.5/apcu.php +++ b/generated/8.5/apcu.php @@ -5,12 +5,8 @@ use Safe\Exceptions\ApcuException; /** - * Retrieves cached information and meta-data from APC's data store. - * - * @param bool $limited If limited is TRUE, the - * return value will exclude the individual list of cache entries. This - * is useful when trying to optimize calls for statistics gathering. - * @return array Array of cached data (and meta-data) + * @param bool $limited + * @return array * @throws ApcuException * */ @@ -26,13 +22,9 @@ function apcu_cache_info(bool $limited = false): array /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value - * with the value of the new parameter. - * - * @param string $key The key of the value being updated. - * @param int $old The old value (the value currently stored). - * @param int $new The new value to update to. + * @param string $key + * @param int $old + * @param int $new * @throws ApcuException * */ @@ -47,14 +39,11 @@ function apcu_cas(string $key, int $old, int $new): void /** - * Decreases a stored integer value. - * - * @param string $key The key of the value being decreased. - * @param int $step The step, or value to decrease. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -70,14 +59,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Increases a stored number. - * - * @param string $key The key of the value being increased. - * @param int $step The step, or value to increase. - * @param bool|null $success Optionally pass the success or fail boolean value to - * this referenced variable. - * @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one). - * @return int Returns the current value of key's value on success + * @param string $key + * @param int $step + * @param bool|null $success + * @param int $ttl + * @return int * @throws ApcuException * */ @@ -93,11 +79,8 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = /** - * Retrieves APCu Shared Memory Allocation information. - * - * @param bool $limited When set to FALSE (default) apcu_sma_info will - * return a detailed information about each segment. - * @return array Array of Shared Memory Allocation data; FALSE on failure. + * @param bool $limited + * @return array * @throws ApcuException * */ diff --git a/generated/8.5/array.php b/generated/8.5/array.php index addd5cb3..d539303b 100644 --- a/generated/8.5/array.php +++ b/generated/8.5/array.php @@ -5,20 +5,8 @@ use Safe\Exceptions\ArrayException; /** - * array_all returns TRUE, if the given - * callback returns TRUE for all elements. - * Otherwise the function returns FALSE. - * - * @param array $array The array that should be searched. - * @param callable $callback The callback function to call to check each element, which must be - * - * boolcallback - * mixedvalue - * mixedkey - * - * If this function returns FALSE, FALSE is returned from - * array_all and the callback will not be called for - * further elements. + * @param array $array + * @param callable $callback * @throws ArrayException * */ @@ -33,14 +21,9 @@ function array_all(array $array, callable $callback): void /** - * Creates an array by using the values from the - * keys array as keys and the values from the - * values array as the corresponding values. - * - * @param array $keys Array of keys to be used. Illegal values for key will be - * converted to string. - * @param array $values Array of values to be used - * @return array Returns the combined array. + * @param array $keys + * @param array $values + * @return array * */ function array_combine(array $keys, array $values): array @@ -52,21 +35,8 @@ function array_combine(array $keys, array $values): array /** - * array_flip returns an array in flip - * order, i.e. keys from array become values and values - * from array become keys. - * - * Note that the values of array need to be valid - * keys, i.e. they need to be either int or - * string. A warning will be emitted if a value has the wrong - * type, and the key/value pair in question will not be included - * in the result. - * - * If a value has several occurrences, the latest key will be - * used as its value, and all others will be lost. - * - * @param array $array An array of key/value pairs to be flipped. - * @return array Returns the flipped array. + * @param array $array + * @return array * */ function array_flip(array $array): array @@ -78,27 +48,9 @@ function array_flip(array $array): array /** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second array - * are both arrays, array_replace_recursive will replace - * their respective value recursively. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace_recursive(array $array, array ...$replacements): array @@ -114,17 +66,9 @@ function array_replace_recursive(array $array, array ...$replacements): array /** - * array_replace creates a new array and assigns items into - * it for each key in each of the provided arrays. If a key appears in multiple - * input arrays, the value from the right-most input array will be used. - * - * array_replace does not process elements items recursively, - * it replaces the entire value for each key when it does a replacement. - * - * @param array $array The array in which elements are replaced. - * @param array $replacements Arrays from which elements will be extracted. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. + * @param array $array + * @param array $replacements + * @return array * */ function array_replace(array $array, array ...$replacements): array @@ -140,25 +84,10 @@ function array_replace(array $array, array ...$replacements): array /** - * Applies the user-defined callback function to each - * element of the array. This function will recurse - * into deeper arrays. - * - * @param array|object $array The input array. - * @param callable $callback Typically, callback takes on two parameters. - * The array parameter's value being the first, and - * the key/index second. - * - * If callback needs to be working with the - * actual values of the array, specify the first parameter of - * callback as a - * reference. Then, - * any changes made to those elements will be made in the - * original array itself. - * @param mixed $arg If the optional arg parameter is supplied, - * it will be passed as the third parameter to the - * callback. - * @return bool Always returns TRUE. + * @param array|object $array + * @param callable $callback + * @param mixed $arg + * @return bool * */ function array_walk_recursive(&$array, callable $callback, $arg = null): bool @@ -174,10 +103,8 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): bool /** - * This function shuffles (randomizes the order of the elements in) an array. - * - * @param array $array The array. - * @return bool Always returns TRUE. + * @param array $array + * @return bool * */ function shuffle(array &$array): bool diff --git a/generated/8.5/bzip2.php b/generated/8.5/bzip2.php index 2ac21619..6205be66 100644 --- a/generated/8.5/bzip2.php +++ b/generated/8.5/bzip2.php @@ -5,10 +5,7 @@ use Safe\Exceptions\Bzip2Exception; /** - * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -23,12 +20,7 @@ function bzclose($bz): void /** - * This function is supposed to force a write of all buffered bzip2 data for the file pointer - * bz, - * but is implemented as null function in libbz2, and as such does nothing. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. + * @param resource $bz * @throws Bzip2Exception * */ @@ -43,14 +35,9 @@ function bzflush($bz): void /** - * bzopen opens a bzip2 (.bz2) file for reading or - * writing. - * - * @param resource|string $file The name of the file to open, or an existing stream resource. - * @param string $mode The modes 'r' (read), and 'w' (write) are supported. - * Everything else will cause bzopen to return FALSE. - * @return resource If the open fails, bzopen returns FALSE, otherwise - * it returns a pointer to the newly opened file. + * @param resource|string $file + * @param string $mode + * @return resource * @throws Bzip2Exception * */ @@ -66,17 +53,9 @@ function bzopen($file, string $mode) /** - * bzread reads from the given bzip2 file pointer. - * - * Reading stops when length (uncompressed) bytes have - * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param int $length 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 Returns the uncompressed data. + * @param resource $bz + * @param int $length + * @return string * @throws Bzip2Exception * */ @@ -92,16 +71,10 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file - * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file - * successfully opened by bzopen. - * @param string $data The written data. - * @param int|null $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of - * data is reached, whichever comes first. - * @return int Returns the number of bytes written. + * @param resource $bz + * @param string $data + * @param int|null $length + * @return int * @throws Bzip2Exception * */ diff --git a/generated/8.5/calendar.php b/generated/8.5/calendar.php index bdbe04db..f426ef08 100644 --- a/generated/8.5/calendar.php +++ b/generated/8.5/calendar.php @@ -5,13 +5,8 @@ use Safe\Exceptions\CalendarException; /** - * Return the Julian Day for a Unix timestamp - * (seconds since 1.1.1970), or for the current day if no - * timestamp is given. Either way, the time is regarded - * as local time (not UTC). - * - * @param int|null $timestamp A unix timestamp to convert. - * @return int A julian day number as integer. + * @param int|null $timestamp + * @return int * @throws CalendarException * */ diff --git a/generated/8.5/classobj.php b/generated/8.5/classobj.php index d2ca82d1..4f70129b 100644 --- a/generated/8.5/classobj.php +++ b/generated/8.5/classobj.php @@ -5,14 +5,9 @@ use Safe\Exceptions\ClassobjException; /** - * Creates an alias named alias - * based on the user defined class class. - * The aliased class is exactly the same as the original class. - * - * @param string $class The original class. - * @param string $alias The alias name for the class. - * @param bool $autoload Whether to autoload - * if the original class is not found. + * @param string $class + * @param string $alias + * @param bool $autoload * @throws ClassobjException * */ diff --git a/generated/8.5/com.php b/generated/8.5/com.php index 18313855..81ba5b88 100644 --- a/generated/8.5/com.php +++ b/generated/8.5/com.php @@ -5,12 +5,7 @@ use Safe\Exceptions\ComException; /** - * Generates a Globally Unique Identifier (GUID). - * - * A GUID is generated in the same way as DCE UUID's, except that the - * Microsoft convention is to enclose a GUID in curly braces. - * - * @return string Returns the GUID as a string. + * @return string * @throws ComException * */ @@ -26,24 +21,9 @@ function com_create_guid(): string /** - * Instructs COM to sink events generated by - * variant into the PHP object - * sink_object. - * - * Be careful how you use this feature; if you are doing something similar - * to the example below, then it doesn't really make sense to run it in a - * web server context. - * * @param object $variant - * @param object $sink_object sink_object should be an instance of a class with - * methods named after those of the desired dispinterface; you may use - * com_print_typeinfo to help generate a template class - * for this purpose. - * @param mixed $sink_interface PHP will attempt to use the default dispinterface type specified by - * the typelibrary associated with variant, but - * you may override this choice by setting - * sink_interface to the name of the dispinterface - * that you want to use. + * @param object $sink_object + * @param mixed $sink_interface * @throws ComException * */ @@ -62,54 +42,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = /** - * Loads a type-library and registers its constants in the engine, as though - * they were defined using define. - * - * Note that it is much more efficient to use the com.typelib-file php.ini setting to pre-load and - * register the constants, although not so flexible. - * - * If com.autoregister-typelib is turned on, then - * PHP will attempt to automatically register the constants associated with a - * COM object when you instantiate it. This depends on the interfaces - * provided by the COM object itself, and may not always be possible. - * - * @param string $typelib typelib can be one of the following: - * - * - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * - * - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * - * - * - * PHP will attempt to resolve the type library in this order, as the - * process gets more and more expensive as you progress down the list; - * searching for the type library by name is handled by physically - * enumerating the registry until we find a match. - * - * The filename of a .tlb file or the executable module - * that contains the type library. - * - * The type library GUID, followed by its version number, for example - * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * The type library name, e.g. Microsoft OLE DB ActiveX Data - * Objects 1.0 Library. - * @param bool $case_insensitive The case_insensitive behaves inversely to - * the parameter $case_insensitive in the define - * function. + * @param string $typelib + * @param bool $case_insensitive * @throws ComException * */ @@ -124,17 +58,9 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void /** - * The purpose of this function is to help generate a skeleton class for use - * as an event sink. You may also use it to generate a dump of any COM - * object, provided that it supports enough of the introspection interfaces, - * and that you know the name of the interface you want to display. - * - * @param object $variant variant should be either an instance of a COM - * object, or be the name of a typelibrary (which will be resolved according - * to the rules set out in com_load_typelib). - * @param null|string $dispatch_interface The name of an IDispatch descendant interface that you want to display. - * @param bool $display_sink If set to TRUE, the corresponding sink interface will be displayed - * instead. + * @param object $variant + * @param null|string $dispatch_interface + * @param bool $display_sink * @throws ComException * */ @@ -155,12 +81,8 @@ function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, /** - * Converts variant from a VT_DATE - * (or similar) value into a Unix timestamp. This allows easier - * interopability between the Unix-ish parts of PHP and COM. - * - * @param object $variant The variant. - * @return int Returns a unix timestamp. + * @param object $variant + * @return int * @throws ComException * */ @@ -176,12 +98,9 @@ function variant_date_to_timestamp(object $variant): int /** - * Returns the value of value rounded to - * decimals decimal places. - * - * @param mixed $value The variant. - * @param int $decimals Number of decimal places. - * @return mixed Returns the rounded value. + * @param mixed $value + * @param int $decimals + * @return mixed * @throws ComException * */ diff --git a/generated/8.5/cubrid.php b/generated/8.5/cubrid.php index 423f0cc5..40c5f695 100644 --- a/generated/8.5/cubrid.php +++ b/generated/8.5/cubrid.php @@ -5,122 +5,10 @@ use Safe\Exceptions\CubridException; /** - * The cubrid_bind function is used to bind values to a - * corresponding named or question mark placeholder in the SQL statement that - * was passed to cubrid_prepare. If - * bind_value_type is not given, string will be the - * default. - * - * The following table shows the types of substitute values. - * - * - * CUBRID Bind Date Types - * - * - * - * Support - * Bind Type - * Corresponding SQL Type - * - * - * - * - * Supported - * STRING - * CHAR, VARCHAR - * - * - * - * NCHAR - * NCHAR, NVARCHAR - * - * - * - * BIT - * BIT, VARBIT - * - * - * - * NUMERIC or NUMBER - * SHORT, INT, NUMERIC - * - * - * - * FLOAT - * FLOAT - * - * - * - * DOUBLE - * DOUBLE - * - * - * - * TIME - * TIME - * - * - * - * DATE - * DATE - * - * - * - * TIMESTAMP - * TIMESTAMP - * - * - * - * OBJECT - * OBJECT - * - * - * - * ENUM - * ENUM - * - * - * - * BLOB - * BLOB - * - * - * - * CLOB - * CLOB - * - * - * - * NULL - * NULL - * - * - * Not supported - * SET - * SET - * - * - * - * MULTISET - * MULTISET - * - * - * - * SEQUENCE - * SEQUENCE - * - * - * - * - * - * @param resource $req_identifier Request identifier as a result of - * cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type A type of the value to bind. (It is omitted by default. - * Thus, the system internally uses string by default. However, you need to - * specify the exact type of the value as an argument when they are NCHAR, - * BIT, or BLOB/CLOB). + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -139,14 +27,10 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bin /** - * The cubrid_col_size function is used to get the - * number of elements in a collection type (set, multiset, sequence) - * attribute. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID the instance that you want to work with. - * @param string $attr_name Name of the attribute that you want to work with. - * @return int Number of elements, when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @return int * @throws CubridException * */ @@ -162,11 +46,8 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int /** - * The cubrid_column_names function is used to get the - * column names of the query result by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column names, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -182,11 +63,8 @@ function cubrid_column_names($req_identifier): array /** - * The cubrid_column_types function gets column types of - * query results by using req_identifier. - * - * @param resource $req_identifier Request identifier. - * @return array Array of string values containing the column types, when process is successful. + * @param resource $req_identifier + * @return array * @throws CubridException * */ @@ -202,18 +80,7 @@ function cubrid_column_types($req_identifier): array /** - * The cubrid_commit function is used to execute commit - * on the transaction pointed by conn_identifier, - * currently in progress. Connection to the server is closed after the - * cubrid_commit function is called; However, - * the connection handle is still valid. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction management. - * You can set it by using cubrid_set_autocommit. - * You can get its status by using cubrid_get_autocommit. Before you start a transaction, - * remember to disable the auto-commit mode. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -228,78 +95,11 @@ function cubrid_commit($conn_identifier): void /** - * The cubrid_connect_with_url function is used to - * establish the environment for connecting to your server by using connection - * information passed with an url string argument. If the HA feature is - * enabled in CUBRID, you must specify the connection information of the - * standby server, which is used for failover when failure occurs, in the url - * string argument of this function. If the user name and password is not - * given, then the "PUBLIC" connection will be made by default. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @param bool $new_link If a second call is made to - * cubrid_connect_with_url with the same arguments, - * no new connection will be established, but instead, the connection - * identifier of the already opened connection will be returned. The - * new_link parameter modifies this behavior and - * makes cubrid_connect_with_url always open a new - * connection, even if cubrid_connect_with_url was - * called before with the same parameters. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -323,27 +123,13 @@ function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?stri /** - * The cubrid_connect function is used to establish the - * environment for connecting to your server by using your server address, - * port number, database name, user name, and password. If the user name and - * password is not given, then the "PUBLIC" connection will be made by - * default. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. If not given, the default - * value is "public". - * @param string $passwd User password. If not given, the default value is "". - * @param bool $new_link If a second call is made to - * cubrid_connect with the same arguments, no new - * connection will be established, but instead, the connection identifier - * of the already opened connection will be 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 Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @param bool $new_link + * @return resource * @throws CubridException * */ @@ -367,14 +153,8 @@ function cubrid_connect(string $host, int $port, string $dbname, ?string $userid /** - * The cubrid_current_oid function is used to get the - * oid of the current cursor location from the query result. To use - * cubrid_current_oid, the query executed must be a - * updatable query, and the CUBRID_INCLUDE_OID option must be included during - * the query execution. - * - * @param resource $req_identifier Request identifier. - * @return string Oid of current cursor location, when process is successful. + * @param resource $req_identifier + * @return string * @throws CubridException * */ @@ -390,11 +170,7 @@ function cubrid_current_oid($req_identifier): string /** - * The cubrid_disconnect function closes the connection - * handle and disconnects from server. If any request handle is not closed at this point, - * it will be closed. It is similar to the CUBRID MySQL compatible function cubrid_close. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -413,11 +189,8 @@ function cubrid_disconnect($conn_identifier = null): void /** - * The cubrid_drop function is used to delete an - * instance from database by using the oid of the instance. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid Oid of the instance that you want to delete. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -432,12 +205,7 @@ function cubrid_drop($conn_identifier, string $oid): void /** - * This function frees the memory occupied by the result data. It returns - * TRUE on success. Note that it can only frees the - * client fetch buffer now, and if you want free all memory, use function - * cubrid_close_request. - * - * @param resource $req_identifier This is the request identifier. + * @param resource $req_identifier * @throws CubridException * */ @@ -452,12 +220,8 @@ function cubrid_free_result($req_identifier): void /** - * This function returns the current CUBRID connection charset and is similar - * to the CUBRID MySQL compatible function - * cubrid_client_encoding. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID connection charset on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -473,13 +237,9 @@ function cubrid_get_charset($conn_identifier): string /** - * The cubrid_get_class_name function is used to get the - * class name from oid. It doesn't work when selecting data from the system tables, - * for example db_class. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to check the existence. - * @return string Class name when process is successful. + * @param resource $conn_identifier + * @param string $oid + * @return string * @throws CubridException * */ @@ -495,9 +255,7 @@ function cubrid_get_class_name($conn_identifier, string $oid): string /** - * This function returns a string that represents the client library version. - * - * @return string A string that represents the client library version on success. + * @return string * @throws CubridException * */ @@ -513,115 +271,8 @@ function cubrid_get_client_info(): string /** - * This function returns the CUBRID database parameters. - * It returns an associative array with the values for the following parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * PARAM_MAX_STRING_LENGTH - * PARAM_AUTO_COMMIT - * - * - * - * Database parameters - * - * - * - * Parameter - * Description - * - * - * - * - * PARAM_ISOLATION_LEVEL - * The transaction isolation level. - * - * - * LOCK_TIMEOUT - * CUBRID provides the lock timeout feature, which sets the waiting - * time (in seconds) for the lock until the transaction lock setting is - * allowed. The default value of the lock_timeout_in_secs parameter is - * -1, which means the application client will wait indefinitely until - * the transaction lock is allowed. - * - * - * - * PARAM_AUTO_COMMIT - * In CUBRID PHP, auto-commit mode is disabled by default for - * transaction management. It can be set by using - * cubrid_set_autocommit. - * - * - * - * - * - * - * The following table shows the isolation levels from 1 to 6. It consists of - * table schema (row) and isolation level: - * - * Levels of Isolation Supported by CUBRID - * - * - * - * Name - * Description - * - * - * - * - * SERIALIZABLE (6) - * In this isolation level, problems concerning concurrency (e.g. - * dirty read, non-repeatable read, phantom read, etc.) do not - * occur. - * - * - * REPEATABLE READ CLASS with REPEATABLE READ INSTANCES (5) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience phantom read for the record R that was - * inserted by another transaction T2 when it is repeatedly retrieving a - * specific record. - * - * - * REPEATABLE READ CLASS with READ COMMITTED INSTANCES (or CURSOR STABILITY) (4) - * Another transaction T2 cannot update the schema of table A while - * transaction T1 is viewing table A. - * Transaction T1 may experience R read (non-repeatable read) that was - * updated and committed by another transaction T2 when it is repeatedly - * retrieving the record R. - * - * - * REPEATABLE READ CLASS with READ UNCOMMITTED INSTANCES (3) - * Default isolation level. Another transaction T2 cannot update - * the schema of table A while transaction T1 is viewing table A. - * Transaction T1 may experience R' read (dirty read) for the record that - * was updated but not committed by another transaction T2. - * - * - * READ COMMITTED CLASS with READ COMMITTED INSTANCES (2) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is viewing table A repeatedly. Transaction T1 may experience - * R' read (non-repeatable read) for the record that was updated and - * committed by another transaction T2 while it is retrieving the record - * R repeatedly. - * - * - * READ COMMITTED CLASS with READ UNCOMMITTED INSTANCES (1) - * Transaction T1 may experience A' read (non-repeatable read) for - * the table that was updated and committed by another transaction T2 - * while it is repeatedly viewing table A. Transaction T1 may experience - * R' read (dirty read) for the record that was updated but not committed - * by another transaction T2. - * - * - * - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @return array An associative array with CUBRID database parameters; on success. + * @param resource $conn_identifier + * @return array * @throws CubridException * */ @@ -637,11 +288,8 @@ function cubrid_get_db_parameter($conn_identifier): array /** - * The cubrid_get_query_timeout function is used to get - * the query timeout of the request. - * - * @param resource $req_identifier Request identifier. - * @return int Returns the query timeout value in milliseconds of the current request on success. + * @param resource $req_identifier + * @return int * @throws CubridException * */ @@ -657,10 +305,8 @@ function cubrid_get_query_timeout($req_identifier): int /** - * This function returns a string that represents the CUBRID server version. - * - * @param resource $conn_identifier The CUBRID connection. - * @return string A string that represents the CUBRID server version on success. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -676,19 +322,8 @@ function cubrid_get_server_info($conn_identifier): string /** - * The cubrid_insert_id function retrieves the ID - * generated for the AUTO_INCREMENT column which is updated by the previous - * INSERT query. It returns 0 if the previous query does not generate new - * rows. - * - * @param resource $conn_identifier The connection identifier previously obtained by a call to - * cubrid_connect. - * @return string A string representing the ID generated for an AUTO_INCREMENT column by the - * previous query, on success. - * - * 0, if the previous query does not generate new rows. - * - * FALSE on failure. + * @param resource $conn_identifier + * @return string * @throws CubridException * */ @@ -708,10 +343,7 @@ function cubrid_insert_id($conn_identifier = null): string /** - * cubrid_lob_close is used to close all BLOB/CLOB - * returned from cubrid_lob_get. - * - * @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get. + * @param array $lob_identifier_array * @throws CubridException * */ @@ -726,12 +358,9 @@ function cubrid_lob_close(array $lob_identifier_array): void /** - * cubrid_lob_export is used to get BLOB/CLOB data from CUBRID database, and saves its contents to a file. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. - * @param string $path_name Path name of the file. + * @param resource $conn_identifier + * @param resource $lob_identifier + * @param string $path_name * @throws CubridException * */ @@ -746,15 +375,9 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) /** - * cubrid_lob_get is used to get BLOB/CLOB meta info from CUBRID database, - * CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. - * Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. - * - * Remember to use cubrid_lob_close to release the LOBs if you don't need it any more. - * - * @param resource $conn_identifier Connection identifier. - * @param string $sql SQL statement to be executed. - * @return array Return an array of LOB resources, when process is successful. + * @param resource $conn_identifier + * @param string $sql + * @return array * @throws CubridException * */ @@ -770,11 +393,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array /** - * cubrid_lob_send reads BLOB/CLOB data and passes it straight through to the browser. - * To use this function, you must use cubrid_lob_get first to get BLOB/CLOB info from CUBRID. - * - * @param resource $conn_identifier Connection identifier. - * @param resource $lob_identifier LOB identifier. + * @param resource $conn_identifier + * @param resource $lob_identifier * @throws CubridException * */ @@ -789,10 +409,8 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void /** - * cubrid_lob_size is used to get BLOB/CLOB data size. - * - * @param resource $lob_identifier LOB identifier. - * @return string A string representing LOB data size, when process is successful. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -808,17 +426,10 @@ function cubrid_lob_size($lob_identifier): string /** - * The cubrid_lob2_bind function is used to bind BLOB/CLOB datas - * to a corresponding question mark placeholder in the SQL statement that was passed - * to cubrid_prepare. If bind_value_type - * is not given, string will be "BLOB" as the default. But if you use - * cubrid_lob2_new before, bind_value_type - * will be consistent with type in cubrid_lob2_new as the default. - * - * @param resource $req_identifier Request identifier as a result of cubrid_prepare. - * @param int $bind_index Location of binding parameters. It starts with 1. - * @param mixed $bind_value Actual value for binding. - * @param string $bind_value_type It must be "BLOB" or "CLOB" and it won't be case-sensitive. If it not be given, the default value is "BLOB". + * @param resource $req_identifier + * @param int $bind_index + * @param mixed $bind_value + * @param string $bind_value_type * @throws CubridException * */ @@ -837,10 +448,7 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string /** - * The cubrid_lob2_close function is used to close LOB object - * returned from cubrid_lob2_new or got from the result set. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. + * @param resource $lob_identifier * @throws CubridException * */ @@ -855,15 +463,8 @@ function cubrid_lob2_close($lob_identifier): void /** - * The cubrid_lob2_export function is used to save the - * contents of BLOB/CLOB data to a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID - * database first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to store BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -878,15 +479,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void /** - * The cubrid_lob2_import function is used to save the - * contents of BLOB/CLOB data from a file. To use this function, you must use - * cubrid_lob2_new or fetch a lob object from CUBRID database - * first. If the file already exists, the operation will fail. - * This function will not influence the cursor position of the lob object. - * It operates the entire lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $file_name File name you want to import BLOB/CLOB data. It also supports the path of the file. + * @param resource $lob_identifier + * @param string $file_name * @throws CubridException * */ @@ -901,14 +495,9 @@ function cubrid_lob2_import($lob_identifier, string $file_name): void /** - * The cubrid_lob2_new function is used to create a lob object (both BLOB and CLOB). - * This function should be used before you bind a lob object. - * - * @param resource $conn_identifier Connection identifier. If the connection identifier is not specified, - * the last connection opened by cubrid_connect or - * cubrid_connect_with_url is assumed. - * @param string $type It may be "BLOB" or "CLOB", it won't be case-sensitive. The default value is "BLOB". - * @return resource Lob identifier when it is successful. + * @param resource $conn_identifier + * @param string $type + * @return resource * @throws CubridException * */ @@ -930,12 +519,9 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") /** - * The cubrid_lob2_read function reads len bytes from the - * LOB data and returns the bytes read. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $len Length from buffer you want to read from the lob data. - * @return string Returns the contents as a string, FALSE when there is no more data. + * @param resource $lob_identifier + * @param int $len + * @return string * @throws CubridException * */ @@ -951,30 +537,9 @@ function cubrid_lob2_read($lob_identifier, int $len): string /** - * The cubrid_lob2_seek function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move - * backward offset units from the end of LOB object and - * offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param int $offset + * @param int $origin * @throws CubridException * */ @@ -989,31 +554,9 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR /** - * The cubrid_lob2_seek64 function is used to move the cursor - * position of a lob object by the value set in the offset - * argument, to the direction set in the origin argument. - * If the offset you want to move is larger than an integer - * data can be stored, you can use this function. - * - * To set the origin argument, you can use CUBRID_CURSOR_FIRST - * to set the cursor position moving forward offset units from - * the first beginning. In this case, offset must be a positive value. - * - * If you use CUBRID_CURSOR_CURRENT for origin, you can move - * forward or backward. and offset can be positive or negative. - * - * If you use CUBRID_CURSOR_LAST for origin, you can move backward - * offset units from the end of LOB object and offset only can be positive. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $offset Number of units you want to move the cursor. - * @param int $origin This parameter can be the following values: - * - * CUBRID_CURSOR_FIRST: move forward from the first beginning. - * - * CUBRID_CURSOR_CURRENT: move forward or backward from the current position. - * - * CUBRID_CURSOR_LAST: move backward at the end of LOB object. + * @param resource $lob_identifier + * @param string $offset + * @param int $origin * @throws CubridException * */ @@ -1028,10 +571,8 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI /** - * The cubrid_lob2_size function is used to get the size of a lob object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the size of the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1047,13 +588,8 @@ function cubrid_lob2_size($lob_identifier): int /** - * The cubrid_lob2_size64 function is used to get the - * size of a lob object. If the size of a lob object is larger than an - * integer data can be stored, you can use this function and it will return - * the size as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the size of the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1069,10 +605,8 @@ function cubrid_lob2_size64($lob_identifier): string /** - * The cubrid_lob2_tell function is used to tell the cursor position of the LOB object. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return int It will return the cursor position on the LOB object when it processes successfully. + * @param resource $lob_identifier + * @return int * @throws CubridException * */ @@ -1088,13 +622,8 @@ function cubrid_lob2_tell($lob_identifier): int /** - * The cubrid_lob2_tell64 function is used to tell the - * cursor position of the LOB object. If the size of a lob object is larger - * than an integer data can be stored, you can use this function and it will - * return the position information as a string. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @return string It will return the cursor position on the LOB object as a string when it processes successfully. + * @param resource $lob_identifier + * @return string * @throws CubridException * */ @@ -1110,12 +639,8 @@ function cubrid_lob2_tell64($lob_identifier): string /** - * The cubrid_lob2_write function reads as much as data - * from buf and stores it to the LOB object. Note that - * this function can only append characters now. - * - * @param resource $lob_identifier Lob identifier as a result of cubrid_lob2_new or get from the result set. - * @param string $buf Data that need to be written to the lob object. + * @param resource $lob_identifier + * @param string $buf * @throws CubridException * */ @@ -1130,11 +655,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void /** - * The cubrid_lock_read function is used to put read - * lock on the instance pointed by given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put read lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1149,11 +671,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void /** - * The cubrid_lock_write function is used to put write - * lock on the instance pointed by the given oid. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to put write lock on. + * @param resource $conn_identifier + * @param string $oid * @throws CubridException * */ @@ -1168,26 +687,10 @@ function cubrid_lock_write($conn_identifier, string $oid): void /** - * The cubrid_move_cursor function is used to move the - * current cursor location of req_identifier by the - * value set in the offset argument, to the direction - * set in the origin argument. To set the - * origin argument, you can use CUBRID_CURSOR_FIRST - * for the first part of the result, CUBRID_CURSOR_CURRENT for the current - * location of the result, or CUBRID_CURSOR_LAST for the last part of the - * result. If origin argument is not explicitly - * designated, then the function uses CUBRID_CURSOR_CURRENT as its default - * value. - * - * If the value of cursor movement range goes over the valid limit, then the - * cursor moves to the next location after the valid range for the cursor. - * For example, if you move 20 units in the result with the size of 10, then - * the cursor will move to 11th place and return CUBRID_NO_MORE_DATA. - * - * @param resource $req_identifier Request identifier. - * @param int $offset Number of units you want to move the cursor. - * @param int $origin Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST. - * @return int Returns TRUE on success. + * @param resource $req_identifier + * @param int $offset + * @param int $origin + * @return int * @throws CubridException * */ @@ -1203,12 +706,7 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C /** - * The cubrid_next_result function is used to get - * results of next query if multiple SQL statements are executed and - * CUBRID_EXEC_QUERY_ALL flag is set upon - * cubrid_execute. - * - * @param resource $result result comes from a call to cubrid_execute + * @param resource $result * @throws CubridException * */ @@ -1223,80 +721,10 @@ function cubrid_next_result($result): void /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect_with_url acts very much like - * cubrid_connect_with_url with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect_with_url). - * - * This type of link is therefore called 'persistent'. - * - * <url> ::= CUBRID:<host>:<db_name>:<db_user>:<db_password>:[?<properties>] - * - * <properties> ::= <property> [&<property>] - * - * <properties> ::= alhosts=<alternative_hosts>[ &rctime=<time>] - * - * <properties> ::= login_timeout=<milli_sec> - * - * <properties> ::= query_timeout=<milli_sec> - * - * <properties> ::= disconnect_on_query_timeout=true|false - * - * <alternative_hosts> ::= <standby_broker1_host>:<port> [,<standby_broker2_host>:<port>] - * - * <host> := HOSTNAME | IP_ADDR - * - * <time> := SECOND - * - * <milli_sec> := MILLI SECOND - * - * - * host : A host name or IP address of the master database - * db_name : A name of the database - * db_user : A name of the database user - * db_password : A database user password - * - * alhosts : Specifies the broker information of the standby server, which is - * used for failover when it is impossible to connect to the active server. - * You can specify multiple brokers for failover, and the connection to the brokers - * is attempted in the order listed in alhosts - * - * rctime : An interval between the attempts to connect to the active broker in - * which failure occurred. After a failure occurs, the system connects to the - * broker specified by althosts (failover), terminates the transaction, and then - * attempts to connect to the active broker of the master database at every rctime. - * The default value is 600 seconds. - * - * login_timeout : Timeout value (unit: msec.) for database login. The default - * value is 0, which means infinite postponement. - * - * - * query_timeout : Timeout value (unit: msec.) for query request. Upon timeout, - * a message to cancel requesting a query transferred to server is sent. The return - * value can depend on the disconnect_on_query_timeout configuration; even though the - * message to cancel a request is sent to server, that request may succeed. - * - * - * disconnect_on_query_timeout : Configures a value whether to immediately return - * an error of function being executed upon timeout. The default value is false. - * - * - * - * @param string $conn_url A character string that contains server connection information. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $conn_url + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1318,30 +746,12 @@ function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?str /** - * Establishes a persistent connection to a CUBRID server. - * - * cubrid_pconnect acts very much like - * cubrid_connect with two major differences. - * - * First, when connecting, the function would first try to find a (persistent) - * link that's already open with the same host, port, dbname and userid. If - * one is found, an identifier for it will be returned instead of opening a - * new connection. - * - * Second, the connection to the SQL server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (cubrid_close or - * cubrid_disconnect will not close links established by - * cubrid_pconnect). - * - * This type of link is therefore called 'persistent'. - * - * @param string $host Host name or IP address of CUBRID CAS server. - * @param int $port Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf). - * @param string $dbname Name of database. - * @param string $userid User name for the database. - * @param string $passwd User password. - * @return resource Connection identifier, when process is successful. + * @param string $host + * @param int $port + * @param string $dbname + * @param string $userid + * @param string $passwd + * @return resource * @throws CubridException * */ @@ -1363,20 +773,10 @@ function cubrid_pconnect(string $host, int $port, string $dbname, ?string $useri /** - * The cubrid_prepare function is a sort of API which represents SQL statements - * compiled previously to a given connection handle. This pre-compiled SQL statement will be included - * in the cubrid_prepare. - * - * Accordingly, you can use this statement effectively to execute several times repeatedly or to - * process long data. Only a single statement can be used and a parameter may put a question mark (?) - * to appropriate area in the SQL statement. Add a parameter when you bind a value in the VALUES - * clause of INSERT statement or in the WHERE clause. Note that it is allowed to bind a value to a - * MARK(?) by using the cubrid_bind function only. - * - * @param resource $conn_identifier Connection identifier. - * @param string $prepare_stmt Prepare query. - * @param int $option OID return option CUBRID_INCLUDE_OID. - * @return resource Request identifier, if process is successful. + * @param resource $conn_identifier + * @param string $prepare_stmt + * @param int $option + * @return resource * @throws CubridException * */ @@ -1392,20 +792,10 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) /** - * The cubrid_put function is used to update an - * attribute of the instance of the given oid. - * - * You can update single attribute by using string data type to set - * attr. In such case, you can use integer, - * floating point or string type data for the value - * argument. To update multiple number of attributes, you can disregard the - * attr argument, and set - * value argument with associative array data type. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance that you want to update. - * @param string $attr Name of the attribute that you want to update. - * @param mixed $value New value that you want to assign to the attribute. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr + * @param mixed $value * @throws CubridException * */ @@ -1426,15 +816,7 @@ function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value /** - * The cubrid_rollback function executes rollback on the - * transaction pointed by conn_identifier, currently in - * progress. - * - * Connection to server is closed after calling - * cubrid_rollback. Connection handle, however, is - * still valid. - * - * @param resource $conn_identifier Connection identifier. + * @param resource $conn_identifier * @throws CubridException * */ @@ -1449,391 +831,11 @@ function cubrid_rollback($conn_identifier): void /** - * The cubrid_schema function is used to get the - * requested schema information from database. To get information about specific class, - * set the class_name, to get information about specific attribute - * (can be used only with CUBRID_SCH_ATTR_PRIVILEGE), - * set the attr_name. - * - * The result of the cubrid_schema function is returned as a two-dimensional - * array (column (associative array) * row (numeric array)). The following - * tables shows types of schema and the column structure of the result array to - * be returned based on the schema type. - * - * - * Result Composition of Each Type - * - * - * - * Schema - * Column Number - * Column Name - * Value - * - * - * - * - * CUBRID_SCH_CLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_VCLASS - * 1 - * NAME - * - * - * - * - * 2 - * TYPE - * 1:vclass - * - * - * - * CUBRID_SCH_QUERY_SPEC - * 1 - * QUERY_SPEC - * - * - * - * - * CUBRID_SCH_ATTRIBUTE / CUBRID_SCH_CLASS_ATTRIBUTE - * 1 - * ATTR_NAME - * - * - * - * - * 2 - * DOMAIN - * - * - * - * - * 3 - * SCALE - * - * - * - * - * 4 - * PRECISION - * - * - * - * - * 5 - * INDEXED - * 1:indexed - * - * - * - * 6 - * NOT NULL - * 1:not null - * - * - * - * 7 - * SHARED - * 1:shared - * - * - * - * 8 - * UNIQUE - * 1:unique - * - * - * - * 9 - * DEFAULT - * - * - * - * - * 10 - * ATTR_ORDER - * base:1 - * - * - * - * 11 - * CLASS_NAME - * - * - * - * - * 12 - * SOURCE_CLASS - * - * - * - * - * 13 - * IS_KEY - * 1:key - * - * - * - * CUBRID_SCH_METHOD / CUBRID_SCH_CLASS_METHOD - * 1 - * NAME - * - * - * - * - * 2 - * RET_DOMAIN - * - * - * - * - * 3 - * ARG_DOMAIN - * - * - * - * - * CUBRID_SCH_METHOD_FILE - * 1 - * METHOD_FILE - * - * - * - * - * CUBRID_SCH_SUPERCLASS / CUBRID_SCH_DIRECT_SUPER_CLASS / CUBRID_SCH_SUBCLASS - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * TYPE - * 0:system class 1:vclass 2:class - * - * - * - * CUBRID_SCH_CONSTRAINT - * 1 - * TYPE - * 0:unique 1:index 2:reverse unique 3:reverse index - * - * - * - * 2 - * NAME - * - * - * - * - * 3 - * ATTR_NAME - * - * - * - * - * 4 - * NUM_PAGES - * - * - * - * - * 5 - * NUM_KEYS - * - * - * - * - * 6 - * PRIMARY_KEY - * 1:primary key - * - * - * - * 7 - * KEY_ORDER - * base:1 - * - * - * - * CUBRID_SCH_TRIGGER - * 1 - * NAME - * - * - * - * - * 2 - * STATUS - * - * - * - * - * 3 - * EVENT - * - * - * - * - * 4 - * TARGET_CLASS - * - * - * - * - * 5 - * TARGET_ATTR - * - * - * - * - * 6 - * ACTION_TIME - * - * - * - * - * 7 - * ACTION - * - * - * - * - * 8 - * PRIORITY - * - * - * - * - * 9 - * CONDITION_TIME - * - * - * - * - * 10 - * CONDITION - * - * - * - * - * CUBRID_SCH_CLASS_PRIVILEGE / CUBRID_SCH_ATTR_PRIVILEGE - * 1 - * CLASS_NAME / ATTR_NAME - * - * - * - * - * 2 - * PRIVILEGE - * - * - * - * - * 3 - * GRANTABLE - * - * - * - * - * CUBRID_SCH_PRIMARY_KEY - * 1 - * CLASS_NAME - * - * - * - * - * 2 - * ATTR_NAME - * - * - * - * - * 3 - * KEY_SEQ - * base:1 - * - * - * - * 4 - * KEY_NAME - * - * - * - * - * CUBRID_SCH_IMPORTED_KEYS / CUBRID_SCH_EXPORTED_KEYS / CUBRID_SCH_CROSS_REFERENCE - * 1 - * PKTABLE_NAME - * - * - * - * - * 2 - * PKCOLUMN_NAME - * - * - * - * - * 3 - * FKTABLE_NAME - * base:1 - * - * - * - * 4 - * FKCOLUMN_NAME - * - * - * - * - * 5 - * KEY_SEQ - * base:1 - * - * - * - * 6 - * UPDATE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 7 - * DELETE_ACTION - * 0:cascade 1:restrict 2:no action 3:set null - * - * - * - * 8 - * FK_NAME - * - * - * - * - * 9 - * PK_NAME - * - * - * - * - * - * - * @param resource $conn_identifier Connection identifier. - * @param int $schema_type Schema data that you want to know. - * @param string $class_name Class you want to know the schema of. - * @param string $attr_name Attribute you want to know the schema of. - * @return array Array containing the schema information, when process is successful. + * @param resource $conn_identifier + * @param int $schema_type + * @param string $class_name + * @param string $attr_name + * @return array * @throws CubridException * */ @@ -1855,14 +857,10 @@ function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = /** - * The cubrid_seq_drop function is used to delete an - * element you request from the given sequence type attribute in the - * database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to delete an element from. - * @param int $index Index of the element that you want to delete (1-based). + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index * @throws CubridException * */ @@ -1877,14 +875,11 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ /** - * The cubrid_col_insert function is used to insert an - * element to a sequence type attribute in a requested location. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an instance to. - * @param int $index Location of the element, you want to insert the element to (1-based). - * @param string $seq_element Content of the element that you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1899,14 +894,11 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int /** - * The cubrid_seq_put function is used to update the - * content of the requested element in a sequent type attribute using OID. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute that you want to update an element. - * @param int $index Index (1-based) of the element that you want to update. - * @param string $seq_element New content that you want to use for the update. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param int $index + * @param string $seq_element * @throws CubridException * */ @@ -1921,14 +913,10 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i /** - * The cubrid_set_add function is used to insert a - * single element to a set type attribute (set, multiset, sequence) you - * requested. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to insert an element. - * @param string $set_element Content of the element you want to insert. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -1943,20 +931,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string /** - * The cubrid_set_autocommit function is used to set the - * CUBRID database auto-commit mode of the current database connection. - * - * In CUBRID PHP, auto-commit mode is disabled by default for transaction - * management. When auto-commit mode is truned from off to on, any pending work is - * automatically committed. - * - * @param resource $conn_identifier Connection identifier. - * @param bool $mode Auto-commit mode. The following constants can be used: - * - * - * CUBRID_AUTOCOMMIT_FALSE - * CUBRID_AUTOCOMMIT_TRUE - * + * @param resource $conn_identifier + * @param bool $mode * @throws CubridException * */ @@ -1971,19 +947,9 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void /** - * The cubrid_set_db_parameter function is used to set - * the CUBRID database parameters. It can set the following CUBRID database - * parameters: - * - * - * PARAM_ISOLATION_LEVEL - * PARAM_LOCK_TIMEOUT - * - * - * @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified, - * the last link opened by cubrid_connect is assumed. - * @param int $param_type Database parameter type. - * @param int $param_value Isolation level value (1-6) or lock timeout (in seconds) value. + * @param resource $conn_identifier + * @param int $param_type + * @param int $param_value * @throws CubridException * */ @@ -1998,14 +964,10 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v /** - * The cubrid_set_drop function is used to delete an - * element that you request from the given set type (set, multiset) attribute - * of the database. - * - * @param resource $conn_identifier Connection identifier. - * @param string $oid OID of the instance you want to work with. - * @param string $attr_name Name of the attribute you want to delete an element from. - * @param string $set_element Content of the element you want to delete. + * @param resource $conn_identifier + * @param string $oid + * @param string $attr_name + * @param string $set_element * @throws CubridException * */ @@ -2020,11 +982,8 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin /** - * The cubrid_set_query_timeout function is used to set - * the timeout time of query execution. - * - * @param resource $req_identifier Request identifier. - * @param int $timeout Timeout time in milliseconds. + * @param resource $req_identifier + * @param int $timeout * @throws CubridException * */ diff --git a/generated/8.5/curl.php b/generated/8.5/curl.php index 6b47f241..96d5ba05 100644 --- a/generated/8.5/curl.php +++ b/generated/8.5/curl.php @@ -5,11 +5,8 @@ use Safe\Exceptions\CurlException; /** - * Copies a cURL handle keeping the same preferences. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return \CurlHandle Returns a new cURL handle. + * @param \CurlHandle $handle + * @return \CurlHandle * @throws CurlException * */ @@ -25,12 +22,9 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle /** - * This function URL encodes the given string according to RFC 3986. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The string to be encoded. - * @return string Returns escaped string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -46,18 +40,8 @@ function curl_escape(\CurlHandle $handle, string $string): string /** - * Execute the given cURL session. - * - * This function should be called after initializing a cURL session and all - * the options for the session are set. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @return bool|string On success, this function flushes the result directly to the - * stdout and returns TRUE. - * However, if the CURLOPT_RETURNTRANSFER - * option is set, it will return - * the result on success. + * @param \CurlHandle $handle + * @return bool|string * @throws CurlException * */ @@ -73,158 +57,9 @@ function curl_exec(\CurlHandle $handle) /** - * Gets information about the last transfer. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int|null $option One of the CURLINFO_* constants. - * @return mixed If option is given, returns its value. - * Otherwise, returns an associative array with the following elements - * (which correspond to option): - * - * - * - * "url" - * - * - * - * - * "content_type" - * - * - * - * - * "http_code" - * - * - * - * - * "header_size" - * - * - * - * - * "request_size" - * - * - * - * - * "filetime" - * - * - * - * - * "ssl_verify_result" - * - * - * - * - * "redirect_count" - * - * - * - * - * "total_time" - * - * - * - * - * "namelookup_time" - * - * - * - * - * "connect_time" - * - * - * - * - * "pretransfer_time" - * - * - * - * - * "size_upload" - * - * - * - * - * "size_download" - * - * - * - * - * "speed_download" - * - * - * - * - * "speed_upload" - * - * - * - * - * "download_content_length" - * - * - * - * - * "upload_content_length" - * - * - * - * - * "starttransfer_time" - * - * - * - * - * "redirect_time" - * - * - * - * - * "certinfo" - * - * - * - * - * "primary_ip" - * - * - * - * - * "primary_port" - * - * - * - * - * "local_ip" - * - * - * - * - * "local_port" - * - * - * - * - * "redirect_url" - * - * - * - * - * "request_header" (This is only set if the CURLINFO_HEADER_OUT - * is set by a previous call to curl_setopt) - * - * - * - * - * "posttransfer_time_us" (Available as of PHP 8.4.0 and cURL 8.10.0) - * - * - * - * Note that private data is not included in the associative array and must be retrieved individually with the CURLINFO_PRIVATE option. + * @param \CurlHandle $handle + * @param int|null $option + * @return mixed * @throws CurlException * */ @@ -244,15 +79,8 @@ function curl_getinfo(\CurlHandle $handle, ?int $option = null) /** - * Initializes a new session and returns a cURL handle. - * - * @param null|string $url If provided, the CURLOPT_URL option will be set - * to its value. This can be set manually using the - * curl_setopt function. - * - * The file protocol is disabled by cURL if - * open_basedir is set. - * @return \CurlHandle Returns a cURL handle on success. + * @param null|string $url + * @return \CurlHandle * @throws CurlException * */ @@ -272,47 +100,9 @@ function curl_init(?string $url = null): \CurlHandle /** - * Ask the multi handle if there are any messages or information from the individual transfers. - * Messages may include information such as an error code from the transfer or just the fact - * that a transfer is completed. - * - * Repeated calls to this function will return a new result each time, until a FALSE is returned - * as a signal that there is no more to get at this point. The integer pointed to with - * queued_messages will contain the number of remaining messages after this - * function was called. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int|null $queued_messages Number of messages that are still in the queue - * @return array On success, returns an associative array for the message. - * - * - * Contents of the returned array - * - * - * - * Key: - * Value: - * - * - * - * - * msg - * The CURLMSG_DONE constant. Other return values - * are currently not available. - * - * - * result - * One of the CURLE_* constants. If everything is - * OK, the CURLE_OK will be the result. - * - * - * handle - * Resource of type curl indicates the handle which it concerns. - * - * - * - * + * @param \CurlMultiHandle $multi_handle + * @param int|null $queued_messages + * @return array * @throws CurlException * */ @@ -328,9 +118,7 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess /** - * Allows the processing of multiple cURL handles asynchronously. - * - * @return \CurlMultiHandle Returns a cURL multi handle. + * @return \CurlMultiHandle * */ function curl_multi_init(): \CurlMultiHandle @@ -342,15 +130,9 @@ function curl_multi_init(): \CurlMultiHandle /** - * Sets an option on the given cURL multi handle. - * - * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by - * curl_multi_init. - * @param int $option One of the CURLMOPT_* constants. - * @param mixed $value The value to be set on option. - * See the description of the - * CURLMOPT_* constants - * for details on the type of values each constant expects. + * @param \CurlMultiHandle $multi_handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -365,15 +147,9 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): /** - * Sets an option on the given cURL session handle. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param int $option The CURLOPT_* option to set. - * @param mixed $value The value to be set on option. - * See the description of the - * CURLOPT_* constants - * for details on the type of values each constant expects. + * @param \CurlHandle $handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -388,11 +164,8 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void /** - * Return an integer containing the last share curl error number. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @return int Returns an integer containing the last share curl error number. + * @param \CurlShareHandle $share_handle + * @return int * */ function curl_share_errno(\CurlShareHandle $share_handle): int @@ -404,12 +177,9 @@ function curl_share_errno(\CurlShareHandle $share_handle): int /** - * Sets an option on the given cURL share handle. - * - * @param \CurlShareHandle $share_handle A cURL share handle returned by - * curl_share_init. - * @param int $option One of the CURLSHOPT_* constants. - * @param mixed $value One of the CURL_LOCK_DATA_* constants. + * @param \CurlShareHandle $share_handle + * @param int $option + * @param mixed $value * @throws CurlException * */ @@ -424,12 +194,9 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): /** - * This function decodes the given URL encoded string. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. - * @param string $string The URL encoded string to be decoded. - * @return string Returns decoded string. + * @param \CurlHandle $handle + * @param string $string + * @return string * @throws CurlException * */ @@ -445,18 +212,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string /** - * Available if built against libcurl >= 7.62.0. - * - * Some protocols have "connection upkeep" mechanisms. - * These mechanisms usually send some traffic on existing connections in order to keep them alive; - * this can prevent connections from being closed due to overzealous firewalls, for example. - * - * Connection upkeep is currently available only for HTTP/2 connections. - * A small amount of traffic is usually sent to keep a connection alive. - * HTTP/2 maintains its connection by sending a HTTP/2 PING frame. - * - * @param \CurlHandle $handle A cURL handle returned by - * curl_init. + * @param \CurlHandle $handle * @throws CurlException * */ diff --git a/generated/8.5/datetime.php b/generated/8.5/datetime.php index 9a3e6f8d..25eb3372 100644 --- a/generated/8.5/datetime.php +++ b/generated/8.5/datetime.php @@ -5,16 +5,9 @@ use Safe\Exceptions\DatetimeException; /** - * This is the procedural version of - * DateTimeImmutable::__construct. - * - * Unlike the DateTimeImmutable constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTimeImmutable Returns a new DateTimeImmutable instance + * @return \DateTimeImmutable * @throws DatetimeException * */ @@ -34,16 +27,9 @@ function date_create_immutable(string $datetime = "now", ?\DateTimeZone $timezon /** - * This is the procedural version of - * DateTime::__construct. - * - * Unlike the DateTime constructor, it will return - * FALSE instead of an exception if the passed in - * datetime string is invalid. - * * @param null|string $datetime * @param \DateTimeZone|null $timezone - * @return \DateTime Returns a new DateTime instance + * @return \DateTime * @throws DatetimeException * */ @@ -63,44 +49,9 @@ function date_create(?string $datetime = "now", ?\DateTimeZone $timezone = null) /** - * Returns associative array with detailed info about given date/time. - * - * @param string $format Documentation on how the format is used, please - * refer to the documentation of - * DateTimeImmutable::createFromFormat. The same - * rules apply. - * @param string $datetime String representing the date/time. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. An example - * below shows such a warning. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. An example - * below shows such an error. + * @param string $format + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * @throws DatetimeException * */ @@ -116,62 +67,8 @@ function date_parse_from_format(string $format, string $datetime): ?array /** - * date_parse parses the given - * datetime string according to the same rules as - * strtotime and - * DateTimeImmutable::__construct. Instead of returning a - * Unix timestamp (with strtotime) or a - * DateTimeImmutable object (with - * DateTimeImmutable::__construct), it returns an - * associative array with the information that it could detect in the given - * datetime string. - * - * If no information about a certain group of elements can be found, these - * array elements will be set to FALSE or are missing. If needed for - * constructing a timestamp or DateTimeImmutable object from - * the same datetime string, more fields can be set to - * a non-FALSE value. See the examples for cases where that happens. - * - * @param string $datetime Date/time in format accepted by - * DateTimeImmutable::__construct. - * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time. - * - * The returned array has keys for year, - * month, day, hour, - * minute, second, - * fraction, and is_localtime. - * - * If is_localtime is present then - * zone_type indicates the type of timezone. For type - * 1 (UTC offset) the zone, - * is_dst fields are added; for type 2 - * (abbreviation) the fields tz_abbr, - * is_dst are added; and for type 3 - * (timezone identifier) the tz_abbr, - * tz_id are added. - * - * If relative time elements are present in the - * datetime string such as +3 days, - * the then returned array includes a nested array with the key - * relative. This array then contains the keys - * year, month, day, - * hour, minute, - * second, and if necessary weekday, and - * weekdays, depending on the string that was passed in. - * - * The array includes warning_count and - * warnings fields. The first one indicate how many - * warnings there were. - * The keys of elements warnings array indicate the - * position in the given datetime where the warning - * occurred, with the string value describing the warning itself. - * - * The array also contains error_count and - * errors fields. The first one indicate how many errors - * were found. - * The keys of elements errors array indicate the - * position in the given datetime where the error - * occurred, with the string value describing the error itself. + * @param string $datetime + * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null * */ function date_parse(string $datetime): ?array @@ -183,98 +80,10 @@ function date_parse(string $datetime): ?array /** - * - * - * @param int $timestamp Unix timestamp. - * @param float $latitude Latitude in degrees. - * @param float $longitude Longitude in degrees. - * @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 an array whose structure 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. - * - * - * - * - * - * The values of the array elements are either UNIX timestamps, 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. + * @param int $timestamp + * @param float $latitude + * @param float $longitude + * @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 * */ function date_sun_info(int $timestamp, float $latitude, float $longitude) @@ -286,84 +95,13 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude) /** - * date_sunrise returns the sunrise time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunrise - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunrise_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunrise: the point where the sun becomes visible. - * - * - * 96° - * Civil twilight: conventionally used to signify the start of dawn. - * - * - * 102° - * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunrise time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not rise at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -389,84 +127,13 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ? /** - * date_sunset returns the sunset time for a given - * day (specified as a timestamp) and location. - * - * @param int $timestamp The timestamp of the day from which the sunset - * time is taken. + * @param int $timestamp * @param int $returnFormat - * returnFormat constants - * - * - * - * constant - * description - * example - * - * - * - * - * SUNFUNCS_RET_STRING - * returns the result as string - * 16:46 - * - * - * SUNFUNCS_RET_DOUBLE - * returns the result as float - * 16.78243132 - * - * - * SUNFUNCS_RET_TIMESTAMP - * returns the result as int (timestamp) - * 1095034606 - * - * - * - * - * @param float|null $latitude Defaults to North, pass in a negative value for South. - * See also: date.default_latitude - * @param float|null $longitude Defaults to East, pass in a negative value for West. - * See also: date.default_longitude - * @param float|null $zenith zenith is the angle between the center of the sun - * and a line perpendicular to earth's surface. It defaults to - * date.sunset_zenith - * - * Common zenith angles - * - * - * - * Angle - * Description - * - * - * - * - * 90°50' - * Sunset: the point where the sun becomes invisible. - * - * - * 96° - * Civil twilight: conventionally used to signify the end of dusk. - * - * - * 102° - * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * - * 108° - * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * - * @param float|null $utcOffset Specified in hours. - * The utcOffset is ignored, if - * returnFormat is - * SUNFUNCS_RET_TIMESTAMP. - * @return mixed Returns the sunset time in a specified returnFormat on - * success. One potential reason for failure is that the - * sun does not set at all, which happens inside the polar circles for part of - * the year. + * @param float|null $latitude + * @param float|null $longitude + * @param float|null $zenith + * @param float|null $utcOffset + * @return mixed * @throws DatetimeException * */ @@ -492,17 +159,9 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f /** - * Returns a string formatted according to the given format string using the - * given integer timestamp (Unix timestamp) or the current time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * @param string $format Format accepted by DateTimeInterface::format. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns a formatted date string. + * @param string $format + * @param int|null $timestamp + * @return string * */ function date(string $format, ?int $timestamp = null): string @@ -518,35 +177,13 @@ function date(string $format, ?int $timestamp = null): string /** - * Identical to mktime except the passed parameters represents a - * GMT date. gmmktime internally uses mktime - * so only times valid in derived local time can be used. - * - * Like mktime, optional arguments may be left out in - * order from right to left, with any omitted arguments being set to the - * current corresponding GMT value. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year The year - * @return int Returns a int Unix timestamp on success, or FALSE if the - * timestamp doesn't fit in a PHP integer. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -574,23 +211,9 @@ function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $mon /** - * Behaves the same as strftime except that the - * time returned is Greenwich Mean Time (GMT). For example, when run - * in Eastern Standard Time (GMT -0500), the first line below prints - * "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 - * 01:00:00". - * - * @param string $format See description in strftime. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * On failure, FALSE is returned. + * @param string $format + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -610,118 +233,9 @@ function gmstrftime(string $format, ?int $timestamp = null): string /** - * Returns a number formatted according to the given format string using the - * given integer timestamp or the current local time - * if no timestamp is given. In other words, timestamp - * is optional and defaults to the value of time. - * - * Unlike the function date, idate - * accepts just one char in the format parameter. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format character - * Description - * - * - * - * - * B - * Swatch Beat/Internet Time - * - * - * d - * Day of the month - * - * - * h - * Hour (12 hour format) - * - * - * H - * Hour (24 hour format) - * - * - * i - * Minutes - * - * - * I (uppercase i) - * returns 1 if DST is activated, - * 0 otherwise - * - * - * L (uppercase l) - * returns 1 for leap year, - * 0 otherwise - * - * - * m - * Month number - * - * - * N - * ISO-8601 day of the week (1 for Monday - * through 7 for Sunday) - * - * - * o - * ISO-8601 year (4 digits) - * - * - * s - * Seconds - * - * - * t - * Days in current month - * - * - * U - * Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - - * this is the same as time - * - * - * w - * Day of the week (0 on Sunday) - * - * - * W - * ISO-8601 week number of year, weeks starting on - * Monday - * - * - * y - * Year (1 or 2 digits - check note below) - * - * - * Y - * Year (4 digits) - * - * - * z - * Day of the year - * - * - * Z - * Timezone offset in seconds - * - * - * - * - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return int Returns an int on success. - * - * As idate always returns an int and - * as they can't start with a "0", idate may return - * fewer digits than you would expect. See the example below. + * @param int|null $timestamp + * @return int * @throws DatetimeException * */ @@ -741,40 +255,13 @@ function idate(string $format, ?int $timestamp = null): int /** - * Returns the Unix timestamp corresponding to the arguments - * given. This timestamp is a long integer containing the number of - * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time - * specified. - * - * Any optional - * arguments omitted or NULL will be set to the current value according - * to the local date and time. - * - * @param int $hour The number of the hour relative to the start of the day determined by - * month, day and year. - * Negative values reference the hour before midnight of the day in question. - * Values greater than 23 reference the appropriate hour in the following day(s). - * @param int|null $minute The number of the minute relative to the start of the hour. - * Negative values reference the minute in the previous hour. - * Values greater than 59 reference the appropriate minute in the following hour(s). - * @param int|null $second The number of seconds relative to the start of the minute. - * Negative values reference the second in the previous minute. - * Values greater than 59 reference the appropriate second in the following minute(s). - * @param int|null $month The number of the month relative to the end of the previous year. - * Values 1 to 12 reference the normal calendar months of the year in question. - * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. - * Values greater than 12 reference the appropriate month in the following year(s). - * @param int|null $day The number of the day relative to the end of the previous month. - * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. - * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. - * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). - * @param int|null $year 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 - * is somewhere between 1901 and 2038. - * @return int mktime returns the Unix timestamp of the arguments - * given, or FALSE if the timestamp doesn't fit in a PHP integer. + * @param int $hour + * @param int|null $minute + * @param int|null $second + * @param int|null $month + * @param int|null $day + * @param int|null $year + * @return int * @throws DatetimeException * */ @@ -802,305 +289,9 @@ function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month /** - * Format the time and/or date according to locale settings. Month and weekday - * names and other language-dependent strings respect the current locale set - * with setlocale. - * * @param string $format - * The following characters are recognized in the - * format parameter string - * - * - * - * format - * Description - * Example returned values - * - * - * - * - * Day - * --- - * --- - * - * - * %a - * An abbreviated textual representation of the day - * Sun through Sat - * - * - * %A - * A full textual representation of the day - * Sunday through Saturday - * - * - * %d - * Two-digit day of the month (with leading zeros) - * 01 to 31 - * - * - * %e - * - * Day of the month, with a space preceding single digits. Not - * implemented as described on Windows. See below for more information. - * - * 1 to 31 - * - * - * %j - * Day of the year, 3 digits with leading zeros - * 001 to 366 - * - * - * %u - * ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * - * %w - * Numeric representation of the day of the week - * 0 (for Sunday) through 6 (for Saturday) - * - * - * Week - * --- - * --- - * - * - * %U - * Week number of the given year, starting with the first - * Sunday as the first week - * 13 (for the 13th full week of the year) - * - * - * %V - * ISO-8601:1988 week number of the given year, starting with - * the first week of the year with at least 4 weekdays, with Monday - * being the start of the week - * 01 through 53 (where 53 - * accounts for an overlapping week) - * - * - * %W - * A numeric representation of the week of the year, starting - * with the first Monday as the first week - * 46 (for the 46th week of the year beginning - * with a Monday) - * - * - * Month - * --- - * --- - * - * - * %b - * Abbreviated month name, based on the locale - * Jan through Dec - * - * - * %B - * Full month name, based on the locale - * January through December - * - * - * %h - * Abbreviated month name, based on the locale (an alias of %b) - * Jan through Dec - * - * - * %m - * Two digit representation of the month - * 01 (for January) through 12 (for December) - * - * - * Year - * --- - * --- - * - * - * %C - * Two digit representation of the century (year divided by 100, truncated to an integer) - * 19 for the 20th Century - * - * - * %g - * Two digit representation of the year going by ISO-8601:1988 standards (see %V) - * Example: 09 for the week of January 6, 2009 - * - * - * %G - * The full four-digit version of %g - * Example: 2008 for the week of January 3, 2009 - * - * - * %y - * Two digit representation of the year - * Example: 09 for 2009, 79 for 1979 - * - * - * %Y - * Four digit representation for the year - * Example: 2038 - * - * - * Time - * --- - * --- - * - * - * %H - * Two digit representation of the hour in 24-hour format - * 00 through 23 - * - * - * %k - * Hour in 24-hour format, with a space preceding single digits - * 0 through 23 - * - * - * %I - * Two digit representation of the hour in 12-hour format - * 01 through 12 - * - * - * %l (lower-case 'L') - * Hour in 12-hour format, with a space preceding single digits - * 1 through 12 - * - * - * %M - * Two digit representation of the minute - * 00 through 59 - * - * - * %p - * UPPER-CASE 'AM' or 'PM' based on the given time - * Example: AM for 00:31, - * PM for 22:23. The exact result depends on the - * Operating System, and they can also return lower-case variants, or - * variants with dots (such as a.m.). - * - * - * %P - * lower-case 'am' or 'pm' based on the given time - * Example: am for 00:31, - * pm for 22:23. Not supported by all Operating - * Systems. - * - * - * %r - * Same as "%I:%M:%S %p" - * Example: 09:34:17 PM for 21:34:17 - * - * - * %R - * Same as "%H:%M" - * Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM - * - * - * %S - * Two digit representation of the second - * 00 through 59 - * - * - * %T - * Same as "%H:%M:%S" - * Example: 21:34:17 for 09:34:17 PM - * - * - * %X - * Preferred time representation based on locale, without the date - * Example: 03:59:16 or 15:59:16 - * - * - * %z - * The time zone offset. Not implemented as described on - * Windows. See below for more information. - * Example: -0500 for US Eastern Time - * - * - * %Z - * The time zone abbreviation. Not implemented as described on - * Windows. See below for more information. - * Example: EST for Eastern Time - * - * - * Time and Date Stamps - * --- - * --- - * - * - * %c - * Preferred date and time stamp based on locale - * Example: Tue Feb 5 00:45:10 2009 for - * February 5, 2009 at 12:45:10 AM - * - * - * %D - * Same as "%m/%d/%y" - * Example: 02/05/09 for February 5, 2009 - * - * - * %F - * Same as "%Y-%m-%d" (commonly used in database datestamps) - * Example: 2009-02-05 for February 5, 2009 - * - * - * %s - * Unix Epoch Time timestamp (same as the time - * function) - * Example: 305815200 for September 10, 1979 08:40:00 AM - * - * - * %x - * Preferred date representation based on locale, without the time - * Example: 02/05/09 for February 5, 2009 - * - * - * Miscellaneous - * --- - * --- - * - * - * %n - * A newline character ("\n") - * --- - * - * - * %t - * A Tab character ("\t") - * --- - * - * - * %% - * A literal percentage character ("%") - * --- - * - * - * - * - * - * Windows only: - * - * The %e modifier is not supported in the Windows - * implementation of this function. To achieve this value, the - * %#d modifier can be used instead. The example below - * illustrates how to write a cross platform compatible function. - * - * The %z and %Z modifiers both - * return the time zone name instead of the offset or abbreviation. - * @param int|null $timestamp The optional timestamp parameter is an - * int Unix timestamp that defaults to the current - * local time if timestamp is omitted or NULL. In other - * words, it defaults to the value of time. - * @return string Returns 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. - * The function returns FALSE if format is empty, contains unsupported - * conversion specifiers, or if the length of the returned string would be greater than - * 4095. + * @param int|null $timestamp + * @return string * @throws DatetimeException * */ @@ -1120,74 +311,9 @@ function strftime(string $format, ?int $timestamp = null): string /** - * strptime returns an array with the - * timestamp parsed. - * - * Month and weekday names and other language dependent strings respect the - * current locale set with setlocale (LC_TIME). - * - * @param string $timestamp The string to parse (e.g. returned from strftime). - * @param string $format The format used in timestamp (e.g. the same as - * used in strftime). Note that some of the format - * options available to strftime may not have any - * effect within strptime; the exact subset that are - * supported will vary based on the operating system and C library in - * use. - * - * For more information about the format options, read the - * strftime page. - * @return array Returns an array. - * - * - * The following parameters are returned in the array - * - * - * - * parameters - * Description - * - * - * - * - * "tm_sec" - * Seconds after the minute (0-61) - * - * - * "tm_min" - * Minutes after the hour (0-59) - * - * - * "tm_hour" - * Hour since midnight (0-23) - * - * - * "tm_mday" - * Day of the month (1-31) - * - * - * "tm_mon" - * Months since January (0-11) - * - * - * "tm_year" - * Years since 1900 - * - * - * "tm_wday" - * Days since Sunday (0-6) - * - * - * "tm_yday" - * Days since January 1 (0-365) - * - * - * "unparsed" - * the timestamp part which was not - * recognized using the specified format - * - * - * - * + * @param string $timestamp + * @param string $format + * @return array * @throws DatetimeException * */ @@ -1203,16 +329,9 @@ function strptime(string $timestamp, string $format): array /** - * Each parameter of this function uses the default time zone unless a - * time zone is specified in that parameter. Be careful not to use - * different time zones in each parameter unless that is intended. - * See date_default_timezone_get on the various - * ways to define the default time zone. - * - * @param string $datetime A date/time string. Valid formats are explained in Date and Time Formats. - * @param int|null $baseTimestamp The timestamp which is used as a base for the calculation of relative - * dates. - * @return int Returns a timestamp on success. + * @param string $datetime + * @param int|null $baseTimestamp + * @return int * @throws DatetimeException * */ @@ -1232,23 +351,10 @@ function strtotime(string $datetime, ?int $baseTimestamp = null): int /** - * - * - * @param string $abbr Time zone abbreviation. - * @param int $utcOffset 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 Daylight saving time indicator. Defaults to -1, which means that - * whether the time zone has daylight saving or not is not taken into - * consideration when searching. If this is set to 1, then the - * utcOffset is assumed to be an offset with - * daylight saving in effect; if 0, then utcOffset - * is assumed to be an offset without daylight saving in effect. If - * abbr doesn't exist then the time zone is - * searched solely by the utcOffset and - * isDST. - * @return string Returns time zone name on success. + * @param string $abbr + * @param int $utcOffset + * @param int $isDST + * @return string * @throws DatetimeException * */ diff --git a/generated/8.5/dir.php b/generated/8.5/dir.php index f1735c1a..a9c1288a 100644 --- a/generated/8.5/dir.php +++ b/generated/8.5/dir.php @@ -5,10 +5,7 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to - * directory. - * - * @param string $directory The new current directory + * @param string $directory * @throws DirException * */ @@ -23,18 +20,7 @@ function chdir(string $directory): void /** - * Changes the root directory of the current process to - * directory, and changes the current - * working directory to "/". - * - * This function is only available to GNU and BSD systems, and - * only when using the CLI, CGI or Embed SAPI. Also, this function - * requires root privileges. - * - * Calling this function does not change the values of the __DIR__ - * and __FILE__ magic constants. - * - * @param string $directory The path to change the root directory to. + * @param string $directory * @throws DirException * */ @@ -49,13 +35,9 @@ function chroot(string $directory): void /** - * A pseudo-object-oriented mechanism for reading a directory. The - * given directory is opened. - * - * @param string $directory Directory to open - * @param null|resource $context A context stream - * resource. - * @return \Directory Returns an instance of Directory, or FALSE in case of error. + * @param string $directory + * @param null|resource $context + * @return \Directory * @throws DirException * */ @@ -75,15 +57,7 @@ function dir(string $directory, $context = null): \Directory /** - * Gets the current working directory. - * - * @return non-empty-string Returns the current working directory on success. - * - * On some Unix variants, getcwd will return - * FALSE if any one of the parent directories does not have the - * readable or search mode set, even if the current directory - * does. See chmod for more information on - * modes and permissions. + * @return non-empty-string * @throws DirException * */ @@ -99,15 +73,9 @@ function getcwd(): string /** - * Opens up a directory handle to be used in subsequent - * closedir, readdir, and - * rewinddir calls. - * - * @param string $directory The directory path to open. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return resource Returns a directory handle on success + * @param string $directory + * @param null|resource $context + * @return resource * @throws DirException * */ @@ -127,21 +95,10 @@ function opendir(string $directory, $context = null) /** - * Returns an array of files and directories from the - * directory. - * - * @param string $directory The directory that will be scanned. - * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order By default, the sorted order is alphabetical in ascending order. If - * the optional sorting_order is set to - * SCANDIR_SORT_DESCENDING, then the sort order is - * alphabetical in descending order. If it is set to - * SCANDIR_SORT_NONE then the result is unsorted. - * @param null|resource $context For a description of the context parameter, - * refer to the streams section of - * the manual. - * @return list Returns an array of filenames on success. If directory is not a directory, then - * boolean FALSE is returned, and an error of level - * E_WARNING is generated. + * @param string $directory + * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order + * @param null|resource $context + * @return list * @throws DirException * */ diff --git a/generated/8.5/eio.php b/generated/8.5/eio.php index f5673390..4fd10a55 100644 --- a/generated/8.5/eio.php +++ b/generated/8.5/eio.php @@ -5,17 +5,11 @@ use Safe\Exceptions\EioException; /** - * eio_busy artificially increases load taking - * delay seconds to execute. May be used for debugging, - * or benchmarking. - * - * @param int $delay Delay in seconds - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. - * @param callable|null $callback This callback is called when all the group requests are done. - * @param mixed $data Arbitrary variable passed to callback. - * @return resource eio_busy returns request resource on success. + * @param int $delay + * @param int $pri + * @param callable|null $callback + * @param mixed $data + * @return resource * @throws EioException * */ @@ -31,43 +25,12 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = /** - * eio_chmod changes file, or directory permissions. The - * new permissions are specified by mode. - * - * @param string $path Path to the target file or directory - * Avoid relative - * paths - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -83,43 +46,13 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * Changes file, or directory permissions. - * - * @param string $path Path to file or directory. - * Avoid relative - * paths - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chown returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -135,40 +68,11 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** - * eio_close closes file specified by - * fd. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_close returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -184,50 +88,11 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_custom executes custom function specified by - * execute processing it just like any other eio_* call. - * - * @param callable $execute Specifies the request function that should match the following prototype: - * - * - * callback is event completion callback that should match the following - * prototype: - * - * - * data is the data passed to - * execute via data argument - * without modifications - * result value returned by execute - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param callable $execute + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_custom returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -243,40 +108,12 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul /** - * eio_dup2 duplicates file descriptor. - * - * @param mixed $fd Source stream, Socket resource, or numeric file descriptor - * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param mixed $fd2 + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_dup2 returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -292,8 +129,6 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = n /** - * eio_event_loop polls libeio until all requests proceeded. - * * @throws EioException * */ @@ -308,47 +143,14 @@ function eio_event_loop(): void /** - * eio_fallocate allows the caller to directly manipulate the allocated disk space for the - * file specified by fd file descriptor for the byte - * range starting at offset and continuing for - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode Currently only one flag is supported for mode: - * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant - * FALLOC_FL_KEEP_SIZE). - * @param int $offset Specifies start of the byte range. - * @param int $length Specifies length the byte range. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fallocate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -364,41 +166,12 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** - * eio_fchmod changes permissions for the file specified - * by fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $mode The new permissions. E.g. 0644. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fchmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -414,42 +187,13 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callb /** - * eio_fchown changes ownership of the file specified by - * fd file descriptor. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $uid User ID. Is ignored when equal to -1. - * @param int $gid Group ID. Is ignored when equal to -1. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $uid + * @param int $gid + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_chmod returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -465,39 +209,11 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?c /** - * eio_fdatasync synchronizes a file's in-core state with storage device. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fdatasync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -513,40 +229,11 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = nu /** - * eio_fstat returns file status information in - * result argument of callback - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -566,40 +253,11 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** - * eio_fstatvfs returns file system statistics in - * result of callback. - * - * @param mixed $fd A file descriptor of a file within the mounted file system. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fstatvfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -619,39 +277,11 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** - * Synchronize a file's in-core state with storage device - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_fsync returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -667,42 +297,12 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_ftruncate causes a regular file referenced by - * fd file descriptor to be truncated to precisely - * length bytes. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor. - * @param int $offset Offset from beginning of the file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_ftruncate returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -718,42 +318,13 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callab /** - * eio_futime changes file last access and modification - * times. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_futime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -769,35 +340,9 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** - * eio_grp creates a request group. - * * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_grp returns request group resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -813,40 +358,11 @@ function eio_grp(callable $callback, ?string $data = null) /** - * eio_lstat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_lstat returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -862,41 +378,12 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) /** - * eio_mkdir creates directory with specified access - * mode. - * - * @param string $path Path for the new directory. - * @param int $mode Access mode, e.g. 0755 - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mkdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -912,57 +399,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callabl /** - * eio_mknod creates ordinary or special(often) file. - * - * @param string $path Path for the new node(file). - * @param int $mode Specifies both the permissions to use and the type of node to be - * created. It should be a combination (using bitwise OR) of one of the - * file types listed below and the permissions for the new node(e.g. 0640). - * - * Possible file types are: EIO_S_IFREG(regular file), - * EIO_S_IFCHR(character file), - * EIO_S_IFBLK(block special file), - * EIO_S_IFIFO(FIFO - named pipe) and - * EIO_S_IFSOCK(UNIX domain socket). - * - * To specify permissions EIO_S_I* constants could be - * used. - * @param int $dev If the file type is EIO_S_IFCHR or - * EIO_S_IFBLK then dev specifies the major and minor - * numbers of the newly created device special file. Otherwise - * dev ignored. See mknod(2) man page for - * details. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $mode + * @param int $dev + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_mknod returns request resource on success. - * @throws EioException + * @param mixed $data + * @return resource + * @throws EioException * */ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null) @@ -977,39 +421,10 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** - * eio_nop does nothing, except go through the whole - * request cycle. Could be useful in debugging. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_nop returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1025,42 +440,13 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = /** - * eio_readahead populates the page cache with data from a file so that subsequent reads from - * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor - * @param int $offset Starting point from which data is to be read. - * @param int $length Number of bytes to be read. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_readahead returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1076,295 +462,12 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT /** - * Reads through a whole directory(via the opendir, readdir and - * closedir system calls) and returns either the names or an array in - * result argument of callback - * function, depending on the flags argument. - * - * @param string $path Directory path. - * @param int $flags Combination of EIO_READDIR_* constants. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $flags + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readdir returns request resource on success. - * Sets result argument of - * callback function according to - * flags: - * - * - * - * - * - * - * EIO_READDIR_DENTS - * (int) - * - * - * - * eio_readdir flag. If specified, the result argument of the callback - * becomes an array with the following keys: - * 'names' - array of directory names - * 'dents' - array of struct - * eio_dirent-like arrays having the following keys each: - * 'name' - the directory name; - * 'type' - one of EIO_DT_* - * constants; - * 'inode' - the inode number, if available, otherwise - * unspecified; - * - * - * - * - * - * EIO_READDIR_DIRS_FIRST - * (int) - * - * - * - * When this flag is specified, the names will be returned in an order - * where likely directories come first, in optimal stat order. - * - * - * - * - * - * EIO_READDIR_STAT_ORDER - * (int) - * - * - * - * When this flag is specified, then the names will be returned in an order - * suitable for stat'ing each one. When planning to - * stat all files in the given directory, the - * returned order will likely be - * fastest. - * - * - * - * - * - * EIO_READDIR_FOUND_UNKNOWN - * (int) - * - * - * - * - * - * - * - * - * - * - * - * Node types: - * - * - * - * - * - * EIO_DT_UNKNOWN - * (int) - * - * - * - * Unknown node type(very common). Further stat needed. - * - * - * - * - * - * EIO_DT_FIFO - * (int) - * - * - * - * FIFO node type - * - * - * - * - * - * EIO_DT_CHR - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPC - * (int) - * - * - * - * Multiplexed char device (v7+coherent) node type - * - * - * - * - * - * EIO_DT_DIR - * (int) - * - * - * - * Directory node type - * - * - * - * - * - * EIO_DT_NAM - * (int) - * - * - * - * Xenix special named file node type - * - * - * - * - * - * EIO_DT_BLK - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MPB - * (int) - * - * - * - * Multiplexed block device (v7+coherent) - * - * - * - * - * - * EIO_DT_REG - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_NWK - * (int) - * - * - * - * - * - * - * - * - * EIO_DT_CMP - * (int) - * - * - * - * HP-UX network special node type - * - * - * - * - * - * EIO_DT_LNK - * (int) - * - * - * - * Link node type - * - * - * - * - * - * EIO_DT_SOCK - * (int) - * - * - * - * Socket node type - * - * - * - * - * - * EIO_DT_DOOR - * (int) - * - * - * - * Solaris door node type - * - * - * - * - * - * EIO_DT_WHT - * (int) - * - * - * - * Node type - * - * - * - * - * - * EIO_DT_MAX - * (int) - * - * - * - * Highest node type value - * - * - * - * - * - * - * + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1380,39 +483,11 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?st /** - * - * - * @param string $path Source symbolic link path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param null|string $data is custom data passed to the request. - * @return resource eio_readlink returns request resource on success. + * @param null|string $data + * @return resource * @throws EioException * */ @@ -1428,40 +503,12 @@ function eio_readlink(string $path, int $pri, callable $callback, ?string $data /** - * eio_rename renames or moves a file to new location. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rename returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1477,39 +524,11 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_rmdir removes a directory. - * - * @param string $path Directory path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_rmdir returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1525,49 +544,13 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback /** - * eio_seek repositions the offset of the open file associated with - * stream, Socket instance, or file descriptor specified by fd to - * the argument offset according to - * the directive whence. - * - * @param mixed $fd Stream, Socket instance, or numeric file descriptor. - * @param int $offset Starting point from which data is to be read. - * @param int $whence whence values are: - * - * EIO_SEEK_SET - Set position equal to offset bytes. - * EIO_SEEK_CUR - Set position to current location plus offset. - * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $whence + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_seek returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1583,43 +566,14 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?ca /** - * eio_sendfile copies data between one file descriptor - * and another. See SENDFILE(2) man page for details. - * - * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. - * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. - * @param int $offset Offset within the source file. - * @param int $length Number of bytes to copy. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $out_fd + * @param mixed $in_fd + * @param int $offset + * @param int $length + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param string $data is custom data passed to the request. - * @return resource eio_sendfile returns request resource on success. + * @param string $data + * @return resource * @throws EioException * */ @@ -1643,41 +597,11 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = nul /** - * eio_stat returns file status information in - * result argument of callback - * - * @param string $path The file path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_stat returns request resource on success. On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1693,42 +617,11 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null) /** - * eio_statvfs returns file system statistics information in - * result argument of callback - * - * @param string $path Pathname of any file within the mounted file system - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_statvfs returns request resource on success. - * On success assigns result argument of - * callback to an array. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1748,41 +641,12 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** - * eio_symlink creates a symbolic link - * new_path to path. - * - * @param string $path Source path - * @param string $new_path Target path - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param string $new_path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_symlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1798,50 +662,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** - * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file - * descriptor fd with disk. - * - * @param mixed $fd File descriptor - * @param int $offset The starting byte of the file range to be synchronized - * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If - * nbytes is zero, then all bytes from offset through - * to the end of file are synchronized. - * @param int $flags A bit-mask. Can include any of the following values: - * EIO_SYNC_FILE_RANGE_WAIT_BEFORE, - * EIO_SYNC_FILE_RANGE_WRITE, - * EIO_SYNC_FILE_RANGE_WAIT_AFTER. These flags have - * the same meaning as their SYNC_FILE_RANGE_* - * counterparts(see SYNC_FILE_RANGE(2) man page). - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $offset + * @param int $nbytes + * @param int $flags + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_sync_file_range returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1857,12 +685,10 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * * @param int $pri * @param callable|null $callback * @param mixed $data - * @return resource eio_sync returns request resource on success. + * @return resource * @throws EioException * */ @@ -1878,39 +704,11 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data /** - * - * - * @param mixed $fd File descriptor - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_syncfs returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1926,41 +724,12 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, /** - * eio_truncate causes the regular file named by path to be truncated to - * a size of precisely length bytes - * - * @param string $path File path - * @param int $offset Offset from beginning of the file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_busy returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -1976,39 +745,11 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** - * eio_unlink deletes a name from the file system. - * - * @param string $path Path to file - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_unlink returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2024,41 +765,13 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callbac /** - * - * - * @param string $path Path to the file. - * @param float $atime Access time - * @param float $mtime Modification time - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param string $path + * @param float $atime + * @param float $mtime + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_utime returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ @@ -2074,44 +787,14 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ /** - * eio_write writes up to length - * bytes from str at offset - * offset from the beginning of the file. - * - * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open - * @param string $str Source string - * @param int $length Maximum number of bytes to write. - * @param int $offset Offset from the beginning of file. - * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. - * If NULL passed, pri internally is set to - * EIO_PRI_DEFAULT. + * @param mixed $fd + * @param string $str + * @param int $length + * @param int $offset + * @param int $pri * @param callable|null $callback - * callback function is called when the request is done. - * It should match the following prototype: - * - * - * data - * is custom data passed to the request. - * - * - * result - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * - * req - * is optional request resource which can be used with functions like eio_get_last_error. - * - * - * - * is custom data passed to the request. - * - * request-specific result value; basically, the value returned by corresponding - * system call. - * - * is optional request resource which can be used with functions like eio_get_last_error. - * @param mixed $data is custom data passed to the request. - * @return resource eio_write returns request resource on success. + * @param mixed $data + * @return resource * @throws EioException * */ diff --git a/generated/8.5/errorfunc.php b/generated/8.5/errorfunc.php index 671fe69c..2e0c2df9 100644 --- a/generated/8.5/errorfunc.php +++ b/generated/8.5/errorfunc.php @@ -5,64 +5,10 @@ use Safe\Exceptions\ErrorfuncException; /** - * Sends an error message to the web server's error log or to a file. - * - * @param string $message The error message that should be logged. - * @param 0|1|2|3|4 $message_type Says where the error should go. The possible message types are as - * follows: - * - * - * error_log log types - * - * - * - * 0 - * - * message is sent to PHP's system logger, using - * the Operating System's system logging mechanism or a file, depending - * on what the error_log - * configuration directive is set to. This is the default option. - * - * - * - * 1 - * - * message is sent by email to the address in - * the destination parameter. This is the only - * message type where the fourth parameter, - * additional_headers is used. - * - * - * - * 2 - * - * No longer an option. - * - * - * - * 3 - * - * message is appended to the file - * destination. A newline is not automatically - * added to the end of the message string. - * - * - * - * 4 - * - * message is sent directly to the SAPI logging - * handler. - * - * - * - * - * - * @param null|string $destination The destination. Its meaning depends on the - * message_type parameter as described above. - * @param null|string $additional_headers The extra headers. It's used when the message_type - * parameter is set to 1. - * This message type uses the same internal function as - * mail does. + * @param string $message + * @param 0|1|2|3|4 $message_type + * @param null|string $destination + * @param null|string $additional_headers * @throws ErrorfuncException * */ diff --git a/generated/8.5/exec.php b/generated/8.5/exec.php index 7e35d71b..534f7a89 100644 --- a/generated/8.5/exec.php +++ b/generated/8.5/exec.php @@ -5,30 +5,10 @@ use Safe\Exceptions\ExecException; /** - * exec executes the given - * command. - * - * @param string $command The command that will be executed. - * @param array|null $output If the output argument is present, then the - * specified array will be filled with every line of output from the - * command. Trailing whitespace, such as \n, is not - * included in this array. Note that if the array already contains some - * elements, exec will append to the end of the array. - * If you do not want the function to append elements, call - * unset on the array before passing it to - * exec. - * @param int|null $result_code If the result_code argument is present - * along with the output argument, then the - * return status of the executed command will be written to this - * variable. - * @return string The last line from the result of the command. If you need to execute a - * command and have all the data from the command passed directly back without - * any interference, use the passthru function. - * - * Returns FALSE on failure. - * - * To get the output of the executed command, be sure to set and use the - * output parameter. + * @param string $command + * @param array|null $output + * @param int|null $result_code + * @return string * @throws ExecException * */ @@ -44,18 +24,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null /** - * proc_close is similar to pclose - * except that it only works on processes opened by - * proc_open. - * proc_close waits for the process to terminate, and - * returns its exit code. Open pipes to that process are closed - * when this function is called, in - * order to avoid a deadlock - the child process may not be able to exit - * while the pipes are open. - * - * @param resource $process The proc_open resource that will - * be closed. - * @return int Returns the termination status of the process that was run. + * @param resource $process + * @return int * @throws ExecException * */ @@ -71,22 +41,7 @@ function proc_close($process): int /** - * proc_nice changes the priority of the current - * process by the amount specified in priority. A - * positive priority will lower the priority of the - * current process, whereas a negative priority - * will raise the priority. - * - * proc_nice is not related to - * proc_open and its associated functions in any way. - * - * @param int $priority The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority - * whereas positive values have a lower priority. - * - * For Windows the priority parameter has the - * following meaning: + * @param int $priority * @throws ExecException * */ @@ -101,81 +56,13 @@ function proc_nice(int $priority): void /** - * proc_open is similar to popen - * but provides a much greater degree of control over the program execution. - * - * @param string $command The commandline to execute as string. Special characters have to be properly escaped, - * and proper quoting has to be applied. - * - * As of PHP 7.4.0, command may be passed as array of command parameters. - * In this case the process will be opened directly (without going through a shell) - * and PHP will take care of any necessary argument escaping. - * - * On Windows, the argument escaping of the array elements assumes that the - * command line parsing of the executed command is compatible with the parsing - * of command line arguments done by the VC runtime. - * @param array $descriptor_spec An indexed array where the key represents the descriptor number and the - * value represents how PHP will pass that descriptor to the child - * process. 0 is stdin, 1 is stdout, while 2 is stderr. - * - * Each element can be: - * - * An array describing the pipe to pass to the process. The first - * element is the descriptor type and the second element is an option for - * the given type. Valid types are pipe (the second - * element is either r to pass the read end of the pipe - * to the process, or w to pass the write end) and - * file (the second element is a filename). - * Note that anything else than w is treated like r. - * - * - * A stream resource representing a real file descriptor (e.g. opened file, - * a socket, STDIN). - * - * - * - * The file descriptor numbers are not limited to 0, 1 and 2 - you may - * specify any valid file descriptor number and it will be passed to the - * child process. This allows your script to interoperate with other - * scripts that run as "co-processes". In particular, this is useful for - * passing passphrases to programs like PGP, GPG and openssl in a more - * secure manner. It is also useful for reading status information - * provided by those programs on auxiliary file descriptors. - * @param null|resource[] $pipes Will be set to an indexed array of file pointers that correspond to - * PHP's end of any pipes that are created. - * @param null|string $cwd The initial working dir for the command. This must be an - * absolute directory path, or NULL - * if you want to use the default value (the working dir of the current - * PHP process) - * @param array|null $env_vars An array with the environment variables for the command that will be - * run, or NULL to use the same environment as the current PHP process - * @param array|null $options Allows you to specify additional options. Currently supported options - * include: - * - * - * suppress_errors (windows only): suppresses errors - * generated by this function when it's set to TRUE - * - * - * bypass_shell (windows only): bypass - * cmd.exe shell when set to TRUE - * - * - * blocking_pipes (windows only): force - * blocking pipes when set to TRUE - * - * - * create_process_group (windows only): allow the - * child process to handle CTRL events when set to TRUE - * - * - * create_new_console (windows only): the new process - * has a new console, instead of inheriting its parent's console - * - * - * @return resource Returns a resource representing the process, which should be freed using - * proc_close when you are finished with it. On failure - * returns FALSE. + * @param string $command + * @param array $descriptor_spec + * @param null|resource[] $pipes + * @param null|string $cwd + * @param array|null $env_vars + * @param array|null $options + * @return resource * @throws ExecException * */ @@ -199,10 +86,8 @@ function proc_open(string $command, array $descriptor_spec, ?array &$pipes, ?str /** - * This function is identical to the backtick operator. - * - * @param string $command The command that will be executed. - * @return null|string A string containing the output from the executed command or NULL if an error occurs or the command produces no output. + * @param string $command + * @return null|string * @throws ExecException * */ @@ -218,23 +103,9 @@ function shell_exec(string $command): ?string /** - * system is just like the C version of the - * function in that it executes the given - * command and outputs the result. - * - * The system call also tries to automatically - * flush the web server's output buffer after each line of output if - * PHP is running as a server module. - * - * If you need to execute a command and have all the data from the - * command passed directly back without any interference, use the - * passthru function. - * - * @param string $command The command that will be executed. - * @param int|null $result_code If the result_code argument is present, then the - * return status of the executed command will be written to this - * variable. - * @return string Returns the last line of the command output on success. + * @param string $command + * @param int|null $result_code + * @return string * @throws ExecException * */ diff --git a/generated/8.5/fileinfo.php b/generated/8.5/fileinfo.php index e82e617f..2e832a4e 100644 --- a/generated/8.5/fileinfo.php +++ b/generated/8.5/fileinfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\FileinfoException; /** - * This function closes the instance opened by finfo_open. - * - * @param \finfo $finfo An finfo instance, returned by finfo_open. + * @param \finfo $finfo * @throws FileinfoException * */ @@ -22,24 +20,9 @@ function finfo_close(\finfo $finfo): void /** - * Procedural style - * - * Object-oriented style (constructor): - * - * This function opens a magic database and returns its instance. - * - * @param int $flags One or disjunction of more Fileinfo - * constants. - * @param null|string $magic_database Name of a magic database file, usually something like - * /path/to/magic.mime. If not specified, the - * MAGIC environment variable is used. If the - * environment variable isn't set, then PHP's bundled magic database will - * be used. - * - * Passing NULL or an empty string will be equivalent to the default - * value. - * @return \finfo (Procedural style only) - * Returns an finfo instance on success. + * @param int $flags + * @param null|string $magic_database + * @return \finfo * @throws FileinfoException * */ @@ -59,12 +42,8 @@ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): /** - * Returns the MIME content type for a file as determined by using - * information from the magic.mime file. - * - * @param resource|string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like - * text/plain or application/octet-stream. + * @param resource|string $filename + * @return string * @throws FileinfoException * */ diff --git a/generated/8.5/filesystem.php b/generated/8.5/filesystem.php index f70ebf0b..a3c6ea4a 100644 --- a/generated/8.5/filesystem.php +++ b/generated/8.5/filesystem.php @@ -5,14 +5,8 @@ use Safe\Exceptions\FilesystemException; /** - * Attempts to change the group of the file filename - * to group. - * - * Only the superuser may change the group of a file arbitrarily; other users - * may change the group of a file to any group of which that user is a member. - * - * @param string $filename Path to the file. - * @param int|string $group A group name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -27,35 +21,9 @@ function chgrp(string $filename, $group): void /** - * Attempts to change the mode of the specified file to that given in - * permissions. - * - * @param string $filename Path to the file. - * @param int $permissions Note that permissions is not automatically - * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix permissions with a zero (0). - * Strings such as "g+w" will not work properly. - * - * - * - * - * ]]> - * - * - * - * The permissions parameter consists of three octal - * number components specifying access restrictions for the owner, - * the user group in which the owner is in, and to everybody else in - * this order. One component can be computed by adding up the needed - * permissions for that target user base. Number 1 means that you - * grant execute rights, number 2 means that you make the file - * writeable, number 4 means that you make the file readable. Add - * up these numbers to specify needed rights. You can also read more - * about modes on Unix systems with 'man 1 chmod' - * and 'man 2 chmod'. - * - * - * + * @param string $filename + * @param int $permissions + * @throws FilesystemException * */ function chmod(string $filename, int $permissions): void @@ -69,12 +37,8 @@ function chmod(string $filename, int $permissions): void /** - * Attempts to change the owner of the file filename - * to user user. Only the superuser may change the - * owner of a file. - * - * @param string $filename Path to the file. - * @param int|string $user A user name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -89,19 +53,9 @@ function chown(string $filename, $user): void /** - * Makes a copy of the file from to - * to. - * - * If you wish to move a file, use the rename function. - * - * @param string $from Path to the source file. - * @param string $to The destination path. If to is a URL, the - * copy operation may fail if the wrapper does not support overwriting of - * existing files. - * - * If the destination file already exists, it will be overwritten. - * @param null|resource $context A valid context resource created with - * stream_context_create. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -120,16 +74,8 @@ function copy(string $from, string $to, $context = null): void /** - * Given a string containing a directory, this function will return the - * number of bytes available on the corresponding filesystem or disk - * partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * - * Given a file name instead of a directory, the behaviour of the - * function is unspecified and may differ between operating systems and - * PHP versions. - * @return float Returns the number of available bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -145,11 +91,8 @@ function disk_free_space(string $directory): float /** - * Given a string containing a directory, this function will return the total - * number of bytes on the corresponding filesystem or disk partition. - * - * @param string $directory A directory of the filesystem or disk partition. - * @return float Returns the total number of bytes as a float. + * @param string $directory + * @return float * @throws FilesystemException * */ @@ -165,10 +108,7 @@ function disk_total_space(string $directory): float /** - * The file pointed to by stream is closed. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or fsockopen. + * @param resource $stream * @throws FilesystemException * */ @@ -183,15 +123,7 @@ function fclose($stream): void /** - * This function synchronizes stream contents to storage media, just like fsync does, - * but it does not synchronize file meta-data. - * Note that this function is only effectively different in POSIX systems. - * In Windows, this function is aliased to fsync. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -206,13 +138,7 @@ function fdatasync($stream): void /** - * This function forces a write of all buffered output to the resource - * pointed to by the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -227,36 +153,12 @@ function fflush($stream): void /** - * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to length bytes. On failure, - * file_get_contents will return FALSE. - * - * file_get_contents is the preferred way to read the - * contents of a file into a string. It will use memory mapping techniques if - * supported by your OS to enhance performance. - * - * @param string $filename Name of the file to read. - * @param bool $use_include_path The FILE_USE_INCLUDE_PATH constant can be used - * to trigger include path - * search. - * This is not possible if strict typing - * is enabled, since FILE_USE_INCLUDE_PATH is an - * int. Use TRUE instead. - * @param null|resource $context A valid context resource created with - * stream_context_create. If you don't need to use a - * custom context, you can skip this parameter by NULL. - * @param int $offset The offset where the reading starts on the original stream. - * Negative offsets count from the end of the stream. - * - * Seeking (offset) is not supported with remote files. - * Attempting to seek on non-local files may work with small offsets, but this - * is unpredictable because it works on the buffered stream. - * @param 0|null|positive-int $length Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the - * stream processed by the filters. - * @return string The function returns the read data. + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @param int $offset + * @param 0|null|positive-int $length + * @return string * @throws FilesystemException * */ @@ -280,76 +182,11 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * This function is identical to calling fopen, - * fwrite and fclose successively - * to write data to a file. - * - * If filename does not exist, the file is created. - * Otherwise, the existing file is overwritten, unless the - * FILE_APPEND flag is set. - * - * @param string $filename Path to the file where to write the data. - * @param mixed $data The data to write. Can be either a string, an - * array or a stream resource. - * - * If data is a stream resource, the - * remaining buffer of that stream will be copied to the specified file. - * This is similar with using stream_copy_to_stream. - * - * You can also specify the data parameter as a single - * dimension array. This is equivalent to - * file_put_contents($filename, implode('', $array)). - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * - * Available flags - * - * - * - * Flag - * Description - * - * - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * Search for filename in the include directory. - * See include_path for more - * information. - * - * - * - * - * FILE_APPEND - * - * - * If file filename already exists, append - * the data to the file instead of overwriting it. - * - * - * - * - * LOCK_EX - * - * - * Acquire an exclusive lock on the file while proceeding to the - * writing. In other words, a flock call happens - * between the fopen call and the - * fwrite call. This is not identical to an - * fopen call with mode "x". - * - * - * - * - * - * @param null|resource $context A valid context resource created with - * stream_context_create. - * @return 0|positive-int This function returns the number of bytes that were written to the file. + * @param string $filename + * @param mixed $data + * @param int $flags + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -369,57 +206,10 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n /** - * Reads an entire file into an array. - * - * @param string $filename Path to the file. - * @param int-mask $flags The optional parameter flags can be one, or - * more, of the following constants: - * - * - * - * FILE_USE_INCLUDE_PATH - * - * - * - * Search for the file in the include_path. - * - * - * - * - * - * FILE_IGNORE_NEW_LINES - * - * - * - * Omit newline at the end of each array element. - * - * - * - * - * - * FILE_SKIP_EMPTY_LINES - * - * - * - * Skip empty lines. - * - * - * - * - * - * FILE_NO_DEFAULT_CONTEXT - * - * - * - * Don't use the default context. - * - * - * - * - * @param null|resource $context Search for the file in the include_path. - * @return list Returns the file in an array. Each element of the array corresponds to a - * line in the file, with the newline still attached. Upon failure, - * file returns FALSE. + * @param string $filename + * @param int-mask $flags + * @param null|resource $context + * @return list * @throws FilesystemException * */ @@ -439,11 +229,8 @@ function file(string $filename, int $flags = 0, $context = null): array /** - * Gets the last access time of the given file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last accessed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -459,11 +246,8 @@ function fileatime(string $filename): int /** - * Gets the inode change time of a file. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last changed. - * The time is returned as a Unix timestamp. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -479,10 +263,8 @@ function filectime(string $filename): int /** - * Gets the file inode. - * - * @param string $filename Path to the file. - * @return int Returns the inode number of the file. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -498,13 +280,8 @@ function fileinode(string $filename): int /** - * This function returns the time when the data blocks of a file were being - * written to, that is, the time when the content of the file was changed. - * - * @param string $filename Path to the file. - * @return int Returns the time the file was last modified. - * The time is returned as a Unix timestamp, which is - * suitable for the date function. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -520,12 +297,8 @@ function filemtime(string $filename): int /** - * Gets the file owner. - * - * @param string $filename Path to the file. - * @return int Returns the user ID of the owner of the file. - * The user ID is returned in numerical format, use - * posix_getpwuid to resolve it to a username. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -541,24 +314,8 @@ function fileowner(string $filename): int /** - * Gets permissions for the given file. - * - * @param string $filename Path to the file. - * @return int Returns the file's permissions as a numeric mode. Lower bits of this mode - * are the same as the permissions expected by chmod, - * however on most platforms the return value will also include information on - * the type of file given as filename. The examples - * below demonstrate how to test the return value for specific permissions and - * file types on POSIX systems, including Linux and macOS. - * - * For local files, the specific return value is that of the - * st_mode member of the structure returned by the C - * library's stat function. Exactly which bits are set - * can vary from platform to platform, and looking up your specific platform's - * documentation is recommended if parsing the non-permission bits of the - * return value is required. - * - * Returns FALSE on failure. + * @param string $filename + * @return int * @throws FilesystemException * */ @@ -574,11 +331,8 @@ function fileperms(string $filename): int /** - * Gets the size for the given file. - * - * @param string $filename Path to the file. - * @return 0|positive-int Returns the size of the file in bytes, or FALSE (and generates an error - * of level E_WARNING) in case of an error. + * @param string $filename + * @return 0|positive-int * @throws FilesystemException * */ @@ -594,15 +348,8 @@ function filesize(string $filename): int /** - * Returns the type of the given file. - * - * @param string $filename Path to the file. - * @return string Returns the type of the file. Possible values are fifo, char, - * dir, block, link, file, socket and unknown. - * - * Returns FALSE if an error occurs. filetype will also - * produce an E_NOTICE message if the stat call fails - * or if the file type is unknown. + * @param string $filename + * @return string * @throws FilesystemException * */ @@ -618,44 +365,9 @@ function filetype(string $filename): string /** - * flock allows you to perform a simple reader/writer - * model which can be used on virtually every platform (including most Unix - * derivatives and even Windows). - * - * The lock is released also by fclose, - * or when stream is garbage collected. - * - * PHP supports a portable way of locking complete files in an advisory way - * (which means all accessing programs have to use the same way of locking - * or it will not work). By default, this function will block until the - * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param int-mask $operation operation is one of the following: - * - * - * - * LOCK_SH to acquire a shared lock (reader). - * - * - * - * - * LOCK_EX to acquire an exclusive lock (writer). - * - * - * - * - * LOCK_UN to release a lock (shared or exclusive). - * - * - * - * - * It is also possible to add LOCK_NB as a bitmask to one - * of the above operations, if flock should not - * block during the locking attempt. - * @param 0|1|null $would_block The optional third argument is set to 1 if the lock would block - * (EWOULDBLOCK errno condition). + * @param resource $stream + * @param int-mask $operation + * @param 0|1|null $would_block * @throws FilesystemException * */ @@ -670,208 +382,11 @@ function flock($stream, int $operation, ?int &$would_block = null): void /** - * fopen binds a named resource, specified by - * filename, to a stream. - * - * @param string $filename If filename is of the form "scheme://...", it - * is assumed to be a URL and PHP will search for a protocol handler - * (also known as a wrapper) for that scheme. If no wrappers for that - * protocol are registered, PHP will emit a notice to help you track - * potential problems in your script and then continue as though - * filename specifies a regular file. - * - * If PHP has decided that filename specifies - * a local file, then it will try to open a stream on that file. - * The file must be accessible to PHP, so you need to ensure that - * the file access permissions allow this access. - * If you have enabled - * open_basedir further - * restrictions may apply. - * - * If PHP has decided that filename specifies - * a registered protocol, and that protocol is registered as a - * network URL, PHP will check to make sure that - * allow_url_fopen is - * enabled. If it is switched off, PHP will emit a warning and - * the fopen call will fail. - * - * The list of supported protocols can be found in . Some protocols (also referred to as - * wrappers) support context - * and/or php.ini options. Refer to the specific page for the - * protocol in use for a list of options which can be set. (e.g. - * php.ini value user_agent used by the - * http wrapper). - * - * On the Windows platform, be careful to escape any backslashes - * used in the path to the file, or use forward slashes. - * - * - * - * ]]> - * - * - * @param string $mode The mode parameter specifies the type of access - * you require to the stream. It may be any of the following: - * - * - * A list of possible modes for fopen - * using mode - * - * - * - * - * mode - * Description - * - * - * - * - * 'r' - * - * Open for reading only; place the file pointer at the - * beginning of the file. - * - * - * - * 'r+' - * - * Open for reading and writing; place the file pointer at - * the beginning of the file. - * - * - * - * 'w' - * - * Open for writing only; place the file pointer at the - * beginning of the file and truncate the file to zero length. - * If the file does not exist, attempt to create it. - * - * - * - * 'w+' - * - * Open for reading and writing; otherwise it has the - * same behavior as 'w'. - * - * - * - * 'a' - * - * Open for writing only; place the file pointer at the end of - * the file. If the file does not exist, attempt to create it. - * In this mode, fseek has no effect, writes are always appended. - * - * - * - * 'a+' - * - * Open for reading and writing; place the file pointer at - * the end of the file. If the file does not exist, attempt to - * create it. In this mode, fseek only affects - * the reading position, writes are always appended. - * - * - * - * 'x' - * - * Create and open for writing only; place the file pointer at the - * beginning of the file. If the file already exists, the - * fopen call will fail by returning FALSE and - * generating an error of level E_WARNING. If - * the file does not exist, attempt to create it. This is equivalent - * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * - * 'x+' - * - * Create and open for reading and writing; otherwise it has the - * same behavior as 'x'. - * - * - * - * 'c' - * - * Open the file for writing only. If the file does not exist, it is - * created. If it exists, it is neither truncated (as opposed to - * 'w'), nor the call to this function fails (as is - * the case with 'x'). The file pointer is - * positioned on the beginning of the file. This may be useful if it's - * desired to get an advisory lock (see flock) - * before attempting to modify the file, as using - * 'w' could truncate the file before the lock - * was obtained (if truncation is desired, - * ftruncate can be used after the lock is - * requested). - * - * - * - * 'c+' - * - * Open the file for reading and writing; otherwise it has the same - * behavior as 'c'. - * - * - * - * 'e' - * - * Set close-on-exec flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conformant systems. - * - * - * - * 'n' - * - * Set non-blocking flag on the opened file descriptor. Only - * available in PHP compiled on POSIX.1-2008 conformant systems. - * - * - * - * - * - * - * Different operating system families have different line-ending - * conventions. When you write a text file and want to insert a line - * break, you need to use the correct line-ending character(s) for your - * operating system. Unix based systems use \n as the - * line ending character, Windows based systems use \r\n - * as the line ending characters and Macintosh based systems (Mac OS Classic) used - * \r as the line ending character. - * - * If you use the wrong line ending characters when writing your files, you - * might find that other applications that open those files will "look - * funny". - * - * Windows offers a text-mode translation flag ('t') - * which will transparently translate \n to - * \r\n when working with the file. In contrast, you - * can also use 'b' to force binary mode, which will not - * translate your data. To use these flags, specify either - * 'b' or 't' as the last character - * of the mode parameter. - * - * The default translation mode is 'b'. - * You can use the 't' - * mode if you are working with plain-text files and you use - * \n to delimit your line endings in your script, but - * expect your files to be readable with applications such as old versions of notepad. You - * should use the 'b' in all other cases. - * - * If you specify the 't' flag when working with binary files, you - * may experience strange problems with your data, including broken image - * files and strange problems with \r\n characters. - * - * For portability, it is also strongly recommended that - * you re-write code that uses or relies upon the 't' - * mode so that it uses the correct line endings and - * 'b' mode instead. - * @param bool $use_include_path The optional third use_include_path parameter - * can be set to TRUE if you want to search for the file in the - * include_path, too. - * @param null|resource $context A context stream - * resource. - * @return resource Returns a file pointer resource on success + * @param string $filename + * @param string $mode + * @param bool $use_include_path + * @param null|resource $context + * @return resource * @throws FilesystemException * */ @@ -891,41 +406,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ /** - * fread reads up to - * length bytes from the file pointer - * referenced by stream. Reading stops as soon as one - * of the following conditions is met: - * - * - * - * length bytes have been read - * - * - * - * - * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the - * socket timeout occurs (for network streams) - * - * - * - * - * if the stream is read buffered and it does not represent a plain file, at - * most one read of up to a number of bytes equal to the chunk size (usually - * 8192) is made; depending on the previously buffered data, the size of the - * returned data may be larger than the chunk size. - * - * - * - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param positive-int $length Up to length number of bytes read. - * @return string Returns the read string. + * @param resource $stream + * @param positive-int $length + * @return string * @throws FilesystemException * */ @@ -941,16 +424,8 @@ function fread($stream, int $length): string /** - * Gathers the statistics of the file opened by the file - * pointer stream. This function is similar to the - * stat function except that it operates - * on an open file pointer instead of a filename. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @return array Returns an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * Returns FALSE on failure. + * @param resource $stream + * @return array * @throws FilesystemException * */ @@ -966,13 +441,7 @@ function fstat($stream): array /** - * This function synchronizes changes to the file, including its meta-data. This is similar to fflush, - * but it also instructs the operating system to write to the storage media. - * - * @param resource $stream The file pointer must be valid, and must point to - * a file successfully opened by fopen or - * fsockopen (and not yet closed by - * fclose). + * @param resource $stream * @throws FilesystemException * */ @@ -987,16 +456,8 @@ function fsync($stream): void /** - * Returns the position of the file pointer referenced by stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file successfully - * opened by fopen or popen. - * ftell gives undefined results for append-only streams - * (opened with "a" flag). - * @return int Returns the position of the file pointer referenced by - * stream as an integer; i.e., its offset into the file stream. - * - * If an error occurs, returns FALSE. + * @param resource $stream + * @return int * @throws FilesystemException * */ @@ -1012,19 +473,8 @@ function ftell($stream): int /** - * Takes the filepointer, stream, and truncates the file to - * length, size. - * - * @param resource $stream The file pointer. - * - * The stream must be open for writing. - * @param 0|positive-int $size The size to truncate to. - * - * If size is larger than the file then the file - * is extended with null bytes. - * - * If size is smaller than the file then the file - * is truncated to that size. + * @param resource $stream + * @param 0|positive-int $size * @throws FilesystemException * */ @@ -1039,18 +489,10 @@ function ftruncate($stream, int $size): void /** - * fwrite writes the contents of - * data to the file stream pointed to by - * stream. - * - * @param resource $stream A file system pointer resource - * that is typically created using fopen. - * @param string $data The string that is to be written. - * @param 0|null|positive-int $length If length is an integer, writing will stop - * after length bytes have been written or the - * end of data is reached, whichever comes first. - * @return 0|positive-int fwrite returns the number of bytes - * written. + * @param resource $stream + * @param string $data + * @param 0|null|positive-int $length + * @return 0|positive-int * @throws FilesystemException * */ @@ -1070,51 +512,9 @@ function fwrite($stream, string $data, ?int $length = null): int /** - * The glob function searches for all the pathnames - * matching pattern according to the rules used by - * the libc glob() function, which is similar to the rules used by common - * shells. - * - * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. - * - * Special characters: - * - * - * - * * - Matches zero or more characters. - * - * - * - * - * ? - Matches exactly one character (any character). - * - * - * - * - * [...] - Matches one character from a group of - * characters. If the first character is !, - * matches any character not in the group. - * - * - * - * - * {a,b,c} - Matches one string from a group of - * strings delimited by a comma when the GLOB_BRACE - * flag is used. - * - * - * - * - * \ - Escapes the following character, - * except when the GLOB_NOESCAPE flag is used. - * - * - * - * @param int $flags Any of the GLOB_* constants. - * @return list Returns an array containing the matched files/directories, an empty array - * if no file matched. - * Unless GLOB_NOSORT was used, the names will - * be sorted alphanumerically. + * @param string $pattern + * @param int $flags + * @return list * @throws FilesystemException * */ @@ -1130,15 +530,8 @@ function glob(string $pattern, int $flags = 0): array /** - * Attempts to change the group of the symlink filename - * to group. - * - * Only the superuser may change the group of a symlink arbitrarily; other - * users may change the group of a symlink to any group of which that user is - * a member. - * - * @param string $filename Path to the symlink. - * @param int|string $group The group specified by name or number. + * @param string $filename + * @param int|string $group * @throws FilesystemException * */ @@ -1153,13 +546,8 @@ function lchgrp(string $filename, $group): void /** - * Attempts to change the owner of the symlink filename - * to user user. - * - * Only the superuser may change the owner of a symlink. - * - * @param string $filename Path to the file. - * @param int|string $user User name or number. + * @param string $filename + * @param int|string $user * @throws FilesystemException * */ @@ -1174,10 +562,8 @@ function lchown(string $filename, $user): void /** - * link creates a hard link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1192,18 +578,8 @@ function link(string $target, string $link): void /** - * Gathers the statistics of the file or symbolic link named by - * filename. - * - * @param string $filename Path to a file or a symbolic link. - * @return array See the manual page for stat for information on - * the structure of the array that lstat returns. - * This function is identical to the stat function - * except that if the filename parameter is a symbolic - * link, the status of the symbolic link is returned, not the status of the - * file pointed to by the symbolic link. - * - * On failure, FALSE is returned. + * @param string $filename + * @return array * @throws FilesystemException * */ @@ -1219,30 +595,10 @@ function lstat(string $filename): array /** - * Attempts to create the directory specified by directory. - * - * @param string $directory The directory path. - * A URL can be used as a - * filename with this function if the fopen wrappers have been enabled. - * See fopen for more details on how to specify the - * filename. See the for links to information - * about what abilities the various wrappers have, notes on their usage, - * and information on any predefined variables they may - * provide. - * @param int $permissions The permissions are 0777 by default, which means the widest possible - * access. For more information on permissions, read the details - * on the chmod page. - * - * permissions is ignored on Windows. - * - * Note that you probably want to specify the permissions as an octal number, - * which means it should have a leading zero. The permissions is also modified - * by the current umask, which you can change using - * umask. - * @param bool $recursive If TRUE, then any parent directories to the directory specified will - * also be created, with the same permissions. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param int $permissions + * @param bool $recursive + * @param null|resource $context * @throws FilesystemException * */ @@ -1261,31 +617,10 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal /** - * parse_ini_file loads in the - * ini file specified in filename, - * and returns the settings in it in an associative array. - * - * The structure of the ini file is the same as the php.ini's. - * - * @param string $filename The filename of the ini file being parsed. If a relative path is used, - * it is evaluated relative to the current working directory, then the - * include_path. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $filename + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1301,28 +636,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s /** - * parse_ini_string returns the settings in string - * ini_string in an associative array. - * - * The structure of the ini string is the same as the php.ini's. - * - * @param string $ini_string The contents of the ini file being parsed. - * @param bool $process_sections By setting the process_sections - * parameter to TRUE, you get a multidimensional array, with - * the section names and settings included. The default - * for process_sections is FALSE - * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or - * INI_SCANNER_RAW. If INI_SCANNER_RAW - * is supplied, then option values will not be parsed. - * - * - * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. - * In this mode boolean, null and integer types are preserved when possible. - * String values "true", "on" and "yes" - * are converted to TRUE. "false", "off", "no" - * and "none" are considered FALSE. "null" is converted to NULL - * in typed mode. Also, all numeric strings are converted to integer type if it is possible. - * @return array The settings are returned as an associative array on success. + * @param string $ini_string + * @param bool $process_sections + * @param int $scanner_mode + * @return array * @throws FilesystemException * */ @@ -1338,11 +655,8 @@ function parse_ini_string(string $ini_string, bool $process_sections = false, in /** - * Closes a file pointer to a pipe opened by popen. - * - * @param resource $handle The file pointer must be valid, and must have been returned by a - * successful call to popen. - * @return int Returns the termination status of the process that was run. + * @param resource $handle + * @return int * @throws FilesystemException * */ @@ -1358,28 +672,9 @@ function pclose($handle): int /** - * Opens a pipe to a process executed by forking the command given - * by command. - * - * @param string $command The command - * @param string $mode The mode. Either 'r' for reading, or 'w' - * for writing. - * - * On Windows, popen defaults to text mode, i.e. any \n - * characters written to or read from the pipe will be translated to \r\n. - * If this is not desired, binary mode can be enforced by setting mode - * to 'rb' and 'wb', respectively. - * @return resource Returns a file pointer identical to that returned by - * fopen, except that it is unidirectional (may - * only be used for reading or writing) and must be closed with - * pclose. This pointer may be used with - * fgets, fgetss, and - * fwrite. When the mode is 'r', the returned - * file pointer equals to the STDOUT of the command, when the mode - * is 'w', the returned file pointer equals to the STDIN of the - * command. - * - * If an error occurs, returns FALSE. + * @param string $command + * @param string $mode + * @return resource * @throws FilesystemException * */ @@ -1395,14 +690,10 @@ function popen(string $command, string $mode) /** - * Reads a file and writes it to the output buffer. - * - * @param string $filename The filename being read. - * @param bool $use_include_path You can use the optional second parameter and set it to TRUE, if - * you want to search for the file in the include_path, too. - * @param null|resource $context A context stream - * resource. - * @return 0|positive-int Returns the number of bytes read from the file on success + * @param string $filename + * @param bool $use_include_path + * @param null|resource $context + * @return 0|positive-int * @throws FilesystemException * */ @@ -1422,10 +713,8 @@ function readfile(string $filename, bool $use_include_path = false, $context = n /** - * readlink does the same as the readlink C function. - * - * @param string $path The symbolic link path. - * @return string Returns the contents of the symbolic link path. + * @param string $path + * @return string * @throws FilesystemException * */ @@ -1441,27 +730,8 @@ function readlink(string $path): string /** - * realpath expands all symbolic links and - * resolves references to /./, /../ and extra / characters in - * the input path and returns the canonicalized - * absolute pathname. - * - * @param string $path The path being checked. - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * - * - * - * Whilst a path must be supplied, the value can be an empty string. - * In this case, the value is interpreted as the current directory. - * @return non-empty-string Returns the canonicalized absolute pathname on success. The resulting path - * will have no symbolic link, /./ or /../ components. Trailing delimiters, - * such as \ and /, are also removed. - * - * realpath returns FALSE on failure, e.g. if - * the file does not exist. + * @param string $path + * @return non-empty-string * @throws FilesystemException * */ @@ -1477,27 +747,9 @@ function realpath(string $path): string /** - * Attempts to rename from to - * to, moving it between directories if necessary. - * If renaming a file and to exists, - * it will be overwritten. If renaming a directory and - * to exists, - * this function will emit a warning. - * - * @param string $from The old name. - * - * The wrapper used in from - * must match the wrapper used in - * to. - * @param string $to The new name. - * - * - * On Windows, if to already exists, it must be writable. - * Otherwise rename fails and issues E_WARNING. - * - * - * @param null|resource $context A context stream - * resource. + * @param string $from + * @param string $to + * @param null|resource $context * @throws FilesystemException * */ @@ -1516,11 +768,7 @@ function rename(string $from, string $to, $context = null): void /** - * Sets the file position indicator for stream - * to the beginning of the file stream. - * - * @param resource $stream The file pointer must be valid, and must point to a file - * successfully opened by fopen. + * @param resource $stream * @throws FilesystemException * */ @@ -1535,13 +783,8 @@ function rewind($stream): void /** - * Attempts to remove the directory named by directory. - * The directory must be empty, and the relevant permissions must permit this. - * A E_WARNING level error will be generated on failure. - * - * @param string $directory Path to the directory. - * @param null|resource $context A context stream - * resource. + * @param string $directory + * @param null|resource $context * @throws FilesystemException * */ @@ -1560,12 +803,8 @@ function rmdir(string $directory, $context = null): void /** - * symlink creates a symbolic link to the existing - * target with the specified name - * link. - * - * @param string $target Target of the link. - * @param string $link The link name. + * @param string $target + * @param string $link * @throws FilesystemException * */ @@ -1580,14 +819,9 @@ function symlink(string $target, string $link): void /** - * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. - * If the directory does not exist or is not writable, tempnam may - * generate a file in the system's temporary directory, and return - * the full path to that file, including its name. - * - * @param string $directory The directory where the temporary filename will be created. - * @param string $prefix The prefix of the generated temporary filename. - * @return non-falsy-string Returns the new temporary filename (with path). + * @param string $directory + * @param string $prefix + * @return non-falsy-string * @throws FilesystemException * */ @@ -1603,16 +837,7 @@ function tempnam(string $directory, string $prefix): string /** - * Creates a temporary file with a unique name in read-write-binary (w+b) mode and - * returns a file handle. - * - * The file is automatically removed when closed (for example, by calling - * fclose, or when there are no remaining references to - * the file handle returned by tmpfile), or when the - * script ends. - * - * @return resource Returns a file handle, similar to the one returned by - * fopen, for the new file. + * @return resource * @throws FilesystemException * */ @@ -1628,21 +853,9 @@ function tmpfile() /** - * Attempts to set the access and modification times of the file named in the - * filename parameter to the value given in - * mtime. - * Note that the access time is always modified, regardless of the number - * of parameters. - * - * If the file does not exist, it will be created. - * - * @param string $filename The name of the file being touched. - * @param int|null $mtime The touch time. If mtime is NULL, - * the current system time is used. - * @param int|null $atime If not NULL, the access time of the given filename is set to - * the value of atime. Otherwise, it is set to - * the value passed to the mtime parameter. - * If both are NULL, the current system time is used. + * @param string $filename + * @param int|null $mtime + * @param int|null $atime * @throws FilesystemException * */ @@ -1663,16 +876,8 @@ function touch(string $filename, ?int $mtime = null, ?int $atime = null): void /** - * Deletes filename. Similar to the Unix C unlink() - * function. An E_WARNING level error will be generated on - * failure. - * - * @param string $filename Path to the file. - * - * If the file is a symlink, the symlink will be deleted. On Windows, to delete - * a symlink to a directory, rmdir has to be used instead. - * @param null|resource $context A context stream - * resource. + * @param string $filename + * @param null|resource $context * @throws FilesystemException * */ diff --git a/generated/8.5/filter.php b/generated/8.5/filter.php index 68c2ec7d..0f05571c 100644 --- a/generated/8.5/filter.php +++ b/generated/8.5/filter.php @@ -5,34 +5,10 @@ use Safe\Exceptions\FilterException; /** - * This function is useful for retrieving many values without - * repetitively calling filter_input. - * - * @param int $type One of the INPUT_* constants. - * - * The content of the superglobal that is being filtered is the original - * "raw" content provided by the SAPI, - * prior to any user modification to the superglobal. - * To filter a modified superglobal use - * filter_var_array instead. + * @param int $type * @param array|int $options * @param bool $add_empty - * @return array|null On success, an array containing the values of the requested variables. - * - * On failure, FALSE is returned. - * Except if the failure is that the input array designated by - * type is not populated where NULL is returned - * if the FILTER_NULL_ON_FAILURE flag is used. - * - * Missing entries from the input array will be populated into the returned - * array if add_empty is TRUE. - * In which case, missing entries will be set to NULL, - * unless the FILTER_NULL_ON_FAILURE flag is used, - * in which case it will be FALSE. - * - * An entry of the returned array will be FALSE if the filter fails, - * unless the FILTER_NULL_ON_FAILURE flag is used, - * in which case it will be NULL. + * @return array|null * @throws FilterException * */ @@ -48,41 +24,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt /** - * Filter an associative array of values using - * FILTER_VALIDATE_* - * validation filters, - * FILTER_SANITIZE_* - * sanitization filters, or custom filters. - * - * @param array $array An associative array containing the data to filter. - * @param mixed $options Either an associative array of options, - * or the filter to apply to each entry, - * which can either be a validation filter by using one of the - * FILTER_VALIDATE_* - * constants, or a sanitization filter by using one of the - * FILTER_SANITIZE_* - * constants. - * - * The option array is an associative array where the key corresponds - * to a key in the data array and the associated - * value is either the filter to apply to this entry, - * or an associative array describing how and which filter should be - * applied to this entry. - * - * The associative array describing how a filter should be applied - * must contain the 'filter' key whose associated - * value is the filter to apply, which can be one of the - * FILTER_VALIDATE_*, - * FILTER_SANITIZE_*, - * FILTER_UNSAFE_RAW, or - * FILTER_CALLBACK constants. - * It can optionally contain the 'flags' key - * which specifies and flags that apply to the filter, - * and the 'options' key which specifies any options - * that apply to the filter. - * @param bool $add_empty Add missing keys as NULL to the return value. - * @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if - * the variable is not set. + * @param array $array + * @param mixed $options + * @param bool $add_empty + * @return array|null * @throws FilterException * */ diff --git a/generated/8.5/fpm.php b/generated/8.5/fpm.php index c25d951e..73840e0d 100644 --- a/generated/8.5/fpm.php +++ b/generated/8.5/fpm.php @@ -5,10 +5,6 @@ use Safe\Exceptions\FpmException; /** - * 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. - * * @throws FpmException * */ @@ -23,14 +19,7 @@ function fastcgi_finish_request(): void /** - * This function returns the full current FPM pool status as an associative array. It always - * returns the full status, including per-process status information. See the - * FPM status page guide for further - * details. - * - * Note that this function will only be defined if FPM is being used to serve the script. - * - * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} Associative array containing the full FPM pool status. + * @return array{pool: string, process-manager: 'dynamic'|'ondemand'|'static', start-time: int, start-since: int, accepted-conn: int, listen-queue: int, max-listen-queue: int, listen-queue-len: int, idle-processes: int, active-processes: int, total-processes: int, max-active-processes: int, max-children-reached: 0|1, slow-requests: int, procs: array} * @throws FpmException * */ diff --git a/generated/8.5/ftp.php b/generated/8.5/ftp.php index f5b87f06..2154de6d 100644 --- a/generated/8.5/ftp.php +++ b/generated/8.5/ftp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to - * allocate space for a file to be uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $size The number of bytes to allocate. - * @param null|string $response A textual representation of the servers response will be returned by - * reference in response if a variable is provided. + * @param \FTP\Connection $ftp + * @param int $size + * @param null|string $response * @throws FtpException * */ @@ -26,9 +22,7 @@ function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @param string $remote_filename * @param string $local_filename * @param FTP_ASCII|FTP_BINARY $mode @@ -46,9 +40,7 @@ function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local /** - * Changes to the parent directory. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -63,10 +55,8 @@ function ftp_cdup(\FTP\Connection $ftp): void /** - * Changes the current directory to the specified one. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The target directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -81,13 +71,10 @@ function ftp_chdir(\FTP\Connection $ftp, string $directory): void /** - * Sets the permissions on the specified remote file to - * permissions. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param int $permissions The new permissions, given as an octal value. - * @param string $filename The remote file. - * @return int Returns the new file permissions on success. + * @param \FTP\Connection $ftp + * @param int $permissions + * @param string $filename + * @return int * @throws FtpException * */ @@ -103,10 +90,7 @@ function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): in /** - * ftp_close closes the given link identifier - * and releases the resource. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. + * @param \FTP\Connection $ftp * @throws FtpException * */ @@ -121,18 +105,10 @@ function ftp_close(\FTP\Connection $ftp): void /** - * ftp_connect opens an FTP connection to the - * specified hostname. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout in seconds for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -148,11 +124,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\ /** - * ftp_delete deletes the file specified by - * filename from the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The file to delete. + * @param \FTP\Connection $ftp + * @param string $filename * @throws FtpException * */ @@ -167,15 +140,11 @@ function ftp_delete(\FTP\Connection $ftp, string $filename): void /** - * ftp_fget retrieves remote_filename - * from the FTP server, and writes it to the given file pointer. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param resource $stream An open file pointer in which we store the data. - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param resource $stream + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -190,15 +159,11 @@ function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $m /** - * ftp_fput uploads the data from a file pointer - * to a remote file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param resource $stream An open file pointer on the local file. Reading stops at end of file. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param resource $stream + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -213,15 +178,11 @@ function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $m /** - * ftp_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -236,11 +197,9 @@ function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_fi /** - * Logs in to the given FTP connection. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $username The username (USER). - * @param string $password The password (PASS). + * @param \FTP\Connection $ftp + * @param string $username + * @param string $password * @throws FtpException * */ @@ -255,11 +214,9 @@ function ftp_login(\FTP\Connection $ftp, string $username, string $password): vo /** - * Creates the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The name of the directory that will be created. - * @return string Returns the newly created directory name on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return string * @throws FtpException * */ @@ -275,11 +232,9 @@ function ftp_mkdir(\FTP\Connection $ftp, string $directory): string /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. - * @return array Returns an array of arrays with file infos from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -295,21 +250,12 @@ function ftp_mlsd(\FTP\Connection $ftp, string $directory): array /** - * ftp_nb_get retrieves a remote file from the FTP server, - * and saves it into a local file. - * - * The difference between this function and ftp_get is that - * this function retrieves the file asynchronously, so your program can perform - * other operations while the file is being downloaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $local_filename The local file path (will be overwritten if the file already exists). - * @param string $remote_filename The remote file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start downloading from. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $local_filename + * @param string $remote_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -325,20 +271,12 @@ function ftp_nb_get(\FTP\Connection $ftp, string $local_filename, string $remote /** - * ftp_nb_put stores a local file on the FTP server. - * - * The difference between this function and the ftp_put - * is that this function uploads the file asynchronously, so your program can - * perform other operations while the file is being uploaded. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. - * @return int Returns FTP_FAILED or FTP_FINISHED - * or FTP_MOREDATA to open the local file. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset + * @return int * @throws FtpException * */ @@ -354,14 +292,9 @@ function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to be listed. This parameter can also include arguments, eg. - * ftp_nlist($ftp, "-la /your/dir");. - * Note that this parameter isn't escaped so there may be some issues with - * filenames containing spaces and other characters. - * @return array Returns an array of filenames from the specified directory on success. + * @param \FTP\Connection $ftp + * @param string $directory + * @return array * @throws FtpException * */ @@ -377,16 +310,8 @@ function ftp_nlist(\FTP\Connection $ftp, string $directory): array /** - * ftp_pasv turns on or off passive mode. In - * passive mode, data connections are initiated by the client, - * rather than by the server. - * It may be needed if the client is behind firewall. - * - * Please note that ftp_pasv can only be called after a - * successful login or otherwise it will fail. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off. + * @param \FTP\Connection $ftp + * @param bool $enable * @throws FtpException * */ @@ -401,14 +326,11 @@ function ftp_pasv(\FTP\Connection $ftp, bool $enable): void /** - * ftp_put stores a local file on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $remote_filename The remote file path. - * @param string $local_filename The local file path. - * @param FTP_ASCII|FTP_BINARY $mode The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. - * @param int $offset The position in the remote file to start uploading to. + * @param \FTP\Connection $ftp + * @param string $remote_filename + * @param string $local_filename + * @param FTP_ASCII|FTP_BINARY $mode + * @param int $offset * @throws FtpException * */ @@ -423,10 +345,8 @@ function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_fi /** - * - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the current directory name. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ @@ -442,12 +362,9 @@ function ftp_pwd(\FTP\Connection $ftp): string /** - * ftp_rename renames a file or a directory on the FTP - * server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $from The old file/directory name. - * @param string $to The new name. + * @param \FTP\Connection $ftp + * @param string $from + * @param string $to * @throws FtpException * */ @@ -462,11 +379,8 @@ function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void /** - * Removes the specified directory on the FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $directory The directory to delete. This must be either an absolute or relative - * path to an empty directory. + * @param \FTP\Connection $ftp + * @param string $directory * @throws FtpException * */ @@ -481,16 +395,8 @@ function ftp_rmdir(\FTP\Connection $ftp, string $directory): void /** - * ftp_site sends the given SITE - * command to the FTP server. - * - * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and - * group membership. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $command The SITE command. Note that this parameter isn't escaped so there may - * be some issues with filenames containing spaces and other characters. + * @param \FTP\Connection $ftp + * @param string $command * @throws FtpException * */ @@ -505,12 +411,9 @@ function ftp_site(\FTP\Connection $ftp, string $command): void /** - * ftp_size returns the size of the given file in - * bytes. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @param string $filename The remote file. - * @return int Returns the file size on success. + * @param \FTP\Connection $ftp + * @param string $filename + * @return int * @throws FtpException * */ @@ -526,23 +429,10 @@ function ftp_size(\FTP\Connection $ftp, string $filename): int /** - * ftp_ssl_connect opens an explicit SSL-FTP connection to the - * specified hostname. That implies that - * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP. Only when ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail. - * The connection established by ftp_ssl_connect will not do - * peer-certificate verification. - * - * @param string $hostname The FTP server address. This parameter shouldn't have any trailing - * slashes and shouldn't be prefixed with ftp://. - * @param int $port This parameter specifies an alternate port to connect to. If it is - * omitted or set to zero, then the default FTP port, 21, will be used. - * @param int $timeout This parameter specifies the timeout for all subsequent network operations. - * If omitted, the default value is 90 seconds. The timeout can be changed and - * queried at any time with ftp_set_option and - * ftp_get_option. - * @return \FTP\Connection Returns an FTP\Connection instance on success. + * @param string $hostname + * @param int $port + * @param int $timeout + * @return \FTP\Connection * @throws FtpException * */ @@ -558,10 +448,8 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \ /** - * Returns the system type identifier of the remote FTP server. - * - * @param \FTP\Connection $ftp An FTP\Connection instance. - * @return string Returns the remote system type. + * @param \FTP\Connection $ftp + * @return string * @throws FtpException * */ diff --git a/generated/8.5/funchand.php b/generated/8.5/funchand.php index 2c04487a..c691f7ea 100644 --- a/generated/8.5/funchand.php +++ b/generated/8.5/funchand.php @@ -5,10 +5,7 @@ use Safe\Exceptions\FunchandException; /** - * Registers the given callback to be executed when a - * tick is called. - * - * @param callable(): void $callback The function to register. + * @param callable(): void $callback * @param mixed $args * @throws FunchandException * diff --git a/generated/8.5/gettext.php b/generated/8.5/gettext.php index 02a0ee63..8cfc1059 100644 --- a/generated/8.5/gettext.php +++ b/generated/8.5/gettext.php @@ -5,14 +5,9 @@ use Safe\Exceptions\GettextException; /** - * The bindtextdomain function sets or gets the path - * for a domain. - * - * @param string $domain The domain. - * @param null|string $directory The directory path. - * An empty string means the current directory. - * If NULL, the currently set directory is returned. - * @return string The full pathname for the domain currently being set. + * @param string $domain + * @param null|string $directory + * @return string * @throws GettextException * */ diff --git a/generated/8.5/gmp.php b/generated/8.5/gmp.php index 9017ed2c..09d70b37 100644 --- a/generated/8.5/gmp.php +++ b/generated/8.5/gmp.php @@ -5,17 +5,7 @@ use Safe\Exceptions\GmpException; /** - * - * - * @param \GMP|int|string $seed The seed to be set for the gmp_random, - * gmp_random_bits, and - * gmp_random_range functions. - * - * - * A GMP object, an integer, - * or a string that can be interpreted as a number following the same logic - * as if the string was used in gmp_init with automatic - * base detection (i.e. when base is equal to 0). + * @param \GMP|int|string $seed * */ function gmp_random_seed($seed): void diff --git a/generated/8.5/gnupg.php b/generated/8.5/gnupg.php index 83784522..0c16e88c 100644 --- a/generated/8.5/gnupg.php +++ b/generated/8.5/gnupg.php @@ -5,12 +5,9 @@ use Safe\Exceptions\GnupgException; /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -25,11 +22,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. + * @param resource $identifier + * @param string $fingerprint * @throws GnupgException * */ @@ -44,12 +38,9 @@ function gnupg_addencryptkey($identifier, string $fingerprint): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $fingerprint The fingerprint key. - * @param string $passphrase The pass phrase. + * @param resource $identifier + * @param string $fingerprint + * @param string $passphrase * @throws GnupgException * */ @@ -68,10 +59,7 @@ function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -86,10 +74,7 @@ function gnupg_cleardecryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -104,10 +89,7 @@ function gnupg_clearencryptkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. + * @param resource $identifier * @throws GnupgException * */ @@ -122,12 +104,9 @@ function gnupg_clearsignkeys($identifier): void /** - * - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param string $key The key to delete. - * @param bool $allow_secret It specifies whether to delete secret keys as well. + * @param resource $identifier + * @param string $key + * @param bool $allow_secret * @throws GnupgException * */ @@ -142,13 +121,8 @@ function gnupg_deletekey($identifier, string $key, bool $allow_secret): void /** - * Toggle the armored output. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $armor Pass a non-zero integer-value to this function to enable armored-output - * (default). - * Pass 0 to disable armored output. + * @param resource $identifier + * @param int $armor * @throws GnupgException * */ @@ -163,18 +137,8 @@ function gnupg_setarmor($identifier, int $armor): void /** - * Sets the mode for signing. - * - * @param resource $identifier The gnupg identifier, from a call to - * gnupg_init or gnupg. - * @param int $signmode The mode for signing. - * - * signmode takes a constant indicating what type of - * signature should be produced. The possible values are - * GNUPG_SIG_MODE_NORMAL, - * GNUPG_SIG_MODE_DETACH and - * GNUPG_SIG_MODE_CLEAR. - * By default GNUPG_SIG_MODE_CLEAR is used. + * @param resource $identifier + * @param int $signmode * @throws GnupgException * */ diff --git a/generated/8.5/hash.php b/generated/8.5/hash.php index 255b05ea..b9d39c78 100644 --- a/generated/8.5/hash.php +++ b/generated/8.5/hash.php @@ -5,29 +5,12 @@ use Safe\Exceptions\HashException; /** - * - * - * @param string $algo Name of selected hashing algorithm (e.g. "sha256"). - * For a list of supported algorithms see hash_hmac_algos. - * - * - * Non-cryptographic hash functions are not allowed. - * - * - * - * Non-cryptographic hash functions are not allowed. - * @param string $key Input keying material (raw binary). Cannot be empty. - * @param int $length 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. - * @param string $info Application/context-specific info string. - * @param string $salt Salt to use during derivation. - * - * While optional, adding random salt significantly improves the strength of HKDF. - * @return false|non-falsy-string Returns a string containing a raw binary representation of the derived key - * (also known as output keying material - OKM). + * @param string $algo + * @param string $key + * @param int $length + * @param string $info + * @param string $salt + * @return false|non-falsy-string * */ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = "") @@ -39,11 +22,9 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "" /** - * - * - * @param \HashContext $context Hashing context returned by hash_init. - * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. - * @param \HashContext|null $stream_context Stream context as returned by stream_context_create. + * @param \HashContext $context + * @param string $filename + * @param \HashContext|null $stream_context * @throws HashException * */ diff --git a/generated/8.5/ibase.php b/generated/8.5/ibase.php index aca3c032..3eb08b46 100644 --- a/generated/8.5/ibase.php +++ b/generated/8.5/ibase.php @@ -5,10 +5,7 @@ use Safe\Exceptions\IbaseException; /** - * This function will discard a BLOB if it has not yet been closed by - * fbird_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with fbird_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -23,14 +20,12 @@ function fbird_blob_cancel($blob_handle): void /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the new database user. - * @param string $password The password of the new user. - * @param string $first_name The first name of the new database user. - * @param string $middle_name The middle name of the new database user. - * @param string $last_name The last name of the new database user. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -53,29 +48,12 @@ function ibase_add_user($service_handle, string $user_name, string $password, ?s /** - * This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_db The absolute file path to the database on the database server. You can also use a database alias. - * @param string $dest_file The path to the backup file on the database server. - * @param int $options Additional options to pass to the database server for backup. - * The options parameter can be a combination - * of the following constants: - * IBASE_BKP_IGNORE_CHECKSUMS, - * IBASE_BKP_IGNORE_LIMBO, - * IBASE_BKP_METADATA_ONLY, - * IBASE_BKP_NO_GARBAGE_COLLECT, - * IBASE_BKP_OLD_DESCRIPTIONS, - * IBASE_BKP_NON_TRANSPORTABLE or - * IBASE_BKP_CONVERT. - * Read the section about for further information. - * @param bool $verbose Since the backup process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the backup process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_db + * @param string $dest_file + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -91,10 +69,7 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int /** - * This function will discard a BLOB if it has not yet been closed by - * ibase_blob_close. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. + * @param resource $blob_handle * @throws IbaseException * */ @@ -109,13 +84,8 @@ function ibase_blob_cancel($blob_handle): void /** - * ibase_blob_create creates a new BLOB for filling with - * data. - * - * @param null|resource $link_identifier An InterBase link identifier. If omitted, the last opened link is - * assumed. - * @return resource Returns a BLOB handle for later use with - * ibase_blob_add. + * @param null|resource $link_identifier + * @return resource * @throws IbaseException * */ @@ -135,12 +105,9 @@ function ibase_blob_create($link_identifier = null) /** - * This function returns at most len bytes from a BLOB - * that has been opened for reading by ibase_blob_open. - * - * @param resource $blob_handle A BLOB handle opened with ibase_blob_open. - * @param int $len Size of returned data. - * @return string Returns at most len bytes from the BLOB. + * @param resource $blob_handle + * @param int $len + * @return string * @throws IbaseException * */ @@ -156,14 +123,7 @@ function ibase_blob_get($blob_handle, int $len): string /** - * Closes the link to an InterBase database that's associated with - * a connection id returned from ibase_connect. - * Default transaction on link is committed, other transactions are - * rolled back. - * - * @param null|resource $connection_id An InterBase link identifier returned from - * ibase_connect. If omitted, the last opened link - * is assumed. + * @param null|resource $connection_id * @throws IbaseException * */ @@ -182,15 +142,7 @@ function ibase_close($connection_id = null): void /** - * Commits a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -209,13 +161,7 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** - * Commits a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function commits the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be committed. If the argument is a transaction identifier, the - * corresponding transaction will be committed. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -234,35 +180,15 @@ function ibase_commit($link_or_trans_identifier = null): void /** - * Establishes a connection to an Firebird/InterBase server. - * - * In case a second call is made to ibase_connect with - * the same arguments, no new link will be established, but instead, the link - * identifier of the already opened link will be returned. The link to the - * server will be closed as soon as the execution of the script ends, unless - * it's closed earlier by explicitly calling ibase_close. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' - * (TCP/IP with interbase server on custom TCP port), '//hostname/' - * (NetBEUI), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an Firebird/InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -296,10 +222,8 @@ function ibase_connect(?string $database = null, ?string $username = null, ?stri /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the user you want to delete from the database. + * @param resource $service_handle + * @param string $user_name * @throws IbaseException * */ @@ -314,11 +238,7 @@ function ibase_delete_user($service_handle, string $user_name): void /** - * This functions drops a database that was opened by either ibase_connect - * or ibase_pconnect. The database is closed and deleted from the server. - * - * @param null|resource $connection An InterBase link identifier. If omitted, the last opened link is - * assumed. + * @param null|resource $connection * @throws IbaseException * */ @@ -337,12 +257,7 @@ function ibase_drop_db($connection = null): void /** - * This function causes the registered event handler specified by - * event to be cancelled. The callback function will - * no longer be called for the events it was registered to handle. - * - * @param resource $event An event resource, created by - * ibase_set_event_handler. + * @param resource $event * @throws IbaseException * */ @@ -357,9 +272,7 @@ function ibase_free_event_handler($event): void /** - * Frees a prepared query. - * - * @param resource $query A query prepared with ibase_prepare. + * @param resource $query * @throws IbaseException * */ @@ -374,10 +287,7 @@ function ibase_free_query($query): void /** - * Frees a result set. - * - * @param resource $result_identifier A result set created by ibase_query or - * ibase_execute. + * @param resource $result_identifier * @throws IbaseException * */ @@ -392,8 +302,6 @@ function ibase_free_result($result_identifier): void /** - * - * * @param resource $service_handle * @param string $db * @param int $action @@ -412,14 +320,12 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume /** - * - * - * @param resource $service_handle The handle on the database server service. - * @param string $user_name The login name of the database user to modify. - * @param string $password The user's new password. - * @param string $first_name The user's new first name. - * @param string $middle_name The user's new middle name. - * @param string $last_name The user's new last name. + * @param resource $service_handle + * @param string $user_name + * @param string $password + * @param string $first_name + * @param string $middle_name + * @param string $last_name * @throws IbaseException * */ @@ -442,11 +348,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** - * This function assigns a name to a result set. This name can be used later in - * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * - * @param resource $result An InterBase result set. - * @param string $name The name to be assigned. + * @param resource $result + * @param string $name * @throws IbaseException * */ @@ -461,42 +364,15 @@ function ibase_name_result($result, string $name): void /** - * Opens a persistent connection to an InterBase database. - * - * ibase_pconnect acts very much like - * ibase_connect with two major differences. - * - * First, when connecting, the function will first try to find a (persistent) - * link that's already opened with the same parameters. If one is found, an - * identifier for it will be returned instead of opening a new connection. - * - * Second, the connection to the InterBase server will not be closed when the - * execution of the script ends. Instead, the link will remain open for - * future use (ibase_close will not close links - * established by ibase_pconnect). This type of link is - * therefore called 'persistent'. - * - * @param string $database The database argument has to be a valid path to - * database file on the server it resides on. If the server is not local, - * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' - * (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection - * protocol used. - * @param string $username The user name. Can be set with the - * ibase.default_user php.ini directive. - * @param string $password The password for username. Can be set with the - * ibase.default_password php.ini directive. - * @param string $charset charset is the default character set for a - * database. - * @param int $buffers buffers is the number of database buffers to - * allocate for the server-side cache. If 0 or omitted, server chooses - * its own default. - * @param int $dialect dialect selects the default SQL dialect for any - * statement executed within a connection, and it defaults to the highest - * one supported by client libraries. Functional only with InterBase 6 - * and up. - * @param string $role Functional only with InterBase 5 and up. + * @param string $database + * @param string $username + * @param string $password + * @param string $charset + * @param int $buffers + * @param int $dialect + * @param string $role * @param int $sync - * @return resource Returns an InterBase link identifier on success. + * @return resource * @throws IbaseException * */ @@ -530,32 +406,12 @@ function ibase_pconnect(?string $database = null, ?string $username = null, ?str /** - * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you - * won't get any responses. - * - * @param resource $service_handle A previously opened connection to the database server. - * @param string $source_file The absolute path on the server where the backup file is located. - * @param string $dest_db The path to create the new database on the server. You can also use database alias. - * @param int $options Additional options to pass to the database server for restore. - * The options parameter can be a combination - * of the following constants: - * IBASE_RES_DEACTIVATE_IDX, - * IBASE_RES_NO_SHADOW, - * IBASE_RES_NO_VALIDITY, - * IBASE_RES_ONE_AT_A_TIME, - * IBASE_RES_REPLACE, - * IBASE_RES_CREATE, - * IBASE_RES_USE_ALL_SPACE, - * IBASE_PRP_PAGE_BUFFERS, - * IBASE_PRP_SWEEP_INTERVAL, - * IBASE_RES_CREATE. - * Read the section about for further information. - * @param bool $verbose Since the restore process is done on the database server, you don't have any chance - * to get its output. This argument is useless. - * @return mixed Returns TRUE on success. - * - * Since the restore process is done on the (remote) server, this function just passes the arguments to it. - * While the arguments are legal, you won't get FALSE. + * @param resource $service_handle + * @param string $source_file + * @param string $dest_db + * @param int $options + * @param bool $verbose + * @return mixed * @throws IbaseException * */ @@ -571,15 +427,7 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in /** - * Rolls back a transaction without closing it. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. The transaction context - * will be retained, so statements executed from within this transaction - * will not be invalidated. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -598,13 +446,7 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** - * Rolls back a transaction. - * - * @param null|resource $link_or_trans_identifier If called without an argument, this function rolls back the default - * transaction of the default link. If the argument is a connection - * identifier, the default transaction of the corresponding connection - * will be rolled back. If the argument is a transaction identifier, the - * corresponding transaction will be rolled back. + * @param null|resource $link_or_trans_identifier * @throws IbaseException * */ @@ -623,13 +465,10 @@ function ibase_rollback($link_or_trans_identifier = null): void /** - * - * - * @param string $host The name or ip address of the database host. You can define the port by adding - * '/' and port number. If no port is specified, port 3050 will be used. - * @param string $dba_username The name of any valid user. - * @param string $dba_password The user's password. - * @return resource Returns a Interbase / Firebird link identifier on success. + * @param string $host + * @param string $dba_username + * @param string $dba_password + * @return resource * @throws IbaseException * */ @@ -645,9 +484,7 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa /** - * - * - * @param resource $service_handle A previously created connection to the database server. + * @param resource $service_handle * @throws IbaseException * */ diff --git a/generated/8.5/ibmDb2.php b/generated/8.5/ibmDb2.php index e17bb2d4..791865ae 100644 --- a/generated/8.5/ibmDb2.php +++ b/generated/8.5/ibmDb2.php @@ -5,45 +5,9 @@ use Safe\Exceptions\IbmDb2Exception; /** - * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. - * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value One of the following constants: - * - * - * DB2_AUTOCOMMIT_OFF - * - * - * Turns AUTOCOMMIT off. - * - * - * - * - * DB2_AUTOCOMMIT_ON - * - * - * Turns AUTOCOMMIT on. - * - * - * - * - * - * Turns AUTOCOMMIT off. - * - * Turns AUTOCOMMIT on. - * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool When 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 - * DB2_AUTOCOMMIT_OFF indicates that AUTOCOMMIT is off, - * while a value of DB2_AUTOCOMMIT_ON indicates that - * AUTOCOMMIT is on. - * - * When db2_autocommit receives both the - * connection parameter and - * autocommit parameter, it attempts to set the - * AUTOCOMMIT state of the requested connection to the corresponding state. - * Returns TRUE on success. + * @param resource $connection + * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value + * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool * @throws IbmDb2Exception * */ @@ -63,37 +27,13 @@ function db2_autocommit($connection, $value = null) /** - * Binds a PHP variable to an SQL statement parameter in a statement resource - * returned by db2_prepare. This function gives you more - * control over the parameter type, data type, precision, and scale for the - * parameter than simply passing the variable as part of the optional input - * array to db2_execute. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared - * statement. - * @param string $variable_name A string specifying the name of the PHP variable to bind to the - * parameter specified by parameter_number. - * @param int $parameter_type A constant specifying whether the PHP variable should be bound to the - * SQL parameter as an input parameter (DB2_PARAM_IN), - * an output parameter (DB2_PARAM_OUT), or as a - * parameter that accepts input and returns output - * (DB2_PARAM_INOUT). To avoid memory overhead, you can - * also specify DB2_PARAM_FILE to bind the PHP variable - * to the name of a file that contains large object (BLOB, CLOB, or DBCLOB) - * data. - * @param int $data_type A constant specifying the SQL data type that the PHP variable should be - * bound as: one of DB2_BINARY, - * DB2_CHAR, DB2_DOUBLE, or - * DB2_LONG . - * @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 - * output value from the stored procedure. - * @param int $scale Specifies the scale with which the variable should be bound to the - * database. + * @param resource $stmt + * @param int $parameter_number + * @param string $variable_name + * @param int $parameter_type + * @param int $data_type + * @param int $precision + * @param int $scale * @throws IbmDb2Exception * */ @@ -108,111 +48,8 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int /** - * This function returns an object with read-only properties that return - * information about the DB2 database client. The following table lists - * the DB2 client properties: - * - * DB2 client properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * APPL_CODEPAGE - * int - * The application code page. - * - * - * CONN_CODEPAGE - * int - * The code page for the current connection. - * - * - * DATA_SOURCE_NAME - * string - * The data source name (DSN) used to create the current connection - * to the database. - * - * - * DRIVER_NAME - * string - * The name of the library that implements the DB2 Call - * Level Interface (CLI) specification. - * - * - * DRIVER_ODBC_VER - * string - * The version of ODBC that the DB2 client supports. This returns a - * string "MM.mm" where MM is the major version and - * mm is the minor version. The DB2 client always - * returns "03.51". - * - * - * - * DRIVER_VER - * string - * The version of the client, in the form of a string "MM.mm.uuuu" where - * MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * ODBC_SQL_CONFORMANCE - * string - * - * The level of ODBC SQL grammar supported by the client: - * - * - * MINIMUM - * - * - * Supports the minimum ODBC SQL grammar. - * - * - * - * - * CORE - * - * - * Supports the core ODBC SQL grammar. - * - * - * - * - * EXTENDED - * - * - * Supports extended ODBC SQL grammar. - * - * - * - * - * - * - * - * - * ODBC_VER - * string - * The version of ODBC that the ODBC driver manager supports. This - * returns a string "MM.mm.rrrr" where MM is the major - * version, mm is the minor version, and - * rrrr is the release. The DB2 client always returns - * "03.01.0000". - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -228,15 +65,7 @@ function db2_client_info($connection): \stdClass /** - * This function closes a DB2 client connection created with - * db2_connect and returns the corresponding - * resources to the database server. - * - * If you attempt to close a persistent DB2 client connection created with - * db2_pconnect, the close request is ignored and the - * persistent DB2 client connection remains available for the next caller. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -251,13 +80,7 @@ function db2_close($connection): void /** - * Commits an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_commit is not necessary unless AUTOCOMMIT - * has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -272,26 +95,8 @@ function db2_commit($connection): void /** - * db2_execute executes an SQL statement that was - * prepared by db2_prepare. - * - * If the SQL statement returns a result set, for example, a SELECT statement - * or a CALL to a stored procedure that returns one or more result sets, you - * can retrieve a row as an array from the stmt resource - * using db2_fetch_assoc, - * db2_fetch_both, or - * db2_fetch_array. Alternatively, you can use - * db2_fetch_row to move the result set pointer to the - * next row and fetch a column at a time from that row with - * db2_result. - * - * Refer to db2_prepare for a brief discussion of the - * advantages of using db2_prepare and - * db2_execute rather than db2_exec. - * - * @param resource $stmt A prepared statement returned from db2_prepare. - * @param array $parameters An array of input parameters matching any parameter markers contained - * in the prepared statement. + * @param resource $stmt + * @param array $parameters * @throws IbmDb2Exception * */ @@ -306,12 +111,7 @@ function db2_execute($stmt, array $parameters = []): void /** - * Frees the system and database resources that are associated with a result - * set. These resources are freed implicitly when a script finishes, but you - * can call db2_free_result to explicitly free the result - * set resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -326,12 +126,7 @@ function db2_free_result($stmt): void /** - * Frees the system and database resources that are associated with a statement - * resource. These resources are freed implicitly when a script finishes, but - * you can call db2_free_stmt to explicitly free the - * statement resources before the end of the script. - * - * @param resource $stmt A valid statement resource. + * @param resource $stmt * @throws IbmDb2Exception * */ @@ -346,152 +141,9 @@ function db2_free_stmt($stmt): void /** - * Retrieves the value of a specified option value for a statement resource - * or a connection resource. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * 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 - * that can be set during execution with db2_get_option. - * - * - * 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 - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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 - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success. + * @param resource $resource + * @param string $option + * @return string * @throws IbmDb2Exception * */ @@ -507,23 +159,8 @@ function db2_get_option($resource, string $option): string /** - * Returns the number of rows deleted, inserted, or updated by an SQL - * statement. - * - * To determine the number of rows that will be returned by a SELECT - * statement, issue SELECT COUNT(*) with the same predicates as your - * intended SELECT statement and retrieve the value. - * - * If your application logic checks the number of rows returned by a SELECT - * statement and branches if the number of rows is 0, consider modifying your - * application to attempt to return the first row with one of - * db2_fetch_assoc, db2_fetch_both, - * db2_fetch_array, or db2_fetch_row, - * and branch if the fetch function returns FALSE. - * - * @param resource $stmt A valid stmt resource containing a result set. - * @return 0|positive-int Returns the number of rows affected by the last SQL statement issued by - * the specified statement handle + * @param resource $stmt + * @return 0|positive-int * @throws IbmDb2Exception * */ @@ -539,24 +176,7 @@ function db2_num_rows($stmt): int /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system - * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for - * a long period of time. - * - * @param resource $connection Specifies an active DB2 client connection. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -571,13 +191,7 @@ function db2_pclose($connection): void /** - * Rolls back an in-progress transaction on the specified connection resource and - * begins a new transaction. PHP applications normally default to AUTOCOMMIT - * mode, so db2_rollback normally has no effect unless - * AUTOCOMMIT has been turned off for the connection resource. - * - * @param resource $connection A valid database connection resource variable as returned from - * db2_connect or db2_pconnect. + * @param resource $connection * @throws IbmDb2Exception * */ @@ -592,253 +206,8 @@ function db2_rollback($connection): void /** - * This function returns an object with read-only properties that return - * information about the IBM DB2, Cloudscape, or Apache Derby database server. - * The following table lists the database server properties: - * - * Database server properties - * - * - * - * Property name - * Return type - * Description - * - * - * - * - * DBMS_NAME - * string - * The name of the database server to which you are - * connected. For DB2 servers this is a combination of - * DB2 followed by the operating system on which - * the database server is running. - * - * - * DBMS_VER - * string - * The version of the database server, in the form of a string - * "MM.mm.uuuu" where MM is the major version, - * mm is the minor version, - * and uuuu is the update. For example, "08.02.0001" - * represents major version 8, minor version 2, update 1. - * - * - * - * DB_CODEPAGE - * int - * The code page of the database to which you are connected. - * - * - * DB_NAME - * string - * The name of the database to which you are connected. - * - * - * DFT_ISOLATION - * string - * - * The default transaction isolation level supported by the - * server: - * - * - * UR - * - * - * Uncommitted read: changes are immediately visible by all - * concurrent transactions. - * - * - * - * - * CS - * - * - * Cursor stability: a row read by one transaction can be altered and - * committed by a second concurrent transaction. - * - * - * - * - * RS - * - * - * Read stability: a transaction can add or remove rows matching a - * search condition or a pending transaction. - * - * - * - * - * RR - * - * - * Repeatable read: data affected by pending transaction is not - * available to other transactions. - * - * - * - * - * NC - * - * - * No commit: any changes are visible at the end of a successful - * operation. Explicit commits and rollbacks are not allowed. - * - * - * - * - * - * - * - * - * IDENTIFIER_QUOTE_CHAR - * string - * The character used to delimit an identifier. - * - * - * INST_NAME - * string - * The instance on the database server that contains the - * database. - * - * - * ISOLATION_OPTION - * array - * An array of the isolation options supported by the - * database server. The isolation options are described in - * the DFT_ISOLATION property. - * - * - * KEYWORDS - * array - * An array of the keywords reserved by the database - * server. - * - * - * LIKE_ESCAPE_CLAUSE - * bool - * TRUE if the database server supports the - * use of % and _ wildcard - * characters. FALSE if the database server does not - * support these wildcard characters. - * - * - * MAX_COL_NAME_LEN - * int - * Maximum length of a column name supported by the database - * server, expressed in bytes. - * - * - * MAX_IDENTIFIER_LEN - * int - * Maximum length of an SQL identifier supported by the database - * server, expressed in characters. - * - * - * MAX_INDEX_SIZE - * int - * Maximum size of columns combined in an index supported by the - * database server, expressed in bytes. - * - * - * MAX_PROC_NAME_LEN - * int - * Maximum length of a procedure name supported by the database - * server, expressed in bytes. - * - * - * MAX_ROW_SIZE - * int - * Maximum length of a row in a base table supported by the - * database server, expressed in bytes. - * - * - * MAX_SCHEMA_NAME_LEN - * int - * Maximum length of a schema name supported by the database - * server, expressed in bytes. - * - * - * MAX_STATEMENT_LEN - * int - * Maximum length of an SQL statement supported by the database - * server, expressed in bytes. - * - * - * MAX_TABLE_NAME_LEN - * int - * Maximum length of a table name supported by the database - * server, expressed in bytes. - * - * - * NON_NULLABLE_COLUMNS - * bool - * TRUE if the database server supports columns that can be - * defined as NOT NULL, FALSE if the database server does not support - * columns defined as NOT NULL. - * - * - * PROCEDURES - * bool - * TRUE if the database server supports the use of the CALL - * statement to call stored procedures, FALSE if the database - * server does not support the CALL statement. - * - * - * SPECIAL_CHARS - * string - * A string containing all of the characters other than - * a-Z, 0-9, and underscore that can be used in an identifier name. - * - * - * SQL_CONFORMANCE - * string - * - * The level of conformance to the ANSI/ISO SQL-92 specification - * offered by the database server: - * - * - * ENTRY - * - * - * Entry-level SQL-92 compliance. - * - * - * - * - * FIPS127 - * - * - * FIPS-127-2 transitional compliance. - * - * - * - * - * FULL - * - * - * Full level SQL-92 compliance. - * - * - * - * - * INTERMEDIATE - * - * - * Intermediate level SQL-92 compliance. - * - * - * - * - * - * - * - * - * - * - * - * @param resource $connection Specifies an active DB2 client connection. - * @return \stdClass Returns an object on a successful call + * @param resource $connection + * @return \stdClass * @throws IbmDb2Exception * */ @@ -854,379 +223,9 @@ function db2_server_info($connection): \stdClass /** - * Sets options for a statement resource or a connection resource. You - * cannot set options for result set resources. - * - * @param resource $resource A valid statement resource as returned from - * db2_prepare or a valid connection resource as - * returned from db2_connect or - * db2_pconnect. - * @param array $options An associative array containing valid statement or connection - * options. This parameter can be used to change autocommit values, - * cursor types (scrollable or forward), and to specify the case of - * the column names (lower, upper, or natural) that will appear in a - * result set. - * - * - * autocommit - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * - * - * - * cursor - * - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * - * - * - * binmode - * - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * - * - * - * db2_attr_case - * - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * - * - * - * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * - * - * - * - * Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. - * - * Passing DB2_FORWARD_ONLY specifies a - * forward-only cursor for a statement resource. This is the - * default cursor type, and is supported by all database - * servers. - * - * Passing DB2_SCROLLABLE specifies a - * scrollable cursor for a statement resource. Scrollable - * cursors enable result set rows to be accessed in - * non-sequential order, but are only supported by - * IBM DB2 Universal Database databases. - * - * Passing DB2_BINARY specifies that - * binary data will be returned as is. This is the default - * mode. This is the equivalent of setting - * ibm_db2.binmode=1 in php.ini. - * - * Passing DB2_CONVERT specifies that - * binary data will be converted to hexadecimal encoding, - * and will be returned as such. This is the equivalent of - * setting ibm_db2.binmode=2 in php.ini. - * - * Passing DB2_PASSTHRU specifies that - * binary data will be converted to NULL. This is the - * equivalent of setting ibm_db2.binmode=3 - * in php.ini. - * - * Passing DB2_CASE_LOWER specifies that - * column names of the result set are returned in lower case. - * - * Passing DB2_CASE_UPPER specifies that - * column names of the result set are returned in upper case. - * - * Passing DB2_CASE_NATURAL specifies that - * column names of the result set are returned in natural - * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred - * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred - * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 - * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * - * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY - * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used - * for positioned updates and deletes. - * - * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * - * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected - * even when a ROLLFORWARD_ONLY cursor is used. - * - * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request - * the full row count prior to fetching. - * - * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * - * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * - * - * - * trusted_password - * - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can - * be set on a connection resource only. To use this option, trusted - * context must be enabled on the connection resource. - * - * The password (String) that corresponds to the user specified - * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during - * execution with db2_get_option. - * - * - * 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, - * 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 - * database server when using DB2 Connect. - * - * - * 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. - * - * - * - * - * - * - * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * - * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * - * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * 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, - * 0 through 9, and the underscore (_) or period (.). - * - * 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. - * - * - * 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. - * - * - * - * 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. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the - * host database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @param int $type Passing DB2_AUTOCOMMIT_ON turns - * autocommit on for the specified connection resource. - * - * Passing DB2_AUTOCOMMIT_OFF turns - * autocommit off for the specified connection resource. + * @param resource $resource + * @param array $options + * @param int $type * @throws IbmDb2Exception * */ diff --git a/generated/8.5/iconv.php b/generated/8.5/iconv.php index a4f8cd16..0df05789 100644 --- a/generated/8.5/iconv.php +++ b/generated/8.5/iconv.php @@ -5,21 +5,8 @@ use Safe\Exceptions\IconvException; /** - * Retrieve internal configuration variables of iconv extension. - * - * @param string $type The value of the optional type can be: - * - * all - * input_encoding - * output_encoding - * internal_encoding - * - * @return mixed Returns the current value of the internal configuration variable if - * successful. - * - * If type is omitted or set to "all", - * iconv_get_encoding returns an array that - * stores all these variables. + * @param string $type + * @return mixed * @throws IconvException * */ @@ -35,53 +22,10 @@ function iconv_get_encoding(string $type = "all") /** - * Decodes a MIME header field. - * - * @param string $string The encoded header, as a string. - * @param int $mode mode determines the behaviour in the event - * iconv_mime_decode encounters a malformed - * MIME header field. You can specify any combination - * of the following bitmasks. - * - * Bitmasks acceptable to iconv_mime_decode - * - * - * - * Value - * Constant - * Description - * - * - * - * - * 1 - * ICONV_MIME_DECODE_STRICT - * - * If set, the given header is decoded in full conformance with the - * standards defined in RFC2047. - * This option is disabled by default because there are a lot of - * broken mail user agents that don't follow the specification and don't - * produce correct MIME headers. - * - * - * - * 2 - * ICONV_MIME_DECODE_CONTINUE_ON_ERROR - * - * If set, iconv_mime_decode_headers - * attempts to ignore any grammatical errors and continue to process - * a given header. - * - * - * - * - * - * @param null|string $encoding The optional encoding parameter specifies the - * character set to represent the result by. If omitted or NULL, - * iconv.internal_encoding - * will be used. - * @return string Returns a decoded MIME field on success, - * or FALSE if an error occurs during the decoding. + * @param string $string + * @param int $mode + * @param null|string $encoding + * @return string * @throws IconvException * */ @@ -101,108 +45,10 @@ function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = nu /** - * Composes and returns a string that represents a valid MIME - * header field, which looks like the following: - * - * - * - * In the above example, "Subject" is the field name and the portion that - * begins with "=?ISO-8859-1?..." is the field value. - * - * @param string $field_name The field name. - * @param string $field_value The field value. - * @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 options. - * The items supported by iconv_mime_encode are - * listed below. Note that item names are treated case-sensitive. - * - * Configuration items supported by iconv_mime_encode - * - * - * - * Item - * Type - * Description - * Default value - * Example - * - * - * - * - * scheme - * string - * - * Specifies the method to encode a field value by. The value of - * this item may be either "B" or "Q", where "B" stands for - * base64 encoding scheme and "Q" stands for - * quoted-printable encoding scheme. - * - * B - * B - * - * - * input-charset - * string - * - * Specifies the character set in which the first parameter - * field_name and the second parameter - * field_value are presented. If not given, - * iconv_mime_encode assumes those parameters - * are presented to it in the - * iconv.internal_encoding - * ini setting. - * - * - * iconv.internal_encoding - * - * ISO-8859-1 - * - * - * output-charset - * string - * - * Specifies the character set to use to compose the - * MIME header. - * - * - * iconv.internal_encoding - * - * UTF-8 - * - * - * line-length - * int - * - * Specifies the maximum length of the header lines. The resulting - * header is "folded" to a set of multiple lines in case - * the resulting header field would be longer than the value of this - * parameter, according to - * RFC2822 - Internet Message Format. - * If not given, the length will be limited to 76 characters. - * - * 76 - * 996 - * - * - * line-break-chars - * string - * - * Specifies the sequence of characters to append to each line - * as an end-of-line sign when "folding" is performed on a long header - * field. If not given, this defaults to "\r\n" - * (CR LF). Note that - * this parameter is always treated as an ASCII string regardless - * of the value of input-charset. - * - * \r\n - * \n - * - * - * - * - * @return string Returns an encoded MIME field on success, - * or FALSE if an error occurs during the encoding. + * @param string $field_name + * @param string $field_value + * @param array $options + * @return string * @throws IconvException * */ @@ -218,16 +64,8 @@ function iconv_mime_encode(string $field_name, string $field_value, array $optio /** - * Changes the value of the internal configuration variable specified by - * type to encoding. - * - * @param string $type The value of type can be any one of these: - * - * input_encoding - * output_encoding - * internal_encoding - * - * @param string $encoding The character set. + * @param string $type + * @param string $encoding * @throws IconvException * */ @@ -242,18 +80,9 @@ function iconv_set_encoding(string $type, string $encoding): void /** - * In contrast to strlen, - * iconv_strlen counts the occurrences of characters - * in the given byte sequence string on the basis of - * the specified character set, the result of which is not necessarily - * identical to the length of the string in bytes. - * - * @param string $string The string. - * @param null|string $encoding If encoding parameter is omitted or NULL, - * string is assumed to be encoded in - * iconv.internal_encoding. - * @return 0|positive-int Returns the character count of string, as an integer, - * or FALSE if an error occurs during the encoding. + * @param string $string + * @param null|string $encoding + * @return 0|positive-int * @throws IconvException * */ @@ -273,28 +102,10 @@ function iconv_strlen(string $string, ?string $encoding = null): int /** - * Converts string from from_encoding - * to to_encoding. - * - * @param string $from_encoding The current encoding used to interpret string. - * @param string $to_encoding The desired encoding of the result. - * - * If the string //TRANSLIT is appended to - * to_encoding, then transliteration is activated. This - * means that when a character can't be represented in the target charset, - * it may be approximated through one or several similarly looking - * characters. If the string //IGNORE is appended, - * characters that cannot be represented in the target charset are silently - * discarded. Otherwise, E_NOTICE is generated and the function - * will return FALSE. - * - * If and how //TRANSLIT works exactly depends on the - * system's iconv() implementation (cf. ICONV_IMPL). - * Some implementations are known to ignore //TRANSLIT, - * so the conversion is likely to fail for characters which are illegal for - * the to_encoding. - * @param string $string The string to be converted. - * @return string Returns the converted string. + * @param string $from_encoding + * @param string $to_encoding + * @param string $string + * @return string * @throws IconvException * */ diff --git a/generated/8.5/image.php b/generated/8.5/image.php index e5f93130..be37705b 100644 --- a/generated/8.5/image.php +++ b/generated/8.5/image.php @@ -5,64 +5,9 @@ use Safe\Exceptions\ImageException; /** - * The getimagesize function will determine the - * size of any supported given image file and return the dimensions along with - * the file type and a height/width text string to be used inside a - * normal HTML IMG tag and the - * correspondent HTTP content type. - * - * getimagesize can also return some more information - * in image_info parameter. - * - * @param string $filename This parameter specifies the file you wish to retrieve information - * about. It can reference a local file or (configuration permitting) a - * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended - * information from the image file. Currently, this will return the - * different JPG APP markers as an associative array. - * Some programs use these APP markers to embed text information in - * images. A very common one is to embed - * IPTC information in the APP13 marker. - * You can use the iptcparse function to parse the - * binary APP13 marker into something readable. - * - * The image_info only supports - * JFIF files. - * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null Returns an array with up to 7 elements. Not all image types will include - * the channels and bits elements. - * - * Index 0 and 1 contains respectively the width and the height of the image. - * - * Index 2 is one of the IMAGETYPE_* constants indicating - * the type of the image. - * - * Index 3 is a text string with the correct - * height="yyy" width="xxx" string that can be used - * directly in an IMG tag. - * - * mime is the correspondant MIME type of the image. - * This information can be used to deliver images with the correct HTTP - * Content-type header: - * - * getimagesize and MIME types - * - * - * ]]> - * - * - * - * channels will be 3 for RGB pictures and 4 for CMYK - * pictures. - * - * bits is the number of bits for each color. - * - * For some image types, the presence of channels and - * bits values can be a bit - * confusing. As an example, GIF always uses 3 channels - * per pixel, but the number of bits per pixel cannot be calculated for an - * animated GIF with a global color table. - * - * On failure, FALSE is returned. + * @param string $filename + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null * @throws ImageException * */ @@ -78,12 +23,9 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array /** - * Returns the extension for the given IMAGETYPE_* - * constant. - * - * @param int $image_type One of the IMAGETYPE_* constant. - * @param bool $include_dot Whether to prepend a dot to the extension or not. Default to TRUE. - * @return string A string with the extension corresponding to the given image type. + * @param int $image_type + * @param bool $include_dot + * @return string * @throws ImageException * */ @@ -99,13 +41,10 @@ function image_type_to_extension(int $image_type, bool $include_dot = true): str /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array|null $clip Array with keys "x", "y", "width" and "height"; or NULL. - * @return \GdImage Return affined image object on success. + * @param \GdImage $image + * @param array $affine + * @param array|null $clip + * @return \GdImage * @throws ImageException * */ @@ -125,16 +64,9 @@ function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdIm /** - * Returns the concatenation of two affine transformation matrices, - * what is useful if multiple transformations should be applied to the same - * image in one go. - * - * @param array $matrix1 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys - * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param array $matrix1 + * @param array $matrix2 + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -150,19 +82,9 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array /** - * Returns an affine transformation matrix. - * - * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE - * or IMG_AFFINE_SCALE, - * options has to be an array with keys x - * and y, both having float values. - * - * If type is IMG_AFFINE_ROTATE, - * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, - * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys - * 0 to 5 and float values). + * @param int $type + * @param array|float $options + * @return array{0:float,1:float,2:float,3:float,4:float,5:float} * @throws ImageException * */ @@ -178,21 +100,8 @@ function imageaffinematrixget(int $type, $options): array /** - * imagealphablending allows for two different - * modes of drawing on truecolor images. In blending mode, the - * alpha channel component of the color supplied to all drawing function, - * such as imagesetpixel determines how much of the - * underlying color should be allowed to shine through. As a result, gd - * automatically blends the existing color at that point with the drawing color, - * and stores the result in the image. The resulting pixel is opaque. In - * non-blending mode, the drawing color is copied literally with its alpha channel - * information, replacing the destination pixel. Blending mode is not available - * when drawing on palette images. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable the blending mode or not. On true color images - * the default value is TRUE otherwise the default value is FALSE + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -207,20 +116,8 @@ function imagealphablending(\GdImage $image, bool $enable): void /** - * Activate the fast drawing antialiased methods for lines and wired polygons. - * It does not support alpha components. It works using a direct blend - * operation. It works only with truecolor images. - * - * Thickness and styled are not supported. - * - * Using antialiased primitives with transparent background color can end with - * some unexpected results. The blend method uses the background color as any - * other colors. The lack of alpha component support does not allow an alpha - * based antialiasing method. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to enable antialiasing or not. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -235,20 +132,14 @@ function imageantialias(\GdImage $image, bool $enable): void /** - * imagearc draws an arc of circle centered at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color * @throws ImageException * */ @@ -263,17 +154,10 @@ function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int /** - * Outputs or saves a AVIF Raster image from the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) - * to 100 (best quality, larger file). - * If -1 is provided, the default value 52 is used. - * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) - * to 10 (fast, larger file). - * If -1 is provided, the default value 6 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $speed * @throws ImageException * */ @@ -296,15 +180,9 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed /** - * Outputs or saves a BMP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the compressed arguments is - * not used. - * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. + * @param \GdImage $image + * @param null|resource|string $file + * @param bool $compressed * @throws ImageException * */ @@ -325,21 +203,12 @@ function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void /** - * imagechar draws the first character of - * char in the image identified by - * image with its upper-left at - * x,y (top left is 0, - * 0) with the color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -354,18 +223,12 @@ function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int /** - * Draws the character char vertically at the specified - * coordinate on the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the start. - * @param int $y y-coordinate of the start. - * @param string $char The character to draw. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $char + * @param int $color * @throws ImageException * */ @@ -380,19 +243,10 @@ function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, i /** - * Returns the index of the color of the pixel at the - * specified location in the image specified by image. - * - * If the image is a - * truecolor image, this function returns the RGB value of that pixel as - * integer. Use bitshifting and masking to access the distinct red, green and blue - * component values: - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of the point. - * @param int $y y-coordinate of the point. - * @return int Returns the index of the color. + * @param \GdImage $image + * @param int $x + * @param int $y + * @return int * @throws ImageException * */ @@ -408,13 +262,8 @@ function imagecolorat(\GdImage $image, int $x, int $y): int /** - * De-allocates a color previously allocated with - * imagecolorallocate or - * imagecolorallocatealpha. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color identifier. + * @param \GdImage $image + * @param int $color * @throws ImageException * */ @@ -429,11 +278,8 @@ function imagecolordeallocate(\GdImage $image, int $color): void /** - * Makes the colors of the palette version of an image more closely match the true color version. - * - * @param \GdImage $image1 A truecolor image object. - * @param \GdImage $image2 A palette image object pointing to an image that has the same - * size as image1. + * @param \GdImage $image1 + * @param \GdImage $image2 * @throws ImageException * */ @@ -448,18 +294,12 @@ function imagecolormatch(\GdImage $image1, \GdImage $image2): void /** - * This sets the specified index in the palette to the specified - * color. This is useful for creating flood-fill-like effects in - * palleted images without the overhead of performing the actual - * flood-fill. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color An index in the palette. - * @param int $red Value of red component. - * @param int $green Value of green component. - * @param int $blue Value of blue component. - * @param int $alpha Value of alpha component. + * @param \GdImage $image + * @param int $color + * @param int $red + * @param int $green + * @param int $blue + * @param int $alpha * @throws ImageException * */ @@ -474,13 +314,9 @@ function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $b /** - * Gets the color for a specified index. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $color The color index. - * @return array{red: int, green: int, blue: int, alpha: int} Returns an associative array with red, green, blue and alpha keys that - * contain the appropriate values for the specified color index. + * @param \GdImage $image + * @param int $color + * @return array{red: int, green: int, blue: int, alpha: int} * */ function imagecolorsforindex(\GdImage $image, int $color): array @@ -492,14 +328,10 @@ function imagecolorsforindex(\GdImage $image, int $color): array /** - * Applies a convolution matrix on the image, using the given coefficient and - * offset. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. - * @param float $divisor The divisor of the result of the convolution, used for normalization. - * @param float $offset Color offset. + * @param \GdImage $image + * @param array $matrix + * @param float $divisor + * @param float $offset * @throws ImageException * */ @@ -514,22 +346,14 @@ function imageconvolution(\GdImage $image, array $matrix, float $divisor, float /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -544,28 +368,15 @@ function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $ds /** - * Copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The two images will be merged according to pct - * which can range from 0 to 100. When pct = 0, - * no action is taken, when 100 this function behaves identically - * to imagecopy for pallete images, except for - * ignoring alpha components, while it implements alpha transparency - * for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -580,32 +391,15 @@ function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, in /** - * imagecopymergegray copy a part of src_image onto - * dst_image starting at the x,y coordinates - * src_x, src_y with - * a width of src_width and a height of - * src_height. The portion defined will be copied - * onto the x,y coordinates, dst_x and - * dst_y. - * - * This function is identical to imagecopymerge except - * that when merging it preserves the hue of the source by converting - * the destination pixels to gray scale before the copy operation. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $src_width Source width. - * @param int $src_height Source height. - * @param int $pct The src_image will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves - * identically to imagecopy for pallete images, except for - * ignoring alpha components, while - * it implements alpha transparency for true colour images. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $src_width + * @param int $src_height + * @param int $pct * @throws ImageException * */ @@ -620,37 +414,16 @@ function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresampled copies a rectangular - * portion of one image to another image, smoothly interpolating pixel - * values so that, in particular, reducing the size of an image still - * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -665,37 +438,16 @@ function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x /** - * imagecopyresized copies a rectangular - * portion of one image to another image. - * dst_image is the destination image, - * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_width and height src_height at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image - * of width dst_width and height dst_height - * at position (dst_x,dst_y). - * - * If the source and destination coordinates and width and heights - * differ, appropriate stretching or shrinking of the image fragment - * will be performed. The coordinates refer to the upper left - * corner. This function can be used to copy regions within the - * same image (if dst_image is the same as - * src_image) but if the regions overlap the - * results will be unpredictable. - * - * @param \GdImage $dst_image Destination image resource. - * @param \GdImage $src_image Source image resource. - * @param int $dst_x x-coordinate of destination point. - * @param int $dst_y y-coordinate of destination point. - * @param int $src_x x-coordinate of source point. - * @param int $src_y y-coordinate of source point. - * @param int $dst_width Destination width. - * @param int $dst_height Destination height. - * @param int $src_width Source width. - * @param int $src_height Source height. + * @param \GdImage $dst_image + * @param \GdImage $src_image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_width + * @param int $dst_height + * @param int $src_width + * @param int $src_height * @throws ImageException * */ @@ -710,20 +462,9 @@ function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, /** - * imagecreate returns an image identifier - * representing a blank image of specified size. - * - * In general, we recommend the use of - * imagecreatetruecolor instead of - * imagecreate so that image processing occurs on the - * highest quality image possible. If you want to output a palette image, then - * imagetruecolortopalette should be called immediately - * before saving the image with imagepng or - * imagegif. - * - * @param int $width The image width. - * @param int $height The image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -739,11 +480,8 @@ function imagecreate(int $width, int $height): \GdImage /** - * imagecreatefromavif returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the AVIF raster image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -759,11 +497,8 @@ function imagecreatefromavif(string $filename): \GdImage /** - * imagecreatefrombmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the BMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -779,10 +514,8 @@ function imagecreatefrombmp(string $filename): \GdImage /** - * Create a new image from GD file or URL. - * - * @param string $filename Path to the GD file. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -798,10 +531,8 @@ function imagecreatefromgd(string $filename): \GdImage /** - * Create a new image from GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -817,14 +548,12 @@ function imagecreatefromgd2(string $filename): \GdImage /** - * Create a new image from a given part of GD2 file or URL. - * - * @param string $filename Path to the GD2 image. - * @param int $x x-coordinate of source point. - * @param int $y y-coordinate of source point. - * @param int $width Source width. - * @param int $height Source height. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @param int $x + * @param int $y + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -840,11 +569,8 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in /** - * imagecreatefromgif returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the GIF image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -860,11 +586,8 @@ function imagecreatefromgif(string $filename): \GdImage /** - * imagecreatefromjpeg returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the JPEG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -880,11 +603,8 @@ function imagecreatefromjpeg(string $filename): \GdImage /** - * imagecreatefrompng returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the PNG image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -900,15 +620,8 @@ function imagecreatefrompng(string $filename): \GdImage /** - * imagecreatefromstring returns an image identifier - * representing the image obtained from the given data. - * These types will be automatically detected if your build of PHP supports - * them: JPEG, PNG, GIF, BMP, WBMP, GD2, WEBP and AVIF. - * - * @param string $data A string containing the image data. - * @return \GdImage An image object will be returned on success. FALSE is returned if - * the image type is unsupported, the data is not in a recognised format, - * or the image is corrupt and cannot be loaded. + * @param string $data + * @return \GdImage * @throws ImageException * */ @@ -924,11 +637,8 @@ function imagecreatefromstring(string $data): \GdImage /** - * imagecreatefromtga returns an image object - * representing the image obtained from the given filename. - * - * @param string $filename Path to the Truevision TGA image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -944,11 +654,8 @@ function imagecreatefromtga(string $filename): \GdImage /** - * imagecreatefromwbmp returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the WBMP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -964,12 +671,8 @@ function imagecreatefromwbmp(string $filename): \GdImage /** - * imagecreatefromwebp returns an image identifier - * representing the image obtained from the given filename. - * Note that animated WebP files cannot be read. - * - * @param string $filename Path to the WebP image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -985,11 +688,8 @@ function imagecreatefromwebp(string $filename): \GdImage /** - * imagecreatefromxbm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XBM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1005,11 +705,8 @@ function imagecreatefromxbm(string $filename): \GdImage /** - * imagecreatefromxpm returns an image identifier - * representing the image obtained from the given filename. - * - * @param string $filename Path to the XPM image. - * @return \GdImage Returns an image object on success. + * @param string $filename + * @return \GdImage * @throws ImageException * */ @@ -1025,12 +722,9 @@ function imagecreatefromxpm(string $filename): \GdImage /** - * imagecreatetruecolor returns an image object - * representing a black image of the specified size. - * - * @param int $width Image width. - * @param int $height Image height. - * @return \GdImage Returns an image object on success. + * @param int $width + * @param int $height + * @return \GdImage * @throws ImageException * */ @@ -1046,15 +740,9 @@ function imagecreatetruecolor(int $width, int $height): \GdImage /** - * Crops an image to the given rectangular area and returns the resulting image. - * The given image is not modified. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys - * x, y, width and - * height. - * @return \GdImage Return cropped image object on success. + * @param \GdImage $image + * @param array $rectangle + * @return \GdImage * @throws ImageException * */ @@ -1070,18 +758,11 @@ function imagecrop(\GdImage $image, array $rectangle): \GdImage /** - * Automatically crops an image according to the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode One of the following constants: - * @param float $threshold Same as IMG_CROP_TRANSPARENT. - * Before PHP 7.4.0, the bundled libgd fell back to IMG_CROP_SIDES, - * if the image had no transparent color. - * @param int $color Crops out a transparent background. - * @return \GdImage Returns a cropped image object on success. - * FALSE is also returned if the whole image was cropped. + * @param \GdImage $image + * @param int $mode + * @param float $threshold + * @param int $color + * @return \GdImage * @throws ImageException * */ @@ -1097,17 +778,12 @@ function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $thr /** - * This function is deprecated. Use combination of - * imagesetstyle and imageline - * instead. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1122,13 +798,7 @@ function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, in /** - * Prior to PHP 8.0.0, imagedestroy freed any memory - * associated with the image resource. As of 8.0.0, - * the GD extension uses objects instead of resources, and objects - * cannot be explicitly closed. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. + * @param \GdImage $image * @throws ImageException * */ @@ -1143,15 +813,12 @@ function imagedestroy(\GdImage $image): void /** - * Draws an ellipse centered at the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1166,15 +833,10 @@ function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, /** - * Performs a flood fill starting at the given coordinate (top left is 0, 0) - * with the given color in the - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start point. - * @param int $y y-coordinate of start point. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -1189,36 +851,15 @@ function imagefill(\GdImage $image, int $x, int $y, int $color): void /** - * Draws a partial arc centered at the specified coordinate in the - * given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The arc width. - * @param int $height The arc height. - * @param int $start_angle The arc start angle, in degrees. - * @param int $end_angle The arc end angle, in degrees. - * 0° is located at the three-o'clock position, and the arc is drawn - * clockwise. - * @param int $color A color identifier created with imagecolorallocate. - * @param int $style A bitwise OR of the following possibilities: - * - * IMG_ARC_PIE - * IMG_ARC_CHORD - * IMG_ARC_NOFILL - * IMG_ARC_EDGED - * - * IMG_ARC_PIE and IMG_ARC_CHORD are - * mutually exclusive; IMG_ARC_CHORD just - * connects the starting and ending angles with a straight line, while - * IMG_ARC_PIE produces a rounded edge. - * IMG_ARC_NOFILL indicates that the arc - * or chord should be outlined, not filled. IMG_ARC_EDGED, - * used together with IMG_ARC_NOFILL, indicates that the - * beginning and ending angles should be connected to the center - this is a - * good way to outline (rather than fill) a 'pie slice'. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $start_angle + * @param int $end_angle + * @param int $color + * @param int $style * @throws ImageException * */ @@ -1233,16 +874,12 @@ function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $widt /** - * Draws an ellipse centered at the specified coordinate on the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $center_x x-coordinate of the center. - * @param int $center_y y-coordinate of the center. - * @param int $width The ellipse width. - * @param int $height The ellipse height. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $center_x + * @param int $center_y + * @param int $width + * @param int $height + * @param int $color * @throws ImageException * */ @@ -1257,17 +894,12 @@ function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $ /** - * Creates a rectangle filled with color in the given - * image starting at point 1 and ending at point 2. - * 0, 0 is the top left corner of the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for point 1. - * @param int $y1 y-coordinate for point 1. - * @param int $x2 x-coordinate for point 2. - * @param int $y2 y-coordinate for point 2. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1282,18 +914,11 @@ function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y /** - * imagefilltoborder performs a flood fill - * whose border color is defined by border_color. - * The starting point for the fill is x, - * y (top left is 0, 0) and the region is - * filled with color color. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate of start. - * @param int $y y-coordinate of start. - * @param int $border_color The border color. A color identifier created with imagecolorallocate. - * @param int $color The fill color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $border_color + * @param int $color * @throws ImageException * */ @@ -1308,138 +933,9 @@ function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, i /** - * imagefilter applies the given filter - * filter on the image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $filter filter can be one of the following: - * - * - * - * IMG_FILTER_NEGATE: Reverses all colors of - * the image. - * - * - * - * - * IMG_FILTER_GRAYSCALE: Converts the image into - * grayscale by changing the red, green and blue components to their - * weighted sum using the same coefficients as the REC.601 luma (Y') - * calculation. The alpha components are retained. For palette images the - * result may differ due to palette limitations. - * - * - * - * - * IMG_FILTER_BRIGHTNESS: Changes the brightness - * of the image. Use args to set the level of - * brightness. The range for the brightness is -255 to 255. - * - * - * - * - * IMG_FILTER_CONTRAST: Changes the contrast of - * the image. Use args to set the level of - * contrast. - * - * - * - * - * IMG_FILTER_COLORIZE: Like - * IMG_FILTER_GRAYSCALE, except you can specify the - * color. Use args, arg2 and - * arg3 in the form of - * red, green, - * blue and arg4 for the - * alpha channel. The range for each color is 0 to 255. - * - * - * - * - * IMG_FILTER_EDGEDETECT: Uses edge detection to - * highlight the edges in the image. - * - * - * - * - * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * - * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using - * the Gaussian method. - * - * - * - * - * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * - * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to - * achieve a "sketchy" effect. - * - * - * - * - * IMG_FILTER_SMOOTH: Makes the image smoother. - * Use args to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use args to set the block size - * and arg2 to set the pixelation effect mode. - * - * - * - * - * IMG_FILTER_SCATTER: Applies scatter effect - * to the image, use args and - * arg2 to define the effect strength and - * additionally arg3 to only apply the - * on select pixel colors. - * - * - * + * @param \GdImage $image + * @param int $filter * @param int $args - * - * - * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * - * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * - * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * - * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * - * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * - * IMG_FILTER_SCATTER: Effect substraction level. - * This must not be higher or equal to the addition level set with - * arg2. - * - * - * * @throws ImageException * */ @@ -1458,43 +954,8 @@ function imagefilter(\GdImage $image, int $filter, int ...$args): void /** - * Flips the image image using the given - * mode. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * - * Constant - * Meaning - * - * - * - * - * IMG_FLIP_HORIZONTAL - * - * Flips the image horizontally. - * - * - * - * IMG_FLIP_VERTICAL - * - * Flips the image vertically. - * - * - * - * IMG_FLIP_BOTH - * - * Flips the image both horizontally and vertically. - * - * - * - * - * + * @param \GdImage $image + * @param int $mode * @throws ImageException * */ @@ -1509,83 +970,12 @@ function imageflip(\GdImage $image, int $mode): void /** - * This function calculates and returns the bounding box in pixels - * for a FreeType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be - * measured. - * @param string $font_filename The name of the TrueType font file (can be a URL). Depending on - * which version of the GD library that PHP is using, it may attempt to - * search for files that do not begin with a leading '/' by appending - * '.ttf' to the filename and searching along a library-defined font path. - * @param string $string The string to be measured. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array imageftbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text: - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1601,100 +991,16 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s /** - * - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size to use in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The index of the desired color for the text, see - * imagecolorexact. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * font_filename does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * @param string $text Text to be inserted into image. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text * @param array $options - * Possible array indexes for options - * - * - * - * Key - * Type - * Meaning - * - * - * - * - * linespacing - * float - * Defines drawing linespacing - * - * - * - * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: - * - * - * - * - * 0 - * lower left x-coordinate - * - * - * 1 - * lower left y-coordinate - * - * - * 2 - * lower right x-coordinate - * - * - * 3 - * lower right y-coordinate - * - * - * 4 - * upper right x-coordinate - * - * - * 5 - * upper right y-coordinate - * - * - * 6 - * upper left x-coordinate - * - * - * 7 - * upper left y-coordinate - * - * - * - * - * - * On failure, FALSE is returned. + * @return array * @throws ImageException * */ @@ -1710,13 +1016,9 @@ function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, /** - * Applies gamma correction to the given gd image - * given an input and an output gamma. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $input_gamma The input gamma. - * @param float $output_gamma The output gamma. + * @param \GdImage $image + * @param float $input_gamma + * @param float $output_gamma * @throws ImageException * */ @@ -1731,11 +1033,8 @@ function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_ga /** - * Outputs or saves the given image in GD format. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1754,15 +1053,10 @@ function imagegd(\GdImage $image, $file = null): void /** - * Outputs or saves the given image in GD2 format. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $chunk_size Chunk size. - * @param int $mode Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is - * IMG_GD2_RAW. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $chunk_size + * @param int $mode * @throws ImageException * */ @@ -1785,20 +1079,8 @@ function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mod /** - * imagegif creates the GIF - * file in file from the image image. The - * image argument is the return from the - * imagecreate or imagecreatefrom* - * function. - * - * The image format will be GIF87a unless the - * image has been made transparent with - * imagecolortransparent, in which case the - * image format will be GIF89a. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. + * @param \GdImage $image + * @param null|resource|string $file * @throws ImageException * */ @@ -1817,9 +1099,7 @@ function imagegif(\GdImage $image, $file = null): void /** - * Grabs a screenshot of the whole screen. - * - * @return \GdImage Returns an image object on success. + * @return \GdImage * @throws ImageException * */ @@ -1835,11 +1115,9 @@ function imagegrabscreen(): \GdImage /** - * Grabs a window or its client area using a windows handle (HWND property in COM instance) - * - * @param int $handle The HWND window ID. - * @param bool $client_area Include the client area of the application window. - * @return \GdImage Returns an image object on success. + * @param int $handle + * @param bool $client_area + * @return \GdImage * @throws ImageException * */ @@ -1855,15 +1133,9 @@ function imagegrabwindow(int $handle, bool $client_area = false): \GdImage /** - * imagejpeg creates a JPEG file from - * the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The - * default (-1) uses the default IJG quality value (about 75). + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -1884,57 +1156,8 @@ function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void /** - * Set the alpha blending flag to use layering effects. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $effect One of the following constants: - * - * - * IMG_EFFECT_REPLACE - * - * - * Use pixel replacement (equivalent of passing TRUE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_ALPHABLEND - * - * - * Use normal pixel blending (equivalent of passing FALSE to - * imagealphablending) - * - * - * - * - * IMG_EFFECT_NORMAL - * - * - * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * - * IMG_EFFECT_OVERLAY - * - * - * Overlay has the effect that black background pixels will remain - * black, white background pixels will remain white, but grey - * background pixels will take the colour of the foreground pixel. - * - * - * - * - * IMG_EFFECT_MULTIPLY - * - * - * Overlays with a multiply effect. - * - * - * - * + * @param \GdImage $image + * @param int $effect * @throws ImageException * */ @@ -1949,15 +1172,12 @@ function imagelayereffect(\GdImage $image, int $effect): void /** - * Draws a line between the two given points. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 x-coordinate for first point. - * @param int $y1 y-coordinate for first point. - * @param int $x2 x-coordinate for second point. - * @param int $y2 y-coordinate for second point. - * @param int $color The line color. A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -1972,58 +1192,8 @@ function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $col /** - * imageloadfont loads a user-defined bitmap and returns - * its identifier. - * - * @param string $filename The font file format is currently binary and architecture - * dependent. This means you should generate the font files on the - * same type of CPU as the machine you are running PHP on. - * - * - * Font file format - * - * - * - * byte position - * C data type - * description - * - * - * - * - * byte 0-3 - * int - * number of characters in the font - * - * - * byte 4-7 - * int - * - * value of first character in the font (often 32 for space) - * - * - * - * byte 8-11 - * int - * pixel width of each character - * - * - * byte 12-15 - * int - * pixel height of each character - * - * - * byte 16- - * char - * - * array with character data, one byte per pixel in each - * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * - * @return int Returns an GdFont instance. + * @param string $filename + * @return int * @throws ImageException * */ @@ -2039,24 +1209,10 @@ function imageloadfont(string $filename): int /** - * Outputs or saves a PNG image from the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * - * NULL is invalid if the quality and - * filters arguments are not used. - * @param int $quality Compression level: from 0 (no compression) to 9. - * The default (-1) uses the zlib compression default. - * For more information see the zlib manual. - * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_* - * constants. PNG_NO_FILTER or - * PNG_ALL_FILTERS may also be used to respectively - * disable or activate all filters. - * The default value (-1) disables filtering. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality + * @param int $filters * @throws ImageException * */ @@ -2079,17 +1235,12 @@ function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters /** - * imagerectangle creates a rectangle starting at - * the specified coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 Upper left x coordinate. - * @param int $y1 Upper left y coordinate - * 0, 0 is the top left corner of the image. - * @param int $x2 Bottom right x coordinate. - * @param int $y2 Bottom right y coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param int $color * @throws ImageException * */ @@ -2104,27 +1255,10 @@ function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int /** - * imageresolution allows to set and get the resolution of - * an image in DPI (dots per inch). If the optional parameters are NULL, - * the current resolution is returned as an indexed array. If only - * resolution_x is not NULL, the horizontal and vertical resolution - * are set to this value. If none of the optional parameters are NULL, the horizontal - * and vertical resolution are set to these values, respectively. - * - * The resolution is only used as meta information when images are read from and - * written to formats supporting this kind of information (curently PNG and - * JPEG). It does not affect any drawing operations. The default resolution - * for new images is 96 DPI. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int|null $resolution_x The horizontal resolution in DPI. - * @param int|null $resolution_y The vertical resolution in DPI. - * @return mixed When used as getter, - * it returns an indexed array of the horizontal and vertical resolution on - * success. - * When used as setter, it returns - * TRUE on success. + * @param \GdImage $image + * @param int|null $resolution_x + * @param int|null $resolution_y + * @return mixed * @throws ImageException * */ @@ -2146,18 +1280,10 @@ function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resol /** - * Rotates the image image using the given - * angle in degrees. - * - * The center of rotation is the center of the image, and the rotated - * image may have different dimensions than the original image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the - * number of degrees to rotate the image anticlockwise. - * @param int $background_color Specifies the color of the uncovered zone after the rotation - * @return \GdImage Returns an image object for the rotated image. + * @param \GdImage $image + * @param float $angle + * @param int $background_color + * @return \GdImage * @throws ImageException * */ @@ -2173,28 +1299,8 @@ function imagerotate(\GdImage $image, float $angle, int $background_color): \GdI /** - * imagesavealpha sets the flag which determines whether to retain - * full alpha channel information (as opposed to single-color transparency) - * when saving images. - * This is only supported for image formats which support full alpha channel information, - * i.e. PNG, WebP and AVIF. - * - * - * imagesavealpha is only meaningful for PNG - * images, since the full alpha channel is always saved for WebP - * and AVIF. It is not recommended to rely on this behavior, - * as it may change in the future. Thus, imagesavealpha - * should be called deliberately also for WebP and - * AVIF images. - * - * - * - * Alphablending has to be disabled (imagealphablending($im, false)) - * to retain the alpha-channel in the first place. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE. + * @param \GdImage $image + * @param bool $enable * @throws ImageException * */ @@ -2209,25 +1315,11 @@ function imagesavealpha(\GdImage $image, bool $enable): void /** - * imagescale scales an image using the given - * interpolation algorithm. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $width The width to scale the image to. - * @param int $height The height to scale the image to. If omitted or negative, the aspect - * ratio will be preserved. - * @param int $mode One of IMG_NEAREST_NEIGHBOUR, - * IMG_BILINEAR_FIXED, - * IMG_BICUBIC, - * IMG_BICUBIC_FIXED or anything else (will use two - * pass). - * - * - * IMG_WEIGHTED4 is not yet supported. - * - * - * @return \GdImage Return the scaled image object on success. + * @param \GdImage $image + * @param int $width + * @param int $height + * @param int $mode + * @return \GdImage * @throws ImageException * */ @@ -2243,15 +1335,8 @@ function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = I /** - * imagesetbrush sets the brush image to be - * used by all line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * colors IMG_COLOR_BRUSHED or - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $brush An image object. + * @param \GdImage $image + * @param \GdImage $brush * @throws ImageException * */ @@ -2266,15 +1351,11 @@ function imagesetbrush(\GdImage $image, \GdImage $brush): void /** - * imagesetclip sets the current clipping rectangle, i.e. - * the area beyond which no pixels will be drawn. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x1 The x-coordinate of the upper left corner. - * @param int $y1 The y-coordinate of the upper left corner. - * @param int $x2 The x-coordinate of the lower right corner. - * @param int $y2 The y-coordinate of the lower right corner. + * @param \GdImage $image + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 * @throws ImageException * */ @@ -2289,119 +1370,8 @@ function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void /** - * Sets the interpolation method, setting an interpolation method affects the rendering - * of various functions in GD, such as the imagerotate function. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $method The interpolation method, which can be one of the following: - * - * - * - * IMG_BELL: Bell filter. - * - * - * - * - * IMG_BESSEL: Bessel filter. - * - * - * - * - * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * - * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * - * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * - * IMG_BLACKMAN: Blackman window function. - * - * - * - * - * IMG_BOX: Box blur filter. - * - * - * - * - * IMG_BSPLINE: Spline interpolation. - * - * - * - * - * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * - * IMG_GAUSSIAN: Gaussian function. - * - * - * - * - * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * - * IMG_HERMITE: Hermite interpolation. - * - * - * - * - * IMG_HAMMING: Hamming filter. - * - * - * - * - * IMG_HANNING: Hanning filter. - * - * - * - * - * IMG_MITCHELL: Mitchell filter. - * - * - * - * - * IMG_POWER: Power interpolation. - * - * - * - * - * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * - * IMG_SINC: Sinc function. - * - * - * - * - * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * - * IMG_WEIGHTED4: Weighting filter. - * - * - * - * - * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * @param \GdImage $image + * @param int $method * @throws ImageException * */ @@ -2416,14 +1386,10 @@ function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED /** - * imagesetpixel draws a pixel at the specified - * coordinate. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $x x-coordinate. - * @param int $y y-coordinate. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $x + * @param int $y + * @param int $color * @throws ImageException * */ @@ -2438,18 +1404,8 @@ function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void /** - * imagesetstyle sets the style to be used by all - * line drawing functions (such as imageline - * and imagepolygon) when drawing with the special - * color IMG_COLOR_STYLED or lines of images with color - * IMG_COLOR_STYLEDBRUSHED. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a - * transparent pixel. - * Note that style must not be an empty array. + * @param \GdImage $image + * @param array $style * @throws ImageException * */ @@ -2464,13 +1420,8 @@ function imagesetstyle(\GdImage $image, array $style): void /** - * imagesetthickness sets the thickness of the lines - * drawn when drawing rectangles, polygons, arcs etc. to - * thickness pixels. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $thickness Thickness, in pixels. + * @param \GdImage $image + * @param int $thickness * @throws ImageException * */ @@ -2485,19 +1436,8 @@ function imagesetthickness(\GdImage $image, int $thickness): void /** - * imagesettile sets the tile image to be - * used by all region filling functions (such as imagefill - * and imagefilledpolygon) when filling with the special - * color IMG_COLOR_TILED. - * - * A tile is an image used to fill an area with a repeated pattern. Any - * GD image can be used as a tile, and by setting the transparent color index of the tile - * image with imagecolortransparent, a tile allows certain parts - * of the underlying area to shine through can be created. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param \GdImage $tile The image object to be used as a tile. + * @param \GdImage $image + * @param \GdImage $tile * @throws ImageException * */ @@ -2512,17 +1452,12 @@ function imagesettile(\GdImage $image, \GdImage $tile): void /** - * Draws a string at the given coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the upper left corner. - * @param int $y y-coordinate of the upper left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2537,18 +1472,12 @@ function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, /** - * Draws a string vertically at the given - * coordinates. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param int $font Can be 1, 2, 3, 4, 5 for built-in - * fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or GdFont instance, - * returned by imageloadfont. - * @param int $x x-coordinate of the bottom left corner. - * @param int $y y-coordinate of the bottom left corner. - * @param string $string The string to be written. - * @param int $color A color identifier created with imagecolorallocate. + * @param \GdImage $image + * @param int $font + * @param int $x + * @param int $y + * @param string $string + * @param int $color * @throws ImageException * */ @@ -2563,11 +1492,8 @@ function imagestringup(\GdImage $image, int $font, int $x, int $y, string $strin /** - * Returns the width of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the width of the image. + * @param \GdImage $image + * @return int * */ function imagesx(\GdImage $image): int @@ -2579,11 +1505,8 @@ function imagesx(\GdImage $image): int /** - * Returns the height of the given image object. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @return int Return the height of the image. + * @param \GdImage $image + * @return int * */ function imagesy(\GdImage $image): int @@ -2595,21 +1518,9 @@ function imagesy(\GdImage $image): int /** - * imagetruecolortopalette converts a truecolor image - * to a palette image. The code for this function was originally drawn from - * the Independent JPEG Group library code, which is excellent. The code - * has been modified to preserve as much alpha channel information as - * possible in the resulting palette, in addition to preserving colors as - * well as possible. This does not work as well as might be hoped. It is - * usually best to simply produce a truecolor output image instead, which - * guarantees the highest output quality. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param bool $dither Indicates if the image should be dithered - if it is TRUE then - * dithering will be used which will result in a more speckled image but - * with better color approximation. - * @param int $num_colors Sets the maximum number of colors that should be retained in the palette. + * @param \GdImage $image + * @param bool $dither + * @param int $num_colors * @throws ImageException * */ @@ -2624,87 +1535,12 @@ function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) /** - * This function calculates and returns the bounding box in pixels - * for a TrueType text. - * - * @param float $size The font size in points. - * @param float $angle Angle in degrees in which string will be measured. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $string The string to be measured. - * @param array $options Same as in imagettftext. - * @return array imagettfbbox returns an array with 8 - * elements representing four points making the bounding box of the - * text on success and FALSE on error. - * - * - * - * - * key - * contents - * - * - * - * - * 0 - * lower left corner, X position - * - * - * 1 - * lower left corner, Y position - * - * - * 2 - * lower right corner, X position - * - * - * 3 - * lower right corner, Y position - * - * - * 4 - * upper right corner, X position - * - * - * 5 - * upper right corner, Y position - * - * - * 6 - * upper left corner, X position - * - * - * 7 - * upper left corner, Y position - * - * - * - * - * - * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand - * corner seeing the text horizontally. + * @param float $size + * @param float $angle + * @param string $font_filename + * @param string $string + * @param array $options + * @return array * @throws ImageException * */ @@ -2720,68 +1556,16 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ /** - * Writes the given text into the image using TrueType - * fonts. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param float $size The font size in points. - * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a - * value of 90 would result in bottom-to-top reading text. - * @param int $x The coordinates given by x and - * y will define the basepoint of the first - * character (roughly the lower-left corner of the character). This - * is different from the imagestring, where - * x and y define the - * upper-left corner of the first character. For example, "top left" - * is 0, 0. - * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the - * very bottom of the character. - * @param int $color The color index. Using the negative of a color index has the effect of - * turning off antialiasing. See imagecolorallocate. - * @param string $font_filename The path to the TrueType font you wish to use. - * - * Depending on which version of the GD library PHP is using, when - * fontfile does not begin with a leading - * / then .ttf will be appended - * to the filename and the library will attempt to search for that - * filename along a library-defined font path. - * - * When using versions of the GD library lower than 2.0.18, a space character, - * rather than a semicolon, was used as the 'path separator' for different font files. - * Unintentional use of this feature will result in the warning message: - * Warning: Could not find/open font. For these affected versions, the - * only solution is moving the font to a path which does not contain spaces. - * - * In many cases where a font resides in the same directory as the script using it - * the following trick will alleviate any include problems. - * - * - * ]]> - * - * - * Note that open_basedir does - * not apply to fontfile. - * @param string $text The text string in UTF-8 encoding. - * - * May include decimal numeric character references (of the form: - * &#8364;) to access characters in a font beyond position 127. - * The hexadecimal format (like &#xA9;) is supported. - * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using - * html_entity_decode - * to decode these named entities into UTF-8 strings. - * - * If a character is used in the string which is not supported by the - * font, a hollow rectangle will replace the character. - * @param array $options An array with linespacing key holding a float value. - * @return array Returns an array with 8 elements representing four points making the - * bounding box of the text. The order of the points is lower left, lower - * right, upper right, upper left. The points are relative to the text - * regardless of the angle, so "upper left" means in the top left-hand - * corner when you see the text horizontally. + * @param \GdImage $image + * @param float $size + * @param float $angle + * @param int $x + * @param int $y + * @param int $color + * @param string $font_filename + * @param string $text + * @param array $options + * @return array * @throws ImageException * */ @@ -2797,15 +1581,9 @@ function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y /** - * imagewbmp outputs or save a WBMP - * version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. + * @param \GdImage $image + * @param null|resource|string $file + * @param int|null $foreground_color * @throws ImageException * */ @@ -2826,14 +1604,9 @@ function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) /** - * Outputs or saves a WebP version of the given image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be output directly. - * @param int $quality quality ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). - * If -1 is provided, the default value 80 is used. + * @param \GdImage $image + * @param null|resource|string $file + * @param int $quality * @throws ImageException * */ @@ -2854,22 +1627,9 @@ function imagewebp(\GdImage $image, $file = null, int $quality = -1): void /** - * Outputs or save an XBM version of the given - * image. - * - * @param \GdImage $image A GdImage object, returned by one of the image creation functions, - * such as imagecreatetruecolor. - * @param null|resource|string $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly. - * - * The filename (without the .xbm extension) is also - * used for the C identifiers of the XBM, whereby non - * alphanumeric characters of the current locale are substituted by - * underscores. If filename is set to NULL, - * image is used to build the C identifiers. - * @param int|null $foreground_color You can set the foreground color with this parameter by setting an - * identifier obtained from imagecolorallocate. - * The default foreground color is black. All other colors are treated as - * background. + * @param \GdImage $image + * @param null|resource|string $filename + * @param int|null $foreground_color * @throws ImageException * */ @@ -2888,13 +1648,10 @@ function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): vo /** - * Embeds binary IPTC data into a JPEG image. - * - * @param string $iptc_data The data to be written. - * @param string $filename Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be - * returned as a string. Otherwise the JPEG will be printed to STDOUT. - * @return bool|string If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @param string $iptc_data + * @param string $filename + * @param int $spool + * @return bool|string * @throws ImageException * */ @@ -2910,11 +1667,8 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) /** - * Parses an IPTC block into its single tags. - * - * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the - * value. It returns FALSE on error or if no IPTC data was found. + * @param string $iptc_block + * @return array * @throws ImageException * */ diff --git a/generated/8.5/imap.php b/generated/8.5/imap.php index 059998f4..05ac9f44 100644 --- a/generated/8.5/imap.php +++ b/generated/8.5/imap.php @@ -5,11 +5,8 @@ use Safe\Exceptions\ImapException; /** - * Convert an 8bit string to a quoted-printable string (according to - * RFC2045, section 6.7). - * - * @param string $string The 8bit string to convert - * @return string Returns a quoted-printable string. + * @param string $string + * @return string * @throws ImapException * */ @@ -25,19 +22,11 @@ function imap_8bit(string $string): string /** - * Appends a string message to the specified folder. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $folder The mailbox name, see imap_open for more - * information - * @param string $message The message to be append, as a string - * - * When talking to the Cyrus IMAP server, you must use "\r\n" as - * your end-of-line terminator instead of "\n" or the operation will - * fail - * @param null|string $options If provided, the options will also be written - * to the folder - * @param null|string $internal_date 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. + * @param \IMAP\Connection $imap + * @param string $folder + * @param string $message + * @param null|string $options + * @param null|string $internal_date * @throws ImapException * */ @@ -58,10 +47,8 @@ function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?s /** - * Decodes the given BASE-64 encoded string. - * - * @param string $string The encoded text - * @return string Returns the decoded message as a string. + * @param string $string + * @return string * @throws ImapException * */ @@ -77,10 +64,8 @@ function imap_base64(string $string): string /** - * Convert an 8bit string to a base64 string according to RFC2045, Section 6.8. - * - * @param string $string The 8bit string - * @return string Returns a base64 encoded string. + * @param string $string + * @return string * @throws ImapException * */ @@ -96,39 +81,10 @@ function imap_binary(string $string): string /** - * imap_body returns the body of the message, - * numbered message_num in the current - * mailbox. - * - * imap_body will only return a verbatim copy of the - * message body. To extract single parts of a multipart MIME-encoded - * message you have to use imap_fetchstructure to - * analyze its structure and imap_fetchbody to - * extract a copy of a single body component. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The optional flags are a bit mask - * with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if not already set - * - * - * - * - * FT_INTERNAL - The return string is in internal format, will - * not canonicalize to CRLF. - * - * - * - * @return string Returns the body of the specified message, as a string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -144,15 +100,10 @@ function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): st /** - * Read the structure of a specified body section of a specific message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param string $section The body section to read - * @return \stdClass Returns the information in an object. - * For a detailed description - * of the object structure and properties see - * imap_fetchstructure. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @return \stdClass * @throws ImapException * */ @@ -168,40 +119,8 @@ function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $secti /** - * Checks information about the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass Returns 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 - * - * - * - * - * Mailbox - the mailbox name - * - * - * - * - * Nmsgs - number of messages in the mailbox - * - * - * - * - * Recent - number of recent messages in the mailbox - * - * - * - * - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return \stdClass * @throws ImapException * */ @@ -217,27 +136,11 @@ function imap_check(\IMAP\Connection $imap): \stdClass /** - * This function causes a store to delete the specified - * flag to the flags set for the - * messages in the specified sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", - * "\\Deleted", and "\\Draft" (as defined by RFC2060) - * @param int $options options are a bit mask and may contain - * the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options + * @return bool * */ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool @@ -249,14 +152,9 @@ function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $f /** - * Closes the imap stream. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags 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 Always returns TRUE. + * @param \IMAP\Connection $imap + * @param int $flags + * @return bool * */ function imap_close(\IMAP\Connection $imap, int $flags = 0): bool @@ -268,12 +166,8 @@ function imap_close(\IMAP\Connection $imap, int $flags = 0): bool /** - * Creates a new mailbox specified by mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information. Names containing international characters should be - * encoded by imap_utf7_encode + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -288,11 +182,8 @@ function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void /** - * Deletes the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -307,108 +198,10 @@ function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void /** - * This function fetches mail headers for the given - * sequence and returns an overview of their - * contents. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A message sequence description. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param int $flags sequence will contain a sequence of message - * indices or UIDs, if this parameter is set to - * FT_UID. - * @return array Returns an array of objects describing one message header each. - * The object will only define a property if it exists. The possible - * properties are: - * - * - * - * subject - the messages subject - * - * - * - * - * from - who sent it - * - * - * - * - * to - recipient - * - * - * - * - * date - when was it sent - * - * - * - * - * message_id - Message-ID - * - * - * - * - * references - is a reference to this message id - * - * - * - * - * in_reply_to - is a reply to this message id - * - * - * - * - * size - size in bytes - * - * - * - * - * uid - UID the message has in the mailbox - * - * - * - * - * msgno - message sequence number in the mailbox - * - * - * - * - * recent - this message is flagged as recent - * - * - * - * - * flagged - this message is flagged - * - * - * - * - * answered - this message is flagged as answered - * - * - * - * - * deleted - this message is flagged for deletion - * - * - * - * - * seen - this message is flagged as already read - * - * - * - * - * draft - this message is flagged as being a draft - * - * - * - * - * udate - the UNIX timestamp of the arrival date - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param int $flags + * @return array * @throws ImapException * */ @@ -424,35 +217,11 @@ function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flag /** - * Fetch of a particular section of the body of the specified messages. - * Body parts are not decoded by this function. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -468,36 +237,10 @@ function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $sectio /** - * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified - * message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags The possible flags are: - * - * - * - * FT_UID - The message_num - * argument is a UID - * - * - * - * - * FT_INTERNAL - The return string - * is in "internal" format, without any attempt to - * canonicalize to CRLF newlines - * - * - * - * - * FT_PREFETCHTEXT - The RFC822.TEXT - * should be pre-fetched at the same time. This avoids an - * extra RTT on an IMAP connection if a full message text is - * desired (e.g. in a "save to local file" operation) - * - * - * - * @return string Returns the header of the specified message as a text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return string * @throws ImapException * */ @@ -513,34 +256,11 @@ function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = /** - * Fetch the MIME headers of a particular section of the body of the specified messages. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * - * @return string Returns the MIME headers of a particular section of the body of the specified messages as a - * text string. + * @param \IMAP\Connection $imap + * @param int $message_num + * @param string $section + * @param int $flags + * @return string * @throws ImapException * */ @@ -556,138 +276,10 @@ function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $sectio /** - * Fetches all the structured information for a given message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $flags This optional parameter only has a single option, - * FT_UID, which tells the function to treat the - * message_num argument as a - * UID. - * @return \stdClass Returns an object with properties listed in the table below. - * - * - * - * Returned Object for imap_fetchstructure - * - * - * - * - * type - * Primary body type - * - * - * encoding - * Body transfer encoding - * - * - * ifsubtype - * TRUE if there is a subtype string - * - * - * subtype - * MIME subtype - * - * - * ifdescription - * TRUE if there is a description string - * - * - * description - * Content description string - * - * - * ifid - * TRUE if there is an identification string - * - * - * id - * Identification string - * - * - * lines - * Number of lines - * - * - * bytes - * Number of bytes - * - * - * ifdisposition - * TRUE if there is a disposition string - * - * - * disposition - * Disposition string - * - * - * ifdparameters - * TRUE if the dparameters array exists - * - * - * dparameters - * An array of objects where each object has an - * "attribute" and a "value" - * property corresponding to the parameters on the - * Content-disposition MIME - * header. - * - * - * ifparameters - * TRUE if the parameters array exists - * - * - * parameters - * An array of objects where each object has an - * "attribute" and a "value" - * property. - * - * - * parts - * An array of objects identical in structure to the top-level - * object, each of which corresponds to a MIME body - * part. - * - * - * - * - * - * - * Primary body type (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 0textTYPETEXT - * 1multipartTYPEMULTIPART - * 2messageTYPEMESSAGE - * 3applicationTYPEAPPLICATION - * 4audioTYPEAUDIO - * 5imageTYPEIMAGE - * 6videoTYPEVIDEO - * 7modelTYPEMODEL - * 8otherTYPEOTHER - * - * - * - * - * - * Transfer encodings (value may vary with used library, use of constants is recommended) - * - * - * ValueTypeConstant - * - * - * 07bitENC7BIT - * 18bitENC8BIT - * 2BinaryENCBINARY - * 3Base64ENCBASE64 - * 4Quoted-PrintableENCQUOTEDPRINTABLE - * 5otherENCOTHER - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -703,15 +295,9 @@ function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flag /** - * Purges the cache of entries of a specific type. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $flags Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), - * IMAP_GC_ENV (envelope and bodies), - * IMAP_GC_TEXTS (texts). - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param int $flags + * @return bool * */ function imap_gc(\IMAP\Connection $imap, int $flags): bool @@ -723,12 +309,9 @@ function imap_gc(\IMAP\Connection $imap, int $flags): bool /** - * Gets the ACL for a given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @return array * @throws ImapException * */ @@ -744,78 +327,11 @@ function imap_getacl(\IMAP\Connection $imap, string $mailbox): array /** - * Gets information on the mailboxes. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox not contains, and may not contain any - * "children" (there are no mailboxes below this one). Calling - * imap_createmailbox will not work on this mailbox. - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. This means that it may - * contain new messages since the last time it was checked. Not provided by all IMAP - * servers. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked, does not contain new - * messages. If either MARKED or UNMARKED is - * provided, you can assume the IMAP server supports this feature for this mailbox. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. - * @throws ImapException + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array + * @throws ImapException * */ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array @@ -830,77 +346,10 @@ function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pa /** - * Gets information about the subscribed mailboxes. - * - * Identical to imap_getmailboxes, except that it only - * returns mailboxes that the user is subscribed to. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each - * object has the attributes name, specifying - * the full name of the mailbox; delimiter, - * which is the hierarchy delimiter for the part of the hierarchy - * this mailbox is in; and - * attributes. Attributes - * is a bitmask that can be tested against: - * - * - * - * LATT_NOINFERIORS - This mailbox has no - * "children" (there are no mailboxes below this one). - * - * - * - * - * LATT_NOSELECT - This is only a container, - * not a mailbox - you cannot open it. - * - * - * - * - * LATT_MARKED - This mailbox is marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_UNMARKED - This mailbox is not marked. - * Only used by UW-IMAPD. - * - * - * - * - * LATT_REFERRAL - This container has a referral to a remote mailbox. - * - * - * - * - * LATT_HASCHILDREN - This mailbox has selectable inferiors. - * - * - * - * - * LATT_HASNOCHILDREN - This mailbox has no selectable inferiors. - * - * - * - * The function returns FALSE on failure. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -916,216 +365,11 @@ function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $p /** - * Gets information about the given message number by reading its headers. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $message_num The message number - * @param int $from_length Number of characters for the fetchfrom property. - * Must be greater than or equal to zero. - * @param int $subject_length Number of characters for the fetchsubject property - * Must be greater than or equal to zero. - * @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * - * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * - * reply_to - an array of objects from the Reply-To: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following - * properties: personal, adl, - * mailbox, and host - * - * - * - * - * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * - * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and - * host - * - * - * - * - * remail - - * - * - * - * - * date - The message date as found in its headers - * - * - * - * - * Date - Same as date - * - * - * - * - * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * - * Recent - R if recent and seen, N - * if recent and not seen, ' ' if not recent. - * - * - * - * - * Unseen - U if not seen AND not recent, ' ' if seen - * OR not seen and recent - * - * - * - * - * Flagged - F if flagged, ' ' if not flagged - * - * - * - * - * Answered - A if answered, ' ' if unanswered - * - * - * - * - * Deleted - D if deleted, ' ' if not deleted - * - * - * - * - * Draft - X if draft, ' ' if not draft - * - * - * - * - * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * - * Size - The message size - * - * - * - * - * udate - mail message date in Unix time - * - * - * - * - * fetchfrom - from line formatted to fit from_length - * characters - * - * - * - * - * fetchsubject - subject line formatted to fit - * subject_length characters - * - * - * + * @param \IMAP\Connection $imap + * @param int $message_num + * @param int $from_length + * @param int $subject_length + * @return \stdClass * @throws ImapException * */ @@ -1141,12 +385,8 @@ function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_len /** - * Returns headers for all messages in a mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One - * element per mail message. - * Returns FALSE on failure. + * @param \IMAP\Connection $imap + * @return array * @throws ImapException * */ @@ -1162,33 +402,11 @@ function imap_headers(\IMAP\Connection $imap): array /** - * Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. - * - * This function is similar to imap_listmailbox, - * but it will additionally check for the presence of the string - * content inside the mailbox data. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have - * content in the text of the mailbox. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @param string $content + * @return array * @throws ImapException * */ @@ -1204,26 +422,10 @@ function imap_listscan(\IMAP\Connection $imap, string $reference, string $patter /** - * Gets an array of all the mailboxes that you have subscribed. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $reference reference should normally be just the server - * specification as described in imap_open - * @param string $pattern Specifies where in the mailbox hierarchy - * to start searching. - * - * There are two special characters you can - * pass as part of the pattern: - * '*' and '%'. - * '*' means to return all mailboxes. If you pass - * pattern as '*', you will - * get a list of the entire mailbox hierarchy. - * '%' - * means to return the current level only. - * '%' as the pattern - * parameter will return only the top level - * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @param \IMAP\Connection $imap + * @param string $reference + * @param string $pattern + * @return array * @throws ImapException * */ @@ -1239,109 +441,9 @@ function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): /** - * Create a MIME message based on the given envelope - * and bodies sections. - * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", - * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", - * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. - * To set additional headers, the key "custom_headers" is supported, which expects - * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; - * only if it has a type of TYPEMULTIPART, further bodies - * are processed; these bodies constitute the bodies of the parts. - * - * - * Body Array Structure - * - * - * - * Key - * Type - * Description - * - * - * - * - * type - * int - * - * The MIME type. - * One of TYPETEXT (default), TYPEMULTIPART, - * TYPEMESSAGE, TYPEAPPLICATION, - * TYPEAUDIO, TYPEIMAGE, - * TYPEMODEL or TYPEOTHER. - * - * - * - * encoding - * int - * - * The Content-Transfer-Encoding. - * One of ENC7BIT (default), ENC8BIT, - * ENCBINARY, ENCBASE64, - * ENCQUOTEDPRINTABLE or ENCOTHER. - * - * - * - * charset - * string - * The charset parameter of the MIME type. - * - * - * type.parameters - * array - * An associative array of Content-Type parameter names and their values. - * - * - * subtype - * string - * The MIME subtype, e.g. 'jpeg' for TYPEIMAGE. - * - * - * id - * string - * The Content-ID. - * - * - * description - * string - * The Content-Description. - * - * - * disposition.type - * string - * The Content-Disposition, e.g. 'attachment'. - * - * - * disposition - * array - * An associative array of Content-Disposition parameter names and values. - * - * - * contents.data - * string - * The payload. - * - * - * lines - * int - * The size of the payload in lines. - * - * - * bytes - * int - * The size of the payload in bytes. - * - * - * md5 - * string - * The MD5 checksum of the payload. - * - * - * - * - * @return string Returns the MIME message as string. + * @param array $envelope + * @param array $bodies + * @return string * @throws ImapException * */ @@ -1357,29 +459,10 @@ function imap_mail_compose(array $envelope, array $bodies): string /** - * Copies mail messages specified by message_nums - * to specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message - * numbers (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask of one or more of - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * - * - * CP_MOVE - Delete the messages from - * the current mailbox after copying. If this flag is set, the function - * behaves identically to imap_mail_move. - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1394,25 +477,10 @@ function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $ma /** - * Moves mail messages specified by message_nums to the - * specified mailbox. - * Note that the mail messages are actually copied to the - * mailbox, and the original messages are flagged for deletion. - * That implies that the messages in mailbox are assigned new UIDs. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums message_nums is a range not just message numbers - * (as described in RFC2060). - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags flags is a bitmask and may contain the single option: - * - * - * - * CP_UID - the sequence numbers contain UIDS - * - * - * + * @param \IMAP\Connection $imap + * @param string $message_nums + * @param string $mailbox + * @param int $flags * @throws ImapException * */ @@ -1427,22 +495,13 @@ function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $ma /** - * This function allows sending of emails with correct handling of - * Cc and Bcc receivers. - * - * The parameters to, cc - * and bcc are all strings and are all parsed - * as RFC822 address lists. - * - * @param string $to The receiver - * @param string $subject The mail subject - * @param string $message The mail body, see imap_mail_compose - * @param null|string $additional_headers As string with additional headers to be set on the mail + * @param string $to + * @param string $subject + * @param string $message + * @param null|string $additional_headers * @param null|string $cc - * @param null|string $bcc The receivers specified in bcc will get the - * mail, but are excluded from the headers. - * @param null|string $return_path Use this parameter to specify return path upon mail delivery failure. - * This is useful when using PHP as a mail client for multiple users. + * @param null|string $bcc + * @param null|string $return_path * @throws ImapException * */ @@ -1467,52 +526,8 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi /** - * Checks the current mailbox status on the server. It is similar to - * imap_status, but will additionally sum up the size of - * all messages in the mailbox, which will take some additional time to - * execute. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return \stdClass|false Returns the information in an object with following properties: - * - * Mailbox properties - * - * - * - * Date - * date of last change (current datetime) - * - * - * Driver - * driver - * - * - * Mailbox - * name of the mailbox - * - * - * Nmsgs - * number of messages - * - * - * Recent - * number of recent messages - * - * - * Unread - * number of unread messages - * - * - * Deleted - * number of deleted messages - * - * - * Size - * mailbox size - * - * - * - * + * @param \IMAP\Connection $imap + * @return \stdClass|false * */ function imap_mailboxmsginfo(\IMAP\Connection $imap) @@ -1524,18 +539,8 @@ function imap_mailboxmsginfo(\IMAP\Connection $imap) /** - * Decodes MIME message header extensions that are non ASCII text (see RFC2047). - * - * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each - * object has two properties, charset and - * text. - * - * If the element hasn't been encoded, and in other words is in - * plain US-ASCII, the charset property of that element is - * set to default. - * - * The function returns FALSE on failure. + * @param string $string + * @return array * @throws ImapException * */ @@ -1551,10 +556,8 @@ function imap_mime_header_decode(string $string): array /** - * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * - * @param string $string A string encoded in modified UTF-7. - * @return string Returns string converted to UTF-8. + * @param string $string + * @return string * @throws ImapException * */ @@ -1570,10 +573,8 @@ function imap_mutf7_to_utf8(string $string): string /** - * Gets the number of messages in the current mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @return int Return the number of messages in the current mailbox, as an integer. + * @param \IMAP\Connection $imap + * @return int * @throws ImapException * */ @@ -1589,206 +590,13 @@ function imap_num_msg(\IMAP\Connection $imap): int /** - * Opens an IMAP stream to a mailbox. - * - * This function can also be used to open streams to POP3 and - * NNTP servers, but some functions and features are only - * available on IMAP servers. - * - * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. - * The special name INBOX stands for the current users - * personal mailbox. Mailbox names that contain international characters - * besides those in the printable ASCII space have to be encoded with - * imap_utf7_encode. - * - * The server part, which is enclosed in '{' and '}', consists of the servers - * name or ip address, an optional port (prefixed by ':'), and an optional - * protocol specification (prefixed by '/'). - * - * The server part is mandatory in all mailbox - * 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. - * - * - * - * - * port - optional TCP port number, default is the - * default port for that service - * - * - * - * - * flags - optional flags, see following table. - * - * - * - * - * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * - * Optional flags for names - * - * - * - * Flag - * Description - * - * - * - * - * /service=service - * mailbox access service, default is "imap" - * - * - * /user=user - * remote user name for login on the server - * - * - * /authuser=user - * remote authentication user; if specified this is the user name - * whose password is used (e.g. administrator) - * - * - * /anonymous - * remote access as anonymous user - * - * - * /debug - * record protocol telemetry in application's debug log - * - * - * /secure - * do not transmit a plaintext password over the network - * - * - * /imap, /imap2, - * /imap2bis, /imap4, - * /imap4rev1 - * equivalent to /service=imap - * - * - * /pop3 - * equivalent to /service=pop3 - * - * - * /nntp - * equivalent to /service=nntp - * - * - * /norsh - * do not use rsh or ssh to establish a preauthenticated IMAP - * session - * - * - * /ssl - * use the Secure Socket Layer to encrypt the session - * - * - * /validate-cert - * validate certificates from TLS/SSL server (this is the default - * behavior) - * - * - * /novalidate-cert - * do not validate certificates from TLS/SSL server, needed if - * server uses self-signed certificates - * - * - * /tls - * force use of start-TLS to encrypt the session, and reject - * connection to servers that do not support it - * - * - * /notls - * do not do start-TLS to encrypt the session, even with servers - * that support it - * - * - * /readonly - * request read-only mailbox open (IMAP only; ignored on NNTP, and - * an error with SMTP and POP3) - * - * - * - * - * @param string $user The user name - * @param string $password The password associated with the user - * @param int $flags The flags are a bit mask with one or more of - * the following: - * - * - * - * OP_READONLY - Open mailbox read-only - * - * - * - * - * OP_ANONYMOUS - Don't use or update a - * .newsrc for news (NNTP only) - * - * - * - * - * OP_HALFOPEN - For IMAP - * and NNTP names, open a connection but - * don't open a mailbox. - * - * - * - * - * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close - * (see also imap_delete and - * imap_expunge) - * - * - * - * - * OP_DEBUG - Debug protocol negotiations - * - * - * - * - * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * - * OP_SILENT - Don't pass up events (internal use) - * - * - * - * - * OP_PROTOTYPE - Return driver prototype - * - * - * - * - * OP_SECURE - Don't do non-secure authentication - * - * - * - * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used - * to set one or more connection parameters: - * - * - * - * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * - * @return \IMAP\Connection Returns an IMAP\Connection instance on success. + * @param string $mailbox + * @param string $user + * @param string $password + * @param int $flags + * @param int $retries + * @param array $options + * @return \IMAP\Connection * @throws ImapException * */ @@ -1804,10 +612,8 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = /** - * Convert a quoted-printable string to an 8 bit string according to RFC2045, section 6.7. - * - * @param string $string A quoted-printable string - * @return string Returns an 8 bits string. + * @param string $string + * @return string * @throws ImapException * */ @@ -1823,15 +629,9 @@ function imap_qprint(string $string): string /** - * This function renames on old mailbox to new mailbox (see - * imap_open for the format of - * mbox names). - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $from The old mailbox name, see imap_open for more - * information - * @param string $to The new mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $from + * @param string $to * @throws ImapException * */ @@ -1846,13 +646,10 @@ function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): v /** - * Returns a properly formatted email address as defined in RFC2822 given the needed information. - * - * @param null|string $mailbox The mailbox name, see imap_open for more - * information - * @param null|string $hostname The email host part - * @param null|string $personal The name of the account owner - * @return string Returns a string properly formatted email address as defined in RFC2822. + * @param null|string $mailbox + * @param null|string $hostname + * @param null|string $personal + * @return string * @throws ImapException * */ @@ -1868,34 +665,11 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string /** - * Saves a part or the whole body of the specified message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int|resource|string $file The path to the saved file as a string, or a valid file descriptor - * returned by fopen. - * @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 $flags A bitmask with one or more of the following: - * - * - * - * FT_UID - The message_num is a UID - * - * - * - * - * FT_PEEK - Do not set the \Seen flag if - * not already set - * - * - * - * - * FT_INTERNAL - The return string is in - * internal format, will not canonicalize to CRLF. - * - * - * + * @param \IMAP\Connection $imap + * @param int|resource|string $file + * @param int $message_num + * @param string $section + * @param int $flags * @throws ImapException * */ @@ -1910,12 +684,9 @@ function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $ /** - * Sets an upper limit quota on a per mailbox basis. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard - * format for a mailbox: user.name. - * @param int $mailbox_size The maximum size (in KB) for the quota_root + * @param \IMAP\Connection $imap + * @param string $quota_root + * @param int $mailbox_size * @throws ImapException * */ @@ -1930,14 +701,10 @@ function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox /** - * Sets the ACL for a giving mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param string $user_id The user to give the rights to. - * @param string $rights The rights to give to the user. Passing an empty string will delete - * acl. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param string $user_id + * @param string $rights * @throws ImapException * */ @@ -1952,28 +719,11 @@ function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, s /** - * Causes a store to add the specified flag to the - * flags set for the messages in the specified - * sequence. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages - * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, - * \Answered, \Flagged, - * \Deleted, and \Draft as - * defined by RFC2060. - * @param int $options A bit mask that may contain the single option: - * - * - * - * ST_UID - The sequence argument contains UIDs - * instead of sequence numbers - * - * - * - * @return bool Always returns TRUE. + * @param \IMAP\Connection $imap + * @param string $sequence + * @param string $flag + * @param int $options + * @return bool * */ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): bool @@ -1985,67 +735,13 @@ function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $fla /** - * Gets and sorts message numbers by the given parameters. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param int $criteria Criteria can be one (and only one) of the following: - * - * - * - * SORTDATE - message Date - * - * - * - * - * SORTARRIVAL - arrival date - * - * - * - * - * SORTFROM - mailbox in first From address - * - * - * - * - * SORTSUBJECT - message subject - * - * - * - * - * SORTTO - mailbox in first To address - * - * - * - * - * SORTCC - mailbox in first cc address - * - * - * - * - * SORTSIZE - size of message in octets - * - * - * - * @param int $reverse Whether to sort in reverse order. - * @param int $flags The flags are a bitmask of one or more of the - * following: - * - * - * - * SE_UID - Return UIDs instead of sequence numbers - * - * - * - * - * SE_NOPREFETCH - Don't prefetch searched messages - * - * - * - * @param null|string $search_criteria IMAP2-format search criteria string. For details see - * imap_search. - * @param null|string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given - * parameters. + * @param \IMAP\Connection $imap + * @param int $criteria + * @param int $reverse + * @param int $flags + * @param null|string $search_criteria + * @param null|string $charset + * @return array * @throws ImapException * */ @@ -2067,57 +763,10 @@ function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $fla /** - * Gets status information about the given mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information - * @param int $flags Valid flags are: - * - * - * - * SA_MESSAGES - set $status->messages to the - * number of messages in the mailbox - * - * - * - * - * SA_RECENT - set $status->recent to the number - * of recent messages in the mailbox - * - * - * - * - * SA_UNSEEN - set $status->unseen to the number - * of unseen (new) messages in the mailbox - * - * - * - * - * SA_UIDNEXT - set $status->uidnext to the next - * uid to be used in the mailbox - * - * - * - * - * SA_UIDVALIDITY - set $status->uidvalidity to a - * constant that changes when uids for the mailbox may no longer be - * valid - * - * - * - * - * SA_ALL - set all of the above - * - * - * - * @return \stdClass This function returns an object containing status information. - * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. - * - * flags is also set, which contains a bitmask which can - * be checked against any of the above constants. + * @param \IMAP\Connection $imap + * @param string $mailbox + * @param int $flags + * @return \stdClass * @throws ImapException * */ @@ -2133,11 +782,8 @@ function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdC /** - * Subscribe to a new mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2152,26 +798,9 @@ function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Gets a tree of a threaded message. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. + * @param \IMAP\Connection $imap * @param int $flags - * @return array imap_thread returns an associative array containing - * a tree of messages threaded by REFERENCES. - * - * Every message in the current mailbox will be represented by three entries - * in the resulting array: - * - * - * $thread["XX.num"] - current message number - * - * - * $thread["XX.next"] - * - * - * $thread["XX.branch"] - * - * + * @return array * @throws ImapException * */ @@ -2187,20 +816,9 @@ function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array /** - * Sets or fetches the imap timeout. - * - * @param int $timeout_type One of the following: - * IMAP_OPENTIMEOUT, - * IMAP_READTIMEOUT, - * IMAP_WRITETIMEOUT, or - * IMAP_CLOSETIMEOUT. - * @param int $timeout The timeout, in seconds. - * @return mixed If the timeout parameter is set, this function - * returns TRUE on success. - * - * If timeout is not provided or evaluates to -1, - * the current timeout value of timeout_type is - * returned as an integer. + * @param int $timeout_type + * @param int $timeout + * @return mixed * @throws ImapException * */ @@ -2216,15 +834,10 @@ function imap_timeout(int $timeout_type, int $timeout = -1) /** - * Removes the deletion flag for a specified message, which is set by - * imap_delete or imap_mail_move. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $message_nums A string representing one or more messages in IMAP4-style sequence format - * ("n", "n:m", or combination of these - * delimited by commas). + * @param \IMAP\Connection $imap + * @param string $message_nums * @param int $flags - * @return bool Always returns TRUE. + * @return bool * */ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0): bool @@ -2236,11 +849,8 @@ function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags /** - * Unsubscribe from the specified mailbox. - * - * @param \IMAP\Connection $imap An IMAP\Connection instance. - * @param string $mailbox The mailbox name, see imap_open for more - * information + * @param \IMAP\Connection $imap + * @param string $mailbox * @throws ImapException * */ @@ -2255,10 +865,8 @@ function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void /** - * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * - * @param string $string A UTF-8 encoded string. - * @return string Returns string converted to modified UTF-7. + * @param string $string + * @return string * @throws ImapException * */ diff --git a/generated/8.5/info.php b/generated/8.5/info.php index 11be92d8..8c00eb74 100644 --- a/generated/8.5/info.php +++ b/generated/8.5/info.php @@ -5,113 +5,9 @@ use Safe\Exceptions\InfoException; /** - * Set the various assert control options or just query - * their current settings. - * * @param int $option - * Assert Options - * - * - * - * Option - * INI Setting - * Default value - * Description - * - * - * - * - * ASSERT_ACTIVE - * assert.active - * 1 - * enable assert evaluation - * - * - * ASSERT_EXCEPTION - * assert.exception - * 1 - * throws an AssertionError for each failed assertions - * - * - * ASSERT_WARNING - * assert.warning - * 1 - * issue a PHP warning for each failed assertion - * - * - * ASSERT_BAIL - * assert.bail - * 0 - * terminate execution on failed assertions - * - * - * ASSERT_QUIET_EVAL - * assert.quiet_eval - * 0 - * - * disable error_reporting during assertion expression - * evaluation. Removed as of PHP 8.0.0. - * - * - * - * ASSERT_CALLBACK - * assert.callback - * (NULL) - * Callback to call on failed assertions - * - * - * - * - * @param mixed $value An optional new value for the option. - * - * The callback function set via ASSERT_CALLBACK or - * assert.callback - * should have the following signature: - * - * voidassert_callback - * stringfile - * intline - * stringnullassertion - * stringdescription - * - * - * - * file - * - * - * The file where assert has been called. - * - * - * - * - * line - * - * - * The line where assert has been called. - * - * - * - * - * assertion - * - * - * Prior to PHP 8.0.0, the assertion which has been passed to assert, - * but only when the assertion is given as a string. - * (If the assertion is a boolean condition, this parameter will be an empty string.) - * As of PHP 8.0.0, this parameter is always NULL. - * - * - * - * - * description - * - * - * The description that has been passed to assert. - * - * - * - * - * @return mixed Returns the original setting of any option. + * @param mixed $value + * @return mixed * */ function assert_options(int $option, $value = null) @@ -127,11 +23,7 @@ function assert_options(int $option, $value = null) /** - * Sets the process title visible in tools such as top and - * ps. This function is available only in - * CLI mode. - * - * @param string $title The new title. + * @param string $title * @throws InfoException * */ @@ -146,56 +38,7 @@ function cli_set_process_title(string $title): void /** - * Loads the PHP extension given by the parameter - * extension_filename. - * - * Use extension_loaded to test whether a given - * extension is already available or not. This works on both built-in - * extensions and dynamically loaded ones (either through php.ini or - * dl). - * - * @param string $extension_filename This parameter is only the filename of the - * extension to load which also depends on your platform. For example, - * the sockets extension (if compiled - * as a shared module, not the default!) would be called - * sockets.so on Unix platforms whereas it is called - * php_sockets.dll on the Windows platform. - * - * The directory where the extension is loaded from depends on your - * platform: - * - * Windows - If not explicitly set in the php.ini, the extension is - * loaded from C:\php5\ by default. - * - * Unix - If not explicitly set in the php.ini, the default extension - * directory depends on - * - * - * - * whether PHP has been built with --enable-debug - * or not - * - * - * - * - * whether PHP has been built with ZTS (Zend Thread Safety) - * support or not - * - * - * - * - * the current internal ZEND_MODULE_API_NO (Zend - * internal module API number, which is basically the date on which a - * major module API change happened, e.g. 20010901) - * - * - * - * Taking into account the above, the directory then defaults to - * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, - * e.g. - * /usr/local/php/lib/php/extensions/debug-non-zts-20010901 - * or - * /usr/local/php/lib/php/extensions/no-debug-zts-20010901. + * @param string $extension_filename * @throws InfoException * */ @@ -210,18 +53,8 @@ function dl(string $extension_filename): void /** - * Gets the value of a PHP configuration option. - * - * This function will not return configuration information set when the PHP - * was compiled, or read from an Apache configuration file. - * - * To check whether the system is using a configuration file, try retrieving the - * value of the cfg_file_path configuration setting. If this is available, a - * configuration file is being used. - * - * @param string $option The configuration option name. - * @return mixed Returns the current value of the PHP configuration variable specified by - * option, or FALSE if an error occurs. + * @param string $option + * @return mixed * @throws InfoException * */ @@ -237,10 +70,7 @@ function get_cfg_var(string $option) /** - * Gets the current include_path - * configuration option value. - * - * @return string Returns the path, as a string. + * @return string * @throws InfoException * */ @@ -256,14 +86,7 @@ function get_include_path(): string /** - * Gets the time of the last modification of the main script of execution. - * - * If you're interested in getting the last modification time - * of a different file, consider using filemtime. - * - * @return int Returns the time of the last modification of the current - * page. The value returned is a Unix timestamp, suitable for - * feeding to date. + * @return int * @throws InfoException * */ @@ -279,9 +102,7 @@ function getlastmod(): int /** - * Gets the group ID of the current script. - * - * @return int Returns the group ID of the current script. + * @return int * @throws InfoException * */ @@ -297,9 +118,7 @@ function getmygid(): int /** - * Gets the inode of the current script. - * - * @return int Returns the current script's inode as an integer. + * @return int * @throws InfoException * */ @@ -315,9 +134,7 @@ function getmyinode(): int /** - * Gets the current PHP process ID. - * - * @return int Returns the current PHP process ID. + * @return int * @throws InfoException * */ @@ -333,9 +150,7 @@ function getmypid(): int /** - * Gets the user ID of the current script. - * - * @return int Returns the user ID of the current script. + * @return int * @throws InfoException * */ @@ -351,25 +166,10 @@ function getmyuid(): int /** - * Parses options passed to the script. - * - * @param string $short_options Each character in this string will be used as option characters and - * matched against options passed to the script starting with a single - * hyphen (-). - * - * For example, an option string "x" recognizes an - * option -x. - * - * Only a-z, A-Z and 0-9 are allowed. - * @param array $long_options An array of options. Each element in this array will be used as option - * strings and matched against options passed to the script starting with - * two hyphens (--). - * - * For example, an longopts element "opt" recognizes an - * option --opt. - * @param int|null $rest_index If the rest_index parameter is present, then the - * index where argument parsing stopped will be written to this variable. - * @return array|array|array This function will return an array of option / argument pairs. + * @param string $short_options + * @param array $long_options + * @param int|null $rest_index + * @return array|array|array * @throws InfoException * */ @@ -385,14 +185,8 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind /** - * This is an interface to getrusage(2). It gets data returned - * from the system call. - * - * @param int $mode If mode is 1, getrusage will be called with - * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system - * call. All entries are accessible by using their documented field names. - * Returns FALSE on failure. + * @param int $mode + * @return array * @throws InfoException * */ @@ -408,12 +202,8 @@ function getrusage(int $mode = 0): array /** - * Returns the value of the configuration option on success. - * - * @param string $option The configuration option name. - * @return string Returns the value of the configuration option as a string on success, or an - * empty string for null values. Returns FALSE if the - * configuration option doesn't exist. + * @param string $option + * @return string * @throws InfoException * */ @@ -429,15 +219,9 @@ function ini_get(string $option): string /** - * Sets the value of the given configuration option. The configuration option - * will keep this new value during the script's execution, and will be restored - * at the script's ending. - * - * @param string $option Not all the available options can be changed using - * ini_set. There is a list of all available options - * in the appendix. - * @param bool|float|int|null|string $value The new value for the option. - * @return string Returns the old value on success. + * @param string $option + * @param bool|float|int|null|string $value + * @return string * @throws InfoException * */ @@ -453,22 +237,7 @@ function ini_set(string $option, $value): string /** - * Returns a lowercase string that describes the type of interface - * (the Server API, SAPI) that PHP is using. For example, in CLI PHP this - * string will be "cli" whereas with Apache it may have several different - * values depending on the exact SAPI used. Possible values are listed - * below. - * - * @return non-empty-string Returns the interface type, as a lowercase string. - * - * Although not exhaustive, the possible return values include - * apache, - * apache2handler, - * cgi (until PHP 5.3), - * cgi-fcgi, cli, cli-server, - * embed, fpm-fcgi, - * litespeed, - * phpdbg. + * @return non-empty-string * @throws InfoException * */ @@ -484,72 +253,8 @@ function php_sapi_name(): string /** - * This function prints out the credits listing the PHP developers, - * modules, etc. It generates the appropriate HTML codes to insert - * the information in a page. - * - * @param int $flags To generate a custom credits page, you may want to use the - * flags parameter. - * - * - * Pre-defined phpcredits flags - * - * - * - * name - * description - * - * - * - * - * CREDITS_ALL - * - * All the credits, equivalent to using: CREDITS_DOCS + - * CREDITS_GENERAL + CREDITS_GROUP + - * CREDITS_MODULES + CREDITS_FULLPAGE. - * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * - * CREDITS_DOCS - * The credits for the documentation team - * - * - * CREDITS_FULLPAGE - * - * Usually used in combination with the other flags. Indicates - * that a complete stand-alone HTML page needs to be - * printed including the information indicated by the other - * flags. - * - * - * - * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors - * and SAPI module. - * - * - * - * CREDITS_GROUP - * A list of the core developers - * - * - * CREDITS_MODULES - * - * A list of the extension modules for PHP, and their authors - * - * - * - * CREDITS_SAPI - * - * A list of the server API modules for PHP, and their authors - * - * - * - * - * - * @return bool Always returns TRUE. + * @param int $flags + * @return bool * */ function phpcredits(int $flags = CREDITS_ALL): bool @@ -561,103 +266,8 @@ function phpcredits(int $flags = CREDITS_ALL): bool /** - * Outputs a large amount of information about the current state of PHP. - * This includes information about PHP compilation options and extensions, - * the PHP version, server information and environment (if compiled as a - * module), the PHP environment, OS version information, paths, master and - * local values of configuration options, HTTP headers, and the PHP License. - * - * Because every system is setup differently, phpinfo is - * commonly used to check configuration settings and for available - * predefined variables - * on a given system. - * - * phpinfo is also a valuable debugging tool as it - * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * - * @param int $flags The output may be customized by passing one or more of the - * following constants bitwise values summed - * together in the optional flags parameter. - * One can also combine the respective constants or bitwise values - * together with the bitwise or operator. - * - * - * phpinfo options - * - * - * - * Name (constant) - * Value - * Description - * - * - * - * - * INFO_GENERAL - * 1 - * - * The configuration line, php.ini location, build date, Web - * Server, System and more. - * - * - * - * INFO_CREDITS - * 2 - * - * PHP Credits. See also phpcredits. - * - * - * - * INFO_CONFIGURATION - * 4 - * - * Current Local and Master values for PHP directives. See - * also ini_get. - * - * - * - * INFO_MODULES - * 8 - * - * Loaded modules and their respective settings. See also - * get_loaded_extensions. - * - * - * - * INFO_ENVIRONMENT - * 16 - * - * Environment Variable information that's also available in - * $_ENV. - * - * - * - * INFO_VARIABLES - * 32 - * - * Shows all - * predefined variables from EGPCS (Environment, GET, - * POST, Cookie, Server). - * - * - * - * INFO_LICENSE - * 64 - * - * PHP License information. See also the license FAQ. - * - * - * - * INFO_ALL - * -1 - * - * Shows all of the above. - * - * - * - * - * - * @return bool Always returns TRUE. + * @param int $flags + * @return bool * */ function phpinfo(int $flags = INFO_ALL): bool @@ -669,12 +279,7 @@ function phpinfo(int $flags = INFO_ALL): bool /** - * Adds assignment to the server environment. The - * environment variable will only exist for the duration of the current - * request. At the end of the request the environment is restored to its - * original state. - * - * @param string $assignment The setting, like "FOO=BAR" + * @param string $assignment * @throws InfoException * */ @@ -689,12 +294,8 @@ function putenv(string $assignment): void /** - * Sets the include_path - * configuration option for the duration of the script. - * - * @param string $include_path The new value for the include_path - * @return string Returns the old include_path on - * success. + * @param string $include_path + * @return string * @throws InfoException * */ @@ -710,19 +311,7 @@ function set_include_path(string $include_path): string /** - * Set the number of seconds a script is allowed to run. If this is reached, - * the script returns a fatal error. The default limit is 30 seconds or, if - * it exists, the max_execution_time value defined in the - * php.ini. - * - * When called, set_time_limit restarts the timeout - * counter from zero. In other words, if the timeout is the default 30 - * seconds, and 25 seconds into script execution a call such as - * set_time_limit(20) is made, the script will run for a - * total of 45 seconds before timing out. - * - * @param int $seconds The maximum execution time, in seconds. If set to zero, no time limit - * is imposed. + * @param int $seconds * @throws InfoException * */ diff --git a/generated/8.5/inotify.php b/generated/8.5/inotify.php index 166bde8c..71e70f7a 100644 --- a/generated/8.5/inotify.php +++ b/generated/8.5/inotify.php @@ -5,19 +5,10 @@ use Safe\Exceptions\InotifyException; /** - * inotify_add_watch adds a new watch or modify an - * existing watch for the file or directory specified in - * pathname. - * - * Using inotify_add_watch on a watched object replaces - * the existing watch. Using the IN_MASK_ADD constant - * adds (OR) events to the existing watch. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param string $pathname File or directory to watch - * @param int $mask Events to watch for. See Predefined Constants. - * @return int The return value is a unique (inotify instance wide) watch descriptor. + * @param resource $inotify_instance + * @param string $pathname + * @param int $mask + * @return int * @throws InotifyException * */ @@ -33,10 +24,7 @@ function inotify_add_watch($inotify_instance, string $pathname, int $mask): int /** - * Initialize an inotify instance for use with - * inotify_add_watch - * - * @return resource A stream resource. + * @return resource * @throws InotifyException * */ @@ -52,13 +40,8 @@ function inotify_init() /** - * inotify_rm_watch removes the watch - * watch_descriptor from the inotify instance - * inotify_instance. - * - * @param resource $inotify_instance Resource returned by - * inotify_init - * @param int $watch_descriptor Watch to remove from the instance + * @param resource $inotify_instance + * @param int $watch_descriptor * @throws InotifyException * */ diff --git a/generated/8.5/json.php b/generated/8.5/json.php index 2518fa1e..cafc2923 100644 --- a/generated/8.5/json.php +++ b/generated/8.5/json.php @@ -5,45 +5,10 @@ use Safe\Exceptions\JsonException; /** - * Returns a string containing the JSON representation of the supplied - * value. If the parameter is an array or object, - * it will be serialized recursively. - * - * If a value to be serialized is an object, then by default only publicly visible - * properties will be included. Alternatively, a class may implement JsonSerializable - * to control how its values are serialized to JSON. - * - * The encoding is affected by the supplied flags - * and additionally the encoding of float values depends on the value of - * serialize_precision. - * - * @param mixed $value The value being encoded. Can be any type except - * a resource. - * - * All string data must be UTF-8 encoded. - * - * PHP implements a superset of JSON as specified in the original - * RFC 7159. - * @param int $flags Bitmask consisting of - * JSON_FORCE_OBJECT, - * JSON_HEX_QUOT, - * JSON_HEX_TAG, - * JSON_HEX_AMP, - * JSON_HEX_APOS, - * JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, - * JSON_NUMERIC_CHECK, - * JSON_PARTIAL_OUTPUT_ON_ERROR, - * JSON_PRESERVE_ZERO_FRACTION, - * JSON_PRETTY_PRINT, - * JSON_UNESCAPED_LINE_TERMINATORS, - * JSON_UNESCAPED_SLASHES, - * JSON_UNESCAPED_UNICODE, - * JSON_THROW_ON_ERROR. - * The behaviour of these constants is described on the - * JSON constants page. - * @param positive-int $depth Set the maximum depth. Must be greater than zero. - * @return non-empty-string Returns a JSON encoded string on success. + * @param mixed $value + * @param int $flags + * @param positive-int $depth + * @return non-empty-string * @throws JsonException * */ diff --git a/generated/8.5/ldap.php b/generated/8.5/ldap.php index a52f1b3a..1d13a605 100644 --- a/generated/8.5/ldap.php +++ b/generated/8.5/ldap.php @@ -5,15 +5,8 @@ use Safe\Exceptions\LdapException; /** - * Translate ISO-8859 characters to t61 - * characters. - * - * This function is useful if you have to talk to a legacy - * LDAPv2 server. - * - * @param string $value The text to be translated. - * @return string Return the t61 translation of - * value. + * @param string $value + * @return string * @throws LdapException * */ @@ -29,21 +22,10 @@ function ldap_8859_to_t61(string $value): string /** - * Add entries in the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * - * - * ]]> - * - * - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -62,9 +44,7 @@ function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $cont /** - * Binds to the LDAP directory with specified RDN and password. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password * @throws LdapException @@ -87,16 +67,12 @@ function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password /** - * Compare value of attribute - * with value of same attribute in an LDAP directory entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $attribute The attribute name. - * @param string $value The compared value. - * @param array|null $controls Array of LDAP Controls to send with the request. - * @return bool Returns TRUE if value matches otherwise returns - * FALSE. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $attribute + * @param string $value + * @param array|null $controls + * @return bool * @throws LdapException * */ @@ -116,12 +92,10 @@ function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, str /** - * Retrieve the pagination information send by the server. - * - * @param resource $link An LDAP resource, returned by ldap_connect. + * @param resource $link * @param resource $result - * @param null|string $cookie An opaque structure sent by the server. - * @param int|null $estimated The estimated number of entries to retrieve. + * @param null|string $cookie + * @param int|null $estimated * @throws LdapException * */ @@ -136,15 +110,10 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n /** - * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * - * @param resource $link An LDAP resource, returned by ldap_connect. - * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. - * If true and if the server doesn't support pagination, the search - * will return no result. - * @param string $cookie An opaque structure sent by the server - * (ldap_control_paged_result_response). + * @param resource $link + * @param int $pagesize + * @param bool $iscritical + * @param string $cookie * @throws LdapException * */ @@ -159,12 +128,9 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** - * Returns the number of entries stored in the result of previous search - * operations. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return int Returns number of entries in the result. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return int * @throws LdapException * */ @@ -180,11 +146,9 @@ function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int /** - * Deletes a particular entry in LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array|null $controls * @throws LdapException * */ @@ -203,11 +167,8 @@ function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null /** - * Turns the specified dn, into a more user-friendly - * form, stripping off type names. - * - * @param string $dn The distinguished name of an LDAP entity. - * @return string Returns the user friendly name. + * @param string $dn + * @return string * @throws LdapException * */ @@ -223,17 +184,12 @@ function ldap_dn2ufn(string $dn): string /** - * Performs a PASSWD extended operation. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $user dn of the user to change the password of. - * @param string $old_password The old password of this user. May be ommited depending of server configuration. - * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @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. - * @return bool|string Returns the generated password if new_password is empty or omitted. - * Otherwise returns TRUE on success. + * @param \LDAP\Connection $ldap + * @param string $user + * @param string $old_password + * @param string $new_password + * @param array|null $controls + * @return bool|string * @throws LdapException * */ @@ -249,10 +205,8 @@ function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old /** - * Performs a WHOAMI extended operation and returns the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @return bool|string The data returned by the server. + * @param \LDAP\Connection $ldap + * @return bool|string * @throws LdapException * */ @@ -268,20 +222,13 @@ function ldap_exop_whoami(\LDAP\Connection $ldap) /** - * Performs an extended operation on the specified ldap with - * request_oid the OID of the operation and - * request_data the data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, 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 null|string $request_data 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 Array of LDAP Controls to send with the request. - * @param null|string $response_data 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 null|string $response_oid Will be filled with the response OID if provided, usually equal to the request OID. - * @return bool|resource When used with response_data, returns TRUE on success. - * When used without response_data, returns a result identifier. + * @param \LDAP\Connection $ldap + * @param string $request_oid + * @param null|string $request_data + * @param array|null $controls + * @param null|string $response_data + * @param null|string $response_oid + * @return bool|resource * @throws LdapException * */ @@ -307,19 +254,9 @@ function ldap_exop(\LDAP\Connection $ldap, string $request_oid, ?string $request /** - * Splits the DN returned by ldap_get_dn and breaks it - * up into its component parts. Each part is known as Relative Distinguished - * Name, or RDN. - * - * @param string $dn The distinguished name of an LDAP entity. - * @param int $with_attrib Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - * @return array Returns an array of all DN components. - * The first element in the array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. + * @param string $dn + * @param int $with_attrib + * @return array * @throws LdapException * */ @@ -335,16 +272,9 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** - * Gets the first attribute in the given entry. Remaining attributes are - * retrieved by calling ldap_next_attribute successively. - * - * Similar to reading entries, attributes are also read one by one from a - * particular entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the first attribute in the entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -360,17 +290,9 @@ function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Returns the entry identifier for first entry in the result. This entry - * identifier is then supplied to ldap_next_entry - * routine to get successive entries from the result. - * - * Entries in the LDAP result are read sequentially using the - * ldap_first_entry and - * ldap_next_entry functions. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return \LDAP\ResultEntry Returns an LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return \LDAP\ResultEntry * @throws LdapException * */ @@ -386,15 +308,7 @@ function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\R /** - * Frees up the memory allocated internally to store the result. All result - * memory will be automatically freed when the script terminates. - * - * Typically all the memory allocated for the LDAP result gets freed at the - * end of the script. In case the script is making successive searches which - * return large result sets, ldap_free_result could be - * called to keep the runtime memory usage by the script low. - * - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. + * @param \LDAP\Result $result * @throws LdapException * */ @@ -409,23 +323,9 @@ function ldap_free_result(\LDAP\Result $result): void /** - * Reads attributes and values from an entry in the search result. - * - * Having located a specific entry in the directory, you can find out what - * information is held for that entry by using this call. You would use this - * call for an application which "browses" directory entries and/or where you - * do not know the structure of the directory entries. In many applications - * you will be searching for a specific attribute such as an email address or - * a surname, and won't care what other data is held. - * - * - * - * - * - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return array * */ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): array @@ -437,11 +337,9 @@ function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Finds out the DN of an entry in the result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the DN of the result entry and FALSE on error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -457,23 +355,9 @@ function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string /** - * Reads multiple entries from the given result, and then reading the - * attributes and multiple values. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on - * success. - * - * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - * - * - * - * - * + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @return array * @throws LdapException * */ @@ -489,184 +373,9 @@ function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array /** - * Sets value to the value of the specified option. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_REFERRALS - * int - * - * - * - * LDAP_OPT_RESTART - * int - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * 7.1 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_NONE - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_PEER - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRL_ALL - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PACKAGE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * 7.1 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * 7.1 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * - * - * - * - * - * @param mixed $value This will be set to the option value. + * @param \LDAP\Connection $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -681,18 +390,10 @@ function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): v /** - * Reads all the values of the attribute in the entry in the result. - * - * This function is used exactly like ldap_get_values - * except that it handles binary data and not string data. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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. + * @return array * @throws LdapException * */ @@ -708,35 +409,10 @@ function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, s /** - * Reads all the values of the attribute in the entry in the result. - * - * This call needs a entry, - * so needs to be preceded by one of the ldap search calls and one - * of the calls to get an individual entry. - * - * You application will either be hard coded to look for certain - * attributes (such as "surname" or "mail") or you will have to use - * the ldap_get_attributes call to work out - * what attributes exist for a given entry. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry * @param string $attribute - * @return array Returns 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 - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - * - * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * - * - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - * - * + * @return array * @throws LdapException * */ @@ -752,13 +428,10 @@ function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, strin /** - * Adds one or more attribute values to the specified dn. - * To add a whole new object see ldap_add function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -777,14 +450,10 @@ function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Removes one or more attribute values from the specified dn. - * Object deletions are done by the - * ldap_delete function. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. + * @param \LDAP\Connection $ldap + * @param string $dn * @param array $entry - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param array|null $controls * @throws LdapException * */ @@ -803,13 +472,10 @@ function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $ /** - * Replaces one or more attributes from the specified dn. - * It may also add or remove attributes. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $entry + * @param array|null $controls * @throws LdapException * */ @@ -828,87 +494,10 @@ function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?arr /** - * Modifies an existing entry in the LDAP directory. Allows detailed - * specification of the modifications to perform. - * - * @param \LDAP\Connection $ldap An LDAP resource, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An 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, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - * - * Possible values for modtype include: - * - * - * LDAP_MODIFY_BATCH_ADD - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE - * - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * - * - * - * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * - * - * - * LDAP_MODIFY_BATCH_REPLACE - * - * - * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - * - * - * - * - * - * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - * - * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - * - * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - * - * 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|null $controls Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param array $modifications_info + * @param array|null $controls * @throws LdapException * */ @@ -927,15 +516,9 @@ function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modificati /** - * Retrieves the attributes in an entry. The first call to - * ldap_next_attribute is made with the - * entry returned from - * ldap_first_attribute. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\ResultEntry $entry An LDAP\ResultEntry instance. - * @return string Returns the next attribute in an entry on success and FALSE on - * error. + * @param \LDAP\Connection $ldap + * @param \LDAP\ResultEntry $entry + * @return string * @throws LdapException * */ @@ -951,12 +534,10 @@ function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): /** - * Parse LDAP extended operation data from result object result - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param null|string $response_data Will be filled by the response data. - * @param null|string $response_oid Will be filled by the response OID. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param null|string $response_data + * @param null|string $response_oid * @throws LdapException * */ @@ -971,20 +552,13 @@ function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string & /** - * Parses an LDAP search result. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param \LDAP\Result $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @param int|null $error_code A reference to a variable that will be set to the LDAP error code in - * the result, or 0 if no error occurred. - * @param null|string $matched_dn A reference to a variable that will be set to a matched DN if one was - * recognised within the request, otherwise it will be set to NULL. - * @param null|string $error_message A reference to a variable that will be set to the LDAP error message in - * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set - * to all of the referral strings in the result, or an empty array if no - * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \LDAP\Connection $ldap + * @param \LDAP\Result $result + * @param int|null $error_code + * @param null|string $matched_dn + * @param null|string $error_message + * @param array|null $referrals + * @param array|null $controls * @throws LdapException * */ @@ -999,15 +573,12 @@ function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$ /** - * The entry specified by dn is renamed/moved. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. - * @param string $dn The distinguished name of an LDAP entity. - * @param string $new_rdn The new RDN. - * @param string $new_parent The new parent/superior entry. - * @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|null $controls Array of LDAP Controls to send with the request. + * @param \LDAP\Connection $ldap + * @param string $dn + * @param string $new_rdn + * @param string $new_parent + * @param bool $delete_old_rdn + * @param array|null $controls * @throws LdapException * */ @@ -1026,8 +597,6 @@ function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string /** - * - * * @param \LDAP\Connection $ldap * @param null|string $dn * @param null|string $password @@ -1066,184 +635,9 @@ function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $pas /** - * Sets the value of the specified option to be value. - * - * @param null|resource $ldap Either an LDAP\Connection instance, returned by - * ldap_connect, to set the option for that connection, - * or NULL to set the option globally. - * @param int $option The parameter option can be one of: - * - * - * - * - * Option - * Type - * Available since - * - * - * - * - * LDAP_OPT_DEREF - * int - * - * - * - * LDAP_OPT_SIZELIMIT - * int - * - * - * - * LDAP_OPT_TIMELIMIT - * int - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * int - * - * - * - * LDAP_OPT_PROTOCOL_VERSION - * int - * - * - * - * LDAP_OPT_ERROR_NUMBER - * int - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_DIAGNOSTIC_MESSAGE - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - * - * LDAP_OPT_X_KEEPALIVE_IDLE - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_PROBES - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_KEEPALIVE_INTERVAL - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTDIR - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CACERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CERTFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CIPHER_SUITE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLCHECK - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_CRLFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_DHFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_KEYFILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_PROTOCOL_MIN - * int - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_RANDOM_FILE - * string - * PHP 7.1.0 - * - * - * LDAP_OPT_X_TLS_REQUIRE_CERT - * int - * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - * - * All TLS options must be set globally before - * ldap_connect for ldaps connection or - * for the connection before ldap_start_tls. - * @param mixed $value The new value for the specified option. + * @param null|resource $ldap + * @param int $option + * @param mixed $value * @throws LdapException * */ @@ -1258,9 +652,7 @@ function ldap_set_option($ldap, int $option, $value): void /** - * Unbinds from the LDAP directory. - * - * @param \LDAP\Connection $ldap An LDAP\Connection instance, returned by ldap_connect. + * @param \LDAP\Connection $ldap * @throws LdapException * */ diff --git a/generated/8.5/libxml.php b/generated/8.5/libxml.php index ea055ba1..aa6180a3 100644 --- a/generated/8.5/libxml.php +++ b/generated/8.5/libxml.php @@ -5,47 +5,7 @@ use Safe\Exceptions\LibxmlException; /** - * Changes the default external entity loader. - * This can be used to suppress the expansion of arbitrary external entities to avoid XXE attacks, - * even when LIBXML_NOENT has been set for the respective operation, - * and is usually preferable over calling libxml_disable_entity_loader. - * - * @param callable $resolver_function A callable with the following signature: - * - * resourcestringnullresolver - * stringnullpublic_id - * stringsystem_id - * arraycontext - * - * - * - * public_id - * - * - * The public ID. - * - * - * - * - * system_id - * - * - * The system ID. - * - * - * - * - * context - * - * - * An array with the four elements "directory", "intSubName", - * "extSubURI" and "extSubSystem". - * - * - * - * - * This callable should return a resource, a string from which a resource can be - * opened. If NULL is returned, the entity reference resolution will fail. + * @param callable $resolver_function * @throws LibxmlException * */ diff --git a/generated/8.5/lzf.php b/generated/8.5/lzf.php index 7ea98c4d..0e90111e 100644 --- a/generated/8.5/lzf.php +++ b/generated/8.5/lzf.php @@ -5,11 +5,8 @@ use Safe\Exceptions\LzfException; /** - * lzf_compress compresses the given - * data string using LZF encoding. - * - * @param string $data The string to compress. - * @return string Returns the compressed data. + * @param string $data + * @return string * @throws LzfException * */ @@ -25,11 +22,8 @@ function lzf_compress(string $data): string /** - * lzf_compress decompresses the given - * data string containing lzf encoded data. - * - * @param string $data The compressed string. - * @return string Returns the decompressed data. + * @param string $data + * @return string * @throws LzfException * */ diff --git a/generated/8.5/mailparse.php b/generated/8.5/mailparse.php index 82c75d63..66b6d383 100644 --- a/generated/8.5/mailparse.php +++ b/generated/8.5/mailparse.php @@ -5,24 +5,10 @@ use Safe\Exceptions\MailparseException; /** - * 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. - * - * @param resource $mimemail A valid MIME resource, created with - * mailparse_msg_create. - * @param mixed $filename Can be a file name or a valid stream resource. - * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the - * extracted section, or NULL to make this function return the - * extracted section. - * - * If not specified, the contents will be sent to "stdout". - * @return string If callbackfunc is not NULL returns TRUE on - * success. - * - * If callbackfunc is set to NULL, returns the - * extracted section as a string. + * @param resource $mimemail + * @param mixed $filename + * @param callable $callbackfunc + * @return string * @throws MailparseException * */ @@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba /** - * Frees a MIME resource. - * - * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or - * mailparse_msg_parse_file. + * @param resource $mimemail * @throws MailparseException * */ @@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void /** - * Parses a file. - * This is the optimal way of parsing a mail file that you have on disk. - * - * @param string $filename Path to the file holding the message. - * The file is opened and streamed through the parser. - * - * The message contained in filename is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. - * @return resource Returns a MIME resource representing the structure. + * @param string $filename + * @return resource * @throws MailparseException * */ @@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename) /** - * Incrementally parse data into the supplied mime mail resource. - * - * This function allow you to stream portions of a file at a time, rather - * than read and parse the whole thing. - * - * @param resource $mimemail A valid MIME resource. - * @param string $data The final chunk of data is supposed to end with a newline - * (CRLF); otherwise the last line of the message will not be parsed. + * @param resource $mimemail + * @param string $data * @throws MailparseException * */ @@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void /** - * Streams data from the source file pointer, apply - * encoding and write to the destination file pointer. - * - * @param resource $sourcefp A valid file handle. The file is streamed through the parser. - * @param resource $destfp The destination file handle in which the encoded data will be written. - * @param string $encoding One of the character encodings supported by the - * mbstring module. + * @param resource $sourcefp + * @param resource $destfp + * @param string $encoding * @throws MailparseException * */ diff --git a/generated/8.5/mbstring.php b/generated/8.5/mbstring.php index cfe06c81..055b21b2 100644 --- a/generated/8.5/mbstring.php +++ b/generated/8.5/mbstring.php @@ -5,17 +5,9 @@ use Safe\Exceptions\MbstringException; /** - * Returns a string containing the character specified by the Unicode code point value, - * encoded in the specified encoding. - * - * This function complements mb_ord. - * - * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return string A string containing the requested character, if it can be represented in the specified - * encoding. + * @param int $codepoint + * @param null|string $encoding + * @return string * @throws MbstringException * */ @@ -35,26 +27,10 @@ function mb_chr(int $codepoint, ?string $encoding = null): string /** - * Converts string from from_encoding, - * or the current internal encoding, to to_encoding. - * If string is an array, all its string values will be - * converted recursively. - * - * @param array|string $string The string or array to be converted. - * @param string $to_encoding The desired encoding of the result. - * @param mixed $from_encoding The current encoding used to interpret string. - * Multiple encodings may be specified as an array or comma separated - * list, in which case the correct encoding will be guessed using the - * same algorithm as mb_detect_encoding. - * - * If from_encoding is omitted or NULL, the - * mbstring.internal_encoding setting - * will be used if set, otherwise the default_charset setting. - * - * See supported encodings - * for valid values of to_encoding - * and from_encoding. - * @return array|string The encoded string or array on success. + * @param array|string $string + * @param string $to_encoding + * @param mixed $from_encoding + * @return array|string * @throws MbstringException * */ @@ -74,27 +50,11 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null /** - * Converts - * character encoding of variables var and vars in - * encoding from_encoding to encoding - * to_encoding. - * - * mb_convert_variables join strings in Array - * or Object to detect encoding, since encoding detection tends to - * fail for short strings. Therefore, it is impossible to mix - * encoding in single array or object. - * - * @param string $to_encoding The encoding that the string is being converted to. - * @param array|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 - * is omitted, detect_order is used. - * @param array|object|string $var var is the reference to the - * variable being converted. String, Array and Object are accepted. - * mb_convert_variables assumes all parameters - * have the same encoding. - * @param array|object|string $vars Additional vars. - * @return string The character encoding before conversion for success. + * @param string $to_encoding + * @param array|string $from_encoding + * @param array|object|string $var + * @param array|object|string $vars + * @return string * @throws MbstringException * */ @@ -110,31 +70,8 @@ function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$va /** - * Sets the automatic character - * encoding detection order to encoding. - * - * @param non-empty-list|non-falsy-string|null $encoding encoding is an array or - * comma separated list of character encoding. See supported encodings. - * - * If encoding is omitted or NULL, it returns - * the current character encoding detection order as array. - * - * This setting affects mb_detect_encoding and - * mb_send_mail. - * - * mbstring currently implements the following - * encoding detection filters. If there is an invalid byte sequence - * for the following encodings, encoding detection will fail. - * - * For ISO-8859-*, mbstring - * always detects as ISO-8859-*. - * - * For UTF-16, UTF-32, - * UCS2 and UCS4, encoding - * detection will fail always. - * @return bool|list When setting the encoding detection order, TRUE is returned on success. - * - * When getting the encoding detection order, an ordered array of the encodings is returned. + * @param non-empty-list|non-falsy-string|null $encoding + * @return bool|list * @throws MbstringException * */ @@ -154,10 +91,8 @@ function mb_detect_order($encoding = null) /** - * Returns an array of aliases for a known encoding type. - * - * @param string $encoding The encoding type being checked, for aliases. - * @return false|list Returns a numerically indexed array of encoding aliases. + * @param string $encoding + * @return false|list * */ function mb_encoding_aliases(string $encoding) @@ -169,36 +104,11 @@ function mb_encoding_aliases(string $encoding) /** - * Scans string for matches to - * pattern, then replaces the matched text - * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, - * except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the string string. The callback should - * return the replacement string. - * - * You'll often need the callback function - * for a mb_ereg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * mb_ereg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param callable(array):string $callback + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -218,19 +128,11 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement - * - * @param string $pattern The regular expression pattern. - * - * Multibyte characters may be used in pattern. - * @param string $replacement The replacement text. - * @param string $string The string being checked. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return null|string The resultant string on success. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return null|string * @throws MbstringException * */ @@ -250,17 +152,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, ? /** - * Retrieve the result from the last multibyte regular expression match - * - * @return array An array - * including the sub-string of matched part by last - * mb_ereg_search, - * mb_ereg_search_pos, - * mb_ereg_search_regs. If there are some - * matches, the first element will have the matched 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. + * @return array * @throws MbstringException * */ @@ -276,16 +168,9 @@ function mb_ereg_search_getregs(): array /** - * mb_ereg_search_init sets - * string and pattern - * for a multibyte regular expression. These values are used for - * mb_ereg_search, - * mb_ereg_search_pos, and - * mb_ereg_search_regs. - * - * @param string $string The search string. - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. + * @param string $string + * @param null|string $pattern + * @param null|string $options * @throws MbstringException * */ @@ -306,16 +191,9 @@ function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $o /** - * Returns the matched part of a multibyte regular expression. - * - * @param null|string $pattern The search pattern. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return array mb_ereg_search_regs executes the multibyte - * regular expression match, and if there are some matched part, it - * 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. + * @param null|string $pattern + * @param null|string $options + * @return array * @throws MbstringException * */ @@ -337,10 +215,7 @@ function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): /** - * mb_ereg_search_setpos sets the starting - * point of a match for mb_ereg_search. - * - * @param int $offset The position to set. If it is negative, it counts from the end of the string. + * @param int $offset * @throws MbstringException * */ @@ -355,17 +230,11 @@ function mb_ereg_search_setpos(int $offset): void /** - * Scans string for matches to - * pattern, then replaces the matched text - * with replacement. - * - * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. - * @param string $replacement The replacement text. - * @param string $string The searched string. - * @param null|string $options The search option. See mb_regex_set_options for explanation. - * @return string The resultant string. - * If string is not valid for the current encoding, NULL - * is returned. + * @param string $pattern + * @param string $replacement + * @param string $string + * @param null|string $options + * @return string * @throws MbstringException * */ @@ -385,29 +254,8 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, /** - * mb_get_info returns the internal setting parameters of mbstring. - * - * @param string $type If type is not specified or is specified as "all", - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * and "strict_detection" - * will be returned. - * - * If type is specified as - * "internal_encoding", "http_input", - * "http_output", "http_output_conv_mimetypes", - * "mail_charset", "mail_header_encoding", - * "mail_body_encoding", "illegal_chars", - * "encoding_translation", "language", - * "detect_order", "substitute_character" - * or "strict_detection" - * the specified setting parameter will be returned. - * @return mixed An array of type information if type - * is not specified, otherwise a specific type. + * @param string $type + * @return mixed * @throws MbstringException * */ @@ -423,20 +271,8 @@ function mb_get_info(string $type = "all") /** - * Set/Get the HTTP output character encoding. - * Output after this function is called will be converted from the set internal encoding to encoding. - * - * @param null|string $encoding If encoding is set, - * mb_http_output sets the HTTP output character - * encoding to encoding. - * - * If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. - * @return bool|string If encoding is omitted, - * mb_http_output returns the current HTTP output - * character encoding. Otherwise, - * Returns TRUE on success. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -456,18 +292,8 @@ function mb_http_output(?string $encoding = null) /** - * Set/Get the internal character encoding - * - * @param null|string $encoding 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. - * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then - * the current character encoding name is returned. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -487,15 +313,9 @@ function mb_internal_encoding(?string $encoding = null) /** - * Returns the Unicode code point value of the given character. - * - * This function complements mb_chr. - * - * @param string $string A string - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return int The Unicode code point for the first character of string. + * @param string $string + * @param null|string $encoding + * @return int * @throws MbstringException * */ @@ -515,15 +335,8 @@ function mb_ord(string $string, ?string $encoding = null): int /** - * Parses GET/POST/COOKIE data and - * sets global variables. Since PHP does not provide raw POST/COOKIE - * data, it can only be used for GET data for now. It parses URL - * encoded data, detects encoding, converts coding to internal - * encoding and set values to the result array or - * global variables. - * - * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param string $string + * @param array|null $result * @throws MbstringException * */ @@ -538,16 +351,8 @@ function mb_parse_str(string $string, ?array &$result): void /** - * Set/Get character encoding for a multibyte regex. - * - * @param null|string $encoding The encoding - * parameter is the character encoding. If it is omitted or NULL, the internal character - * encoding value will be used. - * @return bool|string If encoding is set, then - * Returns TRUE on success. - * 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. + * @param null|string $encoding + * @return bool|string * @throws MbstringException * */ @@ -567,59 +372,11 @@ function mb_regex_encoding(?string $encoding = null) /** - * Sends email. Headers and messages are converted and encoded according - * to the mb_language setting. It's a wrapper function - * for mail, so see also mail for details. - * - * @param string $to The mail addresses being sent to. Multiple - * recipients may be specified by putting a comma between each - * address in to. - * This parameter is not automatically encoded. - * @param string $subject The subject of the mail. - * @param string $message The message of the mail. - * @param array|null|string $additional_headers String or array to be inserted at the end of the email header. - * - * This is typically used to add extra headers (From, Cc, and Bcc). - * Multiple extra headers should be separated with a CRLF (\r\n). - * Validate parameter not to be injected unwanted headers by attackers. - * - * If an array is passed, its keys are the header names and its - * values are the respective header values. - * - * When sending mail, the mail must contain - * a From header. This can be set with the - * additional_headers parameter, or a default - * can be set in php.ini. - * - * Failing to do this will result in an error - * message similar to Warning: mail(): "sendmail_from" not - * set in php.ini or custom "From:" header missing. - * The From header sets also - * Return-Path under Windows. - * - * If messages are not received, try using a LF (\n) only. - * Some Unix mail transfer agents (most notably - * qmail) replace LF by CRLF - * automatically (which leads to doubling CR if CRLF is used). - * This should be a last resort, as it does not comply with - * RFC 2822. - * @param null|string $additional_params additional_params is a MTA command line - * parameter. It is useful when setting the correct Return-Path - * header when using sendmail. - * - * This parameter is escaped by escapeshellcmd internally - * to prevent command execution. escapeshellcmd prevents - * command execution, but allows to add additional parameters. For security reason, - * this parameter should be validated. - * - * Since escapeshellcmd is applied automatically, some characters - * that are allowed as email addresses by internet RFCs cannot be used. Programs - * that are required to use these characters mail cannot be used. - * - * The user that the webserver runs as should be added as a trusted user to the - * sendmail configuration to prevent a 'X-Warning' header from being added - * to the message when the envelope sender (-f) is set using this method. - * For sendmail users, this file is /etc/mail/trusted-users. + * @param string $to + * @param string $subject + * @param string $message + * @param array|null|string $additional_headers + * @param null|string $additional_params * @throws MbstringException * */ @@ -638,17 +395,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ /** - * Split a multibyte - * string using regular expression - * pattern and returns the result as an - * array. - * - * @param string $pattern The regular expression pattern. - * @param string $string The string being split. - * @param int $limit If optional parameter limit is specified, - * it will be split in limit elements as - * maximum. - * @return list The result as an array. + * @param string $pattern + * @param string $string + * @param int $limit + * @return list * @throws MbstringException * */ diff --git a/generated/8.5/misc.php b/generated/8.5/misc.php index cd0fc146..f9a6bcb5 100644 --- a/generated/8.5/misc.php +++ b/generated/8.5/misc.php @@ -5,23 +5,9 @@ use Safe\Exceptions\MiscException; /** - * Defines a named constant at runtime. - * - * @param string $constant_name The name of the constant. - * - * It is possible to define constants with reserved or - * even invalid names, whose value can (only) be retrieved with - * constant. However, doing so is not recommended. - * @param mixed $value The value of the constant. - * - * While it is possible to define resource constants, it is - * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive 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. - * - * Case-insensitive constants are stored as lower-case. + * @param string $constant_name + * @param mixed $value + * @param bool $case_insensitive * @throws MiscException * */ @@ -36,22 +22,9 @@ function define(string $constant_name, $value, bool $case_insensitive = false): /** - * Prints out or returns a syntax highlighted version of the code contained - * in filename using the colors defined in the - * built-in syntax highlighter for PHP. - * - * Many servers are configured to automatically highlight files - * with a phps extension. For example, - * example.phps when viewed will show the - * syntax highlighted source of the file. To enable this, add this - * line to the httpd.conf: - * - * @param string $filename Path to the PHP file to be highlighted. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. Otherwise, it will return - * TRUE on success. + * @param string $filename + * @param bool $return + * @return bool|string * @throws MiscException * */ @@ -67,15 +40,9 @@ function highlight_file(string $filename, bool $return = false) /** - * Outputs or returns html markup for a syntax highlighted version of the given PHP code - * using the colors defined in the built-in syntax highlighter for PHP. - * - * @param string $string The PHP code to be highlighted. This should include the opening tag. - * @param bool $return Set this parameter to TRUE to make this function return the - * highlighted code. - * @return bool|string If return is set to TRUE, returns the highlighted - * code as a string instead of printing it out. - * Otherwise, it will return TRUE. + * @param string $string + * @param bool $return + * @return bool|string * */ function highlight_string(string $string, bool $return = false) @@ -87,16 +54,8 @@ function highlight_string(string $string, bool $return = false) /** - * Returns the system's high resolution time, counted from an arbitrary point in time. - * The delivered timestamp is monotonic and can not be adjusted. - * - * @param bool $as_number Whether the high resolution time should be returned as array - * or number. - * @return array{0:int,1:int}|float|int Returns an array of integers in the form [seconds, nanoseconds], if the - * parameter as_number is false. Otherwise the nanoseconds - * are returned as int (64bit platforms) or float - * (32bit platforms). - * Returns FALSE on failure. + * @param bool $as_number + * @return array{0:int,1:int}|float|int * @throws MiscException * */ @@ -112,156 +71,9 @@ function hrtime(bool $as_number = false) /** - * Pack given arguments into a binary string according to - * format. - * - * The idea for this function was taken from Perl and all formatting codes - * work the same as in Perl. However, there are some formatting codes that are - * missing such as Perl's "u" format code. - * - * Note that the distinction between signed and unsigned values only - * affects the function unpack, where as - * function pack gives the same result for - * signed and unsigned format codes. - * - * @param string $format The format string consists of format codes - * followed by an optional repeater argument. The repeater argument can - * be either an integer value or * for repeating to - * the end of the input data. For a, A, h, H the repeat count specifies - * how many characters of one data argument are taken, for @ it is the - * absolute position where to put the next data, for everything else the - * repeat count specifies how many data arguments are consumed and packed - * into the resulting binary string. - * - * Currently implemented formats are: - * - * pack format characters - * - * - * - * Code - * Description - * - * - * - * - * a - * NUL-padded string - * - * - * A - * SPACE-padded string - * - * h - * Hex string, low nibble first - * - * H - * Hex string, high nibble first - * csigned char - * - * C - * unsigned char - * - * s - * signed short (always 16 bit, machine byte order) - * - * - * S - * unsigned short (always 16 bit, machine byte order) - * - * - * n - * unsigned short (always 16 bit, big endian byte order) - * - * - * v - * unsigned short (always 16 bit, little endian byte order) - * - * - * i - * signed integer (machine dependent size and byte order) - * - * - * I - * unsigned integer (machine dependent size and byte order) - * - * - * l - * signed long (always 32 bit, machine byte order) - * - * - * L - * unsigned long (always 32 bit, machine byte order) - * - * - * N - * unsigned long (always 32 bit, big endian byte order) - * - * - * V - * unsigned long (always 32 bit, little endian byte order) - * - * - * q - * signed long long (always 64 bit, machine byte order) - * - * - * Q - * unsigned long long (always 64 bit, machine byte order) - * - * - * J - * unsigned long long (always 64 bit, big endian byte order) - * - * - * P - * unsigned long long (always 64 bit, little endian byte order) - * - * - * f - * float (machine dependent size and representation) - * - * - * g - * float (machine dependent size, little endian byte order) - * - * - * G - * float (machine dependent size, big endian byte order) - * - * - * d - * double (machine dependent size and representation) - * - * - * e - * double (machine dependent size, little endian byte order) - * - * - * E - * double (machine dependent size, big endian byte order) - * - * - * x - * NUL byte - * - * - * X - * Back up one byte - * - * - * Z - * NUL-terminated (ASCIIZ) string, will be NUL padded - * - * - * @ - * NUL-fill to absolute position - * - * - * - * + * @param string $format * @param mixed $values - * @return string Returns a binary string containing data. + * @return string * */ function pack(string $format, ...$values): string @@ -277,15 +89,10 @@ function pack(string $format, ...$values): string /** - * Convert string from one codepage to another. - * - * @param int|string $in_codepage The codepage of the subject string. - * Either the codepage name or identifier. - * @param int|string $out_codepage The codepage to convert the subject string to. - * Either the codepage name or identifier. - * @param string $subject The string to convert. - * @return string The subject string converted to - * out_codepage. + * @param int|string $in_codepage + * @param int|string $out_codepage + * @param string $subject + * @return string * @throws MiscException * */ @@ -301,9 +108,7 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str /** - * Set the codepage of the current process. - * - * @param int $codepage A codepage identifier. + * @param int $codepage * @throws MiscException * */ @@ -318,13 +123,8 @@ function sapi_windows_cp_set(int $codepage): void /** - * Sends a CTRL event to another process in the same process group. - * - * @param int $event The CTRL event to send; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * @param int $pid The ID of the process to which to send the event to. If 0 - * is given, the event is sent to all processes of the process group. + * @param int $event + * @param int $pid * @throws MiscException * */ @@ -339,54 +139,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void /** - * Sets or removes a CTRL event handler, which allows Windows - * CLI processes to intercept or ignore CTRL+C and - * CTRL+BREAK events. Note that in multithreaded environments, - * this is only possible when called from the main thread. - * - * @param callable|null $handler A callback function to set or remove. If set, this function will be called - * whenever a - * - * CTRL - * C - * - * or - * - * CTRL - * BREAK - * - * event occurs. - * The function is supposed to have the following signature: - * - * voidhandler - * intevent - * - * - * - * event - * - * - * The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. - * - * - * - * - * Setting a NULL handler causes the process to ignore - * - * CTRL - * C - * - * events, but not - * - * CTRL - * BREAK - * - * events. - * @param bool $add The CTRL event which has been received; - * either PHP_WINDOWS_EVENT_CTRL_C - * or PHP_WINDOWS_EVENT_CTRL_BREAK. + * @param callable|null $handler + * @param bool $add * @throws MiscException * */ @@ -401,18 +155,8 @@ function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): vo /** - * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled. - * - * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. - * If the feature has been successfully enabled (or disabled). - * - * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * - * If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal. - * They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences. - * - * @param resource $stream The stream on which the function will operate. - * @param bool|null $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). + * @param resource $stream + * @param bool|null $enable * @throws MiscException * */ @@ -431,18 +175,8 @@ function sapi_windows_vt100_support($stream, ?bool $enable = null): void /** - * Delays the program execution for the given number of - * seconds. - * - * @param int $seconds Halt time in seconds (must be greater than or equal to 0). - * @return false|int Returns zero on success. - * - * If the call was interrupted by a signal, sleep returns - * a non-zero value. On Windows, this value will always be - * 192 (the value of the - * WAIT_IO_COMPLETION constant within the Windows API). - * On other platforms, the return value will be the number of seconds left to - * sleep. + * @param int $seconds + * @return false|int * */ function sleep(int $seconds) @@ -454,29 +188,9 @@ function sleep(int $seconds) /** - * Delays program execution for the given number of - * seconds and nanoseconds. - * - * @param int $seconds Must be a non-negative integer. - * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool Returns TRUE on success. - * - * If the delay was interrupted by a signal, an associative array will be - * returned with the components: - * - * - * - * seconds - number of seconds remaining in - * the delay - * - * - * - * - * nanoseconds - number of nanoseconds - * remaining in the delay - * - * - * + * @param int $seconds + * @param int $nanoseconds + * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool * @throws MiscException * */ @@ -492,10 +206,7 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** - * Makes the script sleep until the specified - * timestamp. - * - * @param float $timestamp The timestamp when the script should wake. + * @param float $timestamp * @throws MiscException * */ @@ -510,35 +221,10 @@ function time_sleep_until(float $timestamp): void /** - * Unpacks from a binary string into an array according to the given - * format. - * - * The unpacked data is stored in an associative array. To - * accomplish this you have to name the different format codes and - * separate them by a slash /. If a repeater argument is present, - * then each of the array keys will have a sequence number behind - * the given name. - * - * Changes were made to bring this function into line with Perl: - * - * - * The "a" code now retains trailing NULL bytes. - * - * - * The "A" code now strips all trailing ASCII whitespace (spaces, tabs, - * newlines, carriage returns, and NULL bytes). - * - * - * The "Z" code was added for NULL-padded strings, and removes trailing - * NULL bytes. - * - * - * - * @param string $format See pack for an explanation of the format codes. - * @param string $string The packed data. - * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary - * string. + * @param string $format + * @param string $string + * @param int $offset + * @return array * @throws MiscException * */ diff --git a/generated/8.5/mysql.php b/generated/8.5/mysql.php index 559a8190..f96eb641 100644 --- a/generated/8.5/mysql.php +++ b/generated/8.5/mysql.php @@ -5,24 +5,7 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened - * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see - * freeing resources - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no connection is found or - * established, an E_WARNING level error is - * generated. + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -37,39 +20,12 @@ function mysql_close($link_identifier = null): void /** - * Opens or reuses a connection to a MySQL server. - * - * @param string $server 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 SQL safe mode, this parameter is ignored - * and value 'localhost:3306' is always used. - * @param string $username The username. Default value is defined by mysql.default_user. In - * SQL safe mode, this parameter is ignored and the name of the user that - * owns the server process is used. - * @param string $password The password. Default value is defined by mysql.default_password. In - * SQL safe mode, this parameter is ignored and empty password is used. - * @param bool $new_link If a second call is made to mysql_connect - * with the same arguments, no new link will be established, but - * instead, the link identifier of the already opened link will be - * returned. The new_link parameter modifies this - * behavior and makes mysql_connect always open - * a new link, even if mysql_connect was called - * before with the same parameters. - * In SQL safe mode, this parameter is ignored. - * @param int $client_flags The client_flags parameter can be a combination - * of the following constants: - * 128 (enable LOAD DATA LOCAL handling), - * MYSQL_CLIENT_SSL, - * MYSQL_CLIENT_COMPRESS, - * MYSQL_CLIENT_IGNORE_SPACE or - * MYSQL_CLIENT_INTERACTIVE. - * Read the section about for further information. - * In SQL safe mode, this parameter is ignored. - * @return resource Returns a MySQL link identifier on success. + * @param string $server + * @param string $username + * @param string $password + * @param bool $new_link + * @param int $client_flags + * @return resource * @throws MysqlException * */ @@ -97,17 +53,8 @@ function mysql_connect(?string $server = null, ?string $username = null, ?string /** - * mysql_create_db attempts to create a new - * database on the server associated with the specified link - * identifier. - * - * @param string $database_name The name of the database being created. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -122,23 +69,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void /** - * mysql_data_seek moves the internal row - * pointer of the MySQL result associated with the specified result - * identifier to point to the specified row number. The next call - * to a MySQL fetch function, such as mysql_fetch_assoc, - * would return that row. - * - * row_number starts at 0. The - * row_number should be a value in the range from 0 to - * mysql_num_rows - 1. However if the result set - * is empty (mysql_num_rows == 0), a seek to 0 will - * fail with an E_WARNING and - * mysql_data_seek will return FALSE. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row_number The desired row number of the new result pointer. + * @param resource $result + * @param int $row_number * @throws MysqlException * */ @@ -153,15 +85,10 @@ function mysql_data_seek($result, int $row_number): void /** - * Retrieve the database name from a call to - * mysql_list_dbs. - * - * @param resource $result The result pointer from a call to mysql_list_dbs. - * @param int $row The index into the result set. - * @param mixed $field The field name. - * @return string Returns the database name on success. If FALSE - * is returned, use mysql_error to determine the nature - * of the error. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -177,22 +104,10 @@ function mysql_db_name($result, int $row, $field = null): string /** - * mysql_db_query selects a database, and executes a - * query on it. - * - * @param string $database The name of the database that will be selected. - * @param string $query The MySQL query. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource Returns a positive MySQL result resource to the query result. The function also returns TRUE/FALSE for - * INSERT/UPDATE/DELETE - * queries to indicate success/failure. + * @param string $database + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -208,19 +123,8 @@ function mysql_db_query(string $database, string $query, $link_identifier = null /** - * mysql_drop_db attempts to drop (remove) an - * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql - * DROP DATABASE statement instead. - * - * @param string $database_name The name of the database that will be deleted. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -235,21 +139,8 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void /** - * Returns an array that corresponds to the lengths of each field - * in the last row fetched by MySQL. - * - * mysql_fetch_lengths stores the lengths of - * each result column in the last row returned by - * mysql_fetch_row, - * mysql_fetch_assoc, - * mysql_fetch_array, and - * mysql_fetch_object in an array, starting at - * offset 0. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return array An array of lengths on success. + * @param resource $result + * @return array * @throws MysqlException * */ @@ -265,27 +156,9 @@ function mysql_fetch_lengths($result): array /** - * mysql_field_flags returns the field flags of - * the specified field. The flags are reported as a single word - * per flag separated by a single space, so that you can split the - * returned value using explode. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string Returns a string of flags associated with the result. - * - * 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", - * "unsigned", "zerofill", - * "binary", "enum", - * "auto_increment" and "timestamp". + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -301,17 +174,9 @@ function mysql_field_flags($result, int $field_offset): string /** - * mysql_field_len returns the length of the - * specified field. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return int The length of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return int * @throws MysqlException * */ @@ -327,17 +192,9 @@ function mysql_field_len($result, int $field_offset): int /** - * mysql_field_name returns the name of the - * specified field index. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. - * @return string The name of the specified field index on success. + * @param resource $result + * @param int $field_offset + * @return string * @throws MysqlException * */ @@ -353,18 +210,8 @@ function mysql_field_name($result, int $field_offset): string /** - * Seeks to the specified field offset. If the next call to - * mysql_fetch_field doesn't include a field - * offset, the field offset specified in - * mysql_field_seek will be returned. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $field_offset The numerical field offset. The - * field_offset starts at 0. If - * field_offset does not exist, an error of level - * E_WARNING is also issued. + * @param resource $result + * @param int $field_offset * @throws MysqlException * */ @@ -379,17 +226,7 @@ function mysql_field_seek($result, int $field_offset): void /** - * mysql_free_result will free all memory - * associated with the result identifier result. - * - * mysql_free_result only needs to be called if - * you are concerned about how much memory is being used for queries - * that return large result sets. All associated result memory is - * automatically freed at the end of the script's execution. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. + * @param resource $result * @throws MysqlException * */ @@ -404,17 +241,8 @@ function mysql_free_result($result): void /** - * Describes the type of connection in use for the connection, including the - * server host name. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns a string describing the type of MySQL connection in use for the - * connection. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -430,15 +258,8 @@ function mysql_get_host_info($link_identifier = null): string /** - * Retrieves the MySQL protocol. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int Returns the MySQL protocol on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -454,15 +275,8 @@ function mysql_get_proto_info($link_identifier = null): int /** - * Retrieves the MySQL server version. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the MySQL server version on success. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -478,17 +292,8 @@ function mysql_get_server_info($link_identifier = null): string /** - * Returns detailed information about the last query. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns information about the statement on success. See the example below for which statements provide information, - * and what the returned value may look like. Statements that are not listed - * will return FALSE. + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -504,18 +309,8 @@ function mysql_info($link_identifier = null): string /** - * Returns a result pointer containing the databases available from the - * current mysql daemon. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource Returns a result pointer resource on success. Use the mysql_tablename function to traverse - * this result pointer, or any function for result tables, such as - * mysql_fetch_array. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -531,26 +326,10 @@ function mysql_list_dbs($link_identifier = null) /** - * Retrieves information about the given table name. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW COLUMNS FROM - * table [LIKE 'name'] statement instead. - * - * @param string $database_name The name of the database that's being queried. - * @param string $table_name The name of the table that's being queried. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * The returned result can be used with mysql_field_flags, - * mysql_field_len, - * mysql_field_name and - * mysql_field_type. + * @param string $database_name + * @param string $table_name + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -566,15 +345,8 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden /** - * Retrieves the current MySQL server threads. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -590,24 +362,9 @@ function mysql_list_processes($link_identifier = null) /** - * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param string $database The name of the database - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return resource A result pointer resource on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param string $database + * @param null|resource $link_identifier + * @return resource * @throws MysqlException * */ @@ -623,13 +380,8 @@ function mysql_list_tables(string $database, $link_identifier = null) /** - * Retrieves the number of fields from a query. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int Returns the number of fields in the result set resource on - * success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -645,15 +397,8 @@ function mysql_num_fields($result): int /** - * Retrieves the number of rows from a result set. This command is only valid - * for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or - * DELETE query, use mysql_affected_rows. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @return int The number of rows in a result set on success. + * @param resource $result + * @return int * @throws MysqlException * */ @@ -669,41 +414,9 @@ function mysql_num_rows($result): int /** - * mysql_query sends a unique query (multiple queries - * are not supported) to the currently - * active database on the server that's associated with the - * specified link_identifier. - * - * @param string $query An SQL query - * - * The query string should not end with a semicolon. - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, - * mysql_query - * returns a resource on success. - * - * For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, - * mysql_query returns TRUE on success. - * - * The returned result resource should be passed to - * mysql_fetch_array, and other - * functions for dealing with result tables, to access the returned data. - * - * Use mysql_num_rows to find out how many rows - * were returned for a SELECT statement or - * mysql_affected_rows to find out how many - * rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - * statement. - * - * mysql_query will also fail and return FALSE - * if the user does not have permission to access the table(s) referenced by - * the query. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ @@ -719,28 +432,9 @@ function mysql_query(string $query, $link_identifier = null) /** - * Escapes special characters in the unescaped_string, - * taking into account the current character set of the connection so that it - * is safe to place it in a mysql_query. If binary data - * is to be inserted, this function must be used. - * - * mysql_real_escape_string calls MySQL's library function - * mysql_real_escape_string, which prepends backslashes to the following characters: - * \x00, \n, - * \r, \, ', - * " and \x1a. - * - * This function must always (with few exceptions) be used to make data - * safe before sending a query to MySQL. - * - * @param string $unescaped_string The string that is to be escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return string Returns the escaped string. + * @param string $unescaped_string + * @param null|resource $link_identifier + * @return string * @throws MysqlException * */ @@ -756,28 +450,10 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n /** - * Retrieves the contents of one cell from a MySQL result set. - * - * When working on large result sets, you should consider using one - * of the functions that fetch an entire row (specified below). As - * these functions return the contents of multiple cells in one - * function call, they're MUCH quicker than - * mysql_result. Also, note that specifying a - * numeric offset for the field argument is much quicker than - * specifying a fieldname or tablename.fieldname argument. - * - * @param resource $result The result resource that - * is being evaluated. This result comes from a call to - * mysql_query. - * @param int $row The row number from the result that's being retrieved. Row numbers - * start at 0. - * @param mixed $field 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 - * dot field name (tablename.fieldname). If the column name has been - * 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. + * @param resource $result + * @param int $row + * @param mixed $field + * @return string * @throws MysqlException * */ @@ -793,17 +469,8 @@ function mysql_result($result, int $row, $field = 0): string /** - * Sets the current active database on the server that's associated with the - * specified link identifier. Every subsequent call to - * mysql_query will be made on the active database. - * - * @param string $database_name The name of the database that is to be selected. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $database_name + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -818,15 +485,8 @@ function mysql_select_db(string $database_name, $link_identifier = null): void /** - * Sets the default character set for the current connection. - * - * @param string $charset A valid character set name. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. + * @param string $charset + * @param null|resource $link_identifier * @throws MysqlException * */ @@ -841,20 +501,9 @@ function mysql_set_charset(string $charset, $link_identifier = null): void /** - * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES - * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from - * mysql_list_tables. - * @param int $i The integer index (row/table number) - * @return string The name of the table on success. - * - * Use the mysql_tablename function to - * traverse this result pointer, or any function for result tables, - * such as mysql_fetch_array. + * @param resource $result + * @param int $i + * @return string * @throws MysqlException * */ @@ -870,17 +519,8 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will - * change. This means only retrieve the thread ID when needed. - * - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return int The thread ID on success. + * @param null|resource $link_identifier + * @return int * @throws MysqlException * */ @@ -896,34 +536,9 @@ function mysql_thread_id($link_identifier = null): int /** - * mysql_unbuffered_query sends the SQL query - * query to MySQL without automatically - * fetching and buffering the result rows as - * mysql_query does. This saves a considerable - * amount of memory with SQL queries that produce large result sets, - * and you can start working on the result set immediately after the - * first row has been retrieved as you don't have to wait until the - * complete SQL query has been performed. To use - * mysql_unbuffered_query while multiple database - * connections are open, you must specify the optional parameter - * link_identifier to identify which connection - * you want to use. - * - * @param string $query The SQL query to execute. - * - * Data inside the query should be properly escaped. - * @param null|resource $link_identifier The MySQL connection. If the - * link identifier is not specified, the last link opened by - * mysql_connect is assumed. If no such link is found, it - * will try to create one as if mysql_connect had been called - * with no arguments. If no connection is found or established, an - * E_WARNING level error is generated. - * @return bool|resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query - * returns a resource on success. - * - * For other type of SQL statements, UPDATE, DELETE, DROP, etc, - * mysql_unbuffered_query returns TRUE on success. + * @param string $query + * @param null|resource $link_identifier + * @return bool|resource * @throws MysqlException * */ diff --git a/generated/8.5/mysqli.php b/generated/8.5/mysqli.php index 8eb49159..b6c6660f 100644 --- a/generated/8.5/mysqli.php +++ b/generated/8.5/mysqli.php @@ -5,9 +5,7 @@ use Safe\Exceptions\MysqliException; /** - * Returns client per-process statistics. - * - * @return array|false Returns an array with client stats. + * @return array|false * */ function mysqli_get_client_stats() diff --git a/generated/8.5/network.php b/generated/8.5/network.php index 3812b5d1..8aad282e 100644 --- a/generated/8.5/network.php +++ b/generated/8.5/network.php @@ -5,10 +5,7 @@ use Safe\Exceptions\NetworkException; /** - * closelog closes the descriptor being used to write to - * the system logger. The use of closelog is optional. - * - * @return bool Always returns TRUE. + * @return bool * */ function closelog(): bool @@ -20,212 +17,12 @@ function closelog(): bool /** - * Fetch DNS Resource Records associated with the given - * hostname. - * - * @param string $hostname hostname should be a valid DNS hostname such - * as "www.example.com". Reverse lookups can be generated - * using in-addr.arpa notation, but - * gethostbyaddr is more suitable for - * the majority of reverse lookups. - * - * Per DNS standards, email addresses are given in user.host format (for - * example: hostmaster.example.com as opposed to hostmaster@example.com), - * be sure to check this value and modify if necessary before using it - * with a functions such as mail. - * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. - * To limit the query, use one of the - * DNS_* - * constants. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource - * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any - * Additional Records. - * @param bool $raw The type will be interpreted as a raw DNS type ID - * (the DNS_* constants cannot be used). - * The return value will contain a data key, which needs - * to be manually parsed. - * @return list This function returns an array of associative arrays. Each associative array contains - * at minimum the following keys: - * - * Basic DNS attributes - * - * - * - * Attribute - * Meaning - * - * - * - * - * host - * - * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * - * class - * - * dns_get_record only returns Internet class records and as - * such this parameter will always return IN. - * - * - * - * type - * - * String containing the record type. Additional attributes will also be contained - * in the resulting array dependant on the value of type. See table below. - * - * - * - * ttl - * - * "Time To Live" remaining for this record. This will not equal - * the record's original ttl, but will rather equal the original ttl minus whatever - * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * - * Other keys in associative arrays dependent on type - * - * - * - * Type - * Extra Columns - * - * - * - * - * A - * - * ip: An IPv4 addresses in dotted decimal notation. - * - * - * - * MX - * - * pri: Priority of mail exchanger. - * Lower numbers indicate greater priority. - * target: FQDN of the mail exchanger. - * See also dns_get_mx. - * - * - * - * CNAME - * - * target: FQDN of location in DNS namespace to which - * the record is aliased. - * - * - * - * NS - * - * target: FQDN of the name server which is authoritative - * for this hostname. - * - * - * - * PTR - * - * target: Location within the DNS namespace to which - * this record points. - * - * - * - * TXT - * - * txt: Arbitrary string data associated with this record. - * - * - * - * HINFO - * - * cpu: IANA number designating the CPU of the machine - * referenced by this record. - * os: IANA number designating the Operating System on - * the machine referenced by this record. - * See IANA's Operating System - * Names for the meaning of these values. - * - * - * - * CAA - * - * flags: A one-byte bitfield; currently only bit 0 is defined, - * meaning 'critical'; other bits are reserved and should be ignored. - * tag: The CAA tag name (alphanumeric ASCII string). - * value: The CAA tag value (binary string, may use subformats). - * For additional information see: RFC 6844 - * - * - * - * SOA - * - * mname: FQDN of the machine from which the resource - * records originated. - * rname: Email address of the administrative contact - * for this domain. - * serial: Serial # of this revision of the requested - * domain. - * refresh: Refresh interval (seconds) secondary name - * servers should use when updating remote copies of this domain. - * retry: Length of time (seconds) to wait after a - * failed refresh before making a second attempt. - * expire: Maximum length of time (seconds) a secondary - * DNS server should retain remote copies of the zone data without a - * successful refresh before discarding. - * minimum-ttl: Minimum length of time (seconds) a - * client can continue to use a DNS resolution before it should request - * a new resolution from the server. Can be overridden by individual - * resource records. - * - * - * - * AAAA - * - * ipv6: IPv6 address - * - * - * - * A6 - * - * masklen: Length (in bits) to inherit from the target - * specified by chain. - * ipv6: Address for this specific record to merge with - * chain. - * chain: Parent record to merge with - * ipv6 data. - * - * - * - * SRV - * - * pri: (Priority) lowest priorities should be used first. - * weight: Ranking to weight which of commonly prioritized - * targets should be chosen at random. - * target and port: hostname and port - * where the requested service can be found. - * For additional information see: RFC 2782 - * - * - * - * NAPTR - * - * order and pref: Equivalent to - * pri and weight above. - * flags, services, regex, - * and replacement: Parameters as defined by - * RFC 2915. - * - * - * - * - * + * @param string $hostname + * @param int $type + * @param array|null $authoritative_name_servers + * @param array|null $additional_records + * @param bool $raw + * @return list * @throws NetworkException * */ @@ -241,51 +38,12 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authorit /** - * Initiates a socket connection to the resource specified by - * hostname. - * - * PHP supports targets in the Internet and Unix domains as described in - * . A list of supported transports can also be - * retrieved using stream_get_transports. - * - * The socket will by default be opened in blocking mode. You can - * switch it to non-blocking mode by using - * stream_set_blocking. - * - * The function stream_socket_client is similar but - * provides a richer set of options, including non-blocking connection and the - * ability to provide a stream context. - * - * @param string $hostname If OpenSSL support is - * installed, you may prefix the hostname - * with either ssl:// or tls:// to - * use an SSL or TLS client connection over TCP/IP to connect to the - * remote host. - * @param int $port The port number. This can be omitted and skipped with - * -1 for transports that do not use ports, such as - * unix://. - * @param int|null $error_code If provided, holds the system level error number that occurred in the - * system-level connect() call. - * - * If the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the - * connect() call. This is most likely due to a - * problem initializing the socket. - * @param null|string $error_message The error message as a string. - * @param float|null $timeout The connection timeout, in seconds. When NULL, the - * default_socket_timeout php.ini setting is used. - * - * If you need to set a timeout for reading/writing data over the - * socket, use stream_set_timeout, as the - * timeout parameter to - * fsockopen only applies while connecting the - * socket. - * @return resource fsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). If the call fails, it will return FALSE + * @param string $hostname + * @param int $port + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @return resource * @throws NetworkException * */ @@ -305,11 +63,7 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? /** - * gethostname gets the standard host name for - * the local machine. - * - * @return string Returns a string with the hostname on success, otherwise FALSE is - * returned. + * @return string * @throws NetworkException * */ @@ -325,12 +79,8 @@ function gethostname(): string /** - * getprotobyname returns the protocol number - * associated with the protocol protocol as per - * /etc/protocols. - * - * @param string $protocol The protocol name. - * @return int Returns the protocol number. + * @param string $protocol + * @return int * @throws NetworkException * */ @@ -346,12 +96,8 @@ function getprotobyname(string $protocol): int /** - * getprotobynumber returns the protocol name - * associated with protocol protocol as per - * /etc/protocols. - * - * @param int $protocol The protocol number. - * @return string Returns the protocol name as a string. + * @param int $protocol + * @return string * @throws NetworkException * */ @@ -367,14 +113,9 @@ function getprotobynumber(int $protocol): string /** - * getservbyport returns the Internet service - * associated with port for the specified - * protocol as per /etc/services. - * - * @param int $port The port number. - * @param string $protocol protocol is either "tcp" - * or "udp" (in lowercase). - * @return string Returns the Internet service name as a string. + * @param int $port + * @param string $protocol + * @return string * @throws NetworkException * */ @@ -390,14 +131,7 @@ function getservbyport(int $port, string $protocol): string /** - * Registers a function that will be called when PHP starts sending output. - * - * The callback is executed just after PHP prepares all - * headers to be sent, and before any other output is sent, creating a window - * to manipulate the outgoing headers before being sent. - * - * @param callable $callback Function called just before the headers are sent. It gets no parameters - * and the return value is ignored. + * @param callable $callback * @throws NetworkException * */ @@ -412,12 +146,8 @@ function header_register_callback(callable $callback): void /** - * This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * string representation. - * - * @param string $ip A 32bit IPv4, or 128bit IPv6 address. - * @return string Returns a string representation of the address. + * @param string $ip + * @return string * @throws NetworkException * */ @@ -433,15 +163,8 @@ function inet_ntop(string $ip): string /** - * This function converts a human readable IPv4 or IPv6 address (if PHP - * was built with IPv6 support enabled) into an address family appropriate - * 32bit or 128bit binary structure. - * - * @param string $ip A human readable IPv4 or IPv6 address. - * @return string Returns the in_addr representation of the given - * ip, or FALSE if a syntactically invalid - * ip is given (for example, an IPv4 address - * without dots or an IPv6 address without colons). + * @param string $ip + * @return string * @throws NetworkException * */ @@ -457,12 +180,8 @@ function inet_pton(string $ip): string /** - * The function long2ip generates an Internet address - * in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer - * representation. - * - * @param int $ip A proper address representation in long integer. - * @return false|string Returns the Internet IP address as a string. + * @param int $ip + * @return false|string * */ function long2ip(int $ip) @@ -474,96 +193,7 @@ function long2ip(int $ip) /** - * Returns an enumeration of network interfaces (adapters) on the local machine. - * - * @return array Returns an associative array where the key is the name of the interface and - * the value an associative array of interface attributes. - * - * Each interface associative array contains: - * - * Interface attributes - * - * - * - * Name - * Description - * - * - * - * - * description - * - * Optional string value for description of the interface. - * Windows only. - * - * - * - * mac - * - * Optional string value for MAC address of the interface. - * Windows only. - * - * - * - * mtu - * - * Integer value for Maximum transmission unit (MTU) of the interface. - * Windows only. - * - * - * - * unicast - * - * Array of associative arrays, see Unicast attributes below. - * - * - * - * up - * - * Boolean status (on/off) for interface. - * - * - * - * - * - * - * - * Unicast attributes - * - * - * - * Name - * Description - * - * - * - * - * flags - * - * Integer value. - * - * - * - * family - * - * Integer value. - * - * - * - * address - * - * String value for address in either IPv4 or IPv6. - * - * - * - * netmask - * - * String value for netmask in either IPv4 or IPv6. - * - * - * - * - * + * @return array * @throws NetworkException * */ @@ -579,44 +209,10 @@ function net_get_interfaces(): array /** - * openlog opens a connection to the system - * logger for a program. - * - * The use of openlog is optional. It - * will automatically be called by syslog if - * necessary, in which case prefix will default - * to the empty string. - * - * @param string $prefix The string prefix is added to each message. - * @param int $flags Bitmask of the following constants: - * - * LOG_CONS - * LOG_NDELAY - * LOG_ODELAY - * LOG_NOWAIT - * LOG_PERROR - * LOG_PID - * - * @param int $facility The facility argument is used to specify - * what type of program is logging the message. - * This lets the configuration file specify that messages from different - * facilities will be handled differently. - * Must be one of the following constants: - * - * LOG_AUTH - * LOG_AUTHPRIV - * LOG_CRON - * LOG_DAEMON - * LOG_KERN - * LOG_LOCAL[0-7] - * LOG_LPR - * LOG_MAIL - * LOG_NEWS - * LOG_SYSLOG - * LOG_USER - * LOG_UUCP - * - * @return bool Always returns TRUE. + * @param string $prefix + * @param int $flags + * @param int $facility + * @return bool * */ function openlog(string $prefix, int $flags, int $facility): bool @@ -628,20 +224,12 @@ function openlog(string $prefix, int $flags, int $facility): bool /** - * This function behaves exactly as fsockopen with the - * difference that the connection is not closed after the script finishes. - * It is the persistent version of fsockopen. - * * @param string $hostname * @param int $port * @param int|null $error_code * @param null|string $error_message * @param float|null $timeout - * @return resource pfsockopen returns a file pointer which may be used - * together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @return resource * @throws NetworkException * */ @@ -661,30 +249,9 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, /** - * syslog generates a log message that will be - * distributed by the system logger. - * - * For information on setting up a user defined log handler, see the - * syslog.conf - * 5 Unix manual page. More - * information on the syslog facilities and option can be found in the man - * pages for syslog - * 3 on Unix machines. - * - * @param int $priority One of the - * - * LOG_EMERG - * LOG_ALERT - * LOG_CRIT - * LOG_ERR - * LOG_WARNING - * LOG_NOTICE - * LOG_INFO - * LOG_DEBUG - * - * constants. - * @param string $message The message to send. - * @return bool Always returns TRUE. + * @param int $priority + * @param string $message + * @return bool * */ function syslog(int $priority, string $message): bool diff --git a/generated/8.5/oci8.php b/generated/8.5/oci8.php index 1dce25ed..e1235f27 100644 --- a/generated/8.5/oci8.php +++ b/generated/8.5/oci8.php @@ -5,99 +5,12 @@ use Safe\Exceptions\Oci8Exception; /** - * Binds the PHP array var to the Oracle - * placeholder param, which points to an Oracle PL/SQL - * array. Whether it will be used for input or output will be determined at - * run-time. - * - * @param resource $statement A valid OCI statement identifier. - * @param string $param The Oracle placeholder. - * @param array $var An array. - * @param int $max_array_length Sets the maximum length both for incoming and result arrays. - * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, - * oci_bind_array_by_name will find the longest - * element in the incoming array and will use it as the maximum length. - * @param int $type Should be used to set the type of PL/SQL array items. See list of - * available types below: - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * - * - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * - * - * - * SQLT_FLT - for arrays of FLOAT. - * - * - * - * - * SQLT_AFC - for arrays of CHAR. - * - * - * - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * - * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * - * SQLT_AVC - for arrays of CHARZ. - * - * - * - * - * SQLT_STR - for arrays of STRING. - * - * - * - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * - * SQLT_ODT - for arrays of DATE. - * - * - * - * - * SQLT_NUM - for arrays of NUMBER. - * - * SQLT_INT - for arrays of INTEGER (Note: INTEGER - * it is actually a synonym for NUMBER(38), but - * SQLT_NUM type won't work in this case even - * though they are synonyms). - * - * SQLT_FLT - for arrays of FLOAT. - * - * SQLT_AFC - for arrays of CHAR. - * - * SQLT_CHR - for arrays of VARCHAR2. - * - * SQLT_VCS - for arrays of VARCHAR. - * - * SQLT_AVC - for arrays of CHARZ. - * - * SQLT_STR - for arrays of STRING. - * - * SQLT_LVC - for arrays of LONG VARCHAR. - * - * SQLT_ODT - for arrays of DATE. + * @param resource $statement + * @param string $param + * @param array $var + * @param int $max_array_length + * @param int $max_item_length + * @param int $type * @throws Oci8Exception * */ @@ -112,198 +25,11 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max /** - * Binds a PHP variable var to the Oracle - * bind variable placeholder param. Binding - * is important for Oracle database performance and also as a way to - * avoid SQL Injection security issues. - * - * Binding allows the database to reuse the statement context and - * caches from previous executions of the statement, even if another - * user or process originally executed it. Binding reduces SQL - * Injection concerns because the data associated with a bind - * variable is never treated as part of the SQL statement. It does - * not need quoting or escaping. - * - * PHP variables that have been bound can be changed and the - * statement re-executed without needing to re-parse the statement or - * re-bind. - * - * In Oracle, bind variables are commonly divided - * into IN binds for values that are passed into - * the database, and OUT binds for values that are - * returned to PHP. A bind variable may be - * both IN and OUT. Whether a - * bind variable will be used for input or output is determined at - * run-time. - * - * You must specify max_length when using - * an OUT bind so that PHP allocates enough memory - * to hold the returned value. - * - * For IN binds it is recommended to set - * the max_length length if the statement is - * re-executed multiple times with different values for the PHP - * variable. Otherwise Oracle may truncate data to the length of the - * initial PHP variable value. If you don't know what the maximum - * length will be, then re-call oci_bind_by_name - * with the current data size prior to - * each oci_execute call. Binding an - * unnecessarily large length will have an impact on process memory - * in the database. - * - * A bind call tells Oracle which memory address to read data from. - * For IN binds that address needs to contain - * valid data when oci_execute is called. This - * means that the variable bound must remain in scope until - * execution. If it doesn't, unexpected results or errors such as - * "ORA-01460: unimplemented or unreasonable conversion requested" - * may occur. For OUT binds one symptom is no - * value being set in the PHP variable. - * - * For a statement that is repeatedly executed, binding values that - * never change may reduce the ability of the Oracle optimizer to - * choose the best statement execution plan. Long running statements - * that are rarely re-executed may not benefit from binding. However - * in both cases, binding might be safer than joining strings into a - * SQL statement, as this can be a security risk if unfiltered user - * text is concatenated. - * - * @param resource $statement A valid OCI8 statement identifier. - * @param string $param The colon-prefixed bind variable placeholder used in the - * statement. The colon is optional - * in param. Oracle does not use question - * marks for placeholders. - * @param mixed $var The PHP variable to be associated with param - * @param int $max_length Sets the maximum length for the data. If you set it to -1, this - * function will use the current length - * of var to set the maximum - * length. In this case the var must - * exist and contain data - * when oci_bind_by_name is called. - * @param int $type The datatype that Oracle will treat the data as. The - * default type used - * is SQLT_CHR. Oracle will convert the data - * between this type and the database column (or PL/SQL variable - * type), when possible. - * - * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you - * need to allocate it first using the - * oci_new_descriptor function. The - * length is not used for abstract datatypes - * and should be set to -1. - * - * Possible values for type are: - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * - * - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * - * - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * - * - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * - * - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * - * - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * - * - * - * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * - * SQLT_CHR - for VARCHARs; - * - * - * - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * - * - * - * SQLT_LNG - for LONG columns; - * - * - * - * - * SQLT_LBI - for LONG RAW columns; - * - * - * - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * - * - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires Oracle Database 12c) - * - * - * - * - * SQLT_BFILEE or OCI_B_BFILE - * - for BFILEs; - * - * SQLT_CFILEE or OCI_B_CFILEE - * - for CFILEs; - * - * SQLT_CLOB or OCI_B_CLOB - * - for CLOBs; - * - * SQLT_BLOB or OCI_B_BLOB - * - for BLOBs; - * - * SQLT_RDD or OCI_B_ROWID - * - for ROWIDs; - * - * SQLT_NTY or OCI_B_NTY - * - for named datatypes; - * - * SQLT_INT or OCI_B_INT - for integers; - * - * SQLT_CHR - for VARCHARs; - * - * SQLT_BIN or OCI_B_BIN - * - for RAW columns; - * - * SQLT_LNG - for LONG columns; - * - * SQLT_LBI - for LONG RAW columns; - * - * SQLT_RSET - for cursors created - * with oci_new_cursor; - * - * SQLT_BOL or OCI_B_BOL - * - for PL/SQL BOOLEANs (Requires Oracle Database 12c) + * @param resource $statement + * @param string $param + * @param mixed $var + * @param int $max_length + * @param int $type * @throws Oci8Exception * */ @@ -318,10 +44,7 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 /** - * Invalidates a cursor, freeing all associated resources and cancels the - * ability to read from it. - * - * @param resource $statement An OCI statement. + * @param resource $statement * @throws Oci8Exception * */ @@ -336,24 +59,7 @@ function oci_cancel($statement): void /** - * Commits the outstanding transaction for the - * Oracle connection. A commit ends the - * current transaction and makes permanent all changes. It releases - * all locks held. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -368,98 +74,12 @@ function oci_commit($connection): void /** - * Returns a connection identifier needed for most other OCI8 operations. - * - * For performance, most applications should use persistent connections - * with oci_pconnect instead - * of oci_connect. - * See Connection Handling for general - * information on connection management and connection pooling. - * - * The second and subsequent calls to oci_connect - * with the same parameters will return the connection handle returned - * from the first call. This means that transactions in one handle are - * also in the other handles, because they use the - * same underlying database connection. If two - * handles need to be transactionally isolated from each other, use - * oci_new_connect instead. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -483,28 +103,10 @@ function oci_connect(string $username, string $password, ?string $connection_str /** - * Associates a PHP variable with a column for query fetches using oci_fetch. - * - * The oci_define_by_name call must occur before - * executing oci_execute. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param string $column The column name used in the query. - * - * Use uppercase for Oracle's default, non-case sensitive column - * names. Use the exact column name case for case-sensitive - * column names. - * @param mixed $var The PHP variable that will contain the returned column value. - * @param int $type The data type to be returned. Generally not needed. Note that - * Oracle-style data conversions are not performed. For example, - * SQLT_INT will be ignored and the returned - * data type will still be SQLT_CHR. - * - * You can optionally use oci_new_descriptor - * to allocate LOB/ROWID/BFILE descriptors. + * @param resource $statement + * @param string $column + * @param mixed $var + * @param int $type * @throws Oci8Exception * */ @@ -519,76 +121,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v /** - * Executes a statement previously returned - * from oci_parse. - * - * After execution, statements like INSERT will - * have data committed to the database by default. For statements - * like SELECT, execution performs the logic of the - * query. Query results can subsequently be fetched in PHP with - * functions like oci_fetch_array. - * - * Each parsed statement may be executed multiple times, saving the - * cost of re-parsing. This is commonly used - * for INSERT statements when data is bound - * with oci_bind_by_name. - * - * @param resource $statement A valid OCI statement identifier. - * @param int $mode An optional second parameter can be one of the following constants: - * - * Execution Modes - * - * - * - * Constant - * Description - * - * - * - * - * OCI_COMMIT_ON_SUCCESS - * Automatically commit all outstanding changes for - * this connection when the statement has succeeded. This - * is the default. - * - * - * OCI_DESCRIBE_ONLY - * Make query meta data available to functions - * like oci_field_name but do not - * create a result set. Any subsequent fetch call such - * as oci_fetch_array will - * fail. - * - * - * OCI_NO_AUTO_COMMIT - * Do not automatically commit changes. - * - * - * - * - * - * Using OCI_NO_AUTO_COMMIT mode starts or continues a - * transaction. Transactions are automatically rolled back when - * the connection is closed, or when the script ends. Explicitly - * call oci_commit to commit a transaction, - * or oci_rollback to abort it. - * - * When inserting or updating data, using transactions is - * recommended for relational data consistency and for performance - * reasons. - * - * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and - * oci_commit - * or oci_rollback is not subsequently - * called, then OCI8 will perform a rollback at the end of the - * script even if no data was changed. To avoid an unnecessary - * rollback, many scripts do not - * use OCI_NO_AUTO_COMMIT mode for queries or - * PL/SQL. Be careful to ensure the appropriate transactional - * consistency for the application when - * using oci_execute with different modes in - * the same script. + * @param resource $statement + * @param int $mode * @throws Oci8Exception * */ @@ -603,11 +137,9 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** - * Returns the name of the column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return string Returns the name as a string + * @param resource $statement + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -623,15 +155,9 @@ function oci_field_name($statement, $column): string /** - * Returns precision of the column. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the precision as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -647,15 +173,9 @@ function oci_field_precision($statement, $column): int /** - * Returns the scale of the column with column index. - * - * For FLOAT columns, precision is nonzero and scale is -127. - * If precision is 0, then column is NUMBER. Else it's - * NUMBER(precision, scale). - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the scale as an integer + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -671,11 +191,9 @@ function oci_field_scale($statement, $column): int /** - * Returns the size of a column. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns the size of a column in bytes + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -691,13 +209,9 @@ function oci_field_size($statement, $column): int /** - * Returns Oracle's raw "SQLT" data type of the column. - * - * If you want a field's type name, then use oci_field_type instead. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return int Returns Oracle's raw data type as a number + * @param resource $statement + * @param mixed $column + * @return int * @throws Oci8Exception * */ @@ -713,11 +227,9 @@ function oci_field_type_raw($statement, $column): int /** - * Returns a field's data type name. - * - * @param resource $statement A valid OCI statement identifier. - * @param mixed $column Can be the field's index (1-based) or name. - * @return mixed Returns the field data type as a string or an integer + * @param resource $statement + * @param mixed $column + * @return mixed * @throws Oci8Exception * */ @@ -733,9 +245,7 @@ function oci_field_type($statement, $column) /** - * Frees a descriptor allocated by oci_new_descriptor. - * - * @param \OCILob $lob Descriptor allocated by oci_new_descriptor. + * @param \OCILob $lob * @throws Oci8Exception * */ @@ -750,11 +260,7 @@ function oci_free_descriptor(\OCILob $lob): void /** - * Frees resources associated with Oracle's cursor or statement, which was - * received from as a result of oci_parse or obtained - * from Oracle. - * - * @param resource $statement A valid OCI statement identifier. + * @param resource $statement * @throws Oci8Exception * */ @@ -769,14 +275,10 @@ function oci_free_statement($statement): void /** - * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param string $type_name Should be a valid named type (uppercase). - * @param null|string $schema Should point to the scheme, where the named type was created. The name - * of the current user is used when NULL is passed. - * @return \OCI-Collection Returns a new OCICollection object. + * @param resource $connection + * @param string $type_name + * @param null|string $schema + * @return \OCI-Collection * @throws Oci8Exception * */ @@ -796,90 +298,12 @@ function oci_new_collection($connection, string $type_name, ?string $schema = nu /** - * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and - * oci_pconnect, oci_new_connect - * does not cache connections and will always return a brand-new freshly - * opened connection handle. This is useful if your application needs - * transactional isolation between two sets of queries. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -903,11 +327,8 @@ function oci_new_connect(string $username, string $password, ?string $connection /** - * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @return resource Returns a new statement handle. + * @param resource $connection + * @return resource * @throws Oci8Exception * */ @@ -923,14 +344,9 @@ function oci_new_cursor($connection) /** - * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: - * OCI_DTYPE_FILE, OCI_DTYPE_LOB and - * OCI_DTYPE_ROWID. - * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success. + * @param resource $connection + * @param int $type + * @return \OCI-Lob|false * @throws Oci8Exception * */ @@ -946,10 +362,8 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** - * Gets the number of rows affected during statement execution. - * - * @param resource $statement A valid OCI statement identifier. - * @return 0|positive-int Returns the number of rows affected as an integer + * @param resource $statement + * @return 0|positive-int * @throws Oci8Exception * */ @@ -965,24 +379,9 @@ function oci_num_rows($statement): int /** - * Prepares sql using - * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, - * oci_execute and other functions. - * - * Statement identifiers can be freed - * with oci_free_statement or by setting the - * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect, or oci_new_connect. - * @param string $sql The SQL or PL/SQL statement. - * - * SQL statements should not end with a - * semi-colon (";"). PL/SQL - * statements should end with a semi-colon - * (";"). - * @return resource Returns a statement handle on success. + * @param resource $connection + * @param string $sql + * @return resource * @throws Oci8Exception * */ @@ -998,91 +397,12 @@ function oci_parse($connection, string $sql) /** - * Creates a persistent connection to an Oracle server and logs on. - * - * Persistent connections are cached and re-used between requests, resulting in - * reduced overhead on each page load; a typical PHP application will have a - * single persistent connection open against an Oracle server per Apache child - * process (or PHP FPM process). See the OCI8 - * Connection Handling and Connection Pooling section for more - * information. - * - * @param string $username The Oracle user name. - * @param string $password The password for username. - * @param null|string $connection_string Contains - * the Oracle instance to connect to. It can be - * an Easy Connect - * string, or a Connect Name from - * the tnsnames.ora file, or the name of a local - * Oracle instance. - * - * If not specified or NULL, PHP uses - * environment variables such as TWO_TASK (on Linux) - * or LOCAL (on Windows) - * and ORACLE_SID to determine the - * Oracle instance to connect to. - * - * - * To use the Easy Connect naming method, PHP must be linked with Oracle - * 10g or greater Client libraries. The Easy Connect string for Oracle - * 10g is of the form: - * [//]host_name[:port][/service_name]. From Oracle - * 11g, the syntax is: - * [//]host_name[:port][/service_name][:server_type][/instance_name]. - * Further options were introduced with Oracle 19c, including timeout and keep-alive - * settings. Refer to Oracle documentation. Service names can be found by running - * the Oracle utility lsnrctl status on the database server - * machine. - * - * - * The tnsnames.ora file can be in the Oracle Net search path, - * which - * includes /your/path/to/instantclient/network/admin, $ORACLE_HOME/network/admin - * and /etc. Alternatively set TNS_ADMIN - * so that $TNS_ADMIN/tnsnames.ora is read. Make sure the web - * daemon has read access to the file. - * @param string $encoding Determines - * the character set used by the Oracle Client libraries. The character - * set does not need to match the character set used by the database. If - * it doesn't match, Oracle will do its best to convert data to and from - * the database character set. Depending on the character sets this may - * not give usable results. Conversion also adds some time overhead. - * - * If not specified, the - * Oracle Client libraries determine a character set from - * the NLS_LANG environment variable. - * - * Passing this parameter can - * reduce the time taken to connect. - * @param int $session_mode This - * parameter is available since version PHP 5 (PECL OCI8 1.1) and accepts the - * following values: OCI_DEFAULT, - * OCI_SYSOPER and OCI_SYSDBA. - * If either OCI_SYSOPER or - * OCI_SYSDBA were specified, this function will try - * to establish privileged connection using external credentials. - * Privileged connections are disabled by default. To enable them you - * need to set oci8.privileged_connect - * to On. - * - * - * PHP 5.3 (PECL OCI8 1.3.4) introduced the - * OCI_CRED_EXT mode value. This tells Oracle to use - * External or OS authentication, which must be configured in the - * database. The OCI_CRED_EXT flag can only be used - * with username of "/" and a empty password. - * oci8.privileged_connect - * may be On or Off. - * - * - * OCI_CRED_EXT may be combined with the - * OCI_SYSOPER or - * OCI_SYSDBA modes. - * - * - * OCI_CRED_EXT is not supported on Windows for - * security reasons. - * @return resource Returns a connection identifier. + * @param string $username + * @param string $password + * @param null|string $connection_string + * @param string $encoding + * @param int $session_mode + * @return resource * @throws Oci8Exception * */ @@ -1106,30 +426,8 @@ function oci_pconnect(string $username, string $password, ?string $connection_st /** - * Registers a user-defined callback function to connection. - * If connection fails due to instance or network failure, - * the registered callback function will be invoked for several times during - * failover. See OCI8 Transparent Application Failover - * (TAF) Support for information. - * - * When oci_register_taf_callback is called multiple times, - * each registration overwrites the previous one. - * - * Use oci_unregister_taf_callback to explicitly unregister a - * user-defined callback. - * - * TAF callback registration will NOT be saved across - * persistent connections, therefore the callback needs to be re-registered for - * a new persistent connection. - * - * @param resource $connection An Oracle connection identifier. - * @param callable $callback A user-defined callback to register for Oracle TAF. It can be a - * string of the function name or a Closure (anonymous function). - * - * The interface of a TAF user-defined callback function is as follows: - * - * See the parameter description and an example on - * OCI8 Transparent Application Failover (TAF) Support page. + * @param resource $connection + * @param callable $callback * @throws Oci8Exception * */ @@ -1144,20 +442,9 @@ function oci_register_taf_callback($connection, callable $callback): void /** - * Returns the data from column in the current row, - * fetched by oci_fetch. - * - * For details on the data type mapping performed by - * the OCI8 extension, see the datatypes - * supported by the driver - * * @param resource $statement - * @param mixed $column Can be either use the column number (1-based) or the column name. - * The case of the column name must be the case that Oracle meta data - * describes the column as, which is uppercase for columns created - * case insensitively. - * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and - * FILEs). + * @param mixed $column + * @return string * @throws Oci8Exception * */ @@ -1173,25 +460,7 @@ function oci_result($statement, $column): string /** - * Reverts all uncommitted changes for the Oracle - * connection and ends the transaction. It - * releases all locks held. All Oracle SAVEPOINTS - * are erased. - * - * A transaction begins when the first SQL statement that changes data - * is executed with oci_execute using - * the OCI_NO_AUTO_COMMIT flag. Further data - * changes made by other statements become part of the same - * transaction. Data changes made in a transaction are temporary - * until the transaction is committed or rolled back. Other users of - * the database will not see the changes until they are committed. - * - * When inserting or updating data, using transactions is recommended - * for relational data consistency and for performance reasons. - * - * @param resource $connection An Oracle connection identifier, returned by - * oci_connect, oci_pconnect - * or oci_new_connect. + * @param resource $connection * @throws Oci8Exception * */ @@ -1206,10 +475,8 @@ function oci_rollback($connection): void /** - * Returns a string with the Oracle Database version and available options - * * @param resource $connection - * @return string Returns the version information as a string. + * @return string * @throws Oci8Exception * */ @@ -1225,23 +492,8 @@ function oci_server_version($connection): string /** - * Sets the action name for Oracle tracing. - * - * The action name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The action name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string up to 32 bytes long. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1256,34 +508,8 @@ function oci_set_action($connection, string $action): void /** - * Sets a timeout limiting the maximum time a database round-trip using this connection may take. - * - * Each OCI8 operation may make zero or more calls to Oracle's client - * library. These internal calls may then may make zero or more - * round-trips to Oracle Database. If any one of those round-trips - * takes more than time_out milliseconds, then the - * operation is cancelled and an error is returned to the application. - * - * The time_out value applies to each round-trip - * individually, not to the sum of all round-trips. Time spent - * processing in PHP OCI8 before or after the completion of each - * round-trip is not counted. - * - * When a call is interrupted, Oracle will attempt to clean up the - * connection for reuse. This operation is allowed to run for - * another time_out period. Depending on the - * outcome of the cleanup, the connection may or may not be reusable. - * - * When persistent connections are used, the timeout value will be - * retained across PHP requests. - * - * The oci_set_call_timeout function is available - * when OCI8 uses Oracle 18 (or later) Client libraries. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take. + * @param resource $connection + * @param int $timeout * @throws Oci8Exception * */ @@ -1298,27 +524,8 @@ function oci_set_call_timeout($connection, int $timeout): void /** - * Sets the client identifier used by various database components to - * identify lightweight application users who authenticate as the same - * database user. - * - * The client identifier is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The identifier can subsequently be queried, for example - * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') - * FROM DUAL. Database administration views such - * as V$SESSION will also contain the value. It - * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE - * for tracing and can also be used for auditing. - * - * The value may be retained across page requests that use the same persistent connection. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_id User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_id * @throws Oci8Exception * */ @@ -1333,21 +540,8 @@ function oci_set_client_identifier($connection, string $client_id): void /** - * Sets the client information for Oracle tracing. - * - * The client information is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The client information can subsequently be queried from database - * administration views such as V$SESSION. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $client_info User chosen string up to 64 bytes long. + * @param resource $connection + * @param string $client_info * @throws Oci8Exception * */ @@ -1362,22 +556,8 @@ function oci_set_client_info($connection, string $client_info): void /** - * Sets the DBOP for Oracle tracing. - * - * The database operation name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when a SQL - * statement is executed. - * - * The database operation can subsequently be queried from database administration - * views such as V$SQL_MONITOR. - * - * The oci_set_db_operation function is available - * when OCI8 uses Oracle 12 (or later) Client libraries and Oracle Database 12 (or later). - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $action User chosen string. + * @param resource $connection + * @param string $action * @throws Oci8Exception * */ @@ -1392,26 +572,7 @@ function oci_set_db_operation($connection, string $action): void /** - * Sets the database "edition" of objects to be used by a subsequent - * connections. - * - * Oracle Editions allow concurrent versions of applications to run - * using the same schema and object names. This is useful for - * upgrading live systems. - * - * Call oci_set_edition before calling - * oci_connect, oci_pconnect - * or oci_new_connect. - * - * If an edition is set that is not valid in the database, connection - * will fail even if oci_set_edition returns success. - * - * When using persistent connections, if a connection with the - * requested edition setting already exists, it is reused. Otherwise, - * a different persistent connection is created - * - * @param string $edition Oracle Database edition name previously created with the SQL - * "CREATE EDITION" command. + * @param string $edition * @throws Oci8Exception * */ @@ -1426,23 +587,8 @@ function oci_set_edition(string $edition): void /** - * Sets the module name for Oracle tracing. - * - * The module name is registered with the database when the next - * 'round-trip' from PHP to the database occurs, typically when an SQL - * statement is executed. - * - * The name can subsequently be queried from database administration - * views such as V$SESSION. It can be used for - * tracing and monitoring such as with V$SQLAREA - * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * - * The value may be retained across persistent connections. - * - * @param resource $connection An Oracle connection identifier, - * returned by oci_connect, oci_pconnect, - * or oci_new_connect. - * @param string $name User chosen string up to 48 bytes long. + * @param resource $connection + * @param string $name * @throws Oci8Exception * */ @@ -1457,28 +603,8 @@ function oci_set_module_name($connection, string $name): void /** - * Sets the internal buffer size used to fetch each CLOB or BLOB value when the - * implementation gets the internal Oracle LOB locator from the database after - * a successful query call to oci_execute and for each - * subsequent internal fetch request to the database. Increasing this value - * can improve the performance of fetching smaller LOBs by reducing round-trips - * between PHP and the database. Memory usage will change. - * - * The value affects LOBs returned as OCILob instances and also those returned - * using OCI_RETURN_LOBS. - * - * Call oci_set_prefetch_lob before - * calling oci_execute. If it is not called, the value - * of oci8.prefetch_lob_size - * is used. - * - * The LOB prefetch value should only be set with Oracle Database 12.2 or later. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $prefetch_lob_size The number of bytes of each LOB to be prefetched, >= 0 + * @param resource $statement + * @param int $prefetch_lob_size * @throws Oci8Exception * */ @@ -1493,56 +619,8 @@ function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void /** - * Sets the number of rows to be buffered by the Oracle Client - * libraries after a successful query call - * to oci_execute and for each subsequent - * internal fetch request to the database. For queries returning a - * large number of rows, performance can be significantly improved by - * increasing the prefetch count above the - * default oci8.default_prefetch - * value. - * - * Prefetching is Oracle's efficient way of returning more than one - * data row from the database in each network request. This can - * result in better network and CPU utilization. The buffering of - * rows is internal to OCI8 and the behavior of OCI8 fetching - * functions is unchanged regardless of the prefetch count. For - * example, oci_fetch_row will always return one - * row. The prefetch buffer is per-statement and is not used by - * re-executed statements or by other connections. - * - * Call oci_set_prefetch before - * calling oci_execute. - * - * A tuning goal is to set the prefetch value to a reasonable size for - * the network and database to handle. For queries returning a very - * large number of rows, overall system efficiency might be better if - * rows are retrieved from the database in several chunks (i.e set the - * prefetch value smaller than the number of rows). This allows the - * database to handle other users' statements while the PHP script is - * processing the current set of rows. - * - * Query prefetching was introduced in Oracle 8i. REF CURSOR - * prefetching was introduced in Oracle 11gR2 and occurs when PHP is - * linked with Oracle 11gR2 (or later) Client libraries. - * Nested cursor prefetching was - * introduced in Oracle 11gR2 and requires both the Oracle Client - * libraries and the database to be version 11gR2 or greater. - * - * Prefetching is not supported when queries contain LONG or LOB - * columns. The prefetch value is ignored and single-row fetches will - * be used in all the situations when prefetching is not supported. - * - * When using Oracle Database 12c, the prefetch - * value set by PHP can be overridden by Oracle's - * client oraaccess.xml configuration file. Refer - * to Oracle documentation for more detail. - * - * @param resource $statement A valid OCI8 statement - * identifier created by oci_parse and executed - * by oci_execute, or a REF - * CURSOR statement identifier. - * @param int $rows The number of rows to be prefetched, >= 0 + * @param resource $statement + * @param int $rows * @throws Oci8Exception * */ @@ -1557,64 +635,8 @@ function oci_set_prefetch($statement, int $rows): void /** - * Returns a keyword identifying the type of the - * OCI8 statement. - * - * @param resource $statement A valid OCI8 statement identifier from oci_parse. - * @return string Returns the type of statement as one of the - * following strings. - * - * Statement type - * - * - * - * Return String - * Notes - * - * - * - * - * ALTER - * - * - * - * BEGIN - * - * - * - * CALL - * - * - * - * CREATE - * - * - * - * DECLARE - * - * - * - * DELETE - * - * - * - * DROP - * - * - * - * INSERT - * - * - * - * SELECT - * - * - * - * UPDATE - * - * - * - * UNKNOW. + * @param resource $statement + * @return string * @throws Oci8Exception * */ @@ -1630,12 +652,7 @@ function oci_statement_type($statement): string /** - * Unregister the user-defined callback function registered to connection - * by oci_register_taf_callback. See - * OCI8 Transparent Application Failover (TAF) Support - * for information. - * - * @param resource $connection An Oracle connection identifier. + * @param resource $connection * @throws Oci8Exception * */ diff --git a/generated/8.5/opcache.php b/generated/8.5/opcache.php index 88d1c435..df3d1999 100644 --- a/generated/8.5/opcache.php +++ b/generated/8.5/opcache.php @@ -5,11 +5,7 @@ use Safe\Exceptions\OpcacheException; /** - * This function compiles a PHP script and adds it to the opcode cache without - * executing it. This can be used to prime the cache after a Web server - * restart by pre-caching files that will be included in later requests. - * - * @param string $filename The path to the PHP script to be compiled. + * @param string $filename * @throws OpcacheException * */ @@ -24,11 +20,8 @@ function opcache_compile_file(string $filename): void /** - * This function returns state information about the in-memory cache instance. It will not return any - * information about the file cache. - * - * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @param bool $include_scripts + * @return array * @throws OpcacheException * */ diff --git a/generated/8.5/openssl.php b/generated/8.5/openssl.php index 28b03a5a..59559d01 100644 --- a/generated/8.5/openssl.php +++ b/generated/8.5/openssl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\OpensslException; /** - * Gets the cipher initialization vector (iv) length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -24,10 +22,8 @@ function openssl_cipher_iv_length(string $cipher_algo): int /** - * Gets the cipher key length. - * - * @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values. - * @return int Returns the cipher length on success. + * @param string $cipher_algo + * @return int * @throws OpensslException * */ @@ -43,14 +39,11 @@ function openssl_cipher_key_length(string $cipher_algo): int /** - * Decrypts a CMS message. - * - * @param string $input_filename The name of a file containing encrypted content. - * @param string $output_filename The name of the file to deposit the decrypted content. - * @param \OpenSSLCertificate|string $certificate The name of the file containing a certificate of the recipient. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key The name of the file containing a PKCS#8 key. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key + * @param int $encoding * @throws OpensslException * */ @@ -71,17 +64,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c /** - * This function encrypts content to one or more recipients, - * based on the certificates that are passed to it. - * - * @param string $input_filename The file to be encrypted. - * @param string $output_filename The output file. - * @param \OpenSSLCertificate|array|string $certificate Recipients to encrypt to. - * @param array|null $headers Headers to include when S/MIME is used. - * @param int $flags Flags to be passed to CMS_sign. - * @param int $encoding An encoding to output. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param int $cipher_algo A cypher to use. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|array|string $certificate + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param int $cipher_algo * @throws OpensslException * */ @@ -96,8 +85,6 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c /** - * Performs the exact analog to openssl_pkcs7_read. - * * @param string $input_filename * @param array $certificates * @throws OpensslException @@ -114,19 +101,14 @@ function openssl_cms_read(string $input_filename, array &$certificates): void /** - * This function signs a file with an X.509 certificate and key. - * - * @param string $input_filename The name of the file to be signed. - * @param string $output_filename The name of the file to deposit the results. - * @param \OpenSSLCertificate|string $certificate The signing certificate. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The key associated with certificate. - * See Key/Certificate parameters for a list of valid values. - * @param array|null $headers An array of headers to be included in S/MIME output. - * @param int $flags Flags to be passed to cms_sign. - * @param int $encoding The encoding of the output file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. - * @param null|string $untrusted_certificates_filename Intermediate certificates to be included in the signature. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array|null $headers + * @param int $flags + * @param int $encoding + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -145,18 +127,15 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert /** - * This function verifies a CMS signature, either attached or detached, with the specified encoding. - * - * @param string $input_filename The input file. - * @param int $flags Flags to pass to cms_verify. - * @param null|string $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. - * @param null|string $untrusted_certificates_filename A file containing additional intermediate certificates. - * @param null|string $content A file pointing to the content when signatures are detached. + * @param string $input_filename + * @param int $flags + * @param null|string $certificates + * @param array $ca_info + * @param null|string $untrusted_certificates_filename + * @param null|string $content * @param null|string $pk7 - * @param null|string $sigfile A file to save the signature to. - * @param int $encoding The encoding of the input file. One of OPENSSL_ENCODING_SMIME, - * OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM. + * @param null|string $sigfile + * @param int $encoding * @throws OpensslException * */ @@ -187,18 +166,9 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $cer /** - * openssl_csr_export_to_file takes the Certificate - * Signing Request represented by csr and saves it - * in PEM format into the file named by - * output_filename. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -213,19 +183,9 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text /** - * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in - * PEM format in output, which is passed by - * reference. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param null|string $output on success, this string will contain the PEM - * encoded CSR + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -240,12 +200,9 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void /** - * openssl_csr_get_public_key extracts the public key - * from csr and prepares it for use by other functions. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names This parameter is ignored - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -261,16 +218,9 @@ function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsy /** - * openssl_csr_get_subject returns subject - * distinguished name information encoded in the csr - * including fields commonName (CN), organizationName (O), countryName (C) etc. - * - * @param \OpenSSLCertificateSigningRequest|string $csr See CSR parameters for a list of valid values. - * @param bool $short_names short_names controls how the data is indexed in the - * array - if short_names is TRUE (the default) then - * fields will be indexed with the short name form, otherwise, the long name - * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param bool $short_names + * @return array * @throws OpensslException * */ @@ -286,119 +236,11 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array /** - * openssl_csr_new generates a new CSR - * based on the information provided by distinguished_names. - * - * @param array $distinguished_names The Distinguished Name or subject fields to be included in the - * certificate. The distinguished_names is an - * associative array where the keys represent the attribute names of - * Distinguished Names and the values can either be strings (for single - * value) or arrays (if multiple values need to be set). - * @param \OpenSSLAsymmetricKey|null $private_key private_key should be set to a private key that - * was previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions), or - * NULL variable. If its value is NULL variable, a new private key is - * generated based on the supplied options and - * assigned to supplied variable. The corresponding public portion of the - * key will be used to sign the CSR. - * @param array|null $options By default, the information in your system openssl.conf - * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key in - * options. You can also specify an alternative - * OpenSSL configuration file by setting the value of the - * config key to the path of the file you want to use. - * The following keys, if present in options - * behave as their equivalents in the openssl.conf, as - * listed in the table below. - * - * Configuration overrides - * - * - * - * options key - * type - * openssl.conf equivalent - * description - * - * - * - * - * digest_alg - * string - * default_md - * Digest method or signature hash, usually one of openssl_get_md_methods - * - * - * x509_extensions - * string - * x509_extensions - * Selects which extensions should be used when creating an x509 - * certificate - * - * - * req_extensions - * string - * req_extensions - * Selects which extensions should be used when creating a CSR - * - * - * private_key_bits - * int - * default_bits - * Specifies how many bits should be used to generate a private key - * - * - * private_key_type - * int - * none - * Specifies the type of private key to create. This can be one - * of OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_RSA or - * OPENSSL_KEYTYPE_EC. - * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * - * encrypt_key - * bool - * encrypt_key - * Should an exported key (with passphrase) be encrypted? - * - * - * encrypt_key_cipher - * int - * none - * - * One of cipher constants. - * - * - * - * curve_name - * string - * none - * - * One of openssl_get_curve_names. - * - * - * - * config - * string - * N/A - * - * Path to your own alternative openssl.conf file. - * - * - * - * - * - * @param array|null $extra_attributes extra_attributes is used to specify additional - * attributes for the CSR. It is an associative arrays - * where the keys are converted to OIDs and applied as - * CSR attributes. - * @return \OpenSSLCertificateSigningRequest|bool Returns the CSR on success, TRUE if - * CSR creation is successful but signing - * fails. + * @param array $distinguished_names + * @param \OpenSSLAsymmetricKey|null $private_key + * @param array|null $options + * @param array|null $extra_attributes + * @return \OpenSSLCertificateSigningRequest|bool * @throws OpensslException * */ @@ -420,30 +262,14 @@ function openssl_csr_new(array $distinguished_names, ?\OpenSSLAsymmetricKey &$pr /** - * openssl_csr_sign generates an x509 certificate from the given CSR. - * - * @param \OpenSSLCertificateSigningRequest|string $csr A CSR previously generated by openssl_csr_new. - * It can also be the path to a PEM encoded CSR when specified as - * file://path/to/csr or an exported string generated - * by openssl_csr_export. - * @param \OpenSSLCertificate|null|string $ca_certificate The generated certificate will be signed by ca_certificate. - * If ca_certificate is NULL, the generated certificate - * will be a self-signed certificate. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key that corresponds to - * ca_certificate. - * @param int $days days specifies the length of time for which the - * generated certificate will be valid, in days. - * @param array|null $options You can finetune the CSR signing by options. - * See openssl_csr_new for more information about - * options. - * @param int $serial An optional the serial number of issued certificate. If not specified - * it will default to 0. - * @param null|string $serial_hex An optional hexadecimal string representing the serial number of the - * issued certificate. If set, it takes precedence over the - * serial parameter value. If not specified or set - * to NULL, the serial parameter value is used - * instead. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificateSigningRequest|string $csr + * @param \OpenSSLCertificate|null|string $ca_certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $days + * @param array|null $options + * @param int $serial + * @param null|string $serial_hex + * @return \OpenSSLCertificate * @throws OpensslException * */ @@ -467,24 +293,14 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array /** - * Takes a raw or base64 encoded string and decrypts it using a given method and passphrase. - * - * @param string $data The encrypted message to be decrypted. - * @param string $cipher_algo The cipher method. For a list of available cipher methods, use - * openssl_get_cipher_methods. - * @param string $passphrase The passphrase. If the passphrase is shorter than expected, it is silently padded with - * NUL characters; if the passphrase is longer than expected, it is - * silently truncated. - * @param int $options options can be one of - * OPENSSL_RAW_DATA, - * OPENSSL_ZERO_PADDING - * or OPENSSL_DONT_ZERO_PAD_KEY. - * @param string $iv A non-NULL Initialization Vector. If the IV is shorter than expected, it is padded with - * NUL characters and warning is emitted; if the passphrase is longer - * than expected, it is truncated and warning is emitted. - * @param null|string $tag The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE. - * @param string $aad Additional authenticated data. - * @return string The decrypted string on success. + * @param string $data + * @param string $cipher_algo + * @param string $passphrase + * @param int $options + * @param string $iv + * @param null|string $tag + * @param string $aad + * @return string * @throws OpensslException * */ @@ -506,13 +322,9 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, /** - * The shared secret returned by openssl_dh_compute_key is - * often used as an encryption key to secretly communicate with a remote party. - * This is known as the Diffie-Hellman key exchange. - * - * @param string $public_key DH Public key of the remote party. - * @param \OpenSSLAsymmetricKey $private_key A local DH private key, corresponding to the public key to be shared with the remote party. - * @return string Returns shared secret on success. + * @param string $public_key + * @param \OpenSSLAsymmetricKey $private_key + * @return string * @throws OpensslException * */ @@ -528,14 +340,10 @@ function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $priva /** - * Computes a digest hash value for the given data using a given method, - * and returns a raw or binhex encoded string. - * - * @param string $data The data. - * @param string $digest_algo The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. - * @param bool $binary Setting to TRUE will return as raw output data, otherwise the return - * value is binhex encoded. - * @return string Returns the digested hash value on success. + * @param string $data + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -551,53 +359,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) /** - * Gets the list of available curve names for use in Elliptic curve - * cryptography (ECC) for public/private key operations. The two most widely - * standardized/supported curves are prime256v1 - * (NIST P-256) and secp384r1 (NIST P-384). - * - * Approximate Equivalancies of AES, RSA, DSA and ECC Keysizes - * - * - * - * AES Symmetric Keysize (Bits) - * RSA and DSA Keysize (Bits) - * ECC Keysize (Bits) - * - * - * - * - * 80 - * 1024 - * 160 - * - * - * 112 - * 2048 - * 224 - * - * - * 128 - * 3072 - * 256 - * - * - * 192 - * 7680 - * 384 - * - * - * 256 - * 15360 - * 512 - * - * - * - * - * NIST - * recommends using ECC curves with at least 256 bits. - * - * @return list An array of available curve names. + * @return list * @throws OpensslException * */ @@ -613,29 +375,12 @@ function openssl_get_curve_names(): array /** - * openssl_open opens (decrypts) data using an envelope - * key that is decrypted from encrypted_key using - * private_key. The decryption is done using - * cipher_algo and iv. The IV is required only if the - * cipher method requires it. The function fills output with the decrypted - * data. The envelope key is usually generated when the data are sealed using a public key that is - * associated with the private key. See openssl_seal for more information. - * - * @param string $data The sealed data. - * @param null|string $output If the call is successful the opened data is returned in this parameter. - * @param string $encrypted_key The encrypted symmetric key that can be decrypted using private_key. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key The private key used for decrypting encrypted_key. - * @param string $cipher_algo The cipher method used for decryption of data. - * - * - * The default value for PHP versions prior to 8.0 is ('RC4') which is - * considered insecure. It is strongly recommended to explicitly specify a secure cipher - * method. - * - * - * @param null|string $iv The initialization vector used for decryption of data. It is required - * if the cipher method requires IV. This can be found out by calling - * openssl_cipher_iv_length with cipher_algo. + * @param string $data + * @param null|string $output + * @param string $encrypted_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $cipher_algo + * @param null|string $iv * @throws OpensslException * */ @@ -654,19 +399,12 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr /** - * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), - * a key derivation function defined in PKCS5 v2. - * - * @param string $password Password from which the derived key is generated. - * @param string $salt PBKDF2 recommends a crytographic salt of at least 128 bits (16 bytes). - * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. - * NIST - * recommends at least 1,000. As of 2023, OWASP recommends 600,000 iterations for - * PBKDF2-HMAC-SHA256 and 210,000 for PBKDF2-HMAC-SHA512. - * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults - * to SHA-1. It is recommended to set it to SHA-256 or SHA-512. - * @return string Returns raw binary string. + * @param string $password + * @param string $salt + * @param int $key_length + * @param int $iterations + * @param string $digest_algo + * @return string * @throws OpensslException * */ @@ -682,36 +420,11 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it /** - * openssl_pkcs12_export_to_file stores - * certificate into a file named by - * output_filename in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendly_name" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -726,36 +439,11 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p /** - * openssl_pkcs12_export stores - * certificate into a string named by - * output in a PKCS#12 file format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PKCS#12. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key Private key component of PKCS#12 file. - * See Public/Private Key parameters for a list of valid values. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. - * - * - * - * - * Key - * Description - * - * - * - * - * "extracerts" - * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * - * "friendly_name" - * string to be used for the supplied certificate and key - * - * - * - * + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param string $passphrase + * @param array $options * @throws OpensslException * */ @@ -770,13 +458,9 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str /** - * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by - * pkcs12 into a array named - * certificates. - * - * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. - * @param string $passphrase Encryption password for unlocking the PKCS#12 file. + * @param string $pkcs12 + * @param array|null $certificates + * @param string $passphrase * @throws OpensslException * */ @@ -791,14 +475,8 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass /** - * Decrypts the S/MIME encrypted message contained in the file specified by - * input_filename using the certificate and its - * associated private key specified by certificate and - * private_key. - * * @param string $input_filename - * @param string $output_filename The decrypted message is written to the file specified by - * output_filename. + * @param string $output_filename * @param \OpenSSLCertificate|string $certificate * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key * @throws OpensslException @@ -819,24 +497,12 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, /** - * openssl_pkcs7_encrypt takes the contents of the - * file named input_filename and encrypts them using an RC2 - * 40-bit cipher so that they can only be read by the intended recipients - * specified by certificate. - * * @param string $input_filename * @param string $output_filename - * @param \OpenSSLCertificate|array|string $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been encrypted. - * - * headers can be either an associative array - * keyed by header name, or an indexed array, where each element contains - * a single header line. - * @param int $flags flags can be used to specify options that affect - * the encoding process - see PKCS7 - * constants. - * @param int $cipher_algo One of cipher constants. + * @param \OpenSSLCertificate|array|string $certificate + * @param array $headers + * @param int $flags + * @param int $cipher_algo * @throws OpensslException * */ @@ -851,10 +517,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, /** - * - * - * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param string $data + * @param array|null $certificates * @throws OpensslException * */ @@ -869,26 +533,13 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void /** - * openssl_pkcs7_sign takes the contents of the file - * named input_filename and signs them using the - * certificate and its matching private key specified by - * certificate and private_key - * parameters. - * - * @param string $input_filename The input file you are intending to digitally sign. - * @param string $output_filename The file which the digital signature will be written to. - * @param \OpenSSLCertificate|string $certificate The X.509 certificate used to digitally sign input_filename. - * See Key/Certificate parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key corresponding to certificate. - * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that - * will be prepended to the data after it has been signed (see - * openssl_pkcs7_encrypt for more information about - * the format of this parameter). - * @param int $flags flags can be used to alter the output - see PKCS7 constants. - * @param null|string $untrusted_certificates_filename untrusted_certificates_filename specifies the name of a file containing - * a bunch of extra certificates to include in the signature which can for - * example be used to help the recipient to verify the certificate that you used. + * @param string $input_filename + * @param string $output_filename + * @param \OpenSSLCertificate|string $certificate + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param array $headers + * @param int $flags + * @param null|string $untrusted_certificates_filename * @throws OpensslException * */ @@ -907,15 +558,10 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce /** - * openssl_pkey_derive takes a set of a public_key - * and private_key and derives a shared secret, for either DH or EC keys. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key is the public key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key is the private key for the derivation. - * See Public/Private Key parameters for a list of valid values. - * @param int $key_length If not zero, will attempt to set the desired length of the derived secret. - * @return string The derived secret on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $key_length + * @return string * @throws OpensslException * */ @@ -931,18 +577,10 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st /** - * openssl_pkey_export_to_file saves an ascii-armoured - * (PEM encoded) rendition of key into the file named - * by output_filename. - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key - * @param string $output_filename Path to the output file. - * @param null|string $passphrase The key can be optionally protected by a - * passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param string $output_filename + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -963,17 +601,10 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas /** - * openssl_pkey_export exports - * key as a PEM encoded string and stores it into - * output (which is passed by reference). - * * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key * @param null|string $output - * @param null|string $passphrase The key is optionally protected by passphrase. - * @param array|null $options options can be used to fine-tune the export - * process by specifying and/or overriding options for the openssl - * configuration file. See openssl_csr_new for more - * information about options. + * @param null|string $passphrase + * @param array|null $options * @throws OpensslException * */ @@ -994,25 +625,8 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, /** - * This function returns the key details (bits, key, type). - * - * @param \OpenSSLAsymmetricKey $key Resource holding the key. - * @return array Returns an array with the key details on success. - * Returned array has indexes bits (number of bits), - * key (string representation of the public key) and - * type (type of the key which is one of - * OPENSSL_KEYTYPE_RSA, - * OPENSSL_KEYTYPE_DSA, - * OPENSSL_KEYTYPE_DH, - * OPENSSL_KEYTYPE_EC, - * OPENSSL_KEYTYPE_X25519, - * OPENSSL_KEYTYPE_ED25519, - * OPENSSL_KEYTYPE_X448, - * OPENSSL_KEYTYPE_ED448, - * or -1 meaning unknown). - * - * Depending on the key type used, additional details may be returned. Note that - * some elements may not always be available. + * @param \OpenSSLAsymmetricKey $key + * @return array * @throws OpensslException * */ @@ -1028,21 +642,9 @@ function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array /** - * openssl_pkey_get_private parses - * private_key and prepares it for use by other functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key can be one of the following: - * - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/private key (it may contain both). - * - * - * A PEM formatted private key. - * - * @param null|string $passphrase The optional parameter passphrase must be used - * if the specified key is encrypted (protected by a passphrase). - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param null|string $passphrase + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1062,21 +664,8 @@ function openssl_pkey_get_private($private_key, ?string $passphrase = null): \Op /** - * openssl_pkey_get_public extracts the public key from - * public_key and prepares it for use by other - * functions. - * - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key can be one of the following: - * - * an OpenSSLAsymmetricKey instance - * a string having the format - * file://path/to/file.pem. The named file must - * contain a PEM encoded certificate/public key (it may contain both). - * - * - * A PEM formatted public key. - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance on success. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1092,350 +681,8 @@ function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey /** - * openssl_pkey_new generates a new private - * key. - * How to obtain the public component of the key is shown in an example below. - * - * @param array|null $options It is possible to fine-tune the key generation (e.g. specifying the number of - * bits or parameters) using the options parameter. - * These options can either be algorithm-specific parameters used for key generation, - * or generic options used also in CSRgeneration if not specified. - * See openssl_csr_new for more information - * about how to use options for a CSR. - * Among those options only private_key_bits, - * private_key_type, curve_name, - * and config are used for key generation. - * Algorithm-specific options are used if the associative array includes one of the specific keys. - * - * - * - * "rsa" key for setting RSA parameters. - * - * - * - * - * - * options - * type - * format - * required - * description - * - * - * - * - * "n" - * string - * binary number - * yes - * modulus - * - * - * "e" - * string - * binary number - * no - * public exponent - * - * - * "d" - * string - * binary number - * yes - * private exponent - * - * - * "p" - * string - * binary number - * no - * prime 1 - * - * - * "q" - * string - * binary number - * no - * prime 2 - * - * - * "dmp1" - * string - * binary number - * no - * exponent1, d mod (p-1) - * - * - * "dmq1" - * string - * binary number - * no - * exponent2, d mod (q-1) - * - * - * "iqmp" - * string - * binary number - * no - * coefficient, (inverse of q) mod p - * - * - * - * - * - * - * - * "dsa" key for setting DSA parameters. - * - * - * - * - * - * options - * type - * format - * required - * description - * - * - * - * - * "p" - * string - * binary number - * no - * prime number (public) - * - * - * "q" - * string - * binary number - * no - * 160-bit subprime, q | p-1 (public) - * - * - * "g" - * string - * binary number - * no - * generator of subgroup (public) - * - * - * "priv_key" - * string - * PEM key - * no - * private key x - * - * - * "pub_key" - * string - * PEM key - * no - * public key y = g^x - * - * - * - * - * - * - * - * "dh" key for DH (Diffie–Hellman key exchange) parameters. - * - * - * - * - * - * Options - * Type - * Format - * Required - * Description - * - * - * - * - * "p" - * string - * binary number - * no - * prime number (shared) - * - * - * "g" - * string - * binary number - * no - * generator of Z_p (shared) - * - * - * "priv_key" - * string - * PEM key - * no - * private DH value x - * - * - * "pub_key" - * string - * PEM key - * no - * public DH value g^x - * - * - * - * - * - * - * - * "ec" key for Elliptic curve parameters - * - * - * - * - * - * Options - * Type - * Format - * Required - * Description - * - * - * - * - * "curve_name" - * string - * name - * no - * name of curve, see openssl_get_curve_names - * - * - * "p" - * string - * binary number - * no - * prime of the field for curve over Fp - * - * - * "a" - * string - * binary number - * no - * coofecient a of the curve for Fp: y^2 mod p = x^3 + ax + b mod p - * - * - * "b" - * string - * binary number - * no - * coofecient b of the curve for Fp: y^2 mod p = x^3 + ax + b mod p - * - * - * "seed" - * string - * binary number - * no - * optional random number seed used to generate coefficient b - * - * - * "generator" - * string - * binary encoded point - * no - * curve generator point - * - * - * "g_x" - * string - * binary number - * no - * curver generator point x coordinat - * - * - * "g_y" - * string - * binary number - * no - * curver generator point y coordinat - * - * - * "cofactor" - * string - * binary number - * no - * curve cofactor - * - * - * "order" - * string - * binary number - * no - * curve order - * - * - * "x" - * string - * binary number - * no - * x coordinate (public) - * - * - * "y" - * string - * binary number - * no - * y coordinate (public) - * - * - * "d" - * string - * binary number - * no - * private key - * - * - * - * - * - * - * - * "x25519", "x448", - * "ed25519", "ed448" keys for - * Curve25519 and Curve448 parameters. - * - * - * - * - * - * Options - * Type - * Format - * Required - * Description - * - * - * - * - * "priv_key" - * string - * PEM key - * no - * private key - * - * - * "pub_key" - * string - * PEM key - * no - * public key - * - * - * - * - * - * - * @return \OpenSSLAsymmetricKey Returns an OpenSSLAsymmetricKey instance for - * the pkey on success. + * @param array|null $options + * @return \OpenSSLAsymmetricKey * @throws OpensslException * */ @@ -1455,22 +702,10 @@ function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey /** - * openssl_private_decrypt decrypts - * data that was previously encrypted via - * openssl_public_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key that corresponds - * to the public key that was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1485,21 +720,10 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat /** - * openssl_private_encrypt encrypts data - * with private private_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_public_decrypt. - * - * This function can be used e.g. to sign data (or its hash) to prove that it - * is not written by someone else. - * * @param string $data * @param null|string $encrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key private_key must be the private key that corresponds - * to the public key that will be used to decrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int $padding * @throws OpensslException * */ @@ -1514,21 +738,10 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat /** - * openssl_public_decrypt decrypts - * data that was previous encrypted via - * openssl_private_encrypt and stores the result into - * decrypted_data. - * - * You can use this function e.g. to check if the message was written by the - * owner of the private key. - * * @param string $data * @param null|string $decrypted_data - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key that corresponds - * to the private key that was used to encrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_NO_PADDING. + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1543,24 +756,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ /** - * openssl_public_encrypt encrypts data - * with public public_key and stores the result into - * encrypted_data. Encrypted data can be decrypted via - * openssl_private_decrypt. - * - * This function can be used e.g. to encrypt message which can be then read - * only by owner of the private key. It can be also used to store secure data - * in database. - * * @param string $data - * @param null|string $encrypted_data This will hold the result of the encryption. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key public_key must be the public key that corresponds - * to the private key that will be used to decrypt the data. - * @param int $padding padding can be one of - * OPENSSL_PKCS1_PADDING, - * OPENSSL_SSLV23_PADDING, - * OPENSSL_PKCS1_OAEP_PADDING, - * OPENSSL_NO_PADDING. + * @param null|string $encrypted_data + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int $padding * @throws OpensslException * */ @@ -1575,19 +774,9 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ /** - * Generates a string of pseudo-random bytes, with the number of bytes - * determined by the length parameter. - * - * It also indicates if a cryptographically strong algorithm was used to produce the - * pseudo-random bytes, and does this via the optional strong_result - * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * - * @param int $length The length of the desired string of bytes. Must be a positive integer less than or equal to 2147483647. PHP will - * try to cast this parameter to a non-null integer to use it. - * @param bool|null $strong_result If passed into the function, this will hold a bool value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, - * passwords, etc. TRUE if it did, otherwise FALSE - * @return string Returns the generated string of bytes. + * @param int $length + * @param bool|null $strong_result + * @return string * */ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string @@ -1599,34 +788,13 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): /** - * openssl_seal seals (encrypts) data using the - * specified cipher_algo with a randomly generated secret key. The key is - * then encrypted with each of the public keys in public_key array, - * and each encrypted envelope key is returned in encrypted_keys. This allows - * sealed data to be sent to multiple recipients (provided their public keys are available). Each - * recipient must receive both the sealed data and the envelope key that was encrypted with the - * recipient's public key. The IV (Initialization Vector) is generated, and its value is returned in - * iv. - * - * @param string $data The data to seal. - * @param null|string $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. - * @param string $cipher_algo The cipher method. - * - * - * The default value for PHP versions prior to 8.0 is ('RC4') which is - * considered insecure. It is strongly recommended to explicitly specify a secure cipher - * method. - * - * - * @param null|string $iv The initialization vector for decryption of data. It is required if - * the cipher method requires IV. This can be found out by calling - * openssl_cipher_iv_length with cipher_algo. - * @return int Returns the length of the sealed data on success. - * If successful the sealed data is returned in - * sealed_data, and the envelope keys in - * encrypted_keys. + * @param string $data + * @param null|string $sealed_data + * @param array|null $encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param null|string $iv + * @return int * @throws OpensslException * */ @@ -1642,21 +810,10 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke /** - * openssl_sign computes a signature for the - * specified data by generating a cryptographic - * digital signature using the private key associated with - * private_key. Note that the data itself is - * not encrypted. - * - * @param string $data The string of data you wish to sign - * @param null|string $signature If the call was successful the signature is returned in - * signature. - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey - * - * string - a PEM formatted key - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". + * @param string $data + * @param null|string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key + * @param int|string $algorithm * @throws OpensslException * */ @@ -1671,10 +828,8 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith /** - * Exports challenge from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated challenge string. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1690,10 +845,8 @@ function openssl_spki_export_challenge(string $spki): ?string /** - * Exports PEM formatted public key from encoded signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge - * @return null|string Returns the associated PEM formatted public key. + * @param string $spki + * @return null|string * @throws OpensslException * */ @@ -1709,16 +862,10 @@ function openssl_spki_export(string $spki): ?string /** - * Generates a signed public key and challenge using specified hashing algorithm - * - * @param \OpenSSLAsymmetricKey $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. - * @param string $challenge The challenge associated to associate with the SPKAC - * @param int $digest_algo The digest algorithm. See openssl_get_md_method(). - * @return null|string Returns a signed public key and challenge string. + * @param \OpenSSLAsymmetricKey $private_key + * @param string $challenge + * @param int $digest_algo + * @return null|string * @throws OpensslException * */ @@ -1734,9 +881,7 @@ function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, /** - * Validates the supplied signed public key and challenge - * - * @param string $spki Expects a valid signed public key and challenge + * @param string $spki * @throws OpensslException * */ @@ -1751,23 +896,11 @@ function openssl_spki_verify(string $spki): void /** - * openssl_verify verifies that the - * signature is correct for the specified - * data using the public key associated with - * public_key. This must be the public key - * corresponding to the private key used for signing. - * - * @param string $data The string of data used to generate the signature previously - * @param string $signature A raw binary string, generated by openssl_sign or similar means - * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key OpenSSLAsymmetricKey - a key, returned by openssl_get_publickey - * - * string - a PEM formatted key (e.g. -----BEGIN PUBLIC KEY----- - * MIIBCgK...) - * @param int|string $algorithm int - one of these Signature Algorithms. - * - * string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". - * @return -1|0|1 Returns 1 if the signature is correct, 0 if it is incorrect, and - * -1. + * @param string $data + * @param string $signature + * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key + * @param int|string $algorithm + * @return -1|0|1 * @throws OpensslException * */ @@ -1783,63 +916,11 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm /** - * openssl_x509_checkpurpose examines a certificate to - * see if it can be used for the specified purpose. - * - * @param \OpenSSLCertificate|string $certificate The examined certificate. + * @param \OpenSSLCertificate|string $certificate * @param int $purpose - * openssl_x509_checkpurpose purposes - * - * - * - * Constant - * Description - * - * - * - * - * X509_PURPOSE_SSL_CLIENT - * Can the certificate be used for the client side of an SSL - * connection? - * - * - * X509_PURPOSE_SSL_SERVER - * Can the certificate be used for the server side of an SSL - * connection? - * - * - * X509_PURPOSE_NS_SSL_SERVER - * Can the cert be used for Netscape SSL server? - * - * - * X509_PURPOSE_SMIME_SIGN - * Can the cert be used to sign S/MIME email? - * - * - * X509_PURPOSE_SMIME_ENCRYPT - * Can the cert be used to encrypt S/MIME email? - * - * - * X509_PURPOSE_CRL_SIGN - * Can the cert be used to sign a certificate revocation list - * (CRL)? - * - * - * X509_PURPOSE_ANY - * Can the cert be used for Any/All purposes? - * - * - * - * - * These options are not bitfields - you may specify one only! - * @param array $ca_info ca_info should be an array of trusted CA files/dirs - * as described in Certificate - * Verification. - * @param null|string $untrusted_certificates_file If specified, this should be the name of a PEM encoded file holding - * certificates that can be used to help verify the certificate, although - * no trust is placed in the certificates that come from that file. - * @return bool|int Returns TRUE if the certificate can be used for the intended purpose, - * FALSE if it cannot. + * @param array $ca_info + * @param null|string $untrusted_certificates_file + * @return bool|int * @throws OpensslException * */ @@ -1859,17 +940,9 @@ function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = /** - * openssl_x509_export_to_file stores - * certificate into a file named by - * output_filename in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $output_filename Path to the output file. + * @param \OpenSSLCertificate|string $certificate + * @param string $output_filename * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1884,17 +957,9 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool /** - * openssl_x509_export stores - * certificate into a string named by - * output in a PEM encoded format. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param null|string $output On success, this will hold the PEM. + * @param \OpenSSLCertificate|string $certificate + * @param null|string $output * @param bool $no_text - * The optional parameter notext affects - * the verbosity of the output; if it is FALSE, then additional human-readable - * information is included in the output. The default value of - * notext is TRUE. * @throws OpensslException * */ @@ -1909,15 +974,10 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru /** - * openssl_x509_fingerprint returns the digest of - * certificate as a string. - * - * @param \OpenSSLCertificate|string $certificate See Key/Certificate parameters for a list of valid values. - * @param string $digest_algo The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods. - * @param bool $binary When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * @return string Returns a string containing the calculated certificate fingerprint as lowercase hexits unless binary is set to TRUE in which case the raw binary representation of the message digest is returned. - * - * Returns FALSE on failure. + * @param \OpenSSLCertificate|string $certificate + * @param string $digest_algo + * @param bool $binary + * @return string * @throws OpensslException * */ @@ -1933,12 +993,8 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo /** - * openssl_x509_read parses the certificate supplied by - * certificate and returns an OpenSSLCertificate object for - * it. - * - * @param \OpenSSLCertificate|string $certificate X509 certificate. See Key/Certificate parameters for a list of valid values. - * @return \OpenSSLCertificate Returns an OpenSSLCertificate on success. + * @param \OpenSSLCertificate|string $certificate + * @return \OpenSSLCertificate * @throws OpensslException * */ diff --git a/generated/8.5/outcontrol.php b/generated/8.5/outcontrol.php index 2fd5378a..74144aa9 100644 --- a/generated/8.5/outcontrol.php +++ b/generated/8.5/outcontrol.php @@ -5,18 +5,6 @@ use Safe\Exceptions\OutcontrolException; /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN flag), - * discards it's return value - * and cleans (erases) the contents of the active output buffer. - * - * This function does not turn off the active output buffer like - * ob_end_clean or ob_get_clean does. - * - * ob_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * * @throws OutcontrolException * */ @@ -31,22 +19,6 @@ function ob_clean(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN and - * PHP_OUTPUT_HANDLER_FINAL flags), - * discards it's return value, - * discards the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_end_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_end_clean - * will discard the contents of the active output buffer - * even if it was started without the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * * @throws OutcontrolException * */ @@ -61,21 +33,6 @@ function ob_end_clean(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FINAL flag), - * flushes (sends) it's return value, - * discards the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_end_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_end_flush will flush (send) - * the return value of the output handler - * even if the active output buffer was started without the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * * @throws OutcontrolException * */ @@ -90,18 +47,6 @@ function ob_end_flush(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FLUSH flag), - * flushes (sends) its return value - * and discards the contents of the active output buffer. - * - * This function does not turn off the active output buffer like - * ob_end_flush or ob_get_flush does. - * - * ob_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * * @throws OutcontrolException * */ @@ -116,23 +61,7 @@ function ob_flush(): void /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_CLEAN and - * PHP_OUTPUT_HANDLER_FINAL flags), - * discards it's return value, - * returns the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_get_clean will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_get_clean - * will discard the contents of the active output buffer - * even if it was started without the - * PHP_OUTPUT_HANDLER_CLEANABLE flag. - * - * @return string Returns the contents of the active output buffer on success. + * @return string * @throws OutcontrolException * */ @@ -148,22 +77,7 @@ function ob_get_clean(): string /** - * This function calls the output handler - * (with the PHP_OUTPUT_HANDLER_FINAL flag), - * flushes (sends) it's return value, - * returns the contents of the active output buffer - * and turns off the active output buffer. - * - * ob_get_flush will fail - * without an active output buffer started with the - * PHP_OUTPUT_HANDLER_REMOVABLE flag. - * - * ob_get_flush will flush (send) - * the return value of the output handler - * even if the active output buffer was started without the - * PHP_OUTPUT_HANDLER_FLUSHABLE flag. - * - * @return string Returns the contents of the active output buffer on success. + * @return string * @throws OutcontrolException * */ @@ -179,77 +93,9 @@ function ob_get_flush(): string /** - * This function will turn output buffering on. - * While output buffering is active no output is sent from the script, - * instead the output is stored in an internal buffer. - * See - * on exactly what output is affected. - * - * Output buffers are stackable, that is, - * ob_start may be called while another buffer is active. - * If multiple output buffers are active, - * output is being filtered sequentially - * through each of them in nesting order. - * See for more details. - * - * See - * for a detailed description of output buffers. - * - * @param array|callable|null|string $callback An optional callback callable may be - * specified. It can also be bypassed by passing NULL. - * - * callback is invoked when the output buffer is - * flushed (sent), cleaned, or when the output buffer is flushed - * at the end of the script. - * - * The signature of the callback is as follows: - * - * - * stringhandler - * stringbuffer - * intphase - * - * - * - * buffer - * - * - * Contents of the output buffer. - * - * - * - * - * phase - * - * - * Bitmask of - * - * PHP_OUTPUT_HANDLER_* - * constants - * . - * See - * for more details. - * - * - * - * - * - * If callback returns FALSE - * the contents of the buffer are returned. - * See - * for more details. - * - * See - * and - * for more details on callbacks (output handlers). - * @param int $chunk_size Contents of the output buffer. - * @param int $flags Bitmask of - * - * PHP_OUTPUT_HANDLER_* - * constants - * . - * See - * for more details. + * @param array|callable|null|string $callback + * @param int $chunk_size + * @param int $flags * @throws OutcontrolException * */ @@ -272,31 +118,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT /** - * This function starts the 'URL-Rewriter' output buffer handler - * if it is not active, - * stores the name and value parameters, - * and when the buffer is flushed rewrites the URLs - * and forms based on the applicable ini settings. - * Subsequent calls to this function will store all additional name/value pairs - * until the handler is turned off. - * - * When the output buffer is flushed - * (by calling ob_flush, ob_end_flush, - * ob_get_flush or at the end of the script) - * the 'URL-Rewriter' handler adds the name/value pairs - * as query parameters to URLs in attributes of HTML tags - * and adds hidden fields to forms based on the values of the - * url_rewriter.tags and - * url_rewriter.hosts - * configuration directives. - * - * Each name/value pair added to the 'URL-Rewriter' handler - * is added to the URLs and/or forms - * even if this results in duplicate URL query parameters - * or elements with the same name attributes. - * - * @param string $name The variable name. - * @param string $value The variable value. + * @param string $name + * @param string $value * @throws OutcontrolException * */ @@ -311,9 +134,6 @@ function output_add_rewrite_var(string $name, string $value): void /** - * This function removes all rewrite variables previously set by - * the output_add_rewrite_var function. - * * @throws OutcontrolException * */ diff --git a/generated/8.5/pcntl.php b/generated/8.5/pcntl.php index 9bcba2d9..cf1e1d8c 100644 --- a/generated/8.5/pcntl.php +++ b/generated/8.5/pcntl.php @@ -5,10 +5,8 @@ use Safe\Exceptions\PcntlException; /** - * Retrieve the cpu affinity of the pid. - * - * @param int|null $pid If NULL, the current process ID is used. - * @return array|bool Returns the cpu affinity mask of the process. + * @param int|null $pid + * @return array|bool * @throws PcntlException * */ @@ -28,17 +26,9 @@ function pcntl_getcpuaffinity(?int $pid = null) /** - * pcntl_getpriority gets the priority of - * process_id. Because priority levels can differ between - * system types and kernel versions, please see your system's getpriority(2) - * man page for specific details. - * - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. - * @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable - * scheduling. + * @param int|null $process_id + * @param int $mode + * @return int * @throws PcntlException * */ @@ -60,11 +50,8 @@ function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): i /** - * Sets the cpu affinity for the pid with the cpu affinity mask given by - * hmask. - * - * @param int|null $pid If NULL, the current process ID is used. - * @param array $hmask The cpu affinity mask comprised of one or more cpu id for binding the process to. + * @param int|null $pid + * @param array $hmask * @throws PcntlException * */ @@ -85,19 +72,9 @@ function pcntl_setcpuaffinity(?int $pid = null, ?array $hmask = null): void /** - * pcntl_setpriority sets the priority of - * process_id. - * - * @param int $priority priority is generally a value in the range - * -20 to 20. The default priority - * is 0 while a lower numerical value causes more - * favorable scheduling. Because priority levels can differ between - * system types and kernel versions, please see your system's setpriority(2) - * man page for specific details. - * @param int|null $process_id If NULL, the process id of the current process is used. - * @param int $mode One of PRIO_PGRP, PRIO_USER, - * PRIO_PROCESS, - * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD. + * @param int $priority + * @param int|null $process_id + * @param int $mode * @throws PcntlException * */ @@ -118,10 +95,6 @@ function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = P /** - * The pcntl_signal_dispatch function calls the signal - * handlers installed by pcntl_signal for each pending - * signal. - * * @throws PcntlException * */ @@ -136,47 +109,9 @@ function pcntl_signal_dispatch(): void /** - * The pcntl_signal function installs a new - * signal handler or replaces the current signal handler for the signal indicated by signal. - * - * @param int $signal The signal number. - * @param callable|int $handler The signal handler. This may be either a callable, which - * will be invoked to handle the signal, or either of the two global - * constants SIG_IGN or SIG_DFL, - * which will ignore the signal or restore the default signal handler - * respectively. - * - * If a callable is given, it must implement the following - * signature: - * - * - * voidhandler - * intsigno - * mixedsiginfo - * - * - * - * signal - * - * - * The signal being handled. - * - * - * - * - * siginfo - * - * - * If operating systems supports siginfo_t structures, this will be an array of signal information dependent on the signal. - * - * - * - * - * - * Note that when you set a handler to an object method, that object's - * reference count is increased which makes it persist until you either - * change the handler to something else, or your script ends. - * @param bool $restart_syscalls The signal being handled. + * @param int $signal + * @param callable|int $handler + * @param bool $restart_syscalls * @throws PcntlException * */ @@ -191,22 +126,9 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi /** - * The pcntl_sigprocmask function adds, removes or sets blocked - * signals, depending on the mode parameter. - * - * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible - * values: - * - * SIG_BLOCK: Add the signals to the - * currently blocked signals. - * SIG_UNBLOCK: Remove the signals from the - * currently blocked signals. - * SIG_SETMASK: Replace the currently - * blocked signals by the given list of signals. - * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array - * containing the list of the previously blocked signals. + * @param int $mode + * @param array $signals + * @param array|null $old_signals * @throws PcntlException * */ @@ -221,19 +143,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul /** - * The pcntl_sigtimedwait function operates in exactly - * the same way as pcntl_sigwaitinfo except that it takes - * two additional parameters, seconds and - * nanoseconds, which enable an upper bound to be placed - * on the time for which the script is suspended. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing - * information about the signal. See - * pcntl_sigwaitinfo. - * @param int $seconds Timeout in seconds. - * @param int $nanoseconds Timeout in nanoseconds. - * @return int pcntl_sigtimedwait returns a signal number on success. + * @param array $signals + * @param array|null $info + * @param int $seconds + * @param int $nanoseconds + * @return int * @throws PcntlException * */ @@ -249,46 +163,9 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 /** - * The pcntl_sigwaitinfo function suspends execution of the - * calling script until one of the signals given in signals - * are delivered. If one of the signal is already pending (e.g. blocked by - * pcntl_sigprocmask), - * pcntl_sigwaitinfo will return immediately. - * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing - * information about the signal. - * - * The following elements are set for all signals: - * - * signo: Signal number - * errno: An error number - * code: Signal code - * - * - * The following elements may be set for the SIGCHLD signal: - * - * status: Exit value or signal - * utime: User time consumed - * stime: System time consumed - * pid: Sending process ID - * uid: Real user ID of sending process - * - * - * The following elements may be set for the SIGILL, - * SIGFPE, SIGSEGV and - * SIGBUS signals: - * - * addr: Memory location which caused fault - * - * - * The following element may be set for the SIGPOLL - * signal: - * - * band: Band event - * fd: File descriptor number - * - * @return int Returns a signal number on success. + * @param array $signals + * @param array|null $info + * @return int * @throws PcntlException * */ diff --git a/generated/8.5/pcre.php b/generated/8.5/pcre.php index c482ddcf..1e15de35 100644 --- a/generated/8.5/pcre.php +++ b/generated/8.5/pcre.php @@ -5,17 +5,10 @@ use Safe\Exceptions\PcreException; /** - * Returns the array consisting of the elements of the - * array array that match the given - * pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. - * @param int $flags If set to PREG_GREP_INVERT, this function returns - * the elements of the input array that do not match - * the given pattern. - * @return array Returns an array indexed using the keys from the - * array array. + * @param string $pattern + * @param array $array + * @param int $flags + * @return array * @throws PcreException * */ @@ -31,345 +24,12 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array /** - * Searches subject for all matches to the regular - * expression given in pattern and puts them in - * matches in the order specified by - * flags. - * - * After the first match is found, the subsequent searches are continued - * on from end of the last match. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to - * flags. - * @param int $flags Can be a combination of the following flags (note that it doesn't make - * sense to use PREG_PATTERN_ORDER together with - * PREG_SET_ORDER): - * - * - * PREG_PATTERN_ORDER - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * - * - * - * PREG_SET_ORDER - * - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * - * - * Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * - * Orders results so that $matches[0] is an array of first set - * of matches, $matches[1] is an array of second set of matches, - * and so on. - * - * - * - * ]]> - * - * The above example will output: - * - * example: , example: - * this is a test, this is a test - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array of arrays where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * ) - * - * [1] => Array - * ( - * [0] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * ) - * - * [2] => Array - * ( - * [0] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * ) - * - * [3] => Array - * ( - * [0] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * If no order flag is given, PREG_PATTERN_ORDER is - * assumed. - * @param int $offset Orders results so that $matches[0] is an array of full - * pattern matches, $matches[1] is an array of strings matched by - * the first parenthesized subpattern, and so on. - * - * - * - * - * ]]> - * - * The above example will output: - * - * example: , this is a test - * example: , this is a test - * ]]> - * - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * - * - * The above example will output: - * - * So, $out[0] contains an array of strings that matched the full pattern, - * and $out[1] contains an array of strings enclosed by tags. - * - * If the pattern contains named subpatterns, $matches - * additionally contains entries for keys with the subpattern name. - * - * If the pattern contains duplicate named subpatterns, only the rightmost - * subpattern is stored in $matches[NAME]. - * - * - * - * ]]> - * - * The above example will output: - * - * - * [1] => bar - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|positive-int Returns the number of full pattern matches (which might be zero). + * @param string $pattern + * @param string $subject + * @param array|null $matches + * @param int $flags + * @param int $offset + * @return 0|positive-int * @throws PcreException * */ @@ -385,228 +45,12 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul /** - * Searches subject for a match to the regular - * expression given in pattern. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param null|string[] $matches If matches is provided, then it is filled with - * the results of search. $matches[0] will contain the - * text that matched the full pattern, $matches[1] - * will have the text that matched the first captured parenthesized - * subpattern, and so on. - * @param int $flags flags can be a combination of the following flags: - * - * - * PREG_OFFSET_CAPTURE - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * - * - * - * PREG_UNMATCHED_AS_NULL - * - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * - * - * - * - * If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * - * If this flag is passed, unmatched subpatterns are reported as NULL; - * otherwise they are reported as an empty string. - * - * - * - * ]]> - * - * The above example will output: - * - * - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * string(0) "" - * [3]=> - * string(1) "c" - * } - * array(4) { - * [0]=> - * string(2) "ac" - * [1]=> - * string(1) "a" - * [2]=> - * NULL - * [3]=> - * string(1) "c" - * } - * ]]> - * - * - * - * The above example will output: - * @param int $offset If this flag is passed, for every occurring match the appendant string - * offset (in bytes) will also be returned. Note that this changes the value of - * matches into an array where every element is an - * array consisting of the matched string at offset 0 - * and its string offset into subject at offset - * 1. - * - * - * - * ]]> - * - * The above example will output: - * - * Array - * ( - * [0] => foobarbaz - * [1] => 0 - * ) - * - * [1] => Array - * ( - * [0] => foo - * [1] => 0 - * ) - * - * [2] => Array - * ( - * [0] => bar - * [1] => 3 - * ) - * - * [3] => Array - * ( - * [0] => baz - * [1] => 6 - * ) - * - * ) - * ]]> - * - * - * - * The above example will output: - * @return 0|1 preg_match returns 1 if the pattern - * matches given subject, 0 if it does not. + * @param string $pattern + * @param string $subject + * @param null|string[] $matches + * @param int $flags + * @param int $offset + * @return 0|1 * @throws PcreException * */ @@ -622,28 +66,12 @@ function preg_match(string $pattern, string $subject, ?array &$matches = null, i /** - * The behavior of this function is similar to - * preg_replace_callback, except that callbacks are - * executed on a per-pattern basis. - * - * @param array $pattern An associative array mapping patterns (keys) to callables (values). - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback_array returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array $pattern + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -659,57 +87,13 @@ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, /** - * The behavior of this function is almost identical to - * preg_replace, except for the fact that instead of - * replacement parameter, one should specify a - * callback. - * - * @param array|string $pattern The pattern to search for. It can be either a string or an array with - * strings. - * @param callable(array):string $callback A callback that will be called and passed an array of matched elements - * in the subject string. The callback should - * return the replacement string. This is the callback signature: - * - * - * stringhandler - * arraymatches - * - * - * You'll often need the callback function - * for a preg_replace_callback in just one place. - * In this case you can use an - * anonymous function to - * declare the callback within the call to - * preg_replace_callback. By doing it this way - * you have all information for the call in one place and do not - * clutter the function namespace with a callback function's name - * not used anywhere else. - * - * - * preg_replace_callback and - * anonymous function - * - * - * ]]> - * - * - * @param array|string $subject The string or an array with strings to search and replace. - * @param int $limit The maximum possible replacements for each pattern in each - * subject string. Defaults to - * -1 (no limit). - * @param int|null $count If specified, this variable will be filled with the number of - * replacements done. - * @param int $flags flags can be a combination of the - * PREG_OFFSET_CAPTURE and - * PREG_UNMATCHED_AS_NULL flags, which influence the - * format of the matches array. - * See the description in preg_match for more details. - * @return array|string preg_replace_callback returns an array if the - * subject parameter is an array, or a string - * otherwise. On errors the return value is NULL - * - * If matches are found, the new subject will be returned, otherwise - * subject will be returned unchanged. + * @param array|string $pattern + * @param callable(array):string $callback + * @param array|string $subject + * @param int $limit + * @param int|null $count + * @param int $flags + * @return array|string * @throws PcreException * */ @@ -725,55 +109,11 @@ function preg_replace_callback($pattern, callable $callback, $subject, int $limi /** - * Split the given string by a regular expression. - * - * @param string $pattern The pattern to search for, as a string. - * @param string $subject The input string. - * @param int|null $limit If specified, then only substrings up to limit - * are returned with the rest of the string being placed in the last - * substring. A limit of -1 or 0 means "no limit". - * @param int $flags flags can be any combination of the following - * flags (combined with the | bitwise operator): - * - * - * PREG_SPLIT_NO_EMPTY - * - * - * If this flag is set, only non-empty pieces will be returned by - * preg_split. - * - * - * - * - * PREG_SPLIT_DELIM_CAPTURE - * - * - * If this flag is set, parenthesized expression in the delimiter pattern - * will be captured and returned as well. - * - * - * - * - * PREG_SPLIT_OFFSET_CAPTURE - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * - * - * - * - * - * If this flag is set, for every occurring match the appendant string - * offset will also be returned. Note that this changes the return - * value in an array where every element is an array consisting of the - * matched string at offset 0 and its string offset - * into subject at offset 1. - * @return list Returns an array containing substrings of subject - * split along boundaries matched by pattern. + * @param string $pattern + * @param string $subject + * @param int|null $limit + * @param int $flags + * @return list * @throws PcreException * */ diff --git a/generated/8.5/pgsql.php b/generated/8.5/pgsql.php index 966dd719..9c5c4cee 100644 --- a/generated/8.5/pgsql.php +++ b/generated/8.5/pgsql.php @@ -5,12 +5,7 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with - * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using - * pg_query. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -25,49 +20,9 @@ function pg_cancel_query(\PgSql\Connection $connection): void /** - * pg_connect opens a connection to a - * PostgreSQL database specified by the - * connection_string. - * - * If a second call is made to pg_connect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * The old syntax with multiple parameters - * $conn = pg_connect("host", "port", "options", "tty", "dbname") - * has been deprecated. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname (defaults to value of user), - * user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. Which of these arguments exist depends - * on your PostgreSQL version. - * - * The options parameter can be used to set command line parameters - * to be invoked by the server. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * - * If PGSQL_CONNECT_ASYNC is given, then the - * connection is established asynchronously. The state of the connection - * can then be checked via pg_connect_poll or - * pg_connection_status. - * @return \PgSql\Connection Returns an PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -83,10 +38,7 @@ function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connectio /** - * pg_connection_reset resets the connection. - * It is useful for error recovery. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. + * @param \PgSql\Connection $connection * @throws PgsqlException * */ @@ -101,22 +53,11 @@ function pg_connection_reset(\PgSql\Connection $connection): void /** - * pg_convert checks and converts the values in - * values into suitable values for use in an SQL - * statement. Precondition for pg_convert is the - * existence of a table table_name which has at least - * as many columns as values has elements. The - * fieldnames in table_name must match the indices in - * values and the corresponding datatypes must be - * compatible. Returns an array with the converted values on success. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. - * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, - * PGSQL_CONV_FORCE_NULL or - * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return array * @throws PgsqlException * */ @@ -132,20 +73,11 @@ function pg_convert(\PgSql\Connection $connection, string $table_name, array $va /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command - * internally to insert records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. - * Each value in rows becomes a row in table_name. - * Each value in rows should be a delimited string of the values - * to insert into each field. Values should be linefeed terminated. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $rows + * @param string $separator + * @param string $null_as * @throws PgsqlException * */ @@ -160,17 +92,11 @@ function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $ /** - * pg_copy_to copies a table to an array. It - * issues COPY TO SQL command internally to - * retrieve records. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to copy the data into rows. - * @param string $separator The token that separates values for each field in each element of - * rows. Default is \t. - * @param string $null_as How SQL NULL values are represented in the - * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param string $separator + * @param string $null_as + * @return array * @throws PgsqlException * */ @@ -186,37 +112,11 @@ function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $s /** - * pg_delete deletes records from a table - * specified by the keys and values in conditions. - * - * If flags is specified, - * pg_convert is applied to - * conditions with the specified flags. - * - * By default pg_delete passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be deleted. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -232,18 +132,7 @@ function pg_delete(\PgSql\Connection $connection, string $table_name, array $con /** - * pg_end_copy syncs the PostgreSQL frontend - * (usually a web server process) with the PostgreSQL server after - * doing a copy operation performed by - * pg_put_line. pg_end_copy - * must be issued, otherwise the PostgreSQL server may get out of - * sync with the frontend and will report an error. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -262,37 +151,10 @@ function pg_end_copy(?\PgSql\Connection $connection = null): void /** - * Sends a request to execute a prepared statement with given parameters, and - * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. - * pg_execute is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a - * prepared statement is given instead of a query string. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name of the prepared statement to execute. if - * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, - * pg_send_prepare or a PREPARE SQL - * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Elements are converted to strings by calling this function. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -316,16 +178,9 @@ function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_field_num will return the number of the - * field number that corresponds to the - * field in the given result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param string $field The name of the field. - * The given name is treated like an identifier in an SQL command, - * that is, it is downcased unless double-quoted. - * @return int The field number (numbered from 0). + * @param \PgSql\Result $result + * @param string $field + * @return int * @throws PgsqlException * */ @@ -341,16 +196,10 @@ function pg_field_num(\PgSql\Result $result, string $field): int /** - * pg_field_table returns the name of the table that field - * belongs to, or the table's oid if oid_only is TRUE. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field Field number, starting from 0. - * @param bool $oid_only By default the tables name that field belongs to is returned but - * if oid_only is set to TRUE, then the - * oid will instead be returned. - * @return mixed On success either the fields table name or oid. + * @param \PgSql\Result $result + * @param int $field + * @param bool $oid_only + * @return mixed * @throws PgsqlException * */ @@ -366,13 +215,8 @@ function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = fals /** - * pg_flush flushes any outbound query data waiting to be - * sent on the connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return mixed Returns TRUE if the flush was successful or no data was waiting to be - * flushed, 0 if part of the pending data was flushed but - * more remains. + * @param \PgSql\Connection $connection + * @return mixed * @throws PgsqlException * */ @@ -388,15 +232,7 @@ function pg_flush(\PgSql\Connection $connection) /** - * pg_free_result frees the memory and data associated with the - * specified PgSql\Result instance. - * - * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will - * be automatically freed when the script ends. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). + * @param \PgSql\Result $result * @throws PgsqlException * */ @@ -411,17 +247,8 @@ function pg_free_result(\PgSql\Result $result): void /** - * pg_host returns the host name of the given - * PostgreSQL connection instance is - * connected to. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @return string A string containing the name of the host the - * connection is to. + * @param \PgSql\Connection|null $connection + * @return string * @throws PgsqlException * */ @@ -441,39 +268,11 @@ function pg_host(?\PgSql\Connection $connection = null): string /** - * pg_insert inserts the values - * of values into the table specified - * by table_name. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_insert passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to insert rows. The table table_name must at least - * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are the values of those fields that are to be inserted. - * @param int $flags Any number of PGSQL_CONV_OPTS, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param int $flags + * @return mixed * @throws PgsqlException * */ @@ -489,30 +288,8 @@ function pg_insert(\PgSql\Connection $connection, string $table_name, array $val /** - * pg_last_oid is used to retrieve the - * OID assigned to an inserted row. - * - * OID field became an optional field from PostgreSQL 7.2 and will - * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use - * pg_result_status to check for successful - * insertion. - * - * To get the value of a SERIAL field in an inserted - * row, it is necessary to use the PostgreSQL CURRVAL - * function, naming the sequence whose last value is required. If the - * name of the sequence is unknown, the pg_get_serial_sequence - * PostgreSQL 8.0 function is necessary. - * - * PostgreSQL 8.1 has a function LASTVAL that returns - * the value of the most recently used sequence in the session. This avoids - * the need for naming the sequence, table or column altogether. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @return string An int or string containing the OID assigned to the most recently inserted - * row in the specified connection or - * no available OID. + * @param \PgSql\Result $result + * @return string * @throws PgsqlException * */ @@ -528,12 +305,7 @@ function pg_last_oid(\PgSql\Result $result): string /** - * pg_lo_close closes a large object. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. + * @param \PgSql\Lob $lob * @throws PgsqlException * */ @@ -548,21 +320,9 @@ function pg_lo_close(\PgSql\Lob $lob): void /** - * pg_lo_export takes a large object in a - * PostgreSQL database and saves its contents to a file on the local - * filesystem. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $pathname The full path and file name of the file in which to write the - * large object on the client filesystem. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $pathname * @throws PgsqlException * */ @@ -585,26 +345,10 @@ function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ? /** - * pg_lo_import creates a new large object - * in the database using a file on the filesystem as its data - * source. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $pathname The full path and file name of the file on the client - * filesystem from which to read the large object data. - * @param $object_id If an object_id is given the function - * will try to create a large object with this id, else a free - * object id is assigned by the server. The parameter - * relies on functionality that first - * appeared in PostgreSQL 8.1. - * @return int The OID of the newly created large object. + * @param \PgSql\Connection $connection + * @param string $pathname + * @param $object_id + * @return int * @throws PgsqlException * */ @@ -628,21 +372,10 @@ function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = /** - * pg_lo_open opens a large object in the database - * and returns an PgSql\Lob instance so that it can be manipulated. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and - * write. - * @return \PgSql\Lob An PgSql\Lob instance. + * @param \PgSql\Connection $connection + * @param int $oid + * @param string $mode + * @return \PgSql\Lob * @throws PgsqlException * */ @@ -658,17 +391,9 @@ function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgS /** - * pg_lo_read reads at most - * length bytes from a large object and - * returns it as a string. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $length An optional maximum number of bytes to return. - * @return string A string containing length bytes from the - * large object. + * @param \PgSql\Lob $lob + * @param int $length + * @return string * @throws PgsqlException * */ @@ -684,16 +409,9 @@ function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string /** - * pg_lo_seek seeks a position within an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), - * PGSQL_SEEK_CUR (seek from current position) - * or PGSQL_SEEK_END (seek from object end) . + * @param \PgSql\Lob $lob + * @param int $offset + * @param int $whence * @throws PgsqlException * */ @@ -708,13 +426,8 @@ function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void /** - * pg_lo_truncate truncates an PgSql\Lob instance. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param int $size The number of bytes to truncate. + * @param \PgSql\Lob $lob + * @param int $size * @throws PgsqlException * */ @@ -729,18 +442,8 @@ function pg_lo_truncate(\PgSql\Lob $lob, int $size): void /** - * pg_lo_unlink deletes a large object with the - * oid. Returns TRUE on success. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $oid The OID of the large object in the database. + * @param \PgSql\Connection $connection + * @param int $oid * @throws PgsqlException * */ @@ -755,20 +458,10 @@ function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void /** - * pg_lo_write writes data into a large object - * at the current seek position. - * - * To use the large object interface, it is necessary to - * enclose it within a transaction block. - * - * @param \PgSql\Lob $lob An PgSql\Lob instance, returned by pg_lo_open. - * @param string $data The data to be written to the large object. If length is - * an int and is less than the length of data, only - * length bytes will be written. - * @param int|null $length An optional maximum number of bytes to write. Must be greater than zero - * and no greater than the length of data. Defaults to - * the length of data. - * @return int The number of bytes written to the large object. + * @param \PgSql\Lob $lob + * @param string $data + * @param int|null $length + * @return int * @throws PgsqlException * */ @@ -788,13 +481,10 @@ function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int /** - * pg_meta_data returns table definition for - * table_name as an array. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name The name of the table. - * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param bool $extended + * @return array * @throws PgsqlException * */ @@ -810,41 +500,9 @@ function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $e /** - * Looks up a current parameter setting of the server. - * - * Certain parameter values are reported by the server automatically at - * connection startup or whenever their values change. pg_parameter_status can be - * used to interrogate these settings. It returns the current value of a - * parameter if known, or FALSE if the parameter is not known. - * - * Parameters reported as of PostgreSQL 8.0 include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and integer_datetimes. - * (server_encoding, TimeZone, and - * integer_datetimes were not reported by releases before 8.0.) Note that - * server_version, server_encoding and integer_datetimes - * cannot change after PostgreSQL startup. - * - * PostgreSQL 7.3 or lower servers do not report parameter settings, - * pg_parameter_status - * includes logic to obtain values for server_version and - * client_encoding - * anyway. Applications are encouraged to use pg_parameter_status rather than ad - * hoc code to determine these values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $param_name Possible param_name values include server_version, - * server_encoding, client_encoding, - * is_superuser, session_authorization, - * DateStyle, TimeZone, and - * integer_datetimes. Note that this value is case-sensitive. - * @return string A string containing the value of the parameter or invalid - * param_name. + * @param \PgSql\Connection $connection + * @param string $param_name + * @return string * @throws PgsqlException * */ @@ -866,49 +524,9 @@ function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $par /** - * pg_pconnect opens a connection to a - * PostgreSQL database. It returns a PgSql\Connection instance that is - * needed by other PostgreSQL functions. - * - * If a second call is made to pg_pconnect with - * the same connection_string as an existing connection, the - * existing connection will be returned unless you pass - * PGSQL_CONNECT_FORCE_NEW as - * flags. - * - * To enable persistent connections, the - * pgsql.allow_persistent - * php.ini directive must be set to "On" (which is the default). - * The maximum number of persistent connections can be defined with the - * pgsql.max_persistent - * php.ini directive (defaults to -1 for no limit). - * The total number of connections can be set with the - * pgsql.max_links - * php.ini directive. - * - * pg_close will not close persistent links - * generated by pg_pconnect. - * - * @param string $connection_string The connection_string can be empty to use all default parameters, or it - * can contain one or more parameter settings separated by whitespace. - * Each parameter setting is in the form keyword = value. Spaces around - * the equal sign are optional. To write an empty value or a value - * containing spaces, surround it with single quotes, e.g., keyword = - * 'a value'. Single quotes and backslashes within the value must be - * escaped with a backslash, i.e., \' and \\. - * - * The currently recognized parameter keywords are: - * host, hostaddr, port, - * dbname, user, - * password, connect_timeout, - * options, tty (ignored), sslmode, - * requiressl (deprecated in favor of sslmode), and - * service. - * Which of these arguments exist depends on the PostgreSQL version. - * @param int $flags If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection - * is created, even if the connection_string is identical to - * an existing connection. - * @return \PgSql\Connection Returns a PgSql\Connection instance on success. + * @param string $connection_string + * @param int $flags + * @return \PgSql\Connection * @throws PgsqlException * */ @@ -924,14 +542,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connecti /** - * pg_ping pings a database connection and tries to - * reconnect it if it is broken. - * - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. + * @param \PgSql\Connection|null $connection * @throws PgsqlException * */ @@ -950,39 +561,10 @@ function pg_ping(?\PgSql\Connection $connection = null): void /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * pg_prepare is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters - * are used, they are referred to in the query as $1, - * $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is - * more flexible since it does not require parameter types to be pre-specified.) Also, - * although there is no PHP function for deleting a prepared statement, the - * SQL DEALLOCATE statement can be used for that purpose. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If - * "" is specified, then an unnamed statement is created, overwriting any - * previously defined unnamed statement. - * @param string $query The parameterized SQL statement. Must contain only a single statement - * (multiple statements separated by semi-colons are not allowed). If any parameters - * are used, they are referred to as $1, $2, etc. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $stmtname + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1006,25 +588,8 @@ function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = n /** - * pg_put_line sends a NULL-terminated string - * to the PostgreSQL backend server. This is needed in conjunction - * with PostgreSQL's COPY FROM command. - * - * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, - * and in a single transaction. - * - * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler - * interface. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL - * terminator is added automatically. + * @param \PgSql\Connection $connection + * @param string $data * @throws PgsqlException * */ @@ -1045,53 +610,10 @@ function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null /** - * Submits a command to the server and waits for the result, with the ability - * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. - * pg_query_params is supported only against PostgreSQL 7.4 or - * higher connections; it will fail when using earlier versions. - * - * If parameters are used, they are referred to in the - * query string as $1, $2, etc. The same parameter may - * appear more than once in the query; the same value - * will be used in that case. params specifies the - * actual values of the parameters. A NULL value in this array means the - * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, - * but not more than one nonempty command.) - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters - * are used, they are referred to as $1, $2, etc. - * - * User-supplied values should always be passed as parameters, not - * interpolated into the query string, where they form possible - * SQL injection - * attack vectors and introduce bugs when handling data containing quotes. - * If for some reason you cannot use a parameter, ensure that interpolated - * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders - * in the original prepared query string. The number of elements in the array - * must match the number of placeholders. - * - * Values intended for bytea fields are not supported as - * parameters. Use pg_escape_bytea instead, or use the - * large object functions. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @param array $params + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1115,42 +637,9 @@ function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = /** - * pg_query executes the query - * on the specified database connection. - * pg_query_params should be preferred - * in most cases. - * - * If an error occurs, and FALSE is returned, details of the error can - * be retrieved using the pg_last_error - * function if the connection is valid. - * - * - * - * Although connection can be omitted, it - * is not recommended, since it can be the cause of hard to find - * bugs in scripts. - * - * - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * When connection is unspecified, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, - * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands - * included in the query string. However, using multiple transactions in one function call is not recommended. - * - * String interpolation of user-supplied data is extremely dangerous and is - * likely to lead to SQL - * injection vulnerabilities. In most cases - * pg_query_params should be preferred, passing - * user-supplied values as parameters rather than substituting them into - * the query string. - * - * Any user-supplied data substituted directly into a query string should - * be properly escaped. - * @return \PgSql\Result An PgSql\Result instance on success. + * @param \PgSql\Connection $connection + * @param string $query + * @return \PgSql\Result * @throws PgsqlException * */ @@ -1172,31 +661,9 @@ function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): /** - * pg_result_error_field returns one of the detailed error message - * fields associated with result instance. It is only available - * against a PostgreSQL 7.4 or above server. The error field is specified by - * the field_code. - * - * Because pg_query and pg_query_params return FALSE if the query fails, - * you must use pg_send_query and - * pg_get_result to get the result handle. - * - * If you need to get additional error information from failed pg_query queries, - * use pg_set_error_verbosity and pg_last_error - * and then parse the result. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $field_code Possible field_code values are: PGSQL_DIAG_SEVERITY, - * PGSQL_DIAG_SQLSTATE, PGSQL_DIAG_MESSAGE_PRIMARY, - * PGSQL_DIAG_MESSAGE_DETAIL, - * PGSQL_DIAG_MESSAGE_HINT, PGSQL_DIAG_STATEMENT_POSITION, - * PGSQL_DIAG_INTERNAL_POSITION (PostgreSQL 8.0+ only), - * PGSQL_DIAG_INTERNAL_QUERY (PostgreSQL 8.0+ only), - * PGSQL_DIAG_CONTEXT, PGSQL_DIAG_SOURCE_FILE, - * PGSQL_DIAG_SOURCE_LINE or - * PGSQL_DIAG_SOURCE_FUNCTION. - * @return null|string A string containing the contents of the error field, NULL if the field does not exist. + * @param \PgSql\Result $result + * @param int $field_code + * @return null|string * @throws PgsqlException * */ @@ -1212,13 +679,8 @@ function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string /** - * pg_result_seek sets the internal row offset in - * the result instance. - * - * @param \PgSql\Result $result An PgSql\Result instance, returned by pg_query, - * pg_query_params or pg_execute(among others). - * @param int $row Row to move the internal offset to in the PgSql\Result instance. - * Rows are numbered starting from zero. + * @param \PgSql\Result $result + * @param int $row * @throws PgsqlException * */ @@ -1233,55 +695,12 @@ function pg_result_seek(\PgSql\Result $result, int $row): void /** - * pg_select selects records specified by - * conditions which has - * field=>value. For a successful query, it returns an - * array containing all records and fields that match the condition - * specified by conditions. - * - * If flags is set, - * pg_convert is applied to - * conditions with the specified flags. - * - * If mode is set, - * the return value will be in the form of an array - * with PGSQL_NUM, an associative array - * with PGSQL_ASSOC (default) or both - * with PGSQL_BOTH. - * - * By default pg_select passes raw values. Values - * must be escaped or PGSQL_DML_ESCAPE option must be - * specified. PGSQL_DML_ESCAPE quotes and escapes - * parameters/identifiers. Therefore, table/column names became case - * sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be retrieved. - * As of PHP 8.4.0, when an empty array is provided, no conditions will apply. - * Previously, the function failed with an empty conditions argument. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then the query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @param int $mode Any number of PGSQL_ASSOC, - * PGSQL_NUM or - * PGSQL_BOTH - * If PGSQL_ASSOC is set the return value will be an associative array, - * with PGSQL_NUM the return value will be an array, and - * with PGSQL_BOTH the return value will be both an associative and - * numerically indexed array. - * @return mixed Returns string if PGSQL_DML_STRING is passed - * via flags, otherwise it returns an array on success. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $conditions + * @param int $flags + * @param int $mode + * @return mixed * @throws PgsqlException * */ @@ -1297,14 +716,8 @@ function pg_select(\PgSql\Connection $connection, string $table_name, array $con /** - * Set the query results to be retrieved in chunk mode. - * The query results returned afterward will be divided into multiple chunks, - * each containing up to size rows. - * This function must be called before retrieving results with pg_get_result. - * This function is only available when libpq is version 17 or higher. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param int $size The number of rows to be retrieved in each chunk. + * @param \PgSql\Connection $connection + * @param int $size * @throws PgsqlException * */ @@ -1319,11 +732,8 @@ function pg_set_chunked_rows_size(\PgSql\Connection $connection, int $size): voi /** - * pg_socket returns a read only resource - * corresponding to the socket underlying the given PostgreSQL connection. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @return resource A socket resource on success. + * @param \PgSql\Connection $connection + * @return resource * @throws PgsqlException * */ @@ -1339,29 +749,10 @@ function pg_socket(\PgSql\Connection $connection) /** - * pg_trace enables tracing of the PostgreSQL - * frontend/backend communication to a file. To fully understand the results, - * one needs to be familiar with the internals of PostgreSQL - * communication protocol. - * - * For those who are not, it can still be - * useful for tracing errors in queries sent to the server, you - * could do for example grep '^To backend' - * trace.log and see what queries actually were sent to the - * PostgreSQL server. For more information, refer to the - * PostgreSQL Documentation. - * - * @param string $filename The full path and file name of the file in which to write the - * trace log. Same as in fopen. - * @param string $mode An optional file access mode, same as for fopen. - * @param \PgSql\Connection|null $connection An PgSql\Connection instance. - * When connection is NULL, the default connection is used. - * The default connection is the last connection made by pg_connect - * or pg_pconnect. - * As of PHP 8.1.0, using the default connection is deprecated. - * @param int $trace_mode An optional trace mode with the following constants - * PGSQL_TRACE_SUPPRESS_TIMESTAMPS and - * PGSQL_TRACE_REGRESS_MODE + * @param string $filename + * @param string $mode + * @param \PgSql\Connection|null $connection + * @param int $trace_mode * @throws PgsqlException * */ @@ -1382,39 +773,12 @@ function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $conn /** - * pg_update updates records that matches - * conditions with values. - * - * If flags is specified, - * pg_convert is applied to - * values with the specified flags. - * - * By default pg_update passes raw values. - * Values must be escaped or the PGSQL_DML_ESCAPE flag - * must be specified in flags. - * PGSQL_DML_ESCAPE quotes and escapes parameters/identifiers. - * Therefore, table/column names become case sensitive. - * - * Note that neither escape nor prepared query can protect LIKE query, - * JSON, Array, Regex, etc. These parameters should be handled - * according to their contexts. i.e. Escape/validate values. - * - * @param \PgSql\Connection $connection An PgSql\Connection instance. - * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, - * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, - * and whose values are the conditions that a row must meet to be updated. - * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, - * PGSQL_DML_NO_CONV, - * PGSQL_DML_ESCAPE, - * PGSQL_DML_EXEC, - * PGSQL_DML_ASYNC or - * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the - * flags then query string is returned. When PGSQL_DML_NO_CONV - * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed - * via flags. + * @param \PgSql\Connection $connection + * @param string $table_name + * @param array $values + * @param array $conditions + * @param int $flags + * @return mixed * @throws PgsqlException * */ diff --git a/generated/8.5/posix.php b/generated/8.5/posix.php index e7d7b2cb..ef0da47d 100644 --- a/generated/8.5/posix.php +++ b/generated/8.5/posix.php @@ -5,18 +5,8 @@ use Safe\Exceptions\PosixException; /** - * posix_access checks the user's permission of a file. - * - * @param string $filename The name of the file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -31,18 +21,8 @@ function posix_access(string $filename, int $flags = 0): void /** - * posix_eaccess checks the effective user's permission of a file - * - * @param string $filename The name of a file to be tested. - * @param int $flags A mask consisting of one or more of POSIX_F_OK, - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK. - * - * POSIX_R_OK, POSIX_W_OK and - * POSIX_X_OK request checking whether the file - * exists and has read, write and execute permissions, respectively. - * POSIX_F_OK just requests checking for the - * existence of the file. + * @param string $filename + * @param int $flags * @throws PosixException * */ @@ -57,55 +37,8 @@ function posix_eaccess(string $filename, int $flags = 0): void /** - * Gets information about a group provided its id. - * - * @param int $group_id The group id. - * @return array{name: string, passwd: string, gid: int, members: list} The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID, should be the same as the - * group_id parameter used when calling the - * function, and hence redundant. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $group_id + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -121,55 +54,8 @@ function posix_getgrgid(int $group_id): array /** - * Gets information about a group provided its name. - * - * @param string $name The name of the group - * @return array{name: string, passwd: string, gid: int, members: list} Returns an array on success. - * The array elements returned are: - * - * The group information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the name of the group. This is - * a short, usually less than 16 character "handle" of the - * group, not the real, full name. This should be the same as - * the name parameter used when - * calling the function, and hence redundant. - * - * - * - * passwd - * - * The passwd element contains the group's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * gid - * - * Group ID of the group in numeric form. - * - * - * - * members - * - * This consists of an array of - * string's for all the members in the group. - * - * - * - * - * + * @param string $name + * @return array{name: string, passwd: string, gid: int, members: list} * @throws PosixException * */ @@ -185,10 +71,7 @@ function posix_getgrnam(string $name): array /** - * Gets the group set of the current process. - * - * @return list Returns an array of integers containing the numeric group ids of the group - * set of the current process. + * @return list * @throws PosixException * */ @@ -204,9 +87,7 @@ function posix_getgroups(): array /** - * Returns the login name of the user owning the current process. - * - * @return string Returns the login name of the user, as a string. + * @return string * @throws PosixException * */ @@ -222,83 +103,8 @@ function posix_getlogin(): string /** - * Returns an array of information about the user - * referenced by the given user ID. - * - * @param int $user_id The user identifier. - * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} Returns an associative array with the following elements: - * - * The user information array - * - * - * - * Element - * Description - * - * - * - * - * name - * - * The name element contains the username of the user. This is - * a short, usually less than 16 character "handle" of the - * user, not the real, full name. - * - * - * - * passwd - * - * The passwd element contains the user's password in an - * encrypted format. Often, for example on a system employing - * "shadow" passwords, an asterisk is returned instead. - * - * - * - * uid - * - * User ID, should be the same as the - * user_id parameter used when calling the - * function, and hence redundant. - * - * - * - * gid - * - * The group ID of the user. Use the function - * posix_getgrgid to resolve the group - * name and a list of its members. - * - * - * - * gecos - * - * GECOS is an obsolete term that refers to the finger - * information field on a Honeywell batch processing system. - * The field, however, lives on, and its contents have been - * formalized by POSIX. The field contains a comma separated - * list containing the user's full name, office phone, office - * number, and home phone number. On most systems, only the - * user's full name is available. - * - * - * - * dir - * - * This element contains the absolute path to the - * home directory of the user. - * - * - * - * shell - * - * The shell element contains the absolute path to the - * executable of the user's default shell. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int $user_id + * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string} * @throws PosixException * */ @@ -314,105 +120,8 @@ function posix_getpwuid(int $user_id): array /** - * posix_getrlimit returns an array - * of information about the current resource's soft and hard limits. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int|null $resource If NULL, all current resource limits will be returned. - * Otherwise, specify the - * resource limit constant - * to retrieve a specific limit. - * @return array Returns an associative array of elements for each - * limit that is defined. Each limit has a soft and a hard limit. - * - * List of possible limits returned - * - * - * - * Limit name - * Limit description - * - * - * - * - * core - * - * The maximum size of the core file. When 0, not core files are - * created. When core files are larger than this size, they will - * be truncated at this size. - * - * - * - * totalmem - * - * The maximum size of the memory of the process, in bytes. - * - * - * - * virtualmem - * - * The maximum size of the virtual memory for the process, in bytes. - * - * - * - * data - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * stack - * - * The maximum size of the process stack, in bytes. - * - * - * - * rss - * - * The maximum number of virtual pages resident in RAM - * - * - * - * maxproc - * - * The maximum number of processes that can be created for the - * real user ID of the calling process. - * - * - * - * memlock - * - * The maximum number of bytes of memory that may be locked into RAM. - * - * - * - * cpu - * - * The amount of time the process is allowed to use the CPU. - * - * - * - * filesize - * - * The maximum size of the data segment for the process, in bytes. - * - * - * - * openfiles - * - * One more than the maximum number of open file descriptors. - * - * - * - * - * - * The function returns FALSE on failure. + * @param int|null $resource + * @return array * @throws PosixException * */ @@ -432,14 +141,8 @@ function posix_getrlimit(?int $resource = null): array /** - * Return the session id of the process process_id. - * The session id of a process is the process group id of the session leader. - * - * @param int $process_id The process identifier. If set to 0, the current process is - * assumed. If an invalid process_id is - * specified, then FALSE is returned and an error is set which - * can be checked with posix_get_last_error. - * @return int Returns the identifier, as an int. + * @param int $process_id + * @return int * @throws PosixException * */ @@ -455,10 +158,8 @@ function posix_getsid(int $process_id): int /** - * Calculates the group access list for the user specified in name. - * - * @param string $username The user to calculate the list for. - * @param int $group_id Typically the group number from the password file. + * @param string $username + * @param int $group_id * @throws PosixException * */ @@ -473,11 +174,8 @@ function posix_initgroups(string $username, int $group_id): void /** - * Send the signal signal to the process with - * the process identifier process_id. - * - * @param int $process_id The process identifier. - * @param int $signal One of the PCNTL signals constants. + * @param int $process_id + * @param int $signal * @throws PosixException * */ @@ -492,16 +190,8 @@ function posix_kill(int $process_id, int $signal): void /** - * posix_mkfifo creates a special - * FIFO file which exists in the file system and acts as - * a bidirectional communication endpoint for processes. - * - * @param string $filename Path to the FIFO file. - * @param int $permissions The second parameter permissions has to be given in - * octal notation (e.g. 0644). The permission of the newly created - * FIFO also depends on the setting of the current - * umask. The permissions of the created file are - * (mode & ~umask). + * @param string $filename + * @param int $permissions * @throws PosixException * */ @@ -516,17 +206,10 @@ function posix_mkfifo(string $filename, int $permissions): void /** - * Creates a special or ordinary file. - * - * @param string $filename The file to create - * @param int $flags This parameter is constructed by a bitwise OR between file type (one of - * the following constants: POSIX_S_IFREG, - * POSIX_S_IFCHR, POSIX_S_IFBLK, - * POSIX_S_IFIFO or - * POSIX_S_IFSOCK) and permissions. - * @param int $major The major device kernel identifier (required to pass when using - * S_IFCHR or S_IFBLK). - * @param int $minor The minor device kernel identifier. + * @param string $filename + * @param int $flags + * @param int $major + * @param int $minor * @throws PosixException * */ @@ -541,11 +224,7 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = /** - * Set the effective group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -560,11 +239,7 @@ function posix_setegid(int $group_id): void /** - * Set the effective user ID of the current process. This is a privileged - * function and needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -579,14 +254,7 @@ function posix_seteuid(int $user_id): void /** - * Set the real group ID of the current process. This is a - * privileged function and needs appropriate privileges (usually - * root) on the system to be able to perform this function. The - * appropriate order of function calls is - * posix_setgid first, - * posix_setuid last. - * - * @param int $group_id The group id. + * @param int $group_id * @throws PosixException * */ @@ -601,11 +269,8 @@ function posix_setgid(int $group_id): void /** - * Let the process process_id join the process group - * process_group_id. - * - * @param int $process_id The process id. - * @param int $process_group_id The process group id. + * @param int $process_id + * @param int $process_group_id * @throws PosixException * */ @@ -620,23 +285,9 @@ function posix_setpgid(int $process_id, int $process_group_id): void /** - * posix_setrlimit sets the soft and hard limits for a - * given system resource. - * - * - * Each resource has an associated soft and hard limit. The soft - * limit is the value that the kernel enforces for the corresponding - * resource. The hard limit acts as a ceiling for the soft limit. - * An unprivileged process may only set its soft limit to a value - * from 0 to the hard limit, and irreversibly lower its hard limit. - * - * @param int $resource The - * resource limit constant - * corresponding to the limit that is being set. - * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. - * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or - * POSIX_RLIMIT_INFINITY. + * @param int $resource + * @param int $soft_limit + * @param int $hard_limit * @throws PosixException * */ @@ -651,9 +302,7 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void /** - * Make the current process a session leader. - * - * @return int Returns the session ids. + * @return int * @throws PosixException * */ @@ -669,11 +318,7 @@ function posix_setsid(): int /** - * Set the real user ID of the current process. This is a privileged - * function that needs appropriate privileges (usually root) on - * the system to be able to perform this function. - * - * @param int $user_id The user id. + * @param int $user_id * @throws PosixException * */ @@ -688,39 +333,7 @@ function posix_setuid(int $user_id): void /** - * Gets information about the current CPU usage. - * - * @return array Returns a hash of strings with information about the current - * process CPU usage. The indices of the hash are: - * - * - * - * ticks - the number of clock ticks that have elapsed since - * reboot. - * - * - * - * - * utime - user time used by the current process. - * - * - * - * - * stime - system time used by the current process. - * - * - * - * - * cutime - user time used by current process and children. - * - * - * - * - * cstime - system time used by current process and children. - * - * - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ @@ -736,41 +349,7 @@ function posix_times(): array /** - * Gets information about the system. - * - * Posix requires that assumptions must not be made about the - * format of the values, e.g. the assumption that a release may contain - * three digits or anything else returned by this function. - * - * @return array Returns a hash of strings with information about the - * system. The indices of the hash are - * - * - * sysname - operating system name (e.g. Linux) - * - * - * nodename - system name (e.g. valiant) - * - * - * release - operating system release (e.g. 2.2.10) - * - * - * version - operating system version (e.g. #4 Tue Jul 20 - * 17:01:36 MEST 1999) - * - * - * machine - system architecture (e.g. i586) - * - * - * domainname - DNS domainname (e.g. example.com) - * - * - * - * domainname is a GNU extension and not part of POSIX.1, so this - * field is only available on GNU systems or when using the GNU - * libc. - * - * The function returns FALSE on failure. + * @return array * @throws PosixException * */ diff --git a/generated/8.5/ps.php b/generated/8.5/ps.php index 1eaa9774..912fbb4e 100644 --- a/generated/8.5/ps.php +++ b/generated/8.5/ps.php @@ -5,23 +5,12 @@ use Safe\Exceptions\PsException; /** - * Places a hyperlink at the given position pointing to a file program - * which is being started when clicked on. The hyperlink's source position - * is a rectangle - * with its lower left corner at (llx, lly) and its upper right corner at - * (urx, ury). The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The path of the program to be started, when the link is clicked on. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename * @throws PsException * */ @@ -36,30 +25,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur /** - * Places a hyperlink at the given position pointing to a page in the same - * document. Clicking on the link will jump to the given page. The first page - * in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param int $page The number of the page displayed when clicking on the link. - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param int $page + * @param string $dest * @throws PsException * */ @@ -74,31 +46,15 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury /** - * Adds a note at a certain position on the page. Notes are like little - * rectangular sheets with text on it, which can be placed anywhere on - * a page. They - * are shown either folded or unfolded. If folded, the specified icon - * is used as a placeholder. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $contents The text of the note. - * @param string $title The title of the note as displayed in the header of the note. - * @param string $icon The icon shown if the note is folded. This parameter can be set - * to comment, insert, - * note, paragraph, - * newparagraph, key, or - * help. - * @param int $open If open is unequal to zero the note will - * be shown unfolded after opening the document with a pdf viewer. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open * @throws PsException * */ @@ -113,32 +69,14 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str /** - * Places a hyperlink at the given position pointing to a second pdf document. - * Clicking on the link will branch to the document at the given page. The - * first page in a document has number 1. - * - * The hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and its upper - * right corner at (urx, ury). - * The rectangle has by default a thin blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $filename The name of the pdf document to be opened when clicking on - * this link. - * @param int $page The page number of the destination pdf document - * @param string $dest The parameter dest determines how the document - * is being viewed. It can be fitpage, - * fitwidth, fitheight, or - * fitbbox. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param int $page + * @param string $dest * @throws PsException * */ @@ -153,25 +91,12 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Places a hyperlink at the given position pointing to a web page. The - * hyperlink's source position is a rectangle with its lower left corner at - * (llx, lly) and - * its upper right corner at (urx, - * ury). The rectangle has by default a thin - * blue border. - * - * The note will not be visible if the document - * is printed or viewed but it will show up if the document is converted to - * pdf by either Acrobat Distiller™ or Ghostview. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $llx The x-coordinate of the lower left corner. - * @param float $lly The y-coordinate of the lower left corner. - * @param float $urx The x-coordinate of the upper right corner. - * @param float $ury The y-coordinate of the upper right corner. - * @param string $url The url of the hyperlink to be opened when clicking on - * this link, e.g. http://www.php.net. + * @param resource $psdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $url * @throws PsException * */ @@ -186,21 +111,12 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn counterclockwise (use - * ps_arcn to draw clockwise). The subpath added - * to the current path starts on the arc at angle alpha - * and ends on the arc at angle beta. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The start angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -215,21 +131,12 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ /** - * Draws a portion of a circle with at middle point at - * (x, y). The arc starts at an - * angle of alpha and ends at an angle of - * beta. It is drawn clockwise (use - * ps_arc to draw counterclockwise). The subpath added to - * the current path starts on the arc at angle beta and - * ends on the arc at angle alpha. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle - * @param float $alpha The starting angle given in degrees. - * @param float $beta The end angle given in degrees. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius + * @param float $alpha + * @param float $beta * @throws PsException * */ @@ -244,43 +151,9 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float /** - * Starts a new page. Although the parameters width - * and height imply a different page size for each - * page, this is not possible in PostScript. The first call of - * ps_begin_page will set the page size for the whole - * document. Consecutive calls will have no effect, except for creating a new - * page. The situation is different if you intent to convert the PostScript - * document into PDF. This function places pdfmarks into the document which - * can set the size for each page indiviually. The resulting PDF document will - * have different page sizes. - * - * Though PostScript does not know different page sizes, pslib places - * a bounding box for each page into the document. This size is evaluated - * by some PostScript viewers and will have precedence over the BoundingBox - * in the Header of the document. This can lead to unexpected results when - * you set a BoundingBox whose lower left corner is not (0, 0), because the - * bounding box of the page will always have a lower left corner (0, 0) - * and overwrites the global setting. - * - * Each page is encapsulated into save/restore. This means, that most of the - * settings made on one page will not be retained on the next page. - * - * If there is up to the first call of ps_begin_page no - * call of ps_findfont, then the header of the PostScript - * document will be output and the bounding box will be set to the size of - * the first page. The lower left corner of the bounding box is set to (0, 0). - * If ps_findfont was called before, then the - * header has been output already, and the document will not have a valid - * bounding box. In order to prevent this, one should call - * ps_set_info to set the info field - * BoundingBox and possibly Orientation - * before any ps_findfont or - * ps_begin_page calls. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the page in pixel, e.g. 596 for A4 format. - * @param float $height The height of the page in pixel, e.g. 842 for A4 format. + * @param resource $psdoc + * @param float $width + * @param float $height * @throws PsException * */ @@ -295,21 +168,13 @@ function ps_begin_page($psdoc, float $width, float $height): void /** - * Starts a new pattern. A pattern is like a page containing e.g. a drawing - * which can be used for filling areas. It is used like a color by calling - * ps_setcolor and setting the color space to - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the pattern in pixel. - * @param float $height The height of the pattern in pixel. - * @param float $xstep The distance in pixel of placements of the pattern in - * horizontal direction. - * @param float $ystep The distance in pixel of placements of the pattern in - * vertical direction. - * @param int $painttype Must be 1 or 2. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param float $width + * @param float $height + * @param float $xstep + * @param float $ystep + * @param int $painttype + * @return int * @throws PsException * */ @@ -325,18 +190,10 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo /** - * Starts a new template. A template is called a form in the postscript - * language. It is created similar to a pattern but used like an image. - * Templates are often used for drawings which are placed several times - * through out the document, e.g. like a company logo. All drawing functions - * may be used within a template. The template will not be drawn until - * it is placed by ps_place_image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of the template in pixel. - * @param float $height The height of the template in pixel. - * @return int Returns TRUE on success. + * @param resource $psdoc + * @param float $width + * @param float $height + * @return int * @throws PsException * */ @@ -352,20 +209,10 @@ function ps_begin_template($psdoc, float $width, float $height): int /** - * Draws a circle with its middle point at (x, - * y). The circle starts and ends at position - * (x+radius, - * y). If this function is called outside a path it - * will start a new path. If it is called within a path it will add the circle - * as a subpath. If the last drawing operation does not end in point - * (x+radius, - * y) then there will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x The x-coordinate of the circle's middle point. - * @param float $y The y-coordinate of the circle's middle point. - * @param float $radius The radius of the circle + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $radius * @throws PsException * */ @@ -380,11 +227,7 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** - * Takes the current path and uses it to define the border of a clipping area. - * Everything drawn outside of that area will not be visible. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -399,14 +242,8 @@ function ps_clip($psdoc): void /** - * Closes an image and frees its resources. Once an image is closed - * it cannot be used anymore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid Resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. + * @param resource $psdoc + * @param int $imageid * @throws PsException * */ @@ -421,17 +258,7 @@ function ps_close_image($psdoc, int $imageid): void /** - * Closes the PostScript document. - * - * This function writes the trailer of the PostScript document. - * It also writes the bookmark tree. ps_close does - * not free any resources, which is done by ps_delete. - * - * This function is also called by ps_delete if it - * has not been called before. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -446,11 +273,7 @@ function ps_close($psdoc): void /** - * Connects the last point with first point of a path and draws the resulting - * closed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -465,11 +288,7 @@ function ps_closepath_stroke($psdoc): void /** - * Connects the last point with the first point of a path. The resulting - * path can be used for stroking, filling, clipping, etc.. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -484,15 +303,8 @@ function ps_closepath($psdoc): void /** - * Output a text one line below the last line. The line spacing is - * taken from the value "leading" which must be set with - * ps_set_value. The actual position of the - * text is determined by the values "textx" and "texty" which can be requested - * with ps_get_value - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -507,17 +319,13 @@ function ps_continue_text($psdoc, string $text): void /** - * Add a section of a cubic Bézier curve described by the three given control - * points to the current path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x1 x-coordinate of first control point. - * @param float $y1 y-coordinate of first control point. - * @param float $x2 x-coordinate of second control point. - * @param float $y2 y-coordinate of second control point. - * @param float $x3 x-coordinate of third control point. - * @param float $y3 y-coordinate of third control point. + * @param resource $psdoc + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PsException * */ @@ -532,15 +340,7 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x /** - * Mainly frees memory used by the document. Also closes a file, if it was not - * closed before with ps_close. You should in any case - * close the file with ps_close before, because - * ps_close not just closes the file but also outputs a - * trailor containing PostScript comments like the number of pages in the - * document and adding the bookmark hierarchy. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -555,13 +355,7 @@ function ps_delete($psdoc): void /** - * Ends a page which was started with ps_begin_page. - * Ending a page will leave the current drawing context, which e.g. requires - * to reload fonts if they were loading within the page, and to set many - * other drawing parameters like the line width, or color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -576,12 +370,7 @@ function ps_end_page($psdoc): void /** - * Ends a pattern which was started with ps_begin_pattern. - * Once a pattern has been ended, it can be used like a color to fill - * areas. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -596,11 +385,7 @@ function ps_end_pattern($psdoc): void /** - * Ends a template which was started with ps_begin_template. - * Once a template has been ended, it can be used like an image. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -615,11 +400,7 @@ function ps_end_template($psdoc): void /** - * Fills and draws the path constructed with previously called drawing - * functions like ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -634,11 +415,7 @@ function ps_fill_stroke($psdoc): void /** - * Fills the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -653,128 +430,10 @@ function ps_fill($psdoc): void /** - * Gets several parameters which were directly set by - * ps_set_parameter or indirectly by one of the other - * functions. Parameters are by definition string - * values. This function cannot be used to retrieve resources which were also - * set by ps_set_parameter. - * - * The parameter name can have the following values. - * - * - * - * fontname - * - * - * The name of the currently active font or the font whose - * identifier is passed in parameter modifier. - * - * - * - * - * fontencoding - * - * - * The encoding of the currently active font. - * - * - * - * - * dottedversion - * - * - * The version of the underlying pslib library in the format - * <major>.<minor>.<subminor> - * - * - * - * - * scope - * - * - * The current drawing scope. Can be object, document, null, page, - * pattern, path, template, prolog, font, glyph. - * - * - * - * - * ligaturedisolvechar - * - * - * The character which dissolves a ligature. If your are using a font - * which contains the ligature `ff' and `|' is the char to dissolve the - * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * - * imageencoding - * - * - * The encoding used for encoding images. Can be either - * hex or 85. hex encoding - * uses two bytes in the postscript file each byte in the image. - * 85 stand for Ascii85 encoding. - * - * - * - * - * linenumbermode - * - * - * Set to paragraph if lines are numbered - * within a paragraph or box if they are - * numbered within the surrounding box. - * - * - * - * - * linebreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will add a line - * break. - * - * - * - * - * parbreak - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE a carriage return will start - * a new paragraph. - * - * - * - * - * hyphenation - * - * - * Only used if text is output with ps_show_boxed. - * If set to TRUE the paragraph will be hyphenated - * if a hypen dictionary is set and exists. - * - * - * - * - * hyphendict - * - * - * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name Name of the parameter. - * @param float $modifier An identifier needed if a parameter of a resource is requested, - * e.g. the size of an image. In such a case the resource id is - * passed. - * @return string Returns the value of the parameter. + * @param resource $psdoc + * @param string $name + * @param float $modifier + * @return string * @throws PsException * */ @@ -794,23 +453,9 @@ function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string /** - * Hyphenates the passed word. ps_hyphenate evaluates the - * value hyphenminchars (set by ps_set_value) and - * the parameter hyphendict (set by ps_set_parameter). - * hyphendict must be set before calling this function. - * - * This function requires the locale category LC_CTYPE to be set properly. - * This is done when the extension is initialized by using the environment - * variables. On Unix systems read the man page of locale for more information. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text text should not contain any non alpha - * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in - * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in - * the text. + * @param resource $psdoc + * @param string $text + * @return array * @throws PsException * */ @@ -826,12 +471,7 @@ function ps_hyphenate($psdoc, string $text): array /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param string $file * @throws PsException * @@ -847,14 +487,9 @@ function ps_include_file($psdoc, string $file): void /** - * Adds a straight line from the current point to the given coordinates to the - * current path. Use ps_moveto to set the starting point - * of the line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the end point of the line. - * @param float $y y-coordinate of the end point of the line. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -869,15 +504,9 @@ function ps_lineto($psdoc, float $x, float $y): void /** - * Sets the current point to new coordinates. If this is the first call of - * ps_moveto after a previous path has been ended then it - * will start a new path. If this function is called in the middle of a path - * it will just set the current point and start a subpath. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the point to move to. - * @param float $y y-coordinate of the point to move to. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -892,13 +521,7 @@ function ps_moveto($psdoc, float $x, float $y): void /** - * Creates a new document instance. It does not create the file on disk or in - * memory, it just sets up everything. ps_new is usually - * followed by a call of ps_open_file to actually create - * the postscript document. - * - * @return resource Resource of PostScript document. The return value - * is passed to all other functions as the first argument. + * @return resource * @throws PsException * */ @@ -914,14 +537,8 @@ function ps_new() /** - * Creates a new file on disk and writes the PostScript document into it. The - * file will be closed when ps_close is called. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $filename The name of the postscript file. - * If filename is not passed the document will be - * created in memory and all output will go straight to the browser. + * @param resource $psdoc + * @param string $filename * @throws PsException * */ @@ -940,20 +557,11 @@ function ps_open_file($psdoc, ?string $filename = null): void /** - * Places a formerly loaded image on the page. The image can be scaled. - * If the image shall be rotated as well, you will have to rotate the - * coordinate system before with ps_rotate. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by - * ps_open_image or - * ps_open_image_file. - * @param float $x x-coordinate of the lower left corner of the image. - * @param float $y y-coordinate of the lower left corner of the image. - * @param float $scale The scaling factor for the image. A scale of 1.0 will result - * in a resolution of 72 dpi, because each pixel is equivalent to - * 1 point. + * @param resource $psdoc + * @param int $imageid + * @param float $x + * @param float $y + * @param float $scale * @throws PsException * */ @@ -968,19 +576,11 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): /** - * Draws a rectangle with its lower left corner at (x, - * y). The rectangle starts and ends in its lower left - * corner. If this function is called outside a path it will start a new path. - * If it is called within a path it will add the rectangle as a subpath. If - * the last drawing operation does not end in the lower left corner then there - * will be a gap in the path. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the lower left corner of the rectangle. - * @param float $y y-coordinate of the lower left corner of the rectangle. - * @param float $width The width of the image. - * @param float $height The height of the image. + * @param resource $psdoc + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PsException * */ @@ -995,14 +595,7 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void /** - * Restores a previously saved graphics context. Any call of - * ps_save must be accompanied by a call to - * ps_restore. All coordinate transformations, line - * style settings, color settings, etc. are being restored to the state - * before the call of ps_save. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1017,11 +610,8 @@ function ps_restore($psdoc): void /** - * Sets the rotation of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $rot Angle of rotation in degree. + * @param resource $psdoc + * @param float $rot * @throws PsException * */ @@ -1036,12 +626,7 @@ function ps_rotate($psdoc, float $rot): void /** - * Saves the current graphics context, containing colors, translation and - * rotation settings and some more. A saved context can be restored with - * ps_restore. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1056,12 +641,9 @@ function ps_save($psdoc): void /** - * Sets horizontal and vertical scaling of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x Scaling factor in horizontal direction. - * @param float $y Scaling factor in vertical direction. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1076,18 +658,10 @@ function ps_scale($psdoc, float $x, float $y): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the color of the rectangle's border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $red The red component of the border color. - * @param float $green The green component of the border color. - * @param float $blue The blue component of the border color. + * @param resource $psdoc + * @param float $red + * @param float $green + * @param float $blue * @throws PsException * */ @@ -1102,18 +676,9 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the length of the black and white portion of a - * dashed border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $black The length of the dash. - * @param float $white The length of the gap between dashes. + * @param resource $psdoc + * @param float $black + * @param float $white * @throws PsException * */ @@ -1128,18 +693,9 @@ function ps_set_border_dash($psdoc, float $black, float $white): void /** - * Links added with one of the functions ps_add_weblink, - * ps_add_pdflink, etc. will be displayed with a - * surounded rectangle when the postscript document is converted to - * pdf and viewed in a pdf viewer. This rectangle is not visible in - * the postscript document. - * This function sets the appearance and width of the border line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $style style can be solid or - * dashed. - * @param float $width The line width of the border. + * @param resource $psdoc + * @param string $style + * @param float $width * @throws PsException * */ @@ -1154,39 +710,9 @@ function ps_set_border_style($psdoc, string $style, float $width): void /** - * Sets certain information fields of the document. This fields will be shown - * as a comment in the header of the PostScript file. If the document is - * converted to pdf this fields will also be used for the document - * information. - * - * The BoundingBox is usually set to the value given to the - * first page. This only works if ps_findfont has not - * been called before. In such cases the BoundingBox would be left unset - * unless you set it explicitly with this function. - * - * This function will have no effect anymore when the header of the postscript - * file has been already written. It must be called before the first page - * or the first call of ps_findfont. - * - * @param resource $p Resource identifier of the postscript file - * as returned by ps_new. - * @param string $key The name of the information field to set. The values which can be - * set are Keywords, Subject, - * Title, Creator, - * Author, BoundingBox, and - * Orientation. Be aware that some of them has a - * meaning to PostScript viewers. - * @param string $val The value of the information field. The field - * Orientation can be set to either - * Portrait or Landscape. The - * BoundingBox is a string consisting of four numbers. - * The first two numbers are the coordinates of the lower left corner of - * the page. The last two numbers are the coordinates of the upper - * right corner. - * - * Up to version 0.2.6 of pslib, the BoundingBox and Orientation - * will be overwritten by ps_begin_page, - * unless ps_findfont has been called before. + * @param resource $p + * @param string $key + * @param string $val * @throws PsException * */ @@ -1201,13 +727,9 @@ function ps_set_info($p, string $key, string $val): void /** - * Sets several parameters which are used by many functions. Parameters are by - * definition string values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name For a list of possible names see ps_get_parameter. - * @param string $value The value of the parameter. + * @param resource $psdoc + * @param string $name + * @param string $value * @throws PsException * */ @@ -1222,19 +744,9 @@ function ps_set_parameter($psdoc, string $name, string $value): void /** - * Set the position for the next text output. You may alternatively set the x - * and y value separately by calling ps_set_value and - * choosing textx respectively texty as - * the value name. - * - * If you want to output text at a certain position it is more convenient - * to use ps_show_xy instead of setting the text position - * and calling ps_show. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the new text position. - * @param float $y y-coordinate of the new text position. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ @@ -1249,65 +761,9 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** - * Sets several values which are used by many functions. Parameters are by - * definition float values. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $name The name can be one of the following: - * - * - * textrendering - * - * - * The way how text is shown. - * - * - * - * - * textx - * - * - * The x coordinate for text output. - * - * - * - * - * texty - * - * - * The y coordinate for text output. - * - * - * - * - * wordspacing - * - * - * The distance between words relative to the width of a space. - * - * - * - * - * leading - * - * - * The distance between lines in pixels. - * - * - * - * - * - * The way how text is shown. - * - * The x coordinate for text output. - * - * The y coordinate for text output. - * - * The distance between words relative to the width of a space. - * - * The distance between lines in pixels. - * @param float $value The way how text is shown. + * @param resource $psdoc + * @param string $name + * @param float $value * @throws PsException * */ @@ -1322,27 +778,13 @@ function ps_set_value($psdoc, string $name, float $value): void /** - * Sets the color for drawing, filling, or both. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The parameter type can be - * both, fill, or - * fillstroke. - * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, - * spot, pattern. Depending on the - * colorspace either only the first, the first three or all parameters - * will be used. - * @param float $c1 Depending on the colorspace this is either the red component (rgb), - * the cyan component (cmyk), the gray value (gray), the identifier of - * the spot color or the identifier of the pattern. - * @param float $c2 Depending on the colorspace this is either the green component (rgb), - * the magenta component (cmyk). - * @param float $c3 Depending on the colorspace this is either the blue component (rgb), - * the yellow component (cmyk). - * @param float $c4 This must only be set in cmyk colorspace and specifies the black - * component. + * @param resource $psdoc + * @param string $type + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PsException * */ @@ -1357,12 +799,9 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** - * Sets the length of the black and white portions of a dashed line. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $on The length of the dash. - * @param float $off The length of the gap between dashes. + * @param resource $psdoc + * @param float $on + * @param float $off * @throws PsException * */ @@ -1377,13 +816,8 @@ function ps_setdash($psdoc, float $on, float $off): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The value must be between 0.2 and 1. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1398,14 +832,9 @@ function ps_setflat($psdoc, float $value): void /** - * Sets a font, which has to be loaded before with - * ps_findfont. Outputting text without setting a font - * results in an error. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $fontid The font identifier as returned by ps_findfont. - * @param float $size The size of the font. + * @param resource $psdoc + * @param int $fontid + * @param float $size * @throws PsException * */ @@ -1420,11 +849,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** - * Sets the gray value for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $gray The value must be between 0 (white) and 1 (black). + * @param resource $psdoc + * @param float $gray * @throws PsException * */ @@ -1439,14 +865,8 @@ function ps_setgray($psdoc, float $gray): void /** - * Sets how line ends look like. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The type of line ends. Possible values are - * PS_LINECAP_BUTT, - * PS_LINECAP_ROUND, or - * PS_LINECAP_SQUARED. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1461,14 +881,8 @@ function ps_setlinecap($psdoc, int $type): void /** - * Sets how lines are joined. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $type The way lines are joined. Possible values are - * PS_LINEJOIN_MITER, - * PS_LINEJOIN_ROUND, or - * PS_LINEJOIN_BEVEL. + * @param resource $psdoc + * @param int $type * @throws PsException * */ @@ -1483,11 +897,8 @@ function ps_setlinejoin($psdoc, int $type): void /** - * Sets the line width for all following drawing operations. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $width The width of lines in points. + * @param resource $psdoc + * @param float $width * @throws PsException * */ @@ -1502,16 +913,8 @@ function ps_setlinewidth($psdoc, float $width): void /** - * If two lines join in a small angle and the line join is set to - * PS_LINEJOIN_MITER, then - * the resulting spike will be very long. The miter limit is the maximum - * ratio of the miter length (the length of the spike) and the line width. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $value The maximum ratio between the miter length and the line width. Larger - * values (> 10) will result in very long spikes when two lines meet - * in a small angle. Keep the default unless you know what you are doing. + * @param resource $psdoc + * @param float $value * @throws PsException * */ @@ -1526,12 +929,7 @@ function ps_setmiterlimit($psdoc, float $value): void /** - * This function is - * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @param int $mode * @throws PsException * @@ -1547,14 +945,8 @@ function ps_setoverprintmode($psdoc, int $mode): void /** - * Sets the length of the black and white portions of a dashed line. - * ps_setpolydash is used to set more complicated dash - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $arr arr is a list of length elements alternately for - * the black and white portion. + * @param resource $psdoc + * @param float $arr * @throws PsException * */ @@ -1569,16 +961,10 @@ function ps_setpolydash($psdoc, float $arr): void /** - * Creates a pattern based on a shading, which has to be created before with - * ps_shading. Shading patterns can be used like regular - * patterns. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. - * @param string $optlist This argument is not currently used. - * @return int The identifier of the pattern. + * @param resource $psdoc + * @param int $shadingid + * @param string $optlist + * @return int * @throws PsException * */ @@ -1594,36 +980,18 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** - * Creates a shading, which can be used by ps_shfill or - * ps_shading_pattern. - * - * The color of the shading can be in any color space except for - * pattern. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $type The type of shading can be either radial or - * axial. Each shading starts with the current fill - * color and ends with the given color values passed in the parameters - * c1 to c4 - * (see ps_setcolor for their meaning). - * @param float $x0 The coordinates x0, y0, - * x1, y1 are the start and - * end point of the shading. If the type of shading is - * radial the two points are the middle points of - * a starting and ending circle. - * @param float $y0 See ps_setcolor for their meaning. - * @param float $x1 If the shading is of type radial the - * optlist must also contain the parameters - * r0 and r1 with the radius of the - * start and end circle. + * @param resource $psdoc + * @param string $type + * @param float $x0 + * @param float $y0 + * @param float $x1 * @param float $y1 * @param float $c1 * @param float $c2 * @param float $c3 * @param float $c4 * @param string $optlist - * @return int Returns the identifier of the pattern. + * @return int * @throws PsException * */ @@ -1639,15 +1007,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float /** - * Fills an area with a shading, which has to be created before with - * ps_shading. This is an alternative way to creating - * a pattern from a shading ps_shading_pattern and using - * the pattern as the filling color. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $shadingid The identifier of a shading previously created with - * ps_shading. + * @param resource $psdoc + * @param int $shadingid * @throws PsException * */ @@ -1662,13 +1023,10 @@ function ps_shfill($psdoc, int $shadingid): void /** - * Output a text at the given text position. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param float $x x-coordinate of the lower left corner of the box surrounding the text. - * @param float $y y-coordinate of the lower left corner of the box surrounding the text. + * @param resource $psdoc + * @param string $text + * @param float $x + * @param float $y * @throws PsException * */ @@ -1683,10 +1041,6 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param resource $psdoc * @param string $text * @param int $len @@ -1706,19 +1060,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) /** - * Output a text at the current text position. The text position can be set - * by storing the x and y coordinates into the values textx - * and texty with the function - * ps_set_value. The function will issue an - * error if a font was not set before with ps_setfont. - * - * ps_show evaluates the following parameters and values - * as set by ps_set_parameter and - * ps_set_value. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. + * @param resource $psdoc + * @param string $text * @throws PsException * */ @@ -1733,12 +1076,9 @@ function ps_show($psdoc, string $text): void /** - * Output text at the current position. Do not print more than len characters. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param string $text The text to be output. - * @param int $len The maximum number of characters to print. + * @param resource $psdoc + * @param string $text + * @param int $len * @throws PsException * */ @@ -1753,11 +1093,7 @@ function ps_show2($psdoc, string $text, int $len): void /** - * Draws the path constructed with previously called drawing functions like - * ps_lineto. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. + * @param resource $psdoc * @throws PsException * */ @@ -1772,13 +1108,8 @@ function ps_stroke($psdoc): void /** - * Output the glyph at position ord in the font - * encoding vector of the current font. The font encoding for a font can be - * set when loading the font with ps_findfont. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param int $ord The position of the glyph in the font encoding vector. + * @param resource $psdoc + * @param int $ord * @throws PsException * */ @@ -1793,12 +1124,9 @@ function ps_symbol($psdoc, int $ord): void /** - * Sets a new initial point of the coordinate system. - * - * @param resource $psdoc Resource identifier of the postscript file - * as returned by ps_new. - * @param float $x x-coordinate of the origin of the translated coordinate system. - * @param float $y y-coordinate of the origin of the translated coordinate system. + * @param resource $psdoc + * @param float $x + * @param float $y * @throws PsException * */ diff --git a/generated/8.5/pspell.php b/generated/8.5/pspell.php index b06330ba..36db793d 100644 --- a/generated/8.5/pspell.php +++ b/generated/8.5/pspell.php @@ -5,14 +5,8 @@ use Safe\Exceptions\PspellException; /** - * pspell_add_to_personal adds a word to the personal - * wordlist. If you used pspell_new_config with - * pspell_config_personal to open the dictionary, - * you can save the wordlist later with - * pspell_save_wordlist. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -27,12 +21,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void /** - * pspell_add_to_session adds a word to the wordlist - * associated with the current session. It is very similar to - * pspell_add_to_personal - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $word The added word. + * @param int $dictionary + * @param string $word * @throws PspellException * */ @@ -47,11 +37,7 @@ function pspell_add_to_session(int $dictionary, string $word): void /** - * pspell_clear_session clears the current session. - * The current wordlist becomes blank, and, for example, if you try to save - * it with pspell_save_wordlist, nothing happens. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -66,35 +52,11 @@ function pspell_clear_session(int $dictionary): void /** - * Create a config used to open a dictionary. - * - * pspell_config_create has a very similar syntax to - * pspell_new. In fact, using - * pspell_config_create immediately followed by - * pspell_new_config will produce the exact same result. - * However, after creating a new config, you can also use - * pspell_config_* functions before calling - * pspell_new_config to take advantage of some - * advanced functionality. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @return false|int Returns an PSpell\Config instance. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @return false|int * */ function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = "") @@ -106,10 +68,6 @@ function pspell_config_create(string $language, string $spelling = "", string $j /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -126,10 +84,6 @@ function pspell_config_data_dir(int $config, string $directory): void /** - * This function is - * currently not documented; only its argument list is available. - * - * * @param int $config * @param string $directory * @throws PspellException @@ -146,12 +100,8 @@ function pspell_config_dict_dir(int $config, string $directory): void /** - * pspell_config_ignore should be used on a config - * before calling pspell_new_config. This function - * allows short words to be skipped by the spell checker. - * - * @param int $config An PSpell\Config instance. - * @param int $min_length Words less than min_length characters will be skipped. + * @param int $config + * @param int $min_length * @throws PspellException * */ @@ -166,33 +116,8 @@ function pspell_config_ignore(int $config, int $min_length): void /** - * pspell_config_mode should be used on a config - * before calling pspell_new_config. This function - * determines how many suggestions will be returned by - * pspell_suggest. - * - * @param int $config An PSpell\Config instance. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * + * @param int $config + * @param int $mode * @throws PspellException * */ @@ -207,17 +132,8 @@ function pspell_config_mode(int $config, int $mode): void /** - * Set a file that contains personal wordlist. The personal wordlist will be - * loaded and used in addition to the standard one after you call - * pspell_new_config. The file is also the file where - * pspell_save_wordlist will save personal wordlist to. - * - * pspell_config_personal should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The personal wordlist. If the file does not exist, it will be created. - * The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -232,19 +148,8 @@ function pspell_config_personal(int $config, string $filename): void /** - * Set a file that contains replacement pairs. - * - * The replacement pairs improve the quality of the spellchecker. When a word - * is misspelled, and a proper suggestion was not found in the list, - * pspell_store_replacement can be used to store a - * replacement pair and then pspell_save_wordlist to - * save the wordlist along with the replacement pairs. - * - * pspell_config_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody). + * @param int $config + * @param string $filename * @throws PspellException * */ @@ -259,18 +164,8 @@ function pspell_config_repl(int $config, string $filename): void /** - * This function determines whether run-together words will be treated as - * legal compounds. That is, "thecat" will be a legal compound, although - * there should be a space between the two words. Changing this setting only - * affects the results returned by pspell_check; - * pspell_suggest will still return suggestions. - * - * pspell_config_runtogether should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $allow TRUE if run-together words should be treated as legal compounds, - * FALSE otherwise. + * @param int $config + * @param bool $allow * @throws PspellException * */ @@ -285,19 +180,8 @@ function pspell_config_runtogether(int $config, bool $allow): void /** - * pspell_config_save_repl determines whether - * pspell_save_wordlist will save the replacement pairs - * along with the wordlist. Usually there is no need to use this function - * because if pspell_config_repl is used, the - * replacement pairs will be saved by - * pspell_save_wordlist anyway, and if it is not, - * the replacement pairs will not be saved. - * - * pspell_config_save_repl should be used on a config - * before calling pspell_new_config. - * - * @param int $config An PSpell\Config instance. - * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise. + * @param int $config + * @param bool $save * @throws PspellException * */ @@ -312,17 +196,8 @@ function pspell_config_save_repl(int $config, bool $save): void /** - * pspell_new_config opens up a new dictionary with - * settings specified in a config, created with - * pspell_config_create and modified with - * pspell_config_* functions. This method provides you - * with the most flexibility and has all the functionality provided by - * pspell_new and - * pspell_new_personal. - * - * @param int $config The config parameter is the one returned by - * pspell_config_create when the config was created. - * @return int Returns an PSpell\Dictionary instance on success + * @param int $config + * @return int * @throws PspellException * */ @@ -338,61 +213,13 @@ function pspell_new_config(int $config): int /** - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $filename The file where words added to the personal list will be stored. - * It should be an absolute filename beginning with '/' because otherwise - * it will be relative to $HOME, which is "/root" for most systems, and - * is probably not what you want. - * @param string $language The language code which consists of the two letter ISO 639 language - * code and an optional two letter ISO 3166 country code after a dash - * or underscore. - * @param string $spelling The requested spelling for languages with more than one spelling such - * as English. Known values are 'american', 'british', and 'canadian'. - * @param string $jargon Extra information to distinguish two different words lists that have - * the same language and spelling parameters. - * @param string $encoding The encoding that words are expected to be in. Valid values are - * utf-8, iso8859-*, - * koi8-r, viscii, - * cp1252, machine unsigned 16, - * machine unsigned 32. - * @param int $mode The mode in which spellchecker will work. There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $filename + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -408,64 +235,12 @@ function pspell_new_personal(string $filename, string $language, string $spellin /** - * pspell_new opens up a new dictionary and - * returns an PSpell\Dictionary instance for use in other pspell - * functions. - * - * For more information and examples, check out inline manual pspell - * website:http://aspell.net/. - * - * @param string $language The language parameter is the language code which consists of the - * two letter ISO 639 language code and an optional two letter ISO - * 3166 country code after a dash or underscore. - * @param string $spelling The spelling parameter is the requested spelling for languages - * with more than one spelling such as English. Known values are - * 'american', 'british', and 'canadian'. - * @param string $jargon The jargon parameter contains extra information to distinguish - * two different words lists that have the same language and - * spelling parameters. - * @param string $encoding The encoding parameter is the encoding that words are expected to - * be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', - * 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned - * 32'. This parameter is largely untested, so be careful when - * using. - * @param int $mode The mode parameter is the mode in which spellchecker will work. - * There are several modes available: - * - * - * - * PSPELL_FAST - Fast mode (least number of - * suggestions) - * - * - * - * - * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * - * PSPELL_BAD_SPELLERS - Slow mode (a lot of - * suggestions) - * - * - * - * - * PSPELL_RUN_TOGETHER - Consider run-together words - * as legal compounds. That is, "thecat" will be a legal compound, - * although there should be a space between the two words. Changing this - * setting only affects the results returned by - * pspell_check; pspell_suggest - * will still return suggestions. - * - * - * - * Mode is a bitmask constructed from different constants listed above. - * However, PSPELL_FAST, - * PSPELL_NORMAL and - * PSPELL_BAD_SPELLERS are mutually exclusive, so you - * should select only one of them. - * @return int Returns an PSpell\Dictionary instance on success. + * @param string $language + * @param string $spelling + * @param string $jargon + * @param string $encoding + * @param int $mode + * @return int * @throws PspellException * */ @@ -481,12 +256,7 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" /** - * pspell_save_wordlist saves the personal wordlist from - * the current session. The location of files to be saved specified with - * pspell_config_personal and (optionally) - * pspell_config_repl. - * - * @param int $dictionary An PSpell\Dictionary instance. + * @param int $dictionary * @throws PspellException * */ @@ -501,20 +271,9 @@ function pspell_save_wordlist(int $dictionary): void /** - * pspell_store_replacement stores a replacement pair for - * a word, so that replacement can be returned by - * pspell_suggest later. In order to be able to take - * advantage of this function, you have to use - * pspell_new_personal to open the dictionary. In order - * to permanently save the replacement pair, you have to - * use pspell_config_personal and - * pspell_config_repl to set the path where to save your - * custom wordlists, and then use pspell_save_wordlist - * for the changes to be written to disk. - * - * @param int $dictionary An PSpell\Dictionary instance. - * @param string $misspelled The misspelled word. - * @param string $correct The fixed spelling for the misspelled word. + * @param int $dictionary + * @param string $misspelled + * @param string $correct * @throws PspellException * */ diff --git a/generated/8.5/readline.php b/generated/8.5/readline.php index 892a9f95..cef74337 100644 --- a/generated/8.5/readline.php +++ b/generated/8.5/readline.php @@ -5,10 +5,8 @@ use Safe\Exceptions\ReadlineException; /** - * This function adds a line to the command line history. - * - * @param string $prompt The line to be added in the history. - * @return bool Always returns TRUE. + * @param string $prompt + * @return bool * */ function readline_add_history(string $prompt): bool @@ -20,20 +18,9 @@ function readline_add_history(string $prompt): bool /** - * Sets up a readline callback interface then prints - * prompt and immediately returns. - * Calling this function twice without removing the previous - * callback interface will automatically and conveniently overwrite the old - * interface. - * - * The callback feature is useful when combined with - * stream_select as it allows interleaving of IO and - * user input, unlike readline. - * - * @param string $prompt The prompt message. - * @param callable $callback The callback function takes one parameter; the - * user input returned. - * @return bool Always returns TRUE. + * @param string $prompt + * @param callable $callback + * @return bool * */ function readline_callback_handler_install(string $prompt, callable $callback): bool @@ -45,9 +32,7 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** - * This function clears the entire command line history. - * - * @return bool Always returns TRUE. + * @return bool * */ function readline_clear_history(): bool @@ -59,11 +44,7 @@ function readline_clear_history(): bool /** - * This function registers a completion function. This is the same kind of - * functionality you'd get if you hit your tab key while using Bash. - * - * @param callable $callback You must supply the name of an existing function which accepts a - * partial command line and returns an array of possible matches. + * @param callable $callback * @throws ReadlineException * */ @@ -78,9 +59,7 @@ function readline_completion_function(callable $callback): void /** - * This function reads a command history from a file. - * - * @param null|string $filename Path to the filename containing the command history. + * @param null|string $filename * @throws ReadlineException * */ @@ -99,9 +78,7 @@ function readline_read_history(?string $filename = null): void /** - * This function writes the command history to a file. - * - * @param null|string $filename Path to the saved file. + * @param null|string $filename * @throws ReadlineException * */ diff --git a/generated/8.5/rnp.php b/generated/8.5/rnp.php index 2c9f3edd..c38882fc 100644 --- a/generated/8.5/rnp.php +++ b/generated/8.5/rnp.php @@ -5,13 +5,9 @@ use Safe\Exceptions\RnpException; /** - * Private keys used for decryption should be loaded into the FFI object before calling this function. - * If password encryption was used, then password provider should be set by calling - * rnp_ffi_set_pass_provider. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input Encrypted message. - * @return string Decrypted message on success. + * @param \RnpFFI $ffi + * @param string $input + * @return string * @throws RnpException * */ @@ -27,11 +23,9 @@ function rnp_decrypt(\RnpFFI $ffi, string $input): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_JSON_DUMP_* predefined constants. - * @return string JSON string with dump. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -47,11 +41,9 @@ function rnp_dump_packets_to_json(string $input, int $flags): string /** - * - * - * @param string $input Input string containing OpenPGP data, either in binary or ASCII-armored format. - * @param int $flags See RNP_DUMP_* predefined constants. - * @return string Text describing packet sequence. + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -67,13 +59,9 @@ function rnp_dump_packets(string $input, int $flags): string /** - * - * - * @param string $pub_format the format of the public keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant. - * @param string $sec_format the format of the secret keyring, RNP_KEYSTORE_GPG or other - * RNP_KEYSTORE_* constant - * @return \RnpFFI Returns RnpFFI object on success. + * @param string $pub_format + * @param string $sec_format + * @return \RnpFFI * @throws RnpException * */ @@ -89,25 +77,8 @@ function rnp_ffi_create(string $pub_format, string $sec_format): \RnpFFI /** - * Sets password provider function. This function can ask for the password on a standard input - * (if PHP script is executed in a command line environment), display GUI dialog or provide - * password in any other possible ways. Requested passwords are used to encrypt or decrypt - * secret keys or perform symmetric encryption/decryption operations. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param callable $password_callback The function that is to be called for every password request. It has the following signature: - * - * boolpassword_callback - * stringkey_fp - * stringpgp_context - * stringpassword - * - * - * $key_fp - The key fingerprint, if any. Can be empty. - * $pgp_context - String describing why the key is being requested. - * $password - Password string reference where provided password should be stored to. - * - * Callback function should return TRUE if password was successfully set or FALSE on failure. + * @param \RnpFFI $ffi + * @param callable $password_callback * @throws RnpException * */ @@ -122,12 +93,10 @@ function rnp_ffi_set_pass_provider(\RnpFFI $ffi, callable $password_callback): v /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* predefined constants. - * @return string JSON string with information about new and updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -143,12 +112,10 @@ function rnp_import_keys(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $input OpenPGP packets containing signatures to be imported. Can be either binary or ASCII armored. - * @param int $flags Currently must be 0. - * @return string JSON string with information about updated keys on success. + * @param \RnpFFI $ffi + * @param string $input + * @param int $flags + * @return string * @throws RnpException * */ @@ -164,17 +131,12 @@ function rnp_import_signatures(\RnpFFI $ffi, string $input, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Primary key fingerprint. - * @param string $subkey_fp Subkey to export. Can be an empty string - * to pick the first suitable subkey. - * @param string $uid User ID to export. Can be an empty string - * if exported key has only one uid. - * @param int $flags Only RNP_KEY_EXPORT_BASE64 is currently supported. Enabling - * it would export base64-encoded key data instead of binary. - * @return string OpenPGP packets of exported key on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param string $subkey_fp + * @param string $uid + * @param int $flags + * @return string * @throws RnpException * */ @@ -190,14 +152,11 @@ function rnp_key_export_autocrypt(\RnpFFI $ffi, string $key_fp, string $subkey_f /** - * Note: to revoke a key you'll need to import this signature into the keystore or use - * rnp_key_revoke function. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint of the primary key to be revoked. - * @param int $flags RNP_KEY_EXPORT_ARMORED or 0. - * @param array $options An associative array with options. - * @return string Exported revocation signature on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options + * @return string * @throws RnpException * */ @@ -217,13 +176,10 @@ function rnp_key_export_revocation(\RnpFFI $ffi, string $key_fp, int $flags, ?ar /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_EXPORT_* predefined constants - * (except RNP_KEY_EXPORT_BASE64). - * @return string OpenPGP packets of exported key (binary or ASCII-armored) on success. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @return string * @throws RnpException * */ @@ -239,11 +195,9 @@ function rnp_key_export(\RnpFFI $ffi, string $key_fp, int $flags): string /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @return array An associative array with information about the key. + * @param \RnpFFI $ffi + * @param string $key_fp + * @return array * @throws RnpException * */ @@ -259,12 +213,9 @@ function rnp_key_get_info(\RnpFFI $ffi, string $key_fp): array /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags See RNP_KEY_REMOVE_* constants. Flag RNP_KEY_REMOVE_SUBKEYS will work only for - * the primary key and will remove all of its subkeys as well. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags * @throws RnpException * */ @@ -279,12 +230,10 @@ function rnp_key_remove(\RnpFFI $ffi, string $key_fp, int $flags): void /** - * Note: you need to call rnp_save_keys to write updated keyring(s) out. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $key_fp Key fingerprint. - * @param int $flags Currently must be 0. - * @param array $options An associative array with options. + * @param \RnpFFI $ffi + * @param string $key_fp + * @param int $flags + * @param array $options * @throws RnpException * */ @@ -303,11 +252,9 @@ function rnp_key_revoke(\RnpFFI $ffi, string $key_fp, int $flags, ?array $option /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Key identifier type ("userid", "keyid", "grip", "fingerprint"). - * @return array An associative array where key is an identifier string and value is a PGP key fingerprint. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @return array * @throws RnpException * */ @@ -323,12 +270,10 @@ function rnp_list_keys(\RnpFFI $ffi, string $identifier_type): array /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input_path file or directory containing the keys. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input_path + * @param int $flags * @throws RnpException * */ @@ -343,12 +288,10 @@ function rnp_load_keys_from_path(\RnpFFI $ffi, string $format, string $input_pat /** - * Note that for G10, the input must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $input OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $input + * @param int $flags * @throws RnpException * */ @@ -363,13 +306,10 @@ function rnp_load_keys(\RnpFFI $ffi, string $format, string $input, int $flags): /** - * Note: only valid userids are checked while searching by userid. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $identifier_type Identifier type string: "userid", "keyid", "fingerprint", "grip". - * @param string $identifier PGP User ID (name and email) for "userid" type, hexadecimal string - * that represents key id, fingerprint or key grip correspondingly. - * @return string Returns hexadecimal fingerprint of the key found on success. + * @param \RnpFFI $ffi + * @param string $identifier_type + * @param string $identifier + * @return string * @throws RnpException * */ @@ -385,13 +325,11 @@ function rnp_locate_key(\RnpFFI $ffi, string $identifier_type, string $identifie /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $message Message to be encrypted. - * @param array $recipient_keys_fp Array with fingerprints of recipient's keys. At least one key must be present. - * @param array $options An associative array with options. - * @return string Encrypted data on success. + * @param \RnpFFI $ffi + * @param string $message + * @param array $recipient_keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -411,18 +349,12 @@ function rnp_op_encrypt(\RnpFFI $ffi, string $message, array $recipient_keys_fp, /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $userid PGP User ID - text that is intended to represent - * the name and email address of the key holder. - * @param string $key_alg Primary key algorithm (i.e. 'RSA', 'DSA', etc). - * @param string $sub_alg Subkey algorithm. If not set, subkey will not be generated. - * @param array $options An associative array with options. - * @return string Fingerprint of the generated primary key. This fingerprint can be used - * later to reference the key in sign and encrypt operations. The key data is stored in FFI - * memory context and can be saved using - * rnp_save_keys or rnp_save_keys_to_path. + * @param \RnpFFI $ffi + * @param string $userid + * @param string $key_alg + * @param string $sub_alg + * @param array $options + * @return string * @throws RnpException * */ @@ -444,15 +376,11 @@ function rnp_op_generate_key(\RnpFFI $ffi, string $userid, string $key_alg, ?str /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Cleartext signed message containing source data with - * additional headers and ASCII-armored signature on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -472,14 +400,11 @@ function rnp_op_sign_cleartext(\RnpFFI $ffi, string $data, array $keys_fp, ?arra /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Detached signature(s) data on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -499,14 +424,11 @@ function rnp_op_sign_detached(\RnpFFI $ffi, string $data, array $keys_fp, ?array /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Data to be signed. - * @param array $keys_fp Array with key fingerprints. At least one key must be provided. - * Keys should be present in ffi. - * @param array $options An associative array with options. - * @return string Data with embedded signature(s) on success. + * @param \RnpFFI $ffi + * @param string $data + * @param array $keys_fp + * @param array $options + * @return string * @throws RnpException * */ @@ -526,14 +448,10 @@ function rnp_op_sign(\RnpFFI $ffi, string $data, array $keys_fp, ?array $options /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Source data. - * @param string $signature Detached signature data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @param string $signature + * @return array * @throws RnpException * */ @@ -549,13 +467,9 @@ function rnp_op_verify_detached(\RnpFFI $ffi, string $data, string $signature): /** - * - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $data Signed data. - * @return array An associative array with information about verification results. - * - * "signatures" sub-array. + * @param \RnpFFI $ffi + * @param string $data + * @return array * @throws RnpException * */ @@ -571,12 +485,10 @@ function rnp_op_verify(\RnpFFI $ffi, string $data): array /** - * Saves keys present in the FFI object (loaded or generated) to the specified file or directory. - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output_path File or directory path where keys should be saved to. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output_path + * @param int $flags * @throws RnpException * */ @@ -591,12 +503,10 @@ function rnp_save_keys_to_path(\RnpFFI $ffi, string $format, string $output_path /** - * Note that for G10, the output must be a directory (which must already exist). - * - * @param \RnpFFI $ffi The FFI object returned by rnp_ffi_create. - * @param string $format The key format of the data (GPG, KBX, G10). - * @param string $output key packets will be saved to the string referenced by output. - * @param int $flags See RNP_LOAD_SAVE_* flags description. + * @param \RnpFFI $ffi + * @param string $format + * @param string $output + * @param int $flags * @throws RnpException * */ @@ -611,10 +521,8 @@ function rnp_save_keys(\RnpFFI $ffi, string $format, string &$output, int $flags /** - * Get the JSON formatted string containing array of supported rnp feature values (algorithms, curves, etc) by type. - * - * @param string $type See RNP_FEATURE_* constants for supported values. - * @return string String containing JSON formatted array of supported algorithms, curves, etc. + * @param string $type + * @return string * @throws RnpException * */ diff --git a/generated/8.5/rpminfo.php b/generated/8.5/rpminfo.php index fb4cfaee..fd98a6a0 100644 --- a/generated/8.5/rpminfo.php +++ b/generated/8.5/rpminfo.php @@ -5,9 +5,7 @@ use Safe\Exceptions\RpminfoException; /** - * Add an additional retrieved tag in subsequent queries. - * - * @param int $tag One of RPMTAG_* constant. + * @param int $tag * @throws RpminfoException * */ @@ -22,12 +20,7 @@ function rpmaddtag(int $tag): void /** - * Define or change a RPM macro value. - * - * This can be used to select the database path and backend to use - * instead of system default one. - * - * @param string $text Macro name, options, body. + * @param string $text * @throws RpminfoException * */ diff --git a/generated/8.5/rrd.php b/generated/8.5/rrd.php index a68379af..d8dc2b4c 100644 --- a/generated/8.5/rrd.php +++ b/generated/8.5/rrd.php @@ -5,11 +5,8 @@ use Safe\Exceptions\RrdException; /** - * Creates the rdd database file. - * - * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -24,11 +21,9 @@ function rrd_create(string $filename, array $options): void /** - * Returns the first data sample from the specified RRA of the RRD file. - * - * @param string $file RRD database file name. - * @param int $raaindex The index number of the RRA that is to be examined. Default value is 0. - * @return int Integer number of unix timestamp. + * @param string $file + * @param int $raaindex + * @return int * @throws RrdException * */ @@ -44,15 +39,9 @@ function rrd_first(string $file, int $raaindex = 0): int /** - * Creates image for a particular data from RRD file. - * - * @param string $filename The filename to output the graph to. This will generally end in either - * .png, .svg or - * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all - * possible options. All options (data definitions, variable definitions, etc.) - * are allowed. - * @return array Array with information about generated image is returned. + * @param string $filename + * @param array $options + * @return array * @throws RrdException * */ @@ -68,10 +57,8 @@ function rrd_graph(string $filename, array $options): array /** - * Returns information about particular RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @param string $filename + * @return array * @throws RrdException * */ @@ -87,11 +74,8 @@ function rrd_info(string $filename): array /** - * Gets array of the UNIX timestamp and the values stored for each date in the - * most recent update of the RRD database file. - * - * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @param string $filename + * @return array * @throws RrdException * */ @@ -107,11 +91,9 @@ function rrd_lastupdate(string $filename): array /** - * Restores the RRD file from the XML dump. - * - * @param string $xml_file XML filename with the dump of the original RRD database file. - * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param string $xml_file + * @param string $rrd_file + * @param array $options * @throws RrdException * */ @@ -130,12 +112,8 @@ function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null) /** - * Change some options in the RRD dabase header file. E.g. renames the source for - * the data etc. - * - * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See - * rrd tune man page for details. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -150,12 +128,8 @@ function rrd_tune(string $filename, array $options): void /** - * Updates the RRD database file. The input data is time interpolated according to the - * properties of the RRD database file. - * - * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update - * for whole list of options. + * @param string $filename + * @param array $options * @throws RrdException * */ @@ -170,12 +144,8 @@ function rrd_update(string $filename, array $options): void /** - * Exports the information about RRD database file. This data can be converted - * to XML file via user space PHP script and then restored back as RRD database - * file. - * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param array $options + * @return array * @throws RrdException * */ diff --git a/generated/8.5/sem.php b/generated/8.5/sem.php index 5ca166d3..949771db 100644 --- a/generated/8.5/sem.php +++ b/generated/8.5/sem.php @@ -5,19 +5,9 @@ use Safe\Exceptions\SemException; /** - * msg_get_queue returns an id that can be used to - * access the System V message queue with the given - * key. The first call creates the message queue with - * the optional permissions. - * A second call to msg_get_queue for the same - * key will return a different message queue - * identifier, but both identifiers access the same underlying message - * queue. - * - * @param int $key Message queue numeric ID - * @param int $permissions Queue permissions. Default to 0666. If the message queue already - * exists, the permissions will be ignored. - * @return \SysvMessageQueue Returns SysvMessageQueue instance that can be used to access the System V message queue. + * @param int $key + * @param int $permissions + * @return \SysvMessageQueue * @throws SemException * */ @@ -33,9 +23,7 @@ function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue /** - * Checks whether the message queue key exists. - * - * @param int $key Queue key. + * @param int $key * @throws SemException * */ @@ -50,73 +38,14 @@ function msg_queue_exists(int $key): void /** - * msg_receive will receive the first message from the - * specified queue of the type specified by - * desired_message_type. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $desired_message_type If desired_message_type is 0, the message from the front - * of the queue is returned. If desired_message_type is - * greater than 0, then the first message of that type is returned. - * If desired_message_type is less than 0, the first - * message on the queue with a type less than or equal to the - * absolute value of desired_message_type will be read. - * If no messages match the criteria, your script will wait until a suitable - * message arrives on the queue. You can prevent the script from blocking - * by specifying MSG_IPC_NOWAIT in the - * flags parameter. - * @param int|null $received_message_type The type of the message that was received will be stored in this - * parameter. - * @param int $max_message_size The maximum size of message to be accepted is specified by the - * max_message_size; if the message in the queue is larger - * than this size the function will fail (unless you set - * flags as described below). - * @param mixed $message The received message will be stored in message, - * unless there were errors receiving the message. - * @param bool $unserialize If set to - * TRUE, the message is treated as though it was serialized using the - * same mechanism as the session module. The message will be unserialized - * and then returned to your script. This allows you to easily receive - * arrays or complex object structures from other PHP scripts, or if you - * are using the WDDX serializer, from any WDDX compatible source. - * - * If unserialize is FALSE, the message will be - * returned as a binary-safe string. - * @param int $flags The optional flags allows you to pass flags to the - * low-level msgrcv system call. It defaults to 0, but you may specify one - * or more of the following values (by adding or ORing them together). - * - * Flag values for msg_receive - * - * - * - * MSG_IPC_NOWAIT - * If there are no messages of the - * desired_message_type, return immediately and do not - * wait. The function will fail and return an integer value - * corresponding to MSG_ENOMSG. - * - * - * - * MSG_EXCEPT - * Using this flag in combination with a - * desired_message_type greater than 0 will cause the - * function to receive the first message that is not equal to - * desired_message_type. - * - * - * MSG_NOERROR - * - * If the message is longer than max_message_size, - * setting this flag will truncate the message to - * max_message_size and will not signal an error. - * - * - * - * - * - * @param int|null $error_code If the function fails, the optional error_code - * will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $desired_message_type + * @param int|null $received_message_type + * @param int $max_message_size + * @param mixed $message + * @param bool $unserialize + * @param int $flags + * @param int|null $error_code * @throws SemException * */ @@ -131,12 +60,7 @@ function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int & /** - * msg_remove_queue destroys the message queue specified - * by the queue. Only use this function when all - * processes have finished working with the message queue and you need to - * release the system resources held by it. - * - * @param \SysvMessageQueue $queue The message queue. + * @param \SysvMessageQueue $queue * @throws SemException * */ @@ -151,35 +75,12 @@ function msg_remove_queue(\SysvMessageQueue $queue): void /** - * msg_send sends a message of type - * message_type (which MUST be greater than 0) to - * the message queue specified by queue. - * - * @param \SysvMessageQueue $queue The message queue. - * @param int $message_type The type of the message (MUST be greater than 0) - * @param mixed $message The body of the message. - * - * If serialize set to FALSE is supplied, - * MUST be of type: string, int, float - * or bool. In other case a warning will be issued. - * @param bool $serialize The optional serialize controls how the - * message is sent. serialize - * defaults to TRUE which means that the message is - * serialized using the same mechanism as the session module before being - * sent to the queue. This allows complex arrays and objects to be sent to - * other PHP scripts, or if you are using the WDDX serializer, to any WDDX - * compatible client. - * @param bool $blocking If the message is too large to fit in the queue, your script will wait - * until another process reads messages from the queue and frees enough - * space for your message to be sent. - * This is called blocking; you can prevent blocking by setting the - * optional blocking parameter to FALSE, in which - * case msg_send will immediately return FALSE if the - * message is too big for the queue, and set the optional - * error_code to MSG_EAGAIN, - * indicating that you should try to send your message again a little - * later on. - * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable. + * @param \SysvMessageQueue $queue + * @param int $message_type + * @param mixed $message + * @param bool $serialize + * @param bool $blocking + * @param int|null $error_code * @throws SemException * */ @@ -194,19 +95,8 @@ function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $s /** - * msg_set_queue allows you to change the values of the - * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the - * underlying message queue data structure. - * - * Changing the data structure will require that PHP be running as the same - * user that created the queue, owns the queue (as determined by the - * existing msg_perm.xxx fields), or be running with root privileges. - * root privileges are required to raise the msg_qbytes values above the - * system defined limit. - * - * @param \SysvMessageQueue $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys - * that you require in the data array. + * @param \SysvMessageQueue $queue + * @param array $data * @throws SemException * */ @@ -221,85 +111,8 @@ function msg_set_queue(\SysvMessageQueue $queue, array $data): void /** - * msg_stat_queue returns the message queue meta data - * for the message queue specified by the queue. - * This is useful, for example, to determine which process sent the message - * that was just received. - * - * @param \SysvMessageQueue $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following - * meanings: - * - * Array structure for msg_stat_queue - * - * - * - * msg_perm.uid - * - * The uid of the owner of the queue. - * - * - * - * msg_perm.gid - * - * The gid of the owner of the queue. - * - * - * - * msg_perm.mode - * - * The file access mode of the queue. - * - * - * - * msg_stime - * - * The time that the last message was sent to the queue. - * - * - * - * msg_rtime - * - * The time that the last message was received from the queue. - * - * - * - * msg_ctime - * - * The time that the queue was last changed. - * - * - * - * msg_qnum - * - * The number of messages waiting to be read from the queue. - * - * - * - * msg_qbytes - * - * The maximum number of bytes allowed in one message queue. On - * Linux, this value may be read and modified via - * /proc/sys/kernel/msgmnb. - * - * - * - * msg_lspid - * - * The pid of the process that sent the last message to the queue. - * - * - * - * msg_lrpid - * - * The pid of the process that received the last message from the queue. - * - * - * - * - * - * - * Returns FALSE on failure. + * @param \SysvMessageQueue $queue + * @return array * @throws SemException * */ @@ -315,21 +128,8 @@ function msg_stat_queue(\SysvMessageQueue $queue): array /** - * sem_acquire by default blocks (if necessary) until the - * semaphore can be acquired. A process attempting to acquire a semaphore which - * it has already acquired will block forever if acquiring the semaphore would - * cause its maximum number of semaphore to be exceeded. - * - * After processing a request, any semaphores acquired by the process but not - * explicitly released will be released automatically and a warning will be - * generated. - * - * @param \SysvSemaphore $semaphore semaphore is a semaphore - * obtained from sem_get. - * @param bool $non_blocking Specifies if the process shouldn't wait for the semaphore to be acquired. - * If set to TRUE, the call will return - * FALSE immediately if a semaphore cannot be immediately - * acquired. + * @param \SysvSemaphore $semaphore + * @param bool $non_blocking * @throws SemException * */ @@ -344,25 +144,11 @@ function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): voi /** - * sem_get returns an id that can be used to - * access the System V semaphore with the given key. - * - * A second call to sem_get for the same key - * will return a different semaphore identifier, but both - * identifiers access the same underlying semaphore. - * - * If key is 0, a new private semaphore - * is created for each call to sem_get. - * * @param int $key - * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously - * is set to max_acquire. - * @param int $permissions The semaphore permissions. Actually this value is - * set only if the process finds it is the only process currently - * attached to the semaphore. - * @param bool $auto_release Specifies if the semaphore should be automatically released on request - * shutdown. - * @return \SysvSemaphore Returns a positive semaphore identifier on success. + * @param int $max_acquire + * @param int $permissions + * @param bool $auto_release + * @return \SysvSemaphore * @throws SemException * */ @@ -378,15 +164,7 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ /** - * sem_release releases the semaphore if it - * is currently acquired by the calling process, otherwise - * a warning is generated. - * - * After releasing the semaphore, sem_acquire - * may be called to re-acquire it. - * - * @param \SysvSemaphore $semaphore A Semaphore as returned by - * sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -401,12 +179,7 @@ function sem_release(\SysvSemaphore $semaphore): void /** - * sem_remove removes the given semaphore. - * - * After removing the semaphore, it is no longer accessible. - * - * @param \SysvSemaphore $semaphore A semaphore as returned - * by sem_get. + * @param \SysvSemaphore $semaphore * @throws SemException * */ @@ -421,24 +194,10 @@ function sem_remove(\SysvSemaphore $semaphore): void /** - * shm_attach returns an id that can be used to access - * the System V shared memory with the given key, the - * first call creates the shared memory segment with - * size and the optional perm-bits - * permissions. - * - * A second call to shm_attach for the same - * key will return a different SysvSharedMemory - * instance, but both instances access the same underlying - * shared memory. size and - * permissions will be ignored. - * - * @param int $key A numeric shared memory segment ID - * @param int|null $size The memory size. If not provided, default to the - * sysvshm.init_mem in the php.ini, otherwise 10000 - * bytes. - * @param int $permissions The optional permission bits. Default to 0666. - * @return \SysvSharedMemory Returns a SysvSharedMemory instance on success. + * @param int $key + * @param int|null $size + * @param int $permissions + * @return \SysvSharedMemory * @throws SemException * */ @@ -460,12 +219,7 @@ function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \Sysv /** - * shm_detach disconnects from the shared memory given - * by the shm created by - * shm_attach. Remember, that shared memory still exist - * in the Unix system and the data is still present. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ @@ -480,21 +234,9 @@ function shm_detach(\SysvSharedMemory $shm): void /** - * shm_put_var inserts or updates the - * value with the given - * key. - * - * Warnings (E_WARNING level) will be issued if - * shm is not a valid SysV shared memory - * index or if there was not enough shared memory remaining to complete your - * request. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. - * @param mixed $value The variable. All variable types - * that serialize supports may be used: generally - * this means all types except for resources and some internal objects - * that cannot be serialized. + * @param \SysvSharedMemory $shm + * @param int $key + * @param mixed $value * @throws SemException * */ @@ -509,11 +251,8 @@ function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void /** - * Removes a variable with a given key - * and frees the occupied memory. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. - * @param int $key The variable key. + * @param \SysvSharedMemory $shm + * @param int $key * @throws SemException * */ @@ -528,10 +267,7 @@ function shm_remove_var(\SysvSharedMemory $shm, int $key): void /** - * shm_remove removes the shared memory - * shm. All data will be destroyed. - * - * @param \SysvSharedMemory $shm A shared memory segment obtained from shm_attach. + * @param \SysvSharedMemory $shm * @throws SemException * */ diff --git a/generated/8.5/session.php b/generated/8.5/session.php index 0f10380a..2628b174 100644 --- a/generated/8.5/session.php +++ b/generated/8.5/session.php @@ -5,9 +5,6 @@ use Safe\Exceptions\SessionException; /** - * session_abort finishes session without saving - * data. Thus the original values in session data are kept. - * * @throws SessionException * */ @@ -22,27 +19,8 @@ function session_abort(): void /** - * session_cache_expire returns the current setting of - * session.cache_expire. - * - * The cache expire is reset to the default value of 180 stored in - * session.cache_expire - * at request startup time. Thus, - * you need to call session_cache_expire for every - * request (and before session_start is called). - * - * @param int|null $value If value is given and not NULL, the current cache - * expire is replaced with value. - * - * - * - * Setting value is of value only, if - * session.cache_limiter is set to a value - * different from nocache. - * - * - * @return int Returns the current setting of session.cache_expire. - * The value returned should be read in minutes, defaults to 180. + * @param int|null $value + * @return int * @throws SessionException * */ @@ -62,34 +40,8 @@ function session_cache_expire(?int $value = null): int /** - * session_cache_limiter returns the name of the - * current cache limiter. - * - * The cache limiter defines which cache control HTTP headers are sent to - * the client. These headers determine the rules by which the page content - * may be cached by the client and intermediate proxies. Setting the cache - * limiter to nocache disallows any client/proxy caching. - * A value of public permits caching by proxies and the - * client, whereas private disallows caching by proxies - * and permits the client to cache the contents. - * - * In private mode, the Expire header sent to the client - * may cause confusion for some browsers, including Mozilla. - * You can avoid this problem by using private_no_expire mode. The - * Expire header is never sent to the client in this mode. - * - * Setting the cache limiter to '' will turn off automatic sending - * of cache headers entirely. - * - * The cache limiter is reset to the default value stored in - * session.cache_limiter - * at request startup time. Thus, you need to call - * session_cache_limiter for every - * request (and before session_start is called). - * - * @param null|string $value If value is specified and not NULL, the name of the - * current cache limiter is changed to the new value. - * @return string Returns the name of the current cache limiter. + * @param null|string $value + * @return string * @throws SessionException * */ @@ -109,26 +61,8 @@ function session_cache_limiter(?string $value = null): string /** - * session_create_id is used to create new - * session id for the current session. It returns collision free - * session id. - * - * If session is not active, collision check is omitted. - * - * Session ID is created according to php.ini settings. - * - * It is important to use the same user ID of your web server for GC - * task script. Otherwise, you may have permission problems especially - * with files save handler. - * - * @param string $prefix If prefix is specified, new session id - * is prefixed by prefix. Not all - * characters are allowed within the session id. Characters in - * the range [a-zA-Z0-9,-] are allowed. Maximum length is 256 characters. - * @return string session_create_id returns new collision free - * session id for the current session. If it is used without active - * session, it omits collision check. - * On failure, FALSE is returned. + * @param string $prefix + * @return string * @throws SessionException * */ @@ -144,14 +78,7 @@ function session_create_id(string $prefix = ""): string /** - * session_decode decodes the serialized session data provided in - * $data, and populates the $_SESSION superglobal - * with the result. - * - * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. - * The serialization method can be set using session.serialize_handler. - * - * @param string $data The encoded data to be stored. + * @param string $data * @throws SessionException * */ @@ -166,18 +93,6 @@ function session_decode(string $data): void /** - * In order to kill the session altogether, the - * session ID must also be unset. If a cookie is used to propagate the - * session ID (default behavior), then the session cookie must be deleted. - * setcookie may be used for that. - * - * When session.use_strict_mode - * is enabled. You do not have to remove obsolete session ID cookie because - * session module will not accept session ID cookie when there is no - * data associated to the session ID and set new session ID cookie. - * Enabling session.use_strict_mode - * is recommended for all sites. - * * @throws SessionException * */ @@ -192,13 +107,7 @@ function session_destroy(): void /** - * session_encode returns a serialized string of the - * contents of the current session data stored in the $_SESSION superglobal. - * - * By default, the serialization method used is internal to PHP, and is not the same as serialize. - * The serialization method can be set using session.serialize_handler. - * - * @return string Returns the contents of the current session encoded. + * @return string * @throws SessionException * */ @@ -214,18 +123,7 @@ function session_encode(): string /** - * By default, PHP uses session.gc_probability - * to run the session garbage collector probabilistically on each - * request. There are some limitations with this approach: - * - * For production systems, it is recommended to disable the - * probability-based garbage collection by setting - * session.gc_probability to 0 - * and explicitly trigger the garbage collector periodically, for example by using "cron" on - * UNIX-like systems to run a script that calls session_gc. - * - * @return int session_gc returns the number of deleted session - * entries on success. + * @return int * @throws SessionException * */ @@ -241,24 +139,8 @@ function session_gc(): int /** - * session_id is used to get or set the session id for - * the current session. - * - * The constant SID can also be used to - * retrieve the current name and session id as a string suitable for - * adding to URLs. See also Session - * handling. - * - * @param null|string $id If id is specified and not NULL, it will replace the current - * session id. session_id needs to be called before - * session_start for that purpose. Depending on the - * session handler, not all characters are allowed within the session id. - * For example, the file session handler only allows characters in the - * range [a-zA-Z0-9,-]! - * @return string session_id returns the session id for the current - * session or the empty string ("") if there is no current - * session (no current session id exists). - * On failure, FALSE is returned. + * @param null|string $id + * @return string * @throws SessionException * */ @@ -278,16 +160,8 @@ function session_id(?string $id = null): string /** - * session_module_name gets the name of the current - * session module, which is also known as - * session.save_handler. - * - * @param null|string $module If module is specified and not NULL, that module will be - * used instead. - * Passing "user" to this parameter is forbidden. Instead - * session_set_save_handler has to be called to set a user - * defined session handler. - * @return string Returns the name of the current session module. + * @param null|string $module + * @return string * @throws SessionException * */ @@ -307,44 +181,8 @@ function session_module_name(?string $module = null): string /** - * session_name returns the name of the current - * session. If name is given, - * session_name will update the session name and return - * the old session name. - * - * If a new session name is - * supplied, session_name modifies the HTTP cookie - * (and outputs the content when session.use_trans_sid is - * enabled). Once the HTTP cookie has been - * sent, calling session_name raises an E_WARNING. - * session_name must be called - * before session_start for the session to work - * properly. - * - * The session name is reset to the default value stored in - * session.name at request startup time. Thus, you need to - * call session_name for every request (and before - * session_start is called). - * - * @param null|string $name The session name references the name of the session, which is - * used in cookies and URLs (e.g. PHPSESSID). It - * should contain only alphanumeric characters; it should be short and - * descriptive (i.e. for users with enabled cookie warnings). - * If name is specified and not NULL, the name of the current - * session is changed to its value. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * - * - * - * The session name can't consist of digits only, at least one letter - * must be present. Otherwise a new session id is generated every time. - * @return non-falsy-string Returns the name of the current session. If name is given - * and function updates the session name, name of the old session - * is returned. + * @param null|string $name + * @return non-falsy-string * @throws SessionException * */ @@ -364,17 +202,7 @@ function session_name(?string $name = null): string /** - * session_regenerate_id will replace the current - * session id with a new one, and keep the current session information. - * - * When session.use_trans_sid - * is enabled, output must be started after session_regenerate_id - * call. Otherwise, old session ID is used. - * - * @param bool $delete_old_session Whether to delete the old associated session file or not. - * You should not delete old session if you need to avoid - * races caused by deletion or detect/avoid session hijack - * attacks. + * @param bool $delete_old_session * @throws SessionException * */ @@ -389,10 +217,6 @@ function session_regenerate_id(bool $delete_old_session = false): void /** - * session_reset reinitializes a session with - * original values stored in session storage. This function requires an active session and - * discards changes in $_SESSION. - * * @throws SessionException * */ @@ -407,23 +231,8 @@ function session_reset(): void /** - * session_save_path returns the path of the current - * directory used to save session data. - * - * @param null|string $path Session data path. If specified and not NULL, the path to which data is saved will - * be changed. session_save_path needs to be called - * before session_start for that purpose. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. - * - * - * - * On some operating systems, you may want to specify a path on a - * filesystem that handles lots of small files efficiently. - * @return string Returns the path of the current directory used for data storage. + * @param null|string $path + * @return string * @throws SessionException * */ @@ -443,41 +252,7 @@ function session_save_path(?string $path = null): string /** - * session_start creates a session or resumes the - * current one based on a session identifier passed via a GET or POST - * request, or passed via a cookie. - * - * When session_start is called or when a session auto starts, - * PHP will call the open and read session save handlers. These will either be a built-in - * save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be - * custom handler as defined by session_set_save_handler. - * The read callback will retrieve any existing session data (stored in a special serialized format) - * and will be unserialized and used to automatically populate the $_SESSION superglobal when the - * read callback returns the saved session data back to PHP session handling. - * - * To use a named session, call - * session_name before calling - * session_start. - * - * When session.use_trans_sid - * is enabled, the session_start function will - * register an internal output handler for URL rewriting. - * - * If a user uses ob_gzhandler or similar with - * ob_start, the function order is important for - * proper output. For example, - * ob_gzhandler must be registered before starting the session. - * - * @param array $options If provided, this is an associative array of options that will override - * the currently set - * session configuration directives. - * The keys should not include the session. prefix. - * - * In addition to the normal set of configuration directives, a - * read_and_close option may also be provided. If set to - * TRUE, this will result in the session being closed immediately after - * being read, thereby avoiding unnecessary locking if the session data - * won't be changed. + * @param array $options * @throws SessionException * */ @@ -492,9 +267,6 @@ function session_start(array $options = []): void /** - * The session_unset function frees all session variables - * currently registered. - * * @throws SessionException * */ @@ -509,16 +281,6 @@ function session_unset(): void /** - * End the current session and store session data. - * - * Session data is usually stored after your script terminated without the - * need to call session_write_close, but as session data - * is locked to prevent concurrent writes only one script may operate on a - * session at any time. When using framesets together with sessions you will - * experience the frames loading one by one due to this locking. You can - * reduce the time needed to load all the frames by ending the session as - * soon as all changes to session variables are done. - * * @throws SessionException * */ diff --git a/generated/8.5/shmop.php b/generated/8.5/shmop.php index ec12f29b..3ebd3230 100644 --- a/generated/8.5/shmop.php +++ b/generated/8.5/shmop.php @@ -5,10 +5,7 @@ use Safe\Exceptions\ShmopException; /** - * shmop_delete is used to delete a shared memory block. - * - * @param \Shmop $shmop The shared memory block resource created by - * shmop_open + * @param \Shmop $shmop * @throws ShmopException * */ @@ -23,17 +20,10 @@ function shmop_delete(\Shmop $shmop): void /** - * shmop_read will read a string from shared memory block. - * - * @param \Shmop $shmop The shared memory block identifier created by - * shmop_open - * @param int $offset Offset from which to start reading; must be greater than or equal to zero - * and less than or equal to the actual size of the shared memory segment. - * @param int $size The number of bytes to read; must be greater than or equal to zero, - * and the sum of offset and size - * must be less than or equal to the actual size of the shared memory segment. - * 0 reads shmop_size($shmid) - $start bytes. - * @return string Returns the data. + * @param \Shmop $shmop + * @param int $offset + * @param int $size + * @return string * */ function shmop_read(\Shmop $shmop, int $offset, int $size): string diff --git a/generated/8.5/sockets.php b/generated/8.5/sockets.php index 00e59c4f..61eb049e 100644 --- a/generated/8.5/sockets.php +++ b/generated/8.5/sockets.php @@ -5,32 +5,8 @@ use Safe\Exceptions\SocketsException; /** - * After the socket socket has been created - * using socket_create, bound to a name with - * socket_bind, and told to listen for connections - * with socket_listen, this function will accept - * incoming connections on that socket. Once a successful connection - * is made, a new Socket instance is returned, - * which may be used for communication. If there are multiple connections - * queued on the socket, the first will be used. If there are no pending - * connections, socket_accept will block until - * a connection becomes present. If socket - * has been made non-blocking using - * socket_set_blocking or - * socket_set_nonblock, FALSE will be returned. - * - * The Socket instance returned by - * socket_accept may not be used to accept new - * connections. The original listening socket - * socket, however, remains open and may be - * reused. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @return \Socket Returns a new Socket instance on success. The actual - * error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param \Socket $socket + * @return \Socket * @throws SocketsException * */ @@ -46,11 +22,8 @@ function socket_accept(\Socket $socket): \Socket /** - * Create a Socket instance, and bind it to the provided AddressInfo. The return - * value of this function may be used with socket_listen. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -66,11 +39,8 @@ function socket_addrinfo_bind(\AddressInfo $address): \Socket /** - * Create a Socket instance, and connect it to the provided AddressInfo instance. The return - * value of this function may be used with the rest of the socket functions. - * - * @param \AddressInfo $address AddressInfo instance created from socket_addrinfo_lookup. - * @return \Socket Returns a Socket instance on success. + * @param \AddressInfo $address + * @return \Socket * @throws SocketsException * */ @@ -86,17 +56,10 @@ function socket_addrinfo_connect(\AddressInfo $address): \Socket /** - * Lookup different ways we can connect to host. The returned array contains - * a set of AddressInfo instances that we can bind to using socket_addrinfo_bind. - * - * @param string $host Hostname to search. - * @param mixed $service The service to connect to. If service is a numeric string, it designates the port. - * Otherwise it designates a network service name, which is mapped to a port by the operating system. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the - * hints as defined by getaddrinfo. - * @return \AddressInfo[] Returns an array of AddressInfo instances that can be used with - * the socket_addrinfo_* family of functions. - * On failure, FALSE is returned. + * @param string $host + * @param mixed $service + * @param array $hints + * @return \AddressInfo[] * @throws SocketsException * */ @@ -118,9 +81,7 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] /** - * Determines whether socket is at out-of-band mark. - * - * @param \Socket $socket A Socket instance created with socket_create. + * @param \Socket $socket * @throws SocketsException * */ @@ -135,22 +96,9 @@ function socket_atmark(\Socket $socket): void /** - * Binds the name given in address to the socket - * described by socket. This has to be done before - * a connection is established using socket_connect - * or socket_listen. - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param string $address If the socket is of the AF_INET family, the - * address is an IP in dotted-quad notation - * (e.g. 127.0.0.1). - * - * If the socket is of the AF_UNIX family, the - * address is the path of a - * Unix-domain socket (e.g. /tmp/my.sock). - * @param int $port The port parameter is only used when - * binding an AF_INET socket, and designates - * the port on which to listen for connections. + * @param \Socket $socket + * @param string $address + * @param int $port * @throws SocketsException * */ @@ -165,23 +113,9 @@ function socket_bind(\Socket $socket, string $address, int $port = 0): void /** - * Initiate a connection to address using the Socket instance - * socket, which must be Socket - * instance created with socket_create. - * - * @param \Socket $socket A Socket instance created with - * socket_create. - * @param string $address The address parameter is either an IPv4 address - * in dotted-quad notation (e.g. 127.0.0.1) if - * socket is AF_INET, a valid - * IPv6 address (e.g. ::1) if IPv6 support is enabled and - * socket is AF_INET6 - * or the pathname of a Unix domain socket, if the socket family is - * AF_UNIX. - * @param int|null $port The port parameter is only used and is mandatory - * when connecting to an AF_INET or an - * AF_INET6 socket, and designates - * the port on the remote host to which a connection should be made. + * @param \Socket $socket + * @param string $address + * @param int|null $port * @throws SocketsException * */ @@ -200,24 +134,9 @@ function socket_connect(\Socket $socket, string $address, ?int $port = null): vo /** - * socket_create_listen creates a new Socket instance of - * type AF_INET listening on all - * local interfaces on the given port waiting for new connections. - * - * This function is meant to ease the task of creating a new socket which - * only listens to accept new connections. - * - * @param int $port The port on which to listen on all interfaces. - * @param int $backlog The backlog parameter defines the maximum length - * the queue of pending connections may grow to. - * SOMAXCONN may be passed as - * backlog parameter, see - * socket_listen for more information. - * @return \Socket socket_create_listen returns a new Socket instance - * on success. The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $port + * @param int $backlog + * @return \Socket * @throws SocketsException * */ @@ -233,27 +152,10 @@ function socket_create_listen(int $port, int $backlog = SOMAXCONN): \Socket /** - * socket_create_pair creates two connected and - * indistinguishable sockets, and stores them in pair. - * This function is commonly used in IPC (InterProcess Communication). - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. See socket_create - * for the full list. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the - * full list. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be retrieved by - * name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * - * See socket_create for the full list of supported - * protocols. - * @param \Socket[]|null $pair Reference to an array in which the two Socket instances will be inserted. + * @param int $domain + * @param int $type + * @param int $protocol + * @param \Socket[]|null $pair * @throws SocketsException * */ @@ -268,25 +170,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair /** - * Creates and returns a Socket instance, also referred to as an endpoint - * of communication. A typical network connection is made up of 2 sockets, one - * performing the role of the client, and another performing the role of the server. - * - * @param int $domain The domain parameter specifies the protocol - * family to be used by the socket. - * @param int $type The type parameter selects the type of communication - * to be used by the socket. - * @param int $protocol The protocol parameter sets the specific - * protocol within the specified domain to be used - * when communicating on the returned socket. The proper value can be - * retrieved by name by using getprotobyname. If - * the desired protocol is TCP, or UDP the corresponding constants - * SOL_TCP, and SOL_UDP - * can also be used. - * @return \Socket socket_create returns a Socket instance on success. The actual error code can be retrieved by calling - * socket_last_error. This error code may be passed to - * socket_strerror to get a textual explanation of the - * error. + * @param int $domain + * @param int $type + * @param int $protocol + * @return \Socket * @throws SocketsException * */ @@ -302,10 +189,8 @@ function socket_create(int $domain, int $type, int $protocol): \Socket /** - * - * * @param \Socket $socket - * @return resource Return resource. + * @return resource * @throws SocketsException * */ @@ -321,38 +206,10 @@ function socket_export_stream(\Socket $socket) /** - * The socket_get_option function retrieves the value for - * the option specified by the option parameter for the - * specified socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to retrieve options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by - * specifying the protocol number of that level. Protocol numbers can be - * found by using the getprotobyname function. - * @param int $option Reports whether the socket lingers on - * socket_close if data is present. By default, - * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, - * socket_close will wait for its peer to - * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the - * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is - * non-zero and l_linger is non-zero, - * socket_close will block until all the data - * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, - * socket_close will fail and return an error. - * @return mixed Returns the value of the given option. + * @param \Socket $socket + * @param int $level + * @param int $option + * @return mixed * @throws SocketsException * */ @@ -368,25 +225,9 @@ function socket_get_option(\Socket $socket, int $level, int $option) /** - * Queries the remote side of the given socket which may either result in - * host/port or in a Unix filesystem path, dependent on its type. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET or - * AF_INET6, socket_getpeername - * will return the peers (remote) IP address in - * appropriate notation (e.g. 127.0.0.1 or - * fe80::1) in the address - * parameter and, if the optional port parameter is - * present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getpeername will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If given, this will hold the port associated to - * address. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -401,22 +242,9 @@ function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = nu /** - * - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param null|string $address If the given socket is of type AF_INET - * or AF_INET6, socket_getsockname - * will return the local IP address in appropriate notation (e.g. - * 127.0.0.1 or fe80::1) in the - * address parameter and, if the optional - * port parameter is present, also the associated port. - * - * If the given socket is of type AF_UNIX, - * socket_getsockname will return the Unix filesystem - * path (e.g. /var/run/daemon.sock) in the - * address parameter. - * @param int|null $port If provided, this will hold the associated port. + * @param \Socket $socket + * @param null|string $address + * @param int|null $port * @throws SocketsException * */ @@ -431,10 +259,8 @@ function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = nu /** - * Imports a stream that encapsulates a socket into a socket extension resource. - * - * @param resource $stream The stream resource to import. - * @return \Socket Returns FALSE on failure. + * @param resource $stream + * @return \Socket * @throws SocketsException * */ @@ -450,30 +276,8 @@ function socket_import_stream($stream): \Socket /** - * After the socket socket has been created - * using socket_create and bound to a name with - * socket_bind, it may be told to listen for incoming - * connections on socket. - * - * socket_listen is applicable only to sockets of - * type SOCK_STREAM or - * SOCK_SEQPACKET. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_addrinfo_bind - * @param int $backlog A maximum of backlog incoming connections will be - * queued for processing. If a connection request arrives with the queue - * full the client may receive an error with an indication of - * ECONNREFUSED, or, if the underlying protocol supports - * retransmission, the request may be ignored so that retries may succeed. - * - * The maximum number passed to the backlog - * parameter highly depends on the underlying platform. On Linux, it is - * silently truncated to SOMAXCONN. On win32, if - * passed SOMAXCONN, the underlying service provider - * responsible for the socket will set the backlog to a maximum - * reasonable value. There is no standard provision to - * find out the actual backlog value on this platform. + * @param \Socket $socket + * @param int $backlog * @throws SocketsException * */ @@ -488,38 +292,10 @@ function socket_listen(\Socket $socket, int $backlog = 0): void /** - * The function socket_read reads from the Socket instance - * socket created by the - * socket_create or - * socket_accept functions. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $length The maximum number of bytes read is specified by the - * length parameter. Otherwise you can use - * \r, \n, - * or \0 to end reading (depending on the mode - * parameter, see below). - * @param int $mode Optional mode parameter is a named constant: - * - * - * - * PHP_BINARY_READ (Default) - use the system - * recv() function. Safe for reading binary data. - * - * - * - * - * PHP_NORMAL_READ - reading stops at - * \n or \r. - * - * - * - * @return string socket_read returns the data as a string on success (including if the remote host has closed the - * connection). The error code can be retrieved with - * socket_last_error. This code may be passed to - * socket_strerror to get a textual representation of - * the error. + * @param \Socket $socket + * @param int $length + * @param int $mode + * @return string * @throws SocketsException * */ @@ -535,52 +311,11 @@ function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): /** - * The function socket_send sends - * length bytes to the socket - * socket from data. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param string $data A buffer containing the data that will be sent to the remote host. - * @param int $length The number of bytes that will be sent to the remote host from - * data. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @return int socket_send returns the number of bytes sent. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @return int * @throws SocketsException * */ @@ -596,12 +331,10 @@ function socket_send(\Socket $socket, string $data, int $length, int $flags): in /** - * - * * @param \Socket $socket * @param array $message * @param int $flags - * @return int Returns the number of bytes sent. + * @return int * @throws SocketsException * */ @@ -617,56 +350,13 @@ function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int /** - * The function socket_sendto sends - * length bytes from data - * through the socket socket to the - * port at the address address. - * - * @param \Socket $socket A Socket instance created using socket_create. - * @param string $data The sent data will be taken from buffer data. - * @param int $length length bytes from data will be - * sent. - * @param int $flags The value of flags can be any combination of - * the following flags, joined with the binary OR (|) - * operator. - * - * Possible values for flags - * - * - * - * MSG_OOB - * - * Send OOB (out-of-band) data. - * - * - * - * MSG_EOR - * - * Indicate a record mark. The sent data completes the record. - * - * - * - * MSG_EOF - * - * Close the sender side of the socket and include an appropriate - * notification of this at the end of the sent data. The sent data - * completes the transaction. - * - * - * - * MSG_DONTROUTE - * - * Bypass routing, use direct interface. - * - * - * - * - * - * @param string $address IP address of the remote host. - * @param int|null $port port is the remote port number at which the data - * will be sent. - * @return int socket_sendto returns the number of bytes sent to the - * remote host. + * @param \Socket $socket + * @param string $data + * @param int $length + * @param int $flags + * @param string $address + * @param int|null $port + * @return int * @throws SocketsException * */ @@ -686,16 +376,7 @@ function socket_sendto(\Socket $socket, string $data, int $length, int $flags, s /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the - * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a blocking socket, the script will pause its execution until it receives - * a signal or it can perform the operation. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -710,17 +391,7 @@ function socket_set_block(\Socket $socket): void /** - * The socket_set_nonblock function sets the - * O_NONBLOCK flag on the socket specified by - * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a - * signal or it can perform the operation. Rather, if the operation would result - * in a block, the called function will fail. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. + * @param \Socket $socket * @throws SocketsException * */ @@ -735,24 +406,10 @@ function socket_set_nonblock(\Socket $socket): void /** - * The socket_set_option function sets the option - * specified by the option parameter, at the - * specified protocol level, to the value pointed to - * by the value parameter for the - * socket. - * - * @param \Socket $socket A Socket instance created with socket_create - * or socket_accept. - * @param int $level The level parameter specifies the protocol - * level at which the option resides. For example, to set options at - * the socket level, a level parameter of - * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the - * getprotobyname function. - * @param int $option The available socket options are the same as those for the - * socket_get_option function. - * @param array|int|string $value The option value. + * @param \Socket $socket + * @param int $level + * @param int $option + * @param array|int|string $value * @throws SocketsException * */ @@ -767,37 +424,8 @@ function socket_set_option(\Socket $socket, int $level, int $option, $value): vo /** - * The socket_shutdown function allows you to stop - * incoming, outgoing or all data (the default) from being sent through the - * socket - * - * @param \Socket $socket A Socket instance created with socket_create. - * @param int $mode The value of mode can be one of the following: - * - * possible values for mode - * - * - * - * 0 - * - * Shutdown socket reading - * - * - * - * 1 - * - * Shutdown socket writing - * - * - * - * 2 - * - * Shutdown socket reading and writing - * - * - * - * - * + * @param \Socket $socket + * @param int $mode * @throws SocketsException * */ @@ -812,13 +440,9 @@ function socket_shutdown(\Socket $socket, int $mode = 2): void /** - * Exports the WSAPROTOCOL_INFO structure into shared memory and returns - * an identifier to be used with socket_wsaprotocol_info_import. The - * exported ID is only valid for the given process_id. - * - * @param \Socket $socket A Socket instance. - * @param int $process_id The ID of the process which will import the socket. - * @return string Returns an identifier to be used for the import + * @param \Socket $socket + * @param int $process_id + * @return string * @throws SocketsException * */ @@ -834,11 +458,8 @@ function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): strin /** - * Imports a socket which has formerly been exported from another process. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. - * @return \Socket Returns a Socket instance on success + * @param string $info_id + * @return \Socket * @throws SocketsException * */ @@ -854,10 +475,7 @@ function socket_wsaprotocol_info_import(string $info_id): \Socket /** - * Releases the shared memory corresponding to the given info_id. - * - * @param string $info_id The ID which has been returned by a former call to - * socket_wsaprotocol_info_export. + * @param string $info_id * @throws SocketsException * */ diff --git a/generated/8.5/sodium.php b/generated/8.5/sodium.php index fac756e2..ea4a955b 100644 --- a/generated/8.5/sodium.php +++ b/generated/8.5/sodium.php @@ -5,14 +5,11 @@ use Safe\Exceptions\SodiumException; /** - * Verify then decrypt a message with AEGIS-128L. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aegis128l_encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. - * @param string $key Encryption key (128-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -28,14 +25,11 @@ function sodium_crypto_aead_aegis128l_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt a message with AEGIS-256. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aegis256_encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -51,16 +45,11 @@ function sodium_crypto_aead_aegis256_decrypt(string $ciphertext, string $additio /** - * Verify then decrypt with AES-256-GCM. - * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_aes256gcm_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -76,15 +65,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi /** - * Verify then decrypt with ChaCha20-Poly1305. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -100,14 +85,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string /** - * Encrypt then authenticate with ChaCha20-Poly1305. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 8 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -123,17 +105,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad /** - * Verify then decrypt with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_chacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -149,16 +125,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st /** - * Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant). - * - * The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 12 bytes long. - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -174,18 +145,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin /** - * Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_aead_xchacha20poly1305_ietf_encrypt - * (ciphertext and tag, concatenated). - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the plaintext on success. + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -201,17 +165,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s /** - * Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant). - * - * Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use. - * - * @param string $message The plaintext message to encrypt. - * @param string $additional_data Additional, authenticated data. This is used in the verification of the authentication tag - * appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string Returns the ciphertext and tag on success. + * @param string $message + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -227,15 +185,9 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri /** - * Verify the authentication tag is valid for a given message and key. - * - * Unlike with digital signatures (e.g. sodium_crypto_sign_verify_detached), - * any party capable of verifying a message is also capable of authenticating - * their own messages. (Hence, symmetric authentication.) - * - * @param string $mac Authentication tag produced by sodium_crypto_auth - * @param string $message Message - * @param string $key Authentication key + * @param string $mac + * @param string $message + * @param string $key * @throws SodiumException * */ @@ -250,14 +202,10 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v /** - * Decrypt a message using asymmetric (public key) cryptography. - * - * @param string $ciphertext The encrypted message to attempt to decrypt. - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key_pair See sodium_crypto_box_keypair_from_secretkey_and_publickey. - * This should include the sender's public key and the recipient's secret key. - * @return string Returns the plaintext message on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -273,11 +221,9 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p /** - * Decrypt a message that was encrypted with sodium_crypto_box_seal - * - * @param string $ciphertext The encrypted message - * @param string $key_pair The keypair of the recipient. Must include the secret key. - * @return string The plaintext on success. + * @param string $ciphertext + * @param string $key_pair + * @return string * @throws SodiumException * */ @@ -293,11 +239,9 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri /** - * Appends a message to the internal hash state. - * - * @param non-empty-string $state The return value of sodium_crypto_generichash_init. - * @param string $message Data to append to the hashing state. - * @return bool Always returns TRUE. + * @param non-empty-string $state + * @param string $message + * @return bool * */ function sodium_crypto_generichash_update(string &$state, string $message): bool @@ -309,14 +253,10 @@ function sodium_crypto_generichash_update(string &$state, string $message): bool /** - * Decrypt an encrypted message with a symmetric (shared) key. - * - * @param string $ciphertext Must be in the format provided by sodium_crypto_secretbox - * (ciphertext and tag, concatenated). - * @param string $nonce A number that must be only used once, per message. 24 bytes long. - * This is a large enough bound to generate randomly (i.e. random_bytes). - * @param string $key Encryption key (256-bit). - * @return string The decrypted string on success. + * @param string $ciphertext + * @param string $nonce + * @param string $key + * @return string * @throws SodiumException * */ @@ -332,11 +272,9 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string /** - * Verify the signature attached to a message and return the message - * - * @param string $signed_message A message signed with sodium_crypto_sign - * @param non-empty-string $public_key An Ed25519 public key - * @return string Returns the original signed message on success. + * @param string $signed_message + * @param non-empty-string $public_key + * @return string * @throws SodiumException * */ @@ -352,11 +290,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st /** - * Verify signature for the message - * - * @param non-empty-string $signature The cryptographic signature obtained from sodium_crypto_sign_detached - * @param string $message The message being verified - * @param non-empty-string $public_key Ed25519 public key + * @param non-empty-string $signature + * @param string $message + * @param non-empty-string $public_key * @throws SodiumException * */ @@ -371,15 +307,11 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message, /** - * The function is similar to sodium_crypto_stream_xchacha20_xor - * but adds the ability to set the initial value of the block counter to a non-zero value. - * This permits direct access to any block without having to compute the previous ones. - * - * @param string $message The message to encrypt. - * @param string $nonce 24-byte nonce. - * @param int $counter The initial value of the block counter. - * @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen. - * @return string Encrypted message. + * @param string $message + * @param string $nonce + * @param int $counter + * @param string $key + * @return string * @throws SodiumException * */ diff --git a/generated/8.5/solr.php b/generated/8.5/solr.php index 0c4260a0..e5e269d0 100644 --- a/generated/8.5/solr.php +++ b/generated/8.5/solr.php @@ -5,9 +5,7 @@ use Safe\Exceptions\SolrException; /** - * This function returns the current version of the extension as a string. - * - * @return string It returns a string on success. + * @return string * @throws SolrException * */ diff --git a/generated/8.5/spl.php b/generated/8.5/spl.php index c357e2dd..7c012526 100644 --- a/generated/8.5/spl.php +++ b/generated/8.5/spl.php @@ -5,13 +5,9 @@ use Safe\Exceptions\SplException; /** - * This function returns an array with the names of the interfaces that the - * given object_or_class and its parents implement. - * - * @param object|string $object_or_class An object (class instance) or a string (class or interface name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -27,13 +23,9 @@ function class_implements($object_or_class, bool $autoload = true): array /** - * This function returns an array with the name of the parent classes of - * the given object_or_class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -49,14 +41,9 @@ function class_parents($object_or_class, bool $autoload = true): array /** - * This function returns an array with the names of the traits that the - * given object_or_class uses. This does however not include - * any traits used by a parent class. - * - * @param object|string $object_or_class An object (class instance) or a string (class name). - * @param bool $autoload Whether to autoload - * if not already loaded. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @param object|string $object_or_class + * @param bool $autoload + * @return array * @throws SplException * */ @@ -72,38 +59,9 @@ function class_uses($object_or_class, bool $autoload = true): array /** - * Register a function with the spl provided __autoload queue. If the queue - * is not yet activated it will be activated. - * - * If your code has an existing __autoload function then - * this function must be explicitly registered on the __autoload queue. This - * is because spl_autoload_register will effectively - * replace the engine cache for the __autoload function - * by either spl_autoload or - * spl_autoload_call. - * - * If there must be multiple autoload functions, spl_autoload_register - * allows for this. It effectively creates a queue of autoload functions, and - * runs through each of them in the order they are defined. By contrast, - * __autoload may only be defined once. - * - * @param callable(string):void|null $callback The autoload function being registered. - * If NULL, then the default implementation of - * spl_autoload will be registered. - * - * The class will not contain the leading - * backslash of a fully-qualified identifier. - * @param bool $throw This parameter specifies whether - * spl_autoload_register should throw - * exceptions when the callback - * cannot be registered. - * - * This parameter is ignored as of PHP 8.0.0, and a notice will be - * emitted if set to FALSE. spl_autoload_register - * will now always throw a TypeError on invalid - * arguments. - * @param bool $prepend If TRUE, spl_autoload_register will prepend - * the autoloader on the autoload queue instead of appending it. + * @param callable(string):void|null $callback + * @param bool $throw + * @param bool $prepend * @throws SplException * */ @@ -126,14 +84,7 @@ function spl_autoload_register(?callable $callback = null, bool $throw = true, b /** - * Removes a function from the autoload queue. If the queue - * is activated and empty after removing the given function then it will - * be deactivated. - * - * When this function results in the queue being deactivated, any - * __autoload function that previously existed will not be reactivated. - * - * @param mixed $callback The autoload function being unregistered. + * @param mixed $callback * @throws SplException * */ diff --git a/generated/8.5/sqlsrv.php b/generated/8.5/sqlsrv.php index fd85b774..2fc4fbfa 100644 --- a/generated/8.5/sqlsrv.php +++ b/generated/8.5/sqlsrv.php @@ -5,16 +5,7 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and commit/roll - * back transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ @@ -29,14 +20,7 @@ function sqlsrv_begin_transaction($conn): void /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been - * consumed. - * - * @param resource $stmt The statement resource to be cancelled. + * @param resource $stmt * @throws SqlsrvException * */ @@ -51,39 +35,8 @@ function sqlsrv_cancel($stmt): void /** - * Returns information about the client and specified connection - * - * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. - * - * Array returned by sqlsrv_client_info - * - * - * - * Key - * Description - * - * - * - * - * DriverDllName - * SQLNCLI10.DLL - * - * - * DriverODBCVer - * ODBC version (xx.yy) - * - * - * DriverVer - * SQL Server Native Client DLL version (10.5.xxx) - * - * - * ExtensionVer - * php_sqlsrv.dll version (2.0.xxx.x) - * - * - * - * + * @param resource $conn + * @return array * @throws SqlsrvException * */ @@ -99,9 +52,7 @@ function sqlsrv_client_info($conn): array /** - * Closes an open connection and releases resourses associated with the connection. - * - * @param resource $conn The connection to be closed. + * @param resource $conn * @throws SqlsrvException * */ @@ -116,16 +67,7 @@ function sqlsrv_close($conn): void /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and commit/roll back - * transactions. For more information, see - * SQLSRV Transactions. - * - * @param resource $conn The connection on which the transaction is to be committed. + * @param resource $conn * @throws SqlsrvException * */ @@ -140,44 +82,8 @@ function sqlsrv_commit($conn): void /** - * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are - * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". - * @param mixed $value The value of the specified setting. The following table shows possible values: - * - * Error and Logging Setting Options - * - * - * - * Setting - * Options - * - * - * - * - * WarningsReturnAsErrors - * 1 (TRUE) or 0 (FALSE) - * - * - * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) - * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * - * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) - * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * @param string $setting + * @param mixed $value * @throws SqlsrvException * */ @@ -192,11 +98,7 @@ function sqlsrv_configure(string $setting, $value): void /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with - * different parameter values. - * - * @param resource $stmt A statement resource returned by sqlsrv_prepare. + * @param resource $stmt * @throws SqlsrvException * */ @@ -211,29 +113,11 @@ function sqlsrv_execute($stmt): void /** - * Returns the next available row of data as an associative array, a numeric - * array, or both (the default). - * - * @param resource $stmt A statement resource returned by sqlsrv_query or sqlsrv_prepare. - * @param int $fetchType A predefined constant specifying the type of array to return. Possible - * values are SQLSRV_FETCH_ASSOC, - * SQLSRV_FETCH_NUMERIC, and - * SQLSRV_FETCH_BOTH (the default). - * - * A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a - * result set with multiple columns of the same name. - * @param int $row Specifies the row to access in a result set that uses a scrollable cursor. - * Possible values are SQLSRV_SCROLL_NEXT, - * SQLSRV_SCROLL_PRIOR, SQLSRV_SCROLL_FIRST, - * SQLSRV_SCROLL_LAST, SQLSRV_SCROLL_ABSOLUTE and, - * SQLSRV_SCROLL_RELATIVE (the default). When this parameter - * is specified, the fetchType must be explicitly defined. - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return array|null Returns an array on success, NULL if there are no more rows to return, and - * FALSE if an error occurs. + * @param resource $stmt + * @param int $fetchType + * @param int $row + * @param int $offset + * @return array|null * @throws SqlsrvException * */ @@ -257,34 +141,12 @@ function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?in /** - * Retrieves the next row of data in a result set as an instance of the specified - * class with properties that match the row field names and values that correspond - * to the row field values. - * - * @param resource $stmt A statement resource created by sqlsrv_query or - * sqlsrv_execute. - * @param string $className The name of the class to instantiate. If no class name is specified, - * stdClass is instantiated. - * @param array $ctorParams Values passed to the constructor of the specified class. If the constructor - * of the specified class takes parameters, the ctorParams array must be - * supplied. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return null|object Returns an object on success, NULL if there are no more rows to return, - * and FALSE if an error occurs or if the specified class does not exist. + * @param resource $stmt + * @param string $className + * @param array $ctorParams + * @param int $row + * @param int $offset + * @return null|object * @throws SqlsrvException * */ @@ -310,28 +172,10 @@ function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParam /** - * Makes the next row in a result set available for reading. Use - * sqlsrv_get_field to read the fields of the row. - * - * @param resource $stmt A statement resource created by executing sqlsrv_query - * or sqlsrv_execute. - * @param int $row The row to be accessed. This parameter can only be used if the specified - * statement was prepared with a scrollable cursor. In that case, this parameter - * can take on one of the following values: - * - * SQLSRV_SCROLL_NEXT - * SQLSRV_SCROLL_PRIOR - * SQLSRV_SCROLL_FIRST - * SQLSRV_SCROLL_LAST - * SQLSRV_SCROLL_ABSOLUTE - * SQLSRV_SCROLL_RELATIVE - * - * @param int $offset Specifies the row to be accessed if the row parameter is set to - * SQLSRV_SCROLL_ABSOLUTE or - * SQLSRV_SCROLL_RELATIVE. Note that the first row in - * a result set has index 0. - * @return bool|null Returns TRUE if the next row of a result set was successfully retrieved, - * FALSE if an error occurs, and NULL if there are no more rows in the result set. + * @param resource $stmt + * @param int $row + * @param int $offset + * @return bool|null * @throws SqlsrvException * */ @@ -353,15 +197,7 @@ function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement - * is rolled back. - * - * @param resource $stmt The statement for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be - * called multiple times in a script. + * @param resource $stmt * @throws SqlsrvException * */ @@ -376,20 +212,10 @@ function sqlsrv_free_stmt($stmt): void /** - * Gets field data from the currently selected row. Fields must be accessed in - * order. Field indices start at 0. - * - * @param resource $stmt A statement resource returned by sqlsrv_query or - * sqlsrv_execute. - * @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields - * must be accessed in order. i.e. If you access field index 1, then field - * index 0 will not be available. - * @param int $getAsType The PHP data type for the returned field data. If this parameter is not - * set, the field data will be returned as its default PHP data type. - * For information about default PHP data types, see - * Default PHP Data Types - * in the Microsoft SQLSRV documentation. - * @return mixed Returns data from the specified field on success. + * @param resource $stmt + * @param int $fieldIndex + * @param int $getAsType + * @return mixed * @throws SqlsrvException * */ @@ -409,12 +235,8 @@ function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null) /** - * Makes the next result of the specified statement active. Results include result - * sets, row counts, and output parameters. - * - * @param resource $stmt The statement on which the next result is being called. - * @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error - * occurred, and NULL if there are no more results to retrieve. + * @param resource $stmt + * @return bool|null * @throws SqlsrvException * */ @@ -430,12 +252,8 @@ function sqlsrv_next_result($stmt): ?bool /** - * Retrieves the number of fields (columns) on a statement. - * - * @param resource $stmt The statement for which the number of fields is returned. - * sqlsrv_num_fields can be called on a statement before - * or after statement execution. - * @return int Returns the number of fields on success. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -451,19 +269,8 @@ function sqlsrv_num_fields($stmt): int /** - * Retrieves the number of rows in a result set. This function requires that the - * statement resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statement resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows - * in the Microsoft SQLSRV documentation. - * @return int Returns the number of rows retrieved on success. - * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. + * @param resource $stmt + * @return int * @throws SqlsrvException * */ @@ -479,23 +286,11 @@ function sqlsrv_num_rows($stmt): int /** - * Prepares a query for execution. This function is ideal for preparing a query - * that will be executed multiple times with different parameter values. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized - * query. Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -517,22 +312,11 @@ function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $optio /** - * Prepares and executes a query. - * - * @param resource $conn A connection resource returned by sqlsrv_connect. - * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. - * Array elements can be any of the following: - * - * A literal value - * A PHP variable - * An array with this structure: - * array($value [, $direction [, $phpType [, $sqlType]]]) - * - * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described - * in the following table: - * @return mixed Returns a statement resource on success. + * @param resource $conn + * @param string $sql + * @param array $params + * @param array $options + * @return mixed * @throws SqlsrvException * */ @@ -554,10 +338,7 @@ function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction - * and returns the connection to auto-commit mode. - * - * @param resource $conn The connection resource returned by a call to sqlsrv_connect. + * @param resource $conn * @throws SqlsrvException * */ diff --git a/generated/8.5/ssdeep.php b/generated/8.5/ssdeep.php index 2c09aea9..8d93d77a 100644 --- a/generated/8.5/ssdeep.php +++ b/generated/8.5/ssdeep.php @@ -5,14 +5,9 @@ use Safe\Exceptions\SsdeepException; /** - * Calculates the match score between signature1 - * and signature2 using - * context-triggered piecewise hashing, and returns the match - * score. - * - * @param string $signature1 The first fuzzy hash signature string. - * @param string $signature2 The second fuzzy hash signature string. - * @return int Returns an integer from 0 to 100 on success. + * @param string $signature1 + * @param string $signature2 + * @return int * @throws SsdeepException * */ @@ -28,13 +23,8 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int /** - * ssdeep_fuzzy_hash_filename calculates the hash - * of the file specified by file_name using - * context-triggered piecewise - * hashing, and returns that hash. - * - * @param string $file_name The filename of the file to hash. - * @return string Returns a string on success. + * @param string $file_name + * @return string * @throws SsdeepException * */ @@ -50,12 +40,8 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string /** - * ssdeep_fuzzy_hash calculates the hash of - * to_hash using - * context-triggered piecewise hashing, and returns that hash. - * - * @param string $to_hash The input string. - * @return string Returns a string on success. + * @param string $to_hash + * @return string * @throws SsdeepException * */ diff --git a/generated/8.5/ssh2.php b/generated/8.5/ssh2.php index 04882b11..c9d72f28 100644 --- a/generated/8.5/ssh2.php +++ b/generated/8.5/ssh2.php @@ -5,11 +5,8 @@ use Safe\Exceptions\Ssh2Exception; /** - * Authenticate over SSH using the ssh agent - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. + * @param resource $session + * @param string $username * @throws Ssh2Exception * */ @@ -24,18 +21,13 @@ function ssh2_auth_agent($session, string $username): void /** - * Authenticate using a public hostkey read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username * @param string $hostname * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. - * @param string $local_username If local_username is omitted, then the value - * for username will be used for it. + * @param string $passphrase + * @param string $local_username * @throws Ssh2Exception * */ @@ -56,13 +48,9 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** - * Authenticate over SSH using a plain password. Since version 0.12 this function - * also supports keyboard_interactive method. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $username Remote user name. - * @param string $password Password for username + * @param resource $session + * @param string $username + * @param string $password * @throws Ssh2Exception * */ @@ -77,17 +65,11 @@ function ssh2_auth_password($session, string $username, string $password): void /** - * Authenticate using a public key read from a file. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $username - * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * - * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 + * @param string $pubkeyfile * @param string $privkeyfile - * @param string $passphrase If privkeyfile is encrypted (which it should - * be), the passphrase must be provided. + * @param string $passphrase * @throws Ssh2Exception * */ @@ -106,201 +88,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** - * Establish a connection to a remote SSH server. - * - * Once connected, the client should verify the server's hostkey using - * ssh2_fingerprint, then authenticate using either - * password or public key. - * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters - * as described below. - * - * - * methods may be an associative array - * with any or all of the following parameters. - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * kex - * - * List of key exchange methods to advertise, comma separated - * in order of preference. - * - * - * diffie-hellman-group1-sha1, - * diffie-hellman-group14-sha1, and - * diffie-hellman-group-exchange-sha1 - * - * - * - * hostkey - * - * List of hostkey methods to advertise, comma separated - * in order of preference. - * - * - * ssh-rsa and - * ssh-dss - * - * - * - * client_to_server - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from client to server. - * - * - * - * - * server_to_client - * - * Associative array containing crypt, compression, and - * message authentication code (MAC) method preferences - * for messages sent from server to client. - * - * - * - * - * - * - * - * * - Supported Values are dependent on methods supported by underlying library. - * See libssh2 documentation for additional - * information. - * - * - * - * client_to_server and - * server_to_client may be an associative array - * with any or all of the following parameters. - * - * - * - * - * Index - * Meaning - * Supported Values* - * - * - * - * - * crypt - * List of crypto methods to advertise, comma separated - * in order of preference. - * - * rijndael-cbc@lysator.liu.se, - * aes256-cbc, - * aes192-cbc, - * aes128-cbc, - * 3des-cbc, - * blowfish-cbc, - * cast128-cbc, - * arcfour, and - * none** - * - * - * - * comp - * List of compression methods to advertise, comma separated - * in order of preference. - * - * zlib and - * none - * - * - * - * mac - * List of MAC methods to advertise, comma separated - * in order of preference. - * - * hmac-sha1, - * hmac-sha1-96, - * hmac-ripemd160, - * hmac-ripemd160@openssh.com, and - * none** - * - * - * - * - * - * - * - * Crypt and MAC method "none" - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * - * - * - * For security reasons, none is disabled by the underlying - * libssh2 library unless explicitly enabled - * during build time by using the appropriate ./configure options. See documentation - * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any - * or all of the following parameters. - * - * - * Callbacks parameters - * - * - * - * - * Index - * Meaning - * Prototype - * - * - * - * - * ignore - * - * Name of function to call when an - * SSH2_MSG_IGNORE packet is received - * - * void ignore_cb($message) - * - * - * debug - * - * Name of function to call when an - * SSH2_MSG_DEBUG packet is received - * - * void debug_cb($message, $language, $always_display) - * - * - * macerror - * - * Name of function to call when a packet is received but the - * message authentication code failed. If the callback returns - * TRUE, the mismatch will be ignored, otherwise the connection - * will be terminated. - * - * bool macerror_cb($packet) - * - * - * disconnect - * - * Name of function to call when an - * SSH2_MSG_DISCONNECT packet is received - * - * void disconnect_cb($reason, $message, $language) - * - * - * - * - * @return resource Returns a resource on success. + * @param array $methods + * @param array $callbacks + * @return resource * @throws Ssh2Exception * */ @@ -322,10 +114,7 @@ function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?arr /** - * Close a connection to a remote SSH server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @throws Ssh2Exception * */ @@ -340,20 +129,14 @@ function ssh2_disconnect($session): void /** - * Execute a command at the remote end and allocate a channel for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. + * @param resource $session * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream on success. + * @param array $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ @@ -381,10 +164,8 @@ function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = /** - * Accepts a connection created by a listener. - * - * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen. - * @return resource Returns a stream resource. + * @param resource $listener + * @return resource * @throws Ssh2Exception * */ @@ -400,13 +181,11 @@ function ssh2_forward_accept($listener) /** - * Binds a port on the remote server and listen for connections. - * - * @param resource $session An SSH Session resource, obtained from a call to ssh2_connect. - * @param int $port The port of the remote server. + * @param resource $session + * @param int $port * @param string $host * @param int $max_connections - * @return resource Returns an SSH2 Listener. + * @return resource * @throws Ssh2Exception * */ @@ -428,17 +207,11 @@ function ssh2_forward_listen($session, int $port, ?string $host = null, int $max /** - * - * - * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data - * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. - * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. - * To mark an attribute as mandatory, precede its name with an asterisk. - * If the server is unable to support an attribute marked mandatory, - * it will abort the add process. + * @param resource $pkey + * @param string $algoname + * @param string $blob + * @param bool $overwrite + * @param array $attributes * @throws Ssh2Exception * */ @@ -457,17 +230,8 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** - * Request the Publickey subsystem from an already connected SSH2 server. - * - * The publickey subsystem allows an already connected and authenticated - * client to manage the list of authorized public keys stored on the - * target server in an implementation agnostic manner. - * If the remote server does not support the publickey subsystem, - * the ssh2_publickey_init function will return FALSE. - * * @param resource $session - * @return resource Returns an SSH2 Publickey Subsystem resource for use - * with all other ssh2_publickey_*() methods. + * @return resource * @throws Ssh2Exception * */ @@ -483,11 +247,9 @@ function ssh2_publickey_init($session) /** - * Removes an authorized publickey. - * - * @param resource $pkey Publickey Subsystem Resource - * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa - * @param string $blob Publickey blob as raw binary data + * @param resource $pkey + * @param string $algoname + * @param string $blob * @throws Ssh2Exception * */ @@ -502,12 +264,9 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** - * Copy a file from the remote server to the local filesystem using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $remote_file Path to the remote file. - * @param string $local_file Path to the local file. + * @param resource $session + * @param string $remote_file + * @param string $local_file * @throws Ssh2Exception * */ @@ -522,14 +281,10 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** - * Copy a file from the local filesystem to the remote server using the SCP protocol. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $local_file Path to the local file. - * @param string $remote_file Path to the remote file. - * @param int $create_mode The file will be created with the mode specified by - * create_mode. + * @param resource $session + * @param string $local_file + * @param string $remote_file + * @param int $create_mode * @throws Ssh2Exception * */ @@ -544,13 +299,7 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** - * Sends an EOF to the stream; this is typically used to close standard input, - * while keeping output and error alive. For example, one can send a remote - * process some data over standard input, close it to start processing, and - * still be able to read out the results without creating additional files. - * - * @param resource $channel An SSH stream; can be acquired through functions like ssh2_fetch_stream - * or ssh2_connect. + * @param resource $channel * @throws Ssh2Exception * */ @@ -565,12 +314,9 @@ function ssh2_send_eof($channel): void /** - * Attempts to change the mode of the specified file to that given in - * mode. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename Path to the file. - * @param int $mode Permissions on the file. See the chmod for more details on this parameter. + * @param resource $sftp + * @param string $filename + * @param int $mode * @throws Ssh2Exception * */ @@ -585,18 +331,10 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** - * Creates a directory on the remote file server with permissions set to - * mode. - * - * This function is similar to using mkdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname Path of the new directory. - * @param int $mode Permissions on the new directory. - * The actual mode is affected by the current umask. - * @param bool $recursive If recursive is TRUE any parent directories - * required for dirname will be automatically created as well. + * @param resource $sftp + * @param string $dirname + * @param int $mode + * @param bool $recursive * @throws Ssh2Exception * */ @@ -611,11 +349,9 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** - * Renames a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $from The current file that is being renamed. - * @param string $to The new file name that replaces from. + * @param resource $sftp + * @param string $from + * @param string $to * @throws Ssh2Exception * */ @@ -630,12 +366,7 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** - * Removes a directory from the remote file server. - * - * This function is similar to using rmdir with the - * ssh2.sftp:// wrapper. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $dirname * @throws Ssh2Exception * @@ -651,11 +382,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** - * Creates a symbolic link named link on the remote - * filesystem pointing to target. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $target Target of the symbolic link. + * @param resource $sftp + * @param string $target * @param string $link * @throws Ssh2Exception * @@ -671,9 +399,7 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** - * Deletes a file on the remote filesystem. - * - * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. + * @param resource $sftp * @param string $filename * @throws Ssh2Exception * @@ -689,13 +415,8 @@ function ssh2_sftp_unlink($sftp, string $filename): void /** - * Request the SFTP subsystem from an already connected SSH2 server. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @return resource This method returns an SSH2 SFTP resource for use with - * all other ssh2_sftp_*() methods and the - * ssh2.sftp:// fopen wrapper. + * @param resource $session + * @return resource * @throws Ssh2Exception * */ @@ -711,20 +432,13 @@ function ssh2_sftp($session) /** - * Open a shell at the remote end and allocate a stream for it. - * - * @param resource $session An SSH connection link identifier, obtained from a call to - * ssh2_connect. - * @param string $termtype termtype should correspond to one of the - * entries in the target system's /etc/termcap file. - * @param array|null $env env may be passed as an associative array of - * name/value pairs to set in the target environment. - * @param int $width Width of the virtual terminal. - * @param int $height Height of the virtual terminal. - * @param int $width_height_type width_height_type should be one of - * SSH2_TERM_UNIT_CHARS or - * SSH2_TERM_UNIT_PIXELS. - * @return resource Returns a stream resource on success. + * @param resource $session + * @param string $termtype + * @param array|null $env + * @param int $width + * @param int $height + * @param int $width_height_type + * @return resource * @throws Ssh2Exception * */ diff --git a/generated/8.5/stream.php b/generated/8.5/stream.php index b363236a..2de7af20 100644 --- a/generated/8.5/stream.php +++ b/generated/8.5/stream.php @@ -5,18 +5,9 @@ use Safe\Exceptions\StreamException; /** - * Sets options on the specified context. - * - * @param resource $context The stream or context resource to apply the options to. - * @param array $options The options to set for context. - * - * options must be an associative - * array of associative arrays in the format - * $array['wrapper']['option'] = $value. - * - * Refer to context options and parameters - * for a listing of stream options. - * @return true Returns TRUE on success. + * @param resource $context + * @param array $options + * @return true * @throws StreamException * */ @@ -31,11 +22,8 @@ function stream_context_set_options($context, array $options): void /** - * Sets parameters on the specified context. - * - * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: - * $params['paramname'] = "paramvalue";. + * @param resource $context + * @param array $params * @throws StreamException * */ @@ -50,18 +38,11 @@ function stream_context_set_params($context, array $params): void /** - * Makes a copy of up to length bytes - * of data from the current position (or from the - * offset position, if specified) in - * from to to. If - * length is NULL, all remaining content in - * from will be copied. - * - * @param resource $from The source stream - * @param resource $to The destination stream - * @param int|null $length Maximum bytes to copy. By default all bytes left are copied. - * @param int $offset The offset where to start to copy data - * @return int Returns the total count of bytes copied. + * @param resource $from + * @param resource $to + * @param int|null $length + * @param int $offset + * @return int * @throws StreamException * */ @@ -83,33 +64,11 @@ function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0) /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_append will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified - * params to the end of - * the list and will therefore be called last during stream operations. - * To add a filter to the beginning of the list, use - * stream_filter_prepend. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -131,34 +90,11 @@ function stream_filter_append($stream, string $filtername, ?int $read_write = nu /** - * Adds filtername to the list of filters - * attached to stream. - * - * @param resource $stream The target stream. - * @param string $filtername The filter name. - * @param int $read_write By default, stream_filter_prepend will - * attach the filter to the read filter chain - * if the file was opened for reading (i.e. File Mode: - * r, and/or +). The filter - * will also be attached to the write filter chain - * if the file was opened for writing (i.e. File Mode: - * w, a, and/or +). - * STREAM_FILTER_READ, - * STREAM_FILTER_WRITE, and/or - * STREAM_FILTER_ALL can also be passed to the - * read_write parameter to override this behavior. - * See stream_filter_append for an example of - * using this parameter. - * @param mixed $params This filter will be added with the specified params - * to the beginning of the list and will therefore be - * called first during stream operations. To add a filter to the end of the - * list, use stream_filter_append. - * @return resource Returns a resource on success. The resource can be - * used to refer to this filter instance during a call to - * stream_filter_remove. - * - * FALSE is returned if stream is not a resource or - * if filtername cannot be located. + * @param resource $stream + * @param string $filtername + * @param int $read_write + * @param mixed $params + * @return resource * @throws StreamException * */ @@ -180,20 +116,8 @@ function stream_filter_prepend($stream, string $filtername, ?int $read_write = n /** - * stream_filter_register allows you to implement - * your own filter on any registered stream used with all the other - * filesystem functions (such as fopen, - * fread etc.). - * - * @param string $filter_name The filter name to be registered. - * @param string $class To implement a filter, you need to define a class as an extension of - * php_user_filter with a number of member - * functions. When performing read/write operations on the stream - * to which your filter is attached, PHP will pass the data through your - * filter (and any other filters attached to that stream) so that the - * data may be modified as desired. You must implement the methods - * exactly as described in php_user_filter - doing - * otherwise will lead to undefined behaviour. + * @param string $filter_name + * @param string $class * @throws StreamException * */ @@ -208,13 +132,7 @@ function stream_filter_register(string $filter_name, string $class): void /** - * Removes a stream filter previously added to a stream with - * stream_filter_prepend or - * stream_filter_append. Any data remaining in the - * filter's internal buffer will be flushed through to the next filter before - * removing it. - * - * @param resource $stream_filter The stream filter to be removed. + * @param resource $stream_filter * @throws StreamException * */ @@ -229,18 +147,10 @@ function stream_filter_remove($stream_filter): void /** - * Identical to file_get_contents, except that - * stream_get_contents operates on an already open - * stream resource and returns the remaining contents in a string, up to - * length bytes and starting at the specified - * offset. - * - * @param resource $stream A stream resource (e.g. returned from fopen) - * @param int|null $length The maximum bytes to read. Defaults to NULL (read all the remaining - * buffer). - * @param int $offset Seek to the specified offset before reading. If this number is negative, - * no seeking will occur and reading will start from the current position. - * @return string Returns a string. + * @param resource $stream + * @param int|null $length + * @param int $offset + * @return string * @throws StreamException * */ @@ -262,25 +172,10 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st /** - * Gets a line from the given handle. - * - * Reading ends when length bytes have been read, when - * the non-empty string specified by ending is found (which is - * not included in the return value), or on EOF - * (whichever comes first). - * - * This function is nearly identical to fgets except in - * that it allows end of line delimiters other than the standard \n, \r, and - * \r\n, and does not return the delimiter itself. - * - * @param resource $stream A valid file handle. - * @param int $length The maximum number of bytes to read from the handle. - * Negative values are not supported. - * Zero (0) means the default socket chunk size, - * i.e. 8192 bytes. - * @param string $ending An optional string delimiter. - * @return string Returns a string of up to length bytes read from the file - * pointed to by stream. + * @param resource $stream + * @param int $length + * @param string $ending + * @return string * @throws StreamException * */ @@ -296,9 +191,6 @@ function stream_get_line($stream, int $length, string $ending = ""): string /** - * Determines if stream stream refers to a valid terminal type device. - * This is a more portable version of posix_isatty, since it works on Windows systems too. - * * @param resource $stream * @throws StreamException * @@ -314,10 +206,8 @@ function stream_isatty($stream): void /** - * Resolve filename against the include path according to the same rules as fopen/include. - * - * @param string $filename The filename to resolve. - * @return string Returns a string containing the resolved absolute filename. + * @param string $filename + * @return string * @throws StreamException * */ @@ -333,20 +223,8 @@ function stream_resolve_include_path(string $filename): string /** - * Sets blocking or non-blocking mode on a stream. - * - * This function works for any stream that supports non-blocking mode - * (currently, regular files and socket streams). - * - * @param resource $stream The stream. - * @param bool $enable If enable is FALSE, the given stream - * will be switched to non-blocking mode, and if TRUE, it - * will be switched to blocking mode. This affects calls like - * fgets and fread - * that read from the stream. In non-blocking mode an - * fgets call will always return right away - * while in blocking mode it will wait for data to become available - * on the stream. + * @param resource $stream + * @param bool $enable * @throws StreamException * */ @@ -361,17 +239,9 @@ function stream_set_blocking($stream, bool $enable): void /** - * Sets the timeout value on stream, - * expressed in the sum of seconds and - * microseconds. - * - * When the stream times out, the 'timed_out' key of the array returned by - * stream_get_meta_data is set to TRUE, although no - * error/warning is generated. - * - * @param resource $stream The target stream. - * @param int $seconds The seconds part of the timeout to be set. - * @param int $microseconds The microseconds part of the timeout to be set. + * @param resource $stream + * @param int $seconds + * @param int $microseconds * @throws StreamException * */ @@ -386,19 +256,10 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** - * Accept a connection on a socket previously created by - * stream_socket_server. - * - * @param resource $socket The server socket to accept a connection from. - * @param float|null $timeout Override the default socket accept timeout. Time should be given in - * seconds. By default, default_socket_timeout - * is used. - * @param null|string $peer_name Will be set to the name (address) of the client which connected, if - * included and available from the selected transport. - * - * Can also be determined later using - * stream_socket_get_name. - * @return resource Returns a stream to the accepted socket connection. + * @param resource $socket + * @param float|null $timeout + * @param null|string $peer_name + * @return resource * @throws StreamException * */ @@ -420,52 +281,13 @@ function stream_socket_accept($socket, ?float $timeout = null, ?string &$peer_na /** - * Initiates a stream or datagram connection to the destination specified - * by address. The type of socket created - * is determined by the transport specified using standard URL formatting: - * transport://target. For Internet Domain sockets - * (AF_INET) such as TCP and UDP, the target portion - * of the address parameter should consist of - * a hostname or IP address followed by a colon and a port number. For Unix - * domain sockets, the target portion should point - * to the socket file on the filesystem. - * - * @param string $address Address to the socket to connect to. - * @param int|null $error_code Will be set to the system level error number if connection fails. - * @param null|string $error_message Will be set to the system level error message if the connection fails. - * @param float|null $timeout Number of seconds until the connect() system call - * should timeout. By default, default_socket_timeout - * is used. - * - * - * This parameter only applies when not making asynchronous - * connection attempts. - * - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * - * - * - * To set a timeout for reading/writing data over the socket, use the - * stream_set_timeout, as the - * timeout only applies while making connecting - * the socket. - * @param int-mask $flags Bitmask field which may be set to any combination of connection flags. - * Currently the select of connection flags is limited to - * STREAM_CLIENT_CONNECT (default), - * STREAM_CLIENT_ASYNC_CONNECT and - * STREAM_CLIENT_PERSISTENT. - * @param null|resource $context A valid context resource created with stream_context_create. - * @return resource On success a stream resource is returned which may - * be used together with the other file functions (such as - * fgets, fgetss, - * fwrite, fclose, and - * feof). + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param float|null $timeout + * @param int-mask $flags + * @param null|resource $context + * @return resource * @throws StreamException * */ @@ -489,12 +311,9 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string /** - * Returns the local or remote name of a given socket connection. - * - * @param resource $socket The socket to get the name of. - * @param bool $remote If set to TRUE the remote socket name will be returned, if set - * to FALSE the local socket name will be returned. - * @return string The name of the socket. + * @param resource $socket + * @param bool $remote + * @return string * @throws StreamException * */ @@ -510,25 +329,10 @@ function stream_socket_get_name($socket, bool $remote): string /** - * stream_socket_pair creates a pair of connected, - * indistinguishable socket streams. This function is commonly used in IPC - * (Inter-Process Communication). - * - * @param int $domain The protocol family to be used: STREAM_PF_INET, - * STREAM_PF_INET6 or - * STREAM_PF_UNIX - * @param int $type The type of communication to be used: - * STREAM_SOCK_DGRAM, - * STREAM_SOCK_RAW, - * STREAM_SOCK_RDM, - * STREAM_SOCK_SEQPACKET or - * STREAM_SOCK_STREAM - * @param int $protocol The protocol to be used: STREAM_IPPROTO_ICMP, - * STREAM_IPPROTO_IP, - * STREAM_IPPROTO_RAW, - * STREAM_IPPROTO_TCP or - * STREAM_IPPROTO_UDP - * @return resource[] Returns an array with the two socket resources on success. + * @param int $domain + * @param int $type + * @param int $protocol + * @return resource[] * @throws StreamException * */ @@ -544,38 +348,11 @@ function stream_socket_pair(int $domain, int $type, int $protocol): array /** - * stream_socket_recvfrom accepts - * data from a remote socket up to length bytes. - * - * @param resource $socket The remote socket. - * @param int $length The number of bytes to receive from the socket. - * @param int $flags The value of flags can be any combination - * of the following: - * - * Possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * STREAM_PEEK - * - * Retrieve data from the socket, but do not consume the buffer. - * Subsequent calls to fread or - * stream_socket_recvfrom will see - * the same data. - * - * - * - * - * - * @param null|string $address If address is provided it will be populated with - * the address of the remote socket. - * @return string Returns the read data, as a string. + * @param resource $socket + * @param int $length + * @param int $flags + * @param null|string $address + * @return string * @throws StreamException * */ @@ -591,31 +368,11 @@ function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$ /** - * Sends the specified data through the - * socket. - * - * @param resource $socket The socket to send data to. - * @param string $data The data to be sent. - * @param int $flags The value of flags can be any combination - * of the following: - * - * possible values for flags - * - * - * - * STREAM_OOB - * - * Process OOB (out-of-band) data. - * - * - * - * - * - * @param string $address The address specified when the socket stream was created will be used - * unless an alternate address is specified in address. - * - * If specified, it must be in dotted quad (or [ipv6]) format. - * @return int Returns a result code, as an integer. + * @param resource $socket + * @param string $data + * @param int $flags + * @param string $address + * @return int * @throws StreamException * */ @@ -631,44 +388,12 @@ function stream_socket_sendto($socket, string $data, int $flags = 0, string $add /** - * Creates a stream or datagram socket on the specified - * address. - * - * This function only creates a socket, to begin accepting connections - * use stream_socket_accept. - * - * @param string $address The type of socket created is determined by the transport specified - * using standard URL formatting: transport://target. - * - * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the - * remote_socket parameter should consist of a - * hostname or IP address followed by a colon and a port number. For - * Unix domain sockets, the target portion should - * point to the socket file on the filesystem. - * - * Depending on the environment, Unix domain sockets may not be available. - * A list of available transports can be retrieved using - * stream_get_transports. See - * for a list of bulitin transports. - * @param int|null $error_code If the optional error_code and error_message - * arguments are present they will be set to indicate the actual system - * level error that occurred in the system-level socket(), - * bind(), and listen() calls. If - * the value returned in error_code is - * 0 and the function returned FALSE, it is an - * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. - * Note that the error_code and - * error_message arguments will always be passed by reference. - * @param null|string $error_message See error_code description. - * @param int $flags A bitmask field which may be set to any combination of socket creation - * flags. - * - * For UDP sockets, you must use STREAM_SERVER_BIND as - * the flags parameter. + * @param string $address + * @param int|null $error_code + * @param null|string $error_message + * @param int $flags * @param null|resource $context - * @return resource Returns the created stream. + * @return resource * @throws StreamException * */ @@ -688,15 +413,8 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string /** - * Shutdowns (partially or not) a full-duplex connection. - * - * @param resource $stream An open stream (opened with stream_socket_client, - * for example) - * @param int $mode One of the following constants: STREAM_SHUT_RD - * (disable further receptions), STREAM_SHUT_WR - * (disable further transmissions) or - * STREAM_SHUT_RDWR (disable further receptions and - * transmissions). + * @param resource $stream + * @param int $mode * @throws StreamException * */ @@ -711,10 +429,7 @@ function stream_socket_shutdown($stream, int $mode): void /** - * Tells whether the stream supports locking through - * flock. - * - * @param resource $stream The stream to check. + * @param resource $stream * @throws StreamException * */ @@ -729,16 +444,9 @@ function stream_supports_lock($stream): void /** - * Allows you to implement your own protocol handlers and streams for use - * with all the other filesystem functions (such as fopen, - * fread etc.). - * - * @param string $protocol The wrapper name to be registered. - * Valid protocol names must contain alphanumerics, dots (.), plusses (+), or hyphens (-) only. - * @param string $class The classname which implements the protocol. - * @param int $flags Should be set to STREAM_IS_URL if - * protocol is a URL protocol. Default is 0, local - * stream. + * @param string $protocol + * @param string $class + * @param int $flags * @throws StreamException * */ @@ -753,9 +461,6 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 /** - * Restores a built-in wrapper previously unregistered with - * stream_wrapper_unregister. - * * @param string $protocol * @throws StreamException * @@ -771,11 +476,6 @@ function stream_wrapper_restore(string $protocol): void /** - * Allows you to disable an already defined stream wrapper. Once the wrapper - * has been disabled you may override it with a user-defined wrapper using - * stream_wrapper_register or reenable it later on with - * stream_wrapper_restore. - * * @param string $protocol * @throws StreamException * diff --git a/generated/8.5/strings.php b/generated/8.5/strings.php index 4b673a75..a9f7e651 100644 --- a/generated/8.5/strings.php +++ b/generated/8.5/strings.php @@ -5,10 +5,8 @@ use Safe\Exceptions\StringsException; /** - * convert_uudecode decodes a uuencoded string. - * - * @param string $string The uuencoded data. - * @return string Returns the decoded data as a string. + * @param string $string + * @return string * @throws StringsException * */ @@ -24,10 +22,8 @@ function convert_uudecode(string $string): string /** - * Decodes a hexadecimally encoded binary string. - * - * @param string $string Hexadecimal representation of data. - * @return string Returns the binary representation of the given data. + * @param string $string + * @return string * @throws StringsException * */ @@ -43,16 +39,9 @@ function hex2bin(string $string): string /** - * Calculates the MD5 hash of the file specified by the - * filename parameter using the - * RSA Data Security, Inc. - * MD5 Message-Digest Algorithm, and returns that hash. - * The hash is a 32-character hexadecimal number. - * - * @param string $filename The filename - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 16. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ @@ -68,15 +57,9 @@ function md5_file(string $filename, bool $binary = false): string /** - * Calculates the sha1 hash of the file specified by - * filename using the - * US Secure Hash Algorithm 1, - * and returns that hash. The hash is a 40-character hexadecimal number. - * - * @param string $filename The filename of the file to hash. - * @param bool $binary When TRUE, returns the digest in raw binary format with a length of - * 20. - * @return non-falsy-string&lowercase-string Returns a string on success. + * @param string $filename + * @param bool $binary + * @return non-falsy-string&lowercase-string * @throws StringsException * */ diff --git a/generated/8.5/swoole.php b/generated/8.5/swoole.php index 3e9d4dc5..f9500d37 100644 --- a/generated/8.5/swoole.php +++ b/generated/8.5/swoole.php @@ -5,12 +5,8 @@ use Safe\Exceptions\SwooleException; /** - * - * - * @param string $hostname The host name. - * @param callable $callback The host name. - * - * The IP address. + * @param string $hostname + * @param callable $callback * @throws SwooleException * */ @@ -25,12 +21,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void /** - * - * - * @param string $filename The filename of the file being read. - * @param string $callback The name of the file. - * - * The content read from the file. + * @param string $filename + * @param string $callback * @throws SwooleException * */ @@ -45,11 +37,9 @@ function swoole_async_readfile(string $filename, string $callback): void /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. - * @param int $offset The offset. + * @param string $filename + * @param string $content + * @param int $offset * @param callable $callback * @throws SwooleException * @@ -71,10 +61,8 @@ function swoole_async_write(string $filename, string $content, ?int $offset = nu /** - * - * - * @param string $filename The filename being written. - * @param string $content The content writing to the file. + * @param string $filename + * @param string $content * @param callable $callback * @param int $flags * @throws SwooleException @@ -97,8 +85,6 @@ function swoole_async_writefile(string $filename, string $content, ?callable $ca /** - * - * * @param callable $callback * @throws SwooleException * @@ -114,8 +100,6 @@ function swoole_event_defer(callable $callback): void /** - * - * * @param int $fd * @throws SwooleException * @@ -131,8 +115,6 @@ function swoole_event_del(int $fd): void /** - * - * * @param int $fd * @param string $data * @throws SwooleException diff --git a/generated/8.5/uodbc.php b/generated/8.5/uodbc.php index a514e1d2..635add32 100644 --- a/generated/8.5/uodbc.php +++ b/generated/8.5/uodbc.php @@ -5,24 +5,9 @@ use Safe\Exceptions\UodbcException; /** - * Toggles autocommit behaviour. - * - * By default, auto-commit is on for a connection. Disabling - * auto-commit is equivalent with starting a transaction. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param bool|null $enable If enable is TRUE, auto-commit is enabled, if - * it is FALSE auto-commit is disabled. - * If NULL is passed, this function returns the auto-commit status for - * odbc. - * @return mixed With a NULL enable parameter, this function returns - * auto-commit status for odbc. Non-zero is - * returned if auto-commit is on, 0 if it is off, or FALSE if an error - * occurs. - * - * If enable is non-null, this function returns TRUE on - * success. + * @param \Odbc\Connection $odbc + * @param bool|null $enable + * @return mixed * @throws UodbcException * */ @@ -42,99 +27,9 @@ function odbc_autocommit(\Odbc\Connection $odbc, ?bool $enable = null) /** - * Controls handling of binary column data. ODBC SQL types affected are - * BINARY, VARBINARY, and - * LONGVARBINARY. - * The default mode can be set using the - * uodbc.defaultbinmode php.ini directive. - * - * When binary SQL data is converted to character C data (ODBC_BINMODE_CONVERT), each byte - * (8 bits) of source data is represented as two ASCII characters. - * These characters are the ASCII character representation of the - * number in its hexadecimal form. For example, a binary - * 00000001 is converted to - * "01" and a binary 11111111 - * is converted to "FF". - * - * While the handling of BINARY and VARBINARY - * columns only depend on the binmode, the handling of LONGVARBINARY - * columns also depends on the longreadlen as well: - * - * LONGVARBINARY handling - * - * - * - * binmode - * longreadlen - * result - * - * - * - * - * ODBC_BINMODE_PASSTHRU - * 0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * 0 - * passthru - * - * - * ODBC_BINMODE_CONVERT - * 0 - * passthru - * - * - * ODBC_BINMODE_PASSTHRU - * >0 - * passthru - * - * - * ODBC_BINMODE_RETURN - * >0 - * return as is - * - * - * ODBC_BINMODE_CONVERT - * >0 - * return as char - * - * - * - * - * - * If odbc_fetch_into is used, passthru means that an - * empty string is returned for these columns. - * If odbc_result is used, passthru means that the data are - * sent directly to the client (i.e. printed). - * - * @param int $statement The ODBC result object. - * @param int $mode Possible values for mode are: - * - * - * - * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * - * ODBC_BINMODE_RETURN: Return as is - * - * - * - * - * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * - * - * - * Handling of binary long - * columns is also affected by odbc_longreadlen. - * - * - * @return bool Always returns TRUE. + * @param int $statement + * @param int $mode + * @return bool * */ function odbc_binmode(int $statement, int $mode): bool @@ -146,39 +41,12 @@ function odbc_binmode(int $statement, int $mode): bool /** - * Lists columns and associated privileges for the given table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * This result object can be used to fetch a list of columns and - * associated privileges. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param string $column + * @return \Odbc\Result|false * */ function odbc_columnprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, string $column) @@ -190,47 +58,12 @@ function odbc_columnprivileges(\Odbc\Connection $odbc, string $catalog, string $ /** - * Lists all columns in the requested range. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The table name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $column + * @return \Odbc\Result|false * */ function odbc_columns(\Odbc\Connection $odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null) @@ -252,10 +85,7 @@ function odbc_columns(\Odbc\Connection $odbc, ?string $catalog = null, ?string $ /** - * Commits all pending transactions on the connection. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. + * @param \Odbc\Connection $odbc * @throws UodbcException * */ @@ -270,50 +100,11 @@ function odbc_commit(\Odbc\Connection $odbc): void /** - * The connection id returned by this functions is needed by other - * ODBC functions. You can have multiple connections open at once as long as - * they either use different db or different credentials. - * - * With some ODBC drivers, executing a complex stored procedure may - * fail with an error similar to: "Cannot open a cursor on a stored - * procedure that has anything other than a single select statement - * in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some - * drivers don't support the optional row_number parameter in - * odbc_fetch_row. SQL_CUR_USE_ODBC might help - * in that case, too. - * - * @param string $dsn The database source name for the connection. Alternatively, a - * DSN-less connection string can be used. - * @param null|string $user The username. - * This parameter is ignored if dsn contains uid. - * To connect without specifying a user, - * use NULL. - * @param null|string $password The password. - * This parameter is ignored if dsn contains pwd. - * To connect without specifying a password, - * use NULL. - * @param int $cursor_option This sets the type of cursor to be used - * for this connection. This parameter is not normally needed, but - * can be useful for working around problems with some ODBC drivers. - * - * - * - * - * SQL_CUR_USE_IF_NEEDED - * - * - * - * - * SQL_CUR_USE_ODBC - * - * - * - * - * SQL_CUR_USE_DRIVER - * - * - * - * @return \Odbc\Connection Returns an ODBC connection. + * @param string $dsn + * @param null|string $user + * @param null|string $password + * @param int $cursor_option + * @return \Odbc\Connection * @throws UodbcException * */ @@ -337,10 +128,8 @@ function odbc_connect(string $dsn, ?string $user = null, ?string $password = nul /** - * Gets the cursorname for the given result_id. - * - * @param \Odbc\Result $statement The ODBC result object. - * @return string Returns the cursor name, as a string. + * @param \Odbc\Result $statement + * @return string * @throws UodbcException * */ @@ -356,17 +145,9 @@ function odbc_cursor(\Odbc\Result $statement): string /** - * This function will return the list of available DSN (after calling it - * several times). - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $fetch_type The fetch_type can be one of two constant types: - * SQL_FETCH_FIRST, SQL_FETCH_NEXT. - * Use SQL_FETCH_FIRST the first time this function is - * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching - * the last available DSN. + * @param \Odbc\Connection $odbc + * @param int $fetch_type + * @return array * @throws UodbcException * */ @@ -382,13 +163,9 @@ function odbc_data_source(\Odbc\Connection $odbc, int $fetch_type): array /** - * Sends an SQL statement to the database server. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The SQL statement. - * @return \Odbc\Result Returns an ODBC result object if the SQL command was executed - * successfully. + * @param \Odbc\Connection $odbc + * @param string $query + * @return \Odbc\Result * @throws UodbcException * */ @@ -404,18 +181,8 @@ function odbc_exec(\Odbc\Connection $odbc, string $query): \Odbc\Result /** - * Executes a statement prepared with odbc_prepare. - * - * @param \Odbc\Result $statement The ODBC result object from odbc_prepare. - * @param array $params Parameters in params will be - * substituted for placeholders in the prepared statement in order. - * Elements of this array will be converted to strings by calling this - * function. - * - * Any parameters in params which - * start and end with single quotes will be taken as the name of a - * file to read and send to the database server as the data for the - * appropriate placeholder. + * @param \Odbc\Result $statement + * @param array $params * @throws UodbcException * */ @@ -430,16 +197,10 @@ function odbc_execute(\Odbc\Result $statement, array $params = []): void /** - * Fetch one result row into array. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param array|null $array The result array - * that can be of any type since it will be converted to type - * array. The array will contain the column values starting at array - * index 0. - * @param int|null $row The row number. - * @return int Returns the number of columns in the result; - * FALSE on error. + * @param \Odbc\Result $statement + * @param array|null $array + * @param int|null $row + * @return int * @throws UodbcException * */ @@ -459,12 +220,9 @@ function odbc_fetch_into(\Odbc\Result $statement, ?array &$array, ?int $row = nu /** - * Gets the length of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field length. + * @param \Odbc\Result $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -480,12 +238,9 @@ function odbc_field_len(\Odbc\Result $statement, int $field): int /** - * Gets the name of the field occupying the given column number in the given - * result object. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field name as a string. + * @param \Odbc\Result $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -501,13 +256,9 @@ function odbc_field_name(\Odbc\Result $statement, int $field): string /** - * Gets the number of the column slot that corresponds to the named field in - * the given result object. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param string $field The field name. - * @return int Returns the field number as a integer. - * Field numbering starts at 1. + * @param \Odbc\Result $statement + * @param string $field + * @return int * @throws UodbcException * */ @@ -523,12 +274,9 @@ function odbc_field_num(\Odbc\Result $statement, string $field): int /** - * Gets the scale of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return int Returns the field scale as a integer. + * @param \Odbc\Result $statement + * @param int $field + * @return int * @throws UodbcException * */ @@ -544,12 +292,9 @@ function odbc_field_scale(\Odbc\Result $statement, int $field): int /** - * Gets the SQL type of the field referenced by number in the given result - * identifier. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $field The field number. Field numbering starts at 1. - * @return string Returns the field type as a string. + * @param \Odbc\Result $statement + * @param int $field + * @return string * @throws UodbcException * */ @@ -565,38 +310,14 @@ function odbc_field_type(\Odbc\Result $statement, int $field): string /** - * Retrieves a list of foreign keys in the specified table or a list of - * foreign keys in other tables that refer to the primary key in the - * specified table - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $pk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the primary key table. - * @param string $pk_schema The schema ('owner' in ODBC 2 parlance) of the primary key table. - * @param string $pk_table The primary key table. - * @param string $fk_catalog The catalog ('qualifier' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_schema The schema ('owner' in ODBC 2 parlance) of the foreign key table. - * @param string $fk_table The foreign key table. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * PKTABLE_CAT - * PKTABLE_SCHEM - * PKTABLE_NAME - * PKCOLUMN_NAME - * FKTABLE_CAT - * FKTABLE_SCHEM - * FKTABLE_NAME - * FKCOLUMN_NAME - * KEY_SEQ - * UPDATE_RULE - * DELETE_RULE - * FK_NAME - * PK_NAME - * DEFERRABILITY - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $pk_catalog + * @param string $pk_schema + * @param string $pk_table + * @param string $fk_catalog + * @param string $fk_schema + * @param string $fk_table + * @return \Odbc\Result|false * */ function odbc_foreignkeys(\Odbc\Connection $odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) @@ -608,34 +329,9 @@ function odbc_foreignkeys(\Odbc\Connection $odbc, string $pk_catalog, string $pk /** - * Retrieves information about data types supported by the data source. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $data_type The data type, which can be used to restrict the information to a - * single data type. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TYPE_NAME - * DATA_TYPE - * PRECISION - * LITERAL_PREFIX - * LITERAL_SUFFIX - * CREATE_PARAMS - * NULLABLE - * CASE_SENSITIVE - * SEARCHABLE - * UNSIGNED_ATTRIBUTE - * MONEY - * AUTO_INCREMENT - * LOCAL_TYPE_NAME - * MINIMUM_SCALE - * MAXIMUM_SCALE - * - * - * The result set is ordered by DATA_TYPE and TYPE_NAME. + * @param \Odbc\Connection $odbc + * @param int $data_type + * @return \Odbc\Result|false * */ function odbc_gettypeinfo(\Odbc\Connection $odbc, int $data_type = 0) @@ -647,15 +343,9 @@ function odbc_gettypeinfo(\Odbc\Connection $odbc, int $data_type = 0) /** - * Controls handling of LONG, LONGVARCHAR and LONGVARBINARY columns. - * The default length can be set using the - * uodbc.defaultlrl php.ini directive. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param int $length The number of bytes returned to PHP is controlled by the parameter - * length. If it is set to 0, long column data is passed through to the - * client (i.e. printed) when retrieved with odbc_result. - * @return bool Always returns TRUE. + * @param \Odbc\Result $statement + * @param int $length + * @return bool * */ function odbc_longreadlen(\Odbc\Result $statement, int $length): bool @@ -667,10 +357,8 @@ function odbc_longreadlen(\Odbc\Result $statement, int $length): bool /** - * Gets the number of fields (columns) in an ODBC result. - * - * @param \Odbc\Result $statement The ODBC result object returned by odbc_exec. - * @return int Returns the number of fields. + * @param \Odbc\Result $statement + * @return int * @throws UodbcException * */ @@ -686,22 +374,11 @@ function odbc_num_fields(\Odbc\Result $statement): int /** - * Opens a persistent database connection. - * - * This function is much like - * odbc_connect, except that the connection is - * not really closed when the script has finished. Future requests - * for a connection with the same dsn, - * user, password - * combination (via odbc_connect and - * odbc_pconnect) can reuse the persistent - * connection. - * * @param string $dsn * @param null|string $user * @param null|string $password * @param int $cursor_option - * @return \Odbc\Connection Returns an ODBC connection. + * @return \Odbc\Connection * @throws UodbcException * */ @@ -725,19 +402,9 @@ function odbc_pconnect(string $dsn, ?string $user = null, ?string $password = nu /** - * Prepares a statement for execution. The ODBC result object can be used - * later to execute the statement with odbc_execute. - * - * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support - * stored procedures that accept parameters of type IN, INOUT, and OUT as - * defined by the ODBC specification. However, the Unified ODBC driver - * currently only supports parameters of type IN to stored procedures. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $query The query string statement being prepared. - * @return \Odbc\Result Returns an ODBC result object if the SQL command was prepared - * successfully. + * @param \Odbc\Connection $odbc + * @param string $query + * @return \Odbc\Result * @throws UodbcException * */ @@ -753,26 +420,11 @@ function odbc_prepare(\Odbc\Connection $odbc, string $query): \Odbc\Result /** - * Returns a result object that can be used to fetch the column names - * that comprise the primary key for a table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema * @param string $table - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * COLUMN_NAME - * KEY_SEQ - * PK_NAME - * - * Drivers can report additional columns. + * @return \Odbc\Result|false * */ function odbc_primarykeys(\Odbc\Connection $odbc, string $catalog, string $schema, string $table) @@ -784,50 +436,12 @@ function odbc_primarykeys(\Odbc\Connection $odbc, string $catalog, string $schem /** - * Retrieve information about parameters to procedures. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The proc. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $column The column. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns the list of input and output parameters, as well as the - * columns that make up the result set for the specified procedures. - * Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * COLUMN_NAME - * COLUMN_TYPE - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * NUM_PREC_RADIX - * NULLABLE - * REMARKS - * COLUMN_DEF - * SQL_DATA_TYPE - * SQL_DATETIME_SUB - * CHAR_OCTET_LENGTH - * ORDINAL_POSITION - * IS_NULLABLE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @param null|string $column + * @return \Odbc\Result|false * */ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null) @@ -849,33 +463,11 @@ function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = /** - * Lists all procedures in the requested range. - * - * @param $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $procedure The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result Returns an ODBC result object containing the information. - * - * The result set has the following columns: - * - * PROCEDURE_CAT - * PROCEDURE_SCHEM - * PROCEDURE_NAME - * NUM_INPUT_PARAMS - * NUM_OUTPUT_PARAMS - * NUM_RESULT_SETS - * REMARKS - * PROCEDURE_TYPE - * - * Drivers can report additional columns. + * @param $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $procedure + * @return \Odbc\Result * @throws UodbcException * */ @@ -899,16 +491,9 @@ function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, /** - * Prints all rows from a result object produced by - * odbc_exec. The result is printed in HTML table format. - * The data is not escaped. - * - * This function is not supposed to be used in production environments; it is - * merely meant for development purposes, to get a result set quickly rendered. - * - * @param \Odbc\Result $statement The ODBC result object. - * @param string $format Additional overall table formatting. - * @return int Returns the number of rows in the result. + * @param \Odbc\Result $statement + * @param string $format + * @return int * @throws UodbcException * */ @@ -924,14 +509,9 @@ function odbc_result_all(\Odbc\Result $statement, string $format = ""): int /** - * Get result data - * - * @param \Odbc\Result $statement The ODBC result object. - * @param mixed $field The field name being retrieved. It can either be an integer containing - * the column number of the field you want; or it can be a string - * containing the name of the field. - * @return mixed Returns the string contents of the field, FALSE on error, NULL for - * NULL data, or TRUE for binary data. + * @param \Odbc\Result $statement + * @param mixed $field + * @return mixed * @throws UodbcException * */ @@ -947,10 +527,7 @@ function odbc_result(\Odbc\Result $statement, $field) /** - * Rolls back all pending statements on the connection. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. + * @param \Odbc\Connection $odbc * @throws UodbcException * */ @@ -965,32 +542,10 @@ function odbc_rollback(\Odbc\Connection $odbc): void /** - * This function allows fiddling with the ODBC options for a - * particular connection or query result. It was written to help - * find work around to problems in quirky ODBC drivers. You should - * probably only use this function if you are an ODBC programmer and - * understand the effects the various options will have. You will - * certainly need a good ODBC reference to explain all the different - * options and values that can be used. Different driver versions - * support different options. - * - * Because the effects may vary depending on the ODBC driver, use of - * this function in scripts to be made publicly available is - * strongly discouraged. Also, some ODBC options are not available - * to this function because they must be set before the connection - * is established or the query is prepared. However, if on a - * particular job it can make PHP work so your boss doesn't tell you - * to use a commercial product, that's all that really - * matters. - * - * @param \Odbc\Connection|\Odbc\Result $odbc Is a connection id or result id on which to change the settings. - * For SQLSetConnectOption(), this is a connection id. - * For SQLSetStmtOption(), this is a result id. - * @param int $which Is the ODBC function to use. The value should be - * 1 for SQLSetConnectOption() and - * 2 for SQLSetStmtOption(). - * @param int $option The option to set. - * @param int $value The value for the given option. + * @param \Odbc\Connection|\Odbc\Result $odbc + * @param int $which + * @param int $option + * @param int $value * @throws UodbcException * */ @@ -1005,42 +560,14 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void /** - * Retrieves either the optimal set of columns that uniquely identifies a - * row in the table, or columns that are automatically updated when any - * value in the row is updated by a transaction. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param int $type When the type argument is SQL_BEST_ROWID, - * odbc_specialcolumns returns the - * column or columns that uniquely identify each row in the table. - * - * When the type argument is SQL_ROWVER, - * odbc_specialcolumns returns the column or columns in the - * specified table, if any, that are automatically updated by the data source - * when any value in the row is updated by any transaction. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table. - * @param int $scope The scope, which orders the result set. - * One of SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION - * or SQL_SCOPE_SESSION. - * @param int $nullable Determines whether to return special columns that can have a NULL value. - * One of SQL_NO_NULLS or SQL_NULLABLE. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * SCOPE - * COLUMN_NAME - * DATA_TYPE - * TYPE_NAME - * COLUMN_SIZE - * BUFFER_LENGTH - * DECIMAL_DIGITS - * PSEUDO_COLUMN - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param int $type + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $scope + * @param int $nullable + * @return \Odbc\Result|false * */ function odbc_specialcolumns(\Odbc\Connection $odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable) @@ -1052,37 +579,13 @@ function odbc_specialcolumns(\Odbc\Connection $odbc, int $type, string $catalog, /** - * Get statistics about a table and its indexes. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * @param string $table The table name. - * @param int $unique The type of the index. - * One of SQL_INDEX_UNIQUE or SQL_INDEX_ALL. - * @param int $accuracy One of SQL_ENSURE or SQL_QUICK. - * The latter requests that the driver retrieve the CARDINALITY and - * PAGES only if they are readily available from the server. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * NON_UNIQUE - * INDEX_QUALIFIER - * INDEX_NAME - * TYPE - * ORDINAL_POSITION - * COLUMN_NAME - * ASC_OR_DESC - * CARDINALITY - * PAGES - * FILTER_CONDITION - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @param int $unique + * @param int $accuracy + * @return \Odbc\Result|false * */ function odbc_statistics(\Odbc\Connection $odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy) @@ -1094,33 +597,11 @@ function odbc_statistics(\Odbc\Connection $odbc, string $catalog, string $schema /** - * Lists tables in the requested range and the privileges associated - * with each table. - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @return \Odbc\Result|false Returns an ODBC result object or FALSE on failure. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * GRANTOR - * GRANTEE - * PRIVILEGE - * IS_GRANTABLE - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param string $catalog + * @param string $schema + * @param string $table + * @return \Odbc\Result|false * */ function odbc_tableprivileges(\Odbc\Connection $odbc, string $catalog, string $schema, string $table) @@ -1132,75 +613,12 @@ function odbc_tableprivileges(\Odbc\Connection $odbc, string $catalog, string $s /** - * Lists all tables in the requested range. - * - * To support enumeration of qualifiers, owners, and table types, - * the following special semantics for the - * catalog, schema, - * table, and - * table_type are available: - * - * - * - * If catalog is a single percent - * character (%) and schema and - * table are empty strings, then the result - * set contains a list of valid qualifiers for the data - * source. (All columns except the TABLE_QUALIFIER column contain - * NULLs.) - * - * - * - * - * If schema is a single percent character - * (%) and catalog and - * table are empty strings, then the result - * set contains a list of valid owners for the data source. (All - * columns except the TABLE_OWNER column contain - * NULLs.) - * - * - * - * - * If table_type is a single percent - * character (%) and catalog, - * schema and table - * are empty strings, then the result set contains a list of - * valid table types for the data source. (All columns except the - * TABLE_TYPE column contain NULLs.) - * - * - * - * - * @param \Odbc\Connection $odbc The ODBC connection object, - * see odbc_connect for details. - * @param null|string $catalog The catalog ('qualifier' in ODBC 2 parlance). - * @param null|string $schema The schema ('owner' in ODBC 2 parlance). - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $table The name. - * This parameter accepts the following search patterns: - * % to match zero or more characters, - * and _ to match a single character. - * @param null|string $types If table_type is not an empty string, it - * must contain a list of comma-separated values for the types of - * interest; each value may be enclosed in single quotes (') or - * unquoted. For example, 'TABLE','VIEW' or TABLE, VIEW. If the - * data source does not support a specified table type, - * odbc_tables does not return any results for - * that type. - * @return \Odbc\Result Returns an ODBC result object containing the information. - * - * The result set has the following columns: - * - * TABLE_CAT - * TABLE_SCHEM - * TABLE_NAME - * TABLE_TYPE - * REMARKS - * - * Drivers can report additional columns. + * @param \Odbc\Connection $odbc + * @param null|string $catalog + * @param null|string $schema + * @param null|string $table + * @param null|string $types + * @return \Odbc\Result * @throws UodbcException * */ diff --git a/generated/8.5/uopz.php b/generated/8.5/uopz.php index 17d2e760..de1a0dc9 100644 --- a/generated/8.5/uopz.php +++ b/generated/8.5/uopz.php @@ -5,10 +5,8 @@ use Safe\Exceptions\UopzException; /** - * Makes class extend parent - * - * @param string $class The name of the class to extend - * @param string $parent The name of the class to inherit + * @param string $class + * @param string $parent * @throws UopzException * */ @@ -23,8 +21,6 @@ function uopz_extend(string $class, string $parent): void /** - * Makes class implement interface - * * @param string $class * @param string $interface * @throws UopzException diff --git a/generated/8.5/url.php b/generated/8.5/url.php index a6d06093..f65c527b 100644 --- a/generated/8.5/url.php +++ b/generated/8.5/url.php @@ -5,15 +5,9 @@ use Safe\Exceptions\UrlException; /** - * Decodes a base64 encoded string. - * - * @param string $string The encoded data. - * @param bool $strict If the strict parameter is set to TRUE - * then the base64_decode function will return - * FALSE if the input contains character from outside the base64 - * alphabet. Otherwise invalid characters will be silently discarded. - * @return string Returns the decoded data. The returned data may be - * binary. + * @param string $string + * @param bool $strict + * @return string * @throws UrlException * */ @@ -29,17 +23,10 @@ function base64_decode(string $string, bool $strict = false): string /** - * get_headers returns an array with the headers sent - * by the server in response to a HTTP request. - * - * @param string $url The target URL. - * @param bool $associative If the optional associative parameter is set to true, - * get_headers parses the response and sets the - * array's keys. - * @param null|resource $context A valid context resource created with - * stream_context_create, or NULL to use the - * default context. - * @return array Returns an indexed or associative array with the headers. + * @param string $url + * @param bool $associative + * @param null|resource $context + * @return array * @throws UrlException * */ @@ -59,38 +46,9 @@ function get_headers(string $url, bool $associative = false, $context = null): a /** - * Opens filename and parses it line by line for - * <meta> tags in the file. The parsing stops at - * </head>. - * - * @param string $filename The path to the HTML file, as a string. This can be a local file or an - * URL. - * - * - * What get_meta_tags parses - * - * - * - * - * - * - * ]]> - * - * - * @param bool $use_include_path Setting use_include_path to TRUE will result - * in PHP trying to open the file along the standard include path as per - * the include_path directive. - * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. - * - * The value of the name property becomes the key, the value of the content - * property becomes the value of the returned array, so you can easily use - * standard array functions to traverse it or access single values. - * Special characters in the value of the name property are substituted with - * '_', the rest is converted to lower case. If two meta tags have the same - * name, only the last one is returned. - * - * Returns FALSE on failure. + * @param string $filename + * @param bool $use_include_path + * @return array * @throws UrlException * */ @@ -106,90 +64,9 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array /** - * This function parses a URL and returns an associative array containing any - * of the various components of the URL that are present. - * The values of the array elements are not URL decoded. - * - * This function is not meant to validate - * the given URL, it only breaks it up into the parts listed below. Partial and invalid - * URLs are also accepted, parse_url tries its best to - * parse them correctly. - * - * @param string $url The URL to parse. - * @param int $component Specify one of PHP_URL_SCHEME, - * PHP_URL_HOST, PHP_URL_PORT, - * PHP_URL_USER, PHP_URL_PASS, - * PHP_URL_PATH, PHP_URL_QUERY - * or PHP_URL_FRAGMENT to retrieve just a specific - * URL component as a string (except when - * PHP_URL_PORT is given, in which case the return - * value will be an int). - * @return array|int|null|string On seriously malformed URLs, parse_url. - * - * If the component parameter is omitted, an - * associative array is returned. At least one element will be - * present within the array. Potential keys within this array are: - * - * - * - * scheme - e.g. http - * - * - * - * - * host - * - * - * - * - * port - * - * - * - * - * user - * - * - * - * - * pass - * - * - * - * - * path - * - * - * - * - * query - after the question mark ? - * - * - * - * - * fragment - after the hashmark # - * - * - * - * - * If the component parameter is specified, - * parse_url returns a string (or an - * int, in the case of PHP_URL_PORT) - * instead of an array. If the requested component doesn't exist - * within the given URL, NULL will be returned. - * As of PHP 8.0.0, parse_url distinguishes absent and empty - * queries and fragments: - * - * - * - * - * - * - * - * Previously all cases resulted in query and fragment being NULL. - * - * Note that control characters (cf. ctype_cntrl) in the - * components are replaced with underscores (_). + * @param string $url + * @param int $component + * @return array|int|null|string * @throws UrlException * */ diff --git a/generated/8.5/var.php b/generated/8.5/var.php index 70f048df..48e3f889 100644 --- a/generated/8.5/var.php +++ b/generated/8.5/var.php @@ -5,48 +5,8 @@ use Safe\Exceptions\VarException; /** - * Set the type of variable var to - * type. - * - * @param mixed $var The variable being converted. - * @param string $type Possibles values of type are: - * - * - * - * "boolean" or "bool" - * - * - * - * - * "integer" or "int" - * - * - * - * - * "float" or "double" - * - * - * - * - * "string" - * - * - * - * - * "array" - * - * - * - * - * "object" - * - * - * - * - * "null" - * - * - * + * @param mixed $var + * @param string $type * @throws VarException * */ diff --git a/generated/8.5/xdiff.php b/generated/8.5/xdiff.php index ce604f81..1de09f23 100644 --- a/generated/8.5/xdiff.php +++ b/generated/8.5/xdiff.php @@ -5,14 +5,9 @@ use Safe\Exceptions\XdiffException; /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -27,14 +22,9 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * and xdiff_file_rabdiff functions or their string counterparts. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -49,16 +39,9 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void /** - * Makes a binary diff of two files and stores the result in a patch file. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -73,20 +56,11 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest /** - * Makes an unified diff containing differences between old_file and - * new_file and stores it in dest file. The - * resulting file is human-readable. An optional context parameter - * specifies how many lines of context should be added around each change. - * Setting minimal parameter to true will result in outputting the shortest - * patch file possible (can take a long time). - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. - * @param int $context Indicates how many lines of context you want to include in diff - * result. - * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result - * (can take a long time). + * @param string $old_file + * @param string $new_file + * @param string $dest + * @param int $context + * @param bool $minimal * @throws XdiffException * */ @@ -101,16 +75,9 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** - * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff - * or xdiff_file_rabdiff functions or their string counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * - * @param string $file The original file. - * @param string $patch The binary patch file. - * @param string $dest Path of the resulting file. + * @param string $file + * @param string $patch + * @param string $dest * @throws XdiffException * */ @@ -125,19 +92,9 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi /** - * Makes a binary diff of two files and stores the result in a patch file. - * The difference between this function and xdiff_file_bdiff is different - * algorithm used which should result in faster execution and smaller diff produced. - * This function works with both text and binary files. Resulting patch - * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff - * website. - * - * @param string $old_file Path to the first file. This file acts as "old" file. - * @param string $new_file Path to the second file. This file acts as "new" file. - * @param string $dest Path of the resulting patch file. Resulting file contains differences - * between "old" and "new" files. It is in binary format and is human-unreadable. + * @param string $old_file + * @param string $new_file + * @param string $dest * @throws XdiffException * */ @@ -152,13 +109,9 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -174,15 +127,9 @@ function xdiff_string_bpatch(string $str, string $patch): string /** - * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff - * and xdiff_string_rabdiff functions or their file counterparts. - * - * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * - * @param string $str The original binary string. - * @param string $patch The binary patch string. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @return string * @throws XdiffException * */ @@ -198,24 +145,11 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. - * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if - * it is provided. - * - * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, - * xdiff_file_diff functions or compatible tools. - * @param int $flags flags can be either - * XDIFF_PATCH_NORMAL (default mode, normal patch) - * or XDIFF_PATCH_REVERSE (reversed patch). - * - * Starting from version 1.5.0, you can also use binary OR to enable - * XDIFF_PATCH_IGNORESPACE flag. - * @param null|string $error If provided then rejected parts are stored inside this variable. - * @return string Returns the patched string. + * @param string $str + * @param string $patch + * @param int $flags + * @param null|string $error + * @return string * @throws XdiffException * */ @@ -237,21 +171,9 @@ function xdiff_string_patch(string $str, string $patch, ?int $flags = null, ?str /** - * Makes a binary diff of two strings using the Rabin's polynomial fingerprinting algorithm implemented by - * libxdiff. Compared to - * xdiff_string_bdiff, this algorithm generally produces smaller diffs and operates faster, - * while remaining fully compatible with xdiff_string_bpatch and - * xdiff_file_bpatch for applying patches. - * - * This function can be used with both text and binary data. The resulting diff data can later be - * applied to recreate the new version from the old one. - * - * For further information about the algorithm, see the - * libxdiff documentation. - * - * @param string $old_data The first string containing the "old" binary data. - * @param string $new_data The second string containing the "new" binary data. - * @return string Returns a binary diff string containing the differences between the old and new data. + * @param string $old_data + * @param string $new_data + * @return string * @throws XdiffException * */ diff --git a/generated/8.5/xml.php b/generated/8.5/xml.php index 7eb056fc..a0d58eb8 100644 --- a/generated/8.5/xml.php +++ b/generated/8.5/xml.php @@ -5,9 +5,7 @@ use Safe\Exceptions\XmlException; /** - * Frees the given XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to free. + * @param \XMLParser $parser * @throws XmlException * */ @@ -22,71 +20,9 @@ function xml_parser_free(\XMLParser $parser): void /** - * Sets an option in an XML parser. - * - * @param \XMLParser $parser A reference to the XML parser to set an option in. - * @param int $option Which option to set. See below. - * - * The following options are available: - * - * XML parser options - * - * - * - * Option constant - * Data type - * Description - * - * - * - * - * XML_OPTION_CASE_FOLDING - * bool - * - * Controls whether case-folding is enabled for this - * XML parser. Enabled by default. - * - * - * - * XML_OPTION_PARSE_HUGE - * bool - * - * Allows parsing documents larger than 10 MB. - * This option should only be enabled when the document size is - * bounded because this could otherwise lead to a DoS. - * This option is only available when using libxml2. - * - * - * - * XML_OPTION_SKIP_TAGSTART - * integer - * - * Specify how many characters should be skipped in the beginning of a - * tag name. - * - * - * - * XML_OPTION_SKIP_WHITE - * bool - * - * Whether to skip values consisting of whitespace characters. - * - * - * - * XML_OPTION_TARGET_ENCODING - * string - * - * Sets which target encoding to - * use in this XML parser.By default, it is set to the same as the - * source encoding used by xml_parser_create. - * Supported target encodings are ISO-8859-1, - * US-ASCII and UTF-8. - * - * - * - * - * - * @param mixed $value The option's new value. + * @param \XMLParser $parser + * @param int $option + * @param mixed $value * @throws XmlException * */ @@ -101,62 +37,9 @@ function xml_parser_set_option(\XMLParser $parser, int $option, $value): void /** - * Sets the character data handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * data - * - * - * Character data as a string. - * - * - * - * - * - * Character data handler is called for every piece of a text in the XML - * document. It can be called multiple times inside each fragment (e.g. - * for non-ASCII strings). - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): bool @@ -168,62 +51,9 @@ function xml_set_character_data_handler(\XMLParser $parser, callable $handler): /** - * Sets the default handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * - * data - * - * - * - * data contains the character data. - * This may be the XML declaration, document type declaration, - * entities or other data for which no other handler exists. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_default_handler(\XMLParser $parser, callable $handler): bool @@ -235,84 +65,10 @@ function xml_set_default_handler(\XMLParser $parser, callable $handler): bool /** - * Sets the element handler functions for the XML parser. - * - * start_handler is called when a new XML element is - * opened. end_handler is called when an XML element - * is closed. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $start_handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidstart_element_handler - * XMLParserparser - * stringname - * arrayattributes - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * name - * - * - * Contains the name of the element for which this handler is called. - * If case-folding is in effect - * for this parser, the element name will be in uppercase letters. - * - * - * - * - * attributes - * - * - * An associative array with the element's attributes. - * The array is empty if the element has no attributes. - * The keys of this array are the attribute names, - * the values are the attribute values. - * Attribute names are - * case-folded - * on the same criteria as element names. - * Attribute values are not case-folded. - * - * - * The order in which attributes is traversed - * is identical to the order in which the attributes were declared. - * - * - * - * - * @param callable $end_handler The XML parser calling the handler. - * @return bool Always returns TRUE. + * @param callable $end_handler + * @return bool * */ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, callable $end_handler): bool @@ -324,61 +80,9 @@ function xml_set_element_handler(\XMLParser $parser, callable $start_handler, ca /** - * Set a handler to be called when leaving the scope of a namespace - * declaration. This will be called, for each namespace declaration, after - * the handler for the end tag of the element in which the namespace was - * declared. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * handler - * XMLParserparser - * stringfalseprefix - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * FALSE if no prefix exists. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handler): bool @@ -390,97 +94,9 @@ function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handle /** - * Sets the external entity reference handler function for the XML parser - * parser. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * boolhandler - * XMLParserparser - * stringopen_entity_names - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * open_entity_names - * - * - * A space-separated list of the names of the entities that are open for - * the parse of this entity (including the name of the referenced - * entity). - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (system_id) of the external entity. - * - * - * - * - * system_id - * - * - * The system identifier as specified in the entity declaration. - * - * - * - * - * public_id - * - * - * The public identifier as specified in the entity declaration, or - * an empty string if none was specified; the whitespace in the - * public identifier will have been normalized as required by - * the XML spec. - * - * - * - * - * - * The handler should return TRUE if the entity was handled, - * FALSE otherwise. - * When returning FALSE the XML parser will stop parsing and - * xml_get_error_code will return - * XML_ERROR_EXTERNAL_ENTITY_HANDLING. - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handler): bool @@ -492,101 +108,9 @@ function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handl /** - * Sets the notation declaration handler function for the XML parser - * parser. - * - * A notation declaration is part of the document's DTD and has the - * following format: - * - * name - * { systemId | publicId?> - * ]]> - * - * See section 4.7 of the XML 1.0 - * spec for the definition of notation declarations. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringnotation_name - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * notation_name - * - * - * This is the notation's name, as per - * the notation format described above. - * - * - * - * - * - * base - * - * - * - * This is the base for resolving the system identifier - * (system_id) of the notation declaration. - * - * - * - * - * system_id - * - * - * System identifier of the external notation declaration. - * - * - * - * - * - * public_id - * - * - * - * Public identifier of the external notation declaration. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): bool @@ -598,14 +122,9 @@ function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): b /** - * This function allows to use parser inside - * object. All callback functions could be set with - * xml_set_element_handler etc and assumed to be - * methods of object. - * - * @param \XMLParser $parser A reference to the XML parser to use inside the object. - * @param object $object The object where to use the XML parser. - * @return bool Always returns TRUE. + * @param \XMLParser $parser + * @param object $object + * @return bool * */ function xml_set_object(\XMLParser $parser, object $object): bool @@ -617,73 +136,9 @@ function xml_set_object(\XMLParser $parser, object $object): bool /** - * Sets the processing instruction (PI) handler function for the XML parser - * parser. - * - * A processing instruction has the following format: - * - * - * ]]> - * - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringtarget - * stringdata - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * target - * - * - * The processing instruction target. - * - * - * - * - * data - * - * - * The processing instruction data. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $handler): bool @@ -695,70 +150,9 @@ function xml_set_processing_instruction_handler(\XMLParser $parser, callable $ha /** - * Set a handler to be called when a namespace is declared. Namespace - * declarations occur inside start tags. But the namespace declaration start - * handler is called before the start tag handler for each namespace declared - * in that start tag. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringfalseprefix - * stringuri - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * prefix - * - * - * The prefix is a string used to reference the namespace within an XML object. - * FALSE if no prefix exists. - * - * - * - * - * uri - * - * - * Uniform Resource Identifier (URI) of namespace. - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $handler): bool @@ -770,109 +164,9 @@ function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $hand /** - * Sets the unparsed entity declaration handler function for the XML parser - * parser. - * - * The handler will be called if the XML parser - * encounters an external entity declaration with an NDATA declaration, like - * the following: - * - * name {publicId | systemId} - * NDATA notationName - * ]]> - * - * - * See section 4.2.2 of - * the XML 1.0 spec for the definition of notation declared - * external entities. - * - * @param \XMLParser $parser The XML parser. + * @param \XMLParser $parser * @param callable $handler - * If NULL is passed, the handler is reset to its default state. - * - * - * An empty string will also reset the handler, - * however this is deprecated as of PHP 8.4.0. - * - * - * - * - * If handler is a callable, - * the callable is set as the handler. - * - * - * If handler is a string, - * it can be the name of a method of an object set with - * xml_set_object. - * - * - * This is deprecated as of PHP 8.4.0. - * - * - * - * The signature of the handler must be: - * - * voidhandler - * XMLParserparser - * stringentity_name - * stringfalsebase - * stringsystem_id - * stringfalsepublic_id - * stringfalsenotation_name - * - * - * - * parser - * - * - * The XML parser calling the handler. - * - * - * - * - * entity_name - * - * - * The name of the entity that is about to be defined. - * - * - * - * - * base - * - * - * This is the base for resolving the system identifier - * (systemId) of the external entity. - * - * - * - * - * system_id - * - * - * System identifier for the external entity. - * - * - * - * - * public_id - * - * - * Public identifier for the external entity. - * - * - * - * - * notation_name - * - * - * Name of the notation of this entity (see - * xml_set_notation_decl_handler). - * - * - * - * - * @return bool Always returns TRUE. + * @return bool * */ function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, callable $handler): bool diff --git a/generated/8.5/xmlrpc.php b/generated/8.5/xmlrpc.php index 3007ab7d..38243a14 100644 --- a/generated/8.5/xmlrpc.php +++ b/generated/8.5/xmlrpc.php @@ -5,10 +5,8 @@ use Safe\Exceptions\XmlrpcException; /** - * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * - * @param \DateTime|string $value Value to set the type - * @param string $type 'base64' or 'datetime' + * @param \DateTime|string $value + * @param string $type * @throws XmlrpcException * */ diff --git a/generated/8.5/yaml.php b/generated/8.5/yaml.php index 52466e27..8e6b196f 100644 --- a/generated/8.5/yaml.php +++ b/generated/8.5/yaml.php @@ -5,21 +5,11 @@ use Safe\Exceptions\YamlException; /** - * Convert all or part of a YAML document stream read from a file to a PHP variable. - * - * @param string $filename Path to the file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in filename in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $filename + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -39,24 +29,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?a /** - * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * - * @param string $url url should be of the form "scheme://...". PHP - * will search for a protocol handler (also known as a wrapper) for that - * scheme. If no wrappers for that protocol are registered, PHP will emit - * a notice to help you track potential problems in your script and then - * continue as though filename specifies a regular file. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more details. - * @return mixed Returns the value encoded in url in appropriate - * PHP type. If pos is - * -1 an array will be returned with one entry - * for each document found in the stream. + * @param string $url + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ @@ -76,21 +53,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $ /** - * Convert all or part of a YAML document stream to a PHP variable. - * - * @param string $input The string to parse as a YAML document stream. - * @param int $pos Document to extract from stream (-1 for all - * documents, 0 for first document, ...). - * @param int|null $ndocs If ndocs is provided, then it is filled with the - * number of documents found in stream. - * @param array|null $callbacks Content handlers for YAML nodes. Associative array of YAML - * tag => callable mappings. See - * parse callbacks for more - * details. - * @return mixed Returns the value encoded in input in appropriate - * PHP type. If pos is -1 an - * array will be returned with one entry for each document found - * in the stream. + * @param string $input + * @param int $pos + * @param int|null $ndocs + * @param array|null $callbacks + * @return mixed * @throws YamlException * */ diff --git a/generated/8.5/yaz.php b/generated/8.5/yaz.php index ce5dd4d0..1832141f 100644 --- a/generated/8.5/yaz.php +++ b/generated/8.5/yaz.php @@ -5,45 +5,9 @@ use Safe\Exceptions\YazException; /** - * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search - * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf - * prior to this function. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array - * containing the valid RPN query under the key rpn. - * - * Upon failure, three indexes are set in this array to indicate the cause - * of failure: - * - * - * - * errorcode - the CCL error code (integer) - * - * - * - * - * errorstring - the CCL error string - * - * - * - * - * errorpos - approximate position in query of failure - * (integer is character position) - * - * - * - * - * errorcode - the CCL error code (integer) - * - * errorstring - the CCL error string - * - * errorpos - approximate position in query of failure - * (integer is character position) + * @param resource $id + * @param string $query + * @param array|null $result * @throws YazException * */ @@ -58,9 +22,7 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void /** - * Closes the connection given by parameter id. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -75,193 +37,9 @@ function yaz_close($id): void /** - * This function returns a connection resource on success, zero on - * failure. - * - * yaz_connect prepares for a connection to a - * Z39.50 server. - * This function is non-blocking and does not attempt to establish - * a connection - it merely prepares a connect to be performed later when - * yaz_wait is called. - * - * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted - * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication - * string (OpenAuth). - * - * If given as an array, the contents of the array serves as options. - * - * - * user - * - * - * Username for authentication. - * - * - * - * - * group - * - * - * Group for authentication. - * - * - * - * - * password - * - * - * Password for authentication. - * - * - * - * - * cookie - * - * - * Cookie for session (YAZ proxy). - * - * - * - * - * proxy - * - * - * Proxy for connection (YAZ proxy). - * - * - * - * - * persistent - * - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * - * - * - * - * piggyback - * - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * - * - * - * charset - * - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * - * preferredMessageSize - * - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * maximumRecordSize - * - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * - * Username for authentication. - * - * Group for authentication. - * - * Password for authentication. - * - * Cookie for session (YAZ proxy). - * - * Proxy for connection (YAZ proxy). - * - * A boolean. If TRUE the connection is persistent; If FALSE the - * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close - * it later with yaz_close. - * - * A boolean. If TRUE piggyback is enabled for searches; If FALSE - * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a - * few Z39.50 servers do not support piggyback or they ignore element - * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 - * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, - * UTF-16. - * - * Most Z39.50 servers do not support this feature (and thus, this is - * ignored). Many servers use the ISO-8859-1 encoding for queries and - * messages. MARC21/USMARC records are not affected by this setting. - * - * An integer that specifies the maximum byte size of all records - * to be returned by a target during retrieval. See the - * Z39.50 standard for more - * information. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * - * An integer that specifies the maximum byte size of a single record - * to be returned by a target during retrieval. This - * entity is referred to as Exceptional-record-size in the - * Z39.50 standard. - * - * This option is supported in PECL YAZ 1.0.5 or later. - * @return mixed A connection resource on success, FALSE on error. + * @param string $zurl + * @param mixed $options + * @return mixed * @throws YazException * */ @@ -281,14 +59,8 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by - * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to - * yaz_connect. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are - * separated by a plus sign +. + * @param resource $id + * @param string $databases * @throws YazException * */ @@ -303,15 +75,8 @@ function yaz_database($id, string $databases): void /** - * This function sets the element set name for retrieval. - * - * Call this function before yaz_search or - * yaz_present to specify the element set name for - * records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $elementset Most servers support F (for full records) and - * B (for brief records). + * @param resource $id + * @param string $elementset * @throws YazException * */ @@ -326,12 +91,7 @@ function yaz_element($id, string $elementset): void /** - * This function prepares for retrieval of records after a successful search. - * - * The yaz_range function should be called prior to this - * function to specify the range of records to be retrieved. - * - * @param resource $id The connection resource returned by yaz_connect. + * @param resource $id * @throws YazException * */ @@ -346,32 +106,9 @@ function yaz_present($id): void /** - * yaz_search prepares for a search on the given - * connection. - * - * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when - * yaz_wait is called. - * - * @param resource $id The connection resource returned by yaz_connect. - * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 - * query in prefix query notation. - * @param string $query The RPN query is a textual representation of the Type-1 query as - * defined by the Z39.50 standard. However, in the text representation - * as used by YAZ a prefix notation is used, that is the operator - * precedes the operands. The query string is a sequence of tokens where - * white space is ignored unless surrounded by double quotes. Tokens beginning - * with an at-character (@) are considered operators, - * otherwise they are treated as search terms. - * - * You can find information about attributes at the - * Z39.50 Maintenance Agency - * site. - * - * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and - * yaz_ccl_parse. + * @param resource $id + * @param string $type + * @param string $query * @throws YazException * */ @@ -386,44 +123,8 @@ function yaz_search($id, string $type, string $query): void /** - * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and - * yaz_itemorder. - * - * yaz_wait returns when all servers have either - * completed all requests or aborted (in case of errors). - * - * @param array $options An associative array of options: - * - * - * timeout - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * - * - * - * event - * - * - * A boolean. - * - * - * - * - * - * Sets timeout in seconds. If a server has not responded within the - * timeout it is considered dead and yaz_wait - * returns. The default value for timeout is 15 seconds. - * - * A boolean. - * @return mixed Returns TRUE on success. - * In event mode, returns resource. + * @param array $options + * @return mixed * @throws YazException * */ diff --git a/generated/8.5/zip.php b/generated/8.5/zip.php index d1a628eb..7cbf1cce 100644 --- a/generated/8.5/zip.php +++ b/generated/8.5/zip.php @@ -5,9 +5,7 @@ use Safe\Exceptions\ZipException; /** - * Closes the specified directory entry. - * - * @param resource $zip_entry A directory entry previously opened zip_entry_open. + * @param resource $zip_entry * @throws ZipException * */ @@ -22,10 +20,8 @@ function zip_entry_close($zip_entry): void /** - * Returns the compressed size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The compressed size. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -41,11 +37,8 @@ function zip_entry_compressedsize($zip_entry): int /** - * Returns the compression method of the directory entry specified - * by zip_entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The compression method. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -61,10 +54,8 @@ function zip_entry_compressionmethod($zip_entry): string /** - * Returns the actual size of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return int The size of the directory entry. + * @param resource $zip_entry + * @return int * @throws ZipException * */ @@ -80,10 +71,8 @@ function zip_entry_filesize($zip_entry): int /** - * Returns the name of the specified directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @return string The name of the directory entry. + * @param resource $zip_entry + * @return string * @throws ZipException * */ @@ -99,16 +88,9 @@ function zip_entry_name($zip_entry): string /** - * Opens a directory entry in a zip file for reading. - * - * @param resource $zip_dp A valid resource handle returned by zip_open. - * @param resource $zip_entry A directory entry returned by zip_read. - * @param string $mode Any of the modes specified in the documentation of - * fopen. - * - * Currently, mode is ignored and is always - * "rb". This is due to the fact that zip support - * in PHP is read only access. + * @param resource $zip_dp + * @param resource $zip_entry + * @param string $mode * @throws ZipException * */ @@ -123,13 +105,9 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void /** - * Reads from an open directory entry. - * - * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $len The number of bytes to return. - * - * This should be the uncompressed length you wish to read. - * @return string Returns the data read, empty string on end of a file. + * @param resource $zip_entry + * @param int $len + * @return string * @throws ZipException * */ diff --git a/generated/8.5/zlib.php b/generated/8.5/zlib.php index 3b3c10c7..786c823b 100644 --- a/generated/8.5/zlib.php +++ b/generated/8.5/zlib.php @@ -5,20 +5,10 @@ use Safe\Exceptions\ZlibException; /** - * Incrementally deflates data in the specified context. - * - * @param \DeflateContext $context A context created with deflate_init. - * @param string $data A chunk of data to compress. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of compressed data. + * @param \DeflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -34,92 +24,9 @@ function deflate_add(\DeflateContext $context, string $data, int $flush_mode = Z /** - * Initializes an incremental deflate context using the specified - * encoding. - * - * Note that the window option here only sets the window size - * of the algorithm, differently from the zlib filters where the same parameter - * also sets the encoding to use; the encoding must be set with the - * encoding parameter. - * - * Limitation: there is currently no way to set the header information on a GZIP - * compressed stream, which are set as follows: GZIP signature - * (\x1f\x8B); compression method (\x08 - * == DEFLATE); 6 zero bytes; the operating system set to the current system - * (\x00 = Windows, \x03 = Unix, etc.) - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; - * defaults to 15. - * zlib changes a window size of 8 to 9, - * and as of zlib 1.2.8 fails with a warning, if a window size of 8 - * is requested for ZLIB_ENCODING_RAW or ZLIB_ENCODING_GZIP. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \DeflateContext Returns a deflate context resource (zlib.deflate) on - * success. + * @param int $encoding + * @param array $options + * @return \DeflateContext * @throws ZlibException * */ @@ -135,10 +42,7 @@ function deflate_init(int $encoding, array $options = []): \DeflateContext /** - * Closes the given gz-file pointer. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -153,20 +57,10 @@ function gzclose($stream): void /** - * This function compresses the given string using the ZLIB - * data format. - * - * For details on the ZLIB compression algorithm see the document - * "ZLIB Compressed Data Format - * Specification version 3.3" (RFC 1950). - * - * @param string $data The data to compress. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. - * - * If -1 is used, the default compression of the zlib library is used which is 6. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The compressed string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -182,12 +76,9 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** - * This function returns a decoded version of the input - * data. - * - * @param string $data The data to decode, encoded by gzencode. - * @param int $max_length The maximum length of data to decode. - * @return string The decoded string, or. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -203,19 +94,10 @@ function gzdecode(string $data, int $max_length = 0): string /** - * This function compresses the given string using the DEFLATE - * data format. - * - * For details on the DEFLATE compression algorithm see the document - * "DEFLATE Compressed Data Format - * Specification version 1.3" (RFC 1951). - * - * @param string $data The data to deflate. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding One of ZLIB_ENCODING_* constants. - * @return string The deflated string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -231,25 +113,10 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ /** - * This function returns a compressed version of the input - * data compatible with the output of the - * gzip program. - * - * For more information on the GZIP file format, see the document: - * GZIP file format specification - * version 4.3 (RFC 1952). - * - * @param string $data The data to encode. - * @param int $level The level of compression. Can be given as 0 for no compression up to 9 - * for maximum compression. If not given, the default compression level will - * be the default compression level of the zlib library. - * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default) - * or FORCE_DEFLATE. - * - * FORCE_DEFLATE generates - * RFC 1950 compliant output, consisting of a zlib header, the deflated - * data, and an Adler checksum. - * @return string The encoded string. + * @param string $data + * @param int $level + * @param int $encoding + * @return string * @throws ZlibException * */ @@ -265,13 +132,9 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G /** - * This function is identical to readgzfile, except that - * it returns the file in an array. - * - * @param string $filename The file name. - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return list An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @param string $filename + * @param int $use_include_path + * @return list * @throws ZlibException * */ @@ -287,14 +150,9 @@ function gzfile(string $filename, int $use_include_path = 0): array /** - * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a - * newline, or on EOF (whichever comes first). - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int|null $length The length of data to get. - * @return string The uncompressed string. + * @param resource $stream + * @param int|null $length + * @return string * @throws ZlibException * */ @@ -314,15 +172,9 @@ function gzgets($stream, ?int $length = null): string /** - * This function inflates a deflated string. - * - * @param string $data The data compressed by gzdeflate. - * @param int $max_length The maximum length of decoded data. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or, unless max_length is 0, more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -338,28 +190,10 @@ function gzinflate(string $data, int $max_length = 0): string /** - * Opens a gzip (.gz) file for reading or writing. - * - * gzopen can be used to read a file which is - * not in gzip format; in this case gzread will - * directly read from the file without decompression. - * - * @param string $filename The file name. - * @param string $mode As in fopen (rb or - * wb) but can also include a compression level - * (wb9) or a strategy: f for - * filtered data as in wb6f, h for - * Huffman only compression as in wb1h. - * (See the description of deflateInit2 - * in zlib.h for - * more information about the strategy parameter.) - * @param int $use_include_path You can set this optional parameter to 1, if you - * want to search for the file in the include_path too. - * @return resource Returns a file pointer to the file opened, after that, everything you read - * from this file descriptor will be transparently decompressed and what you - * write gets compressed. - * - * If the open fails, the function returns FALSE. + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return resource * @throws ZlibException * */ @@ -375,13 +209,8 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) /** - * Reads to EOF on the given gz-file pointer from the current position and - * writes the (uncompressed) results to standard output. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return false|int The number of uncompressed characters read from gz - * and passed through to the input. + * @param resource $stream + * @return false|int * */ function gzpassthru($stream) @@ -393,15 +222,9 @@ function gzpassthru($stream) /** - * gzread reads up to length bytes - * from the given gz-file pointer. Reading stops when - * length (uncompressed) bytes have been read - * or EOF is reached, whichever comes first. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param int $length The number of bytes to read. - * @return string The data that have been read. + * @param resource $stream + * @param int $length + * @return string * @throws ZlibException * */ @@ -417,11 +240,7 @@ function gzread($stream, int $length): string /** - * Sets the file position indicator of the given gz-file pointer to the - * beginning of the file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. + * @param resource $stream * @throws ZlibException * */ @@ -436,12 +255,8 @@ function gzrewind($stream): void /** - * Gets the position of the given file pointer; i.e., its offset into the - * uncompressed file stream. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @return int The position of the file pointer or FALSE if an error occurs. + * @param resource $stream + * @return int * @throws ZlibException * */ @@ -457,15 +272,9 @@ function gztell($stream): int /** - * This function uncompress a compressed string. - * - * @param string $data The data compressed by gzcompress. - * @param int $max_length The maximum length of data to decode. - * @return string The original uncompressed data. - * - * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data - * or more than the optional parameter max_length. + * @param string $data + * @param int $max_length + * @return string * @throws ZlibException * */ @@ -481,18 +290,10 @@ function gzuncompress(string $data, int $max_length = 0): string /** - * gzwrite writes the contents of - * data to the given gz-file. - * - * @param resource $stream The gz-file pointer. It must be valid, and must point to a file - * successfully opened by gzopen. - * @param string $data The string to write. - * @param int|null $length The number of uncompressed bytes to write. If supplied, writing will - * stop after length (uncompressed) bytes have been - * written or the end of data is reached, - * whichever comes first. - * @return int Returns the number of (uncompressed) bytes written to the given gz-file - * stream. + * @param resource $stream + * @param string $data + * @param int|null $length + * @return int * @throws ZlibException * */ @@ -512,10 +313,8 @@ function gzwrite($stream, string $data, ?int $length = null): int /** - * - * * @param \InflateContext $context - * @return int Returns number of bytes read so far. + * @return int * @throws ZlibException * */ @@ -531,10 +330,8 @@ function inflate_get_read_len(\InflateContext $context): int /** - * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * * @param \InflateContext $context - * @return false|int Returns decompression status. + * @return false|int * */ function inflate_get_status(\InflateContext $context) @@ -546,23 +343,10 @@ function inflate_get_status(\InflateContext $context) /** - * Incrementally inflates encoded data in the specified context. - * - * Limitation: header information from GZIP compressed data are not made - * available. - * - * @param \InflateContext $context A context created with inflate_init. - * @param string $data A chunk of compressed data. - * @param int $flush_mode One of ZLIB_BLOCK, - * ZLIB_NO_FLUSH, - * ZLIB_PARTIAL_FLUSH, - * ZLIB_SYNC_FLUSH (default), - * ZLIB_FULL_FLUSH, ZLIB_FINISH. - * Normally you will want to set ZLIB_NO_FLUSH to - * maximize compression, and ZLIB_FINISH to terminate - * with the last chunk of data. See the zlib manual for a - * detailed description of these constants. - * @return string Returns a chunk of uncompressed data. + * @param \InflateContext $context + * @param string $data + * @param int $flush_mode + * @return string * @throws ZlibException * */ @@ -578,73 +362,9 @@ function inflate_add(\InflateContext $context, string $data, int $flush_mode = Z /** - * Initialize an incremental inflate context with the specified - * encoding. - * - * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: - * - * - * level - * - * - * The compression level in range -1..9; defaults to -1. - * - * - * - * - * memory - * - * - * The compression memory level in range 1..9; defaults to 8. - * - * - * - * - * window - * - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * - * strategy - * - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * - * dictionary - * - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * - * The compression level in range -1..9; defaults to -1. - * - * The compression memory level in range 1..9; defaults to 8. - * - * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * One of ZLIB_FILTERED, - * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, - * ZLIB_FIXED or - * ZLIB_DEFAULT_STRATEGY (the default). - * - * A string or an array of strings - * of the preset dictionary (default: no preset dictionary). - * @return \InflateContext Returns an inflate context resource (zlib.inflate) on - * success. + * @param int $encoding + * @param array $options + * @return \InflateContext * @throws ZlibException * */ @@ -660,18 +380,9 @@ function inflate_init(int $encoding, array $options = []): \InflateContext /** - * Reads a file, decompresses it and writes it to standard output. - * - * readgzfile can be used to read a file which is not in - * gzip format; in this case readgzfile will directly - * read from the file without decompression. - * - * @param string $filename The file name. This file will be opened from the filesystem and its - * contents written to standard output. - * @param $use_include_path When set to TRUE the - * include_path - * will be used to determine which file to open. - * @return 0|positive-int Returns the number of (uncompressed) bytes read from the file on success + * @param string $filename + * @param $use_include_path + * @return 0|positive-int * @throws ZlibException * */ @@ -687,11 +398,9 @@ function readgzfile(string $filename, $use_include_path = false): int /** - * Uncompress any raw/gzip/zlib encoded data. - * * @param string $data * @param int $max_length - * @return string Returns the uncompressed data. + * @return string * @throws ZlibException * */ diff --git a/generator/src/XmlDocParser/Method.php b/generator/src/XmlDocParser/Method.php index fc6d8298..58c6920c 100644 --- a/generator/src/XmlDocParser/Method.php +++ b/generator/src/XmlDocParser/Method.php @@ -126,14 +126,9 @@ public function getPhpDoc(): string private function getDocBlock(): string { - $str = $this->stripReturnFalseText($this->getStringForXPath("//docbook:refsect1[@role='description']")); - $str .= "\n\n"; - - $i=1; + $str = ''; foreach ($this->getParams() as $parameter) { - $str .= '@param '.$parameter->getDocBlockType().' $'.$parameter->getParameterName().' '; - $str .= $this->getStringForXPath("(//docbook:refsect1[@role='parameters']//docbook:varlistentry)[$i]/")."\n"; - $i++; + $str .= '@param '.$parameter->getDocBlockType().' $'.$parameter->getParameterName()."\n"; } $str .= $this->getReturnDocBlock(); @@ -147,12 +142,9 @@ private function getDocBlock(): string public function getReturnDocBlock(): string { - $returnDoc = $this->getStringForXPath("//docbook:refsect1[@role='returnvalues']"); - $returnDoc = $this->stripReturnFalseText($returnDoc); - $bestReturnType = $this->getDocBlockReturnType(); if ($bestReturnType !== 'void') { - return '@return '.$bestReturnType. ' ' .$returnDoc."\n"; + return '@return '.$bestReturnType."\n"; } return ''; } diff --git a/generator/tests/XmlDocParser/MethodTest.php b/generator/tests/XmlDocParser/MethodTest.php index fd6c74eb..21cd687c 100644 --- a/generator/tests/XmlDocParser/MethodTest.php +++ b/generator/tests/XmlDocParser/MethodTest.php @@ -112,7 +112,8 @@ public function testGetReturnDocBlock(): void $docPage = new DocPage(DocPage::referenceDir() . '/array/functions/array-replace.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), ErrorType::NULLSY); - $this->assertEquals("@return array Returns an array.\n", $method->getReturnDocBlock()); + // $this->assertEquals("@return array Returns an array.\n", $method->getReturnDocBlock()); + $this->assertEquals("@return array\n", $method->getReturnDocBlock()); $docPage = new DocPage(DocPage::referenceDir() . '/shmop/functions/shmop-delete.xml'); $xmlObject = $docPage->getMethodSynopsis(); @@ -123,7 +124,8 @@ public function testGetReturnDocBlock(): void $docPage = new DocPage(DocPage::referenceDir() . '/sqlsrv/functions/sqlsrv-next-result.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), ErrorType::FALSY); - $this->assertEquals("@return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error\n occurred, and NULL if there are no more results to retrieve.\n", $method->getReturnDocBlock()); + // $this->assertEquals("@return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error\n occurred, and NULL if there are no more results to retrieve.\n", $method->getReturnDocBlock()); + $this->assertEquals("@return bool|null\n", $method->getReturnDocBlock()); $this->assertEquals('?bool', $method->getSignatureReturnType()); } @@ -153,6 +155,7 @@ public function testOpensslCipherKeyLengthUnionTypeReturnDocBlocks(): void $docPage = new DocPage(DocPage::referenceDir() . '/openssl/functions/openssl-cipher-key-length.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), ErrorType::FALSY); - $this->assertEquals("@return int Returns the cipher length on success.\n", $method->getReturnDocBlock()); + // $this->assertEquals("@return int Returns the cipher length on success.\n", $method->getReturnDocBlock()); + $this->assertEquals("@return int\n", $method->getReturnDocBlock()); } }