upgrade idiorm to php8.1-patched version (aaronpk/idiorm)

This commit is contained in:
Andrew Dolgov
2022-07-12 22:26:21 +03:00
parent 4b61618920
commit 80d3db1dcf
189 changed files with 17077 additions and 12739 deletions

View File

@@ -36,7 +36,7 @@ function iconv_get_encoding(string $type = "all")
/**
* Changes the value of the internal configuration variable specified by
* type to charset.
* type to encoding.
*
* @param string $type The value of type can be any one of these:
*
@@ -44,14 +44,14 @@ function iconv_get_encoding(string $type = "all")
* output_encoding
* internal_encoding
*
* @param string $charset The character set.
* @param string $encoding The character set.
* @throws IconvException
*
*/
function iconv_set_encoding(string $type, string $charset): void
function iconv_set_encoding(string $type, string $encoding): void
{
error_clear_last();
$result = \iconv_set_encoding($type, $charset);
$result = \iconv_set_encoding($type, $encoding);
if ($result === false) {
throw IconvException::createFromPhpError();
}
@@ -59,18 +59,17 @@ function iconv_set_encoding(string $type, string $charset): void
/**
* Performs a character set conversion on the string
* str from in_charset
* to out_charset.
* Converts string from from_encoding
* to to_encoding.
*
* @param string $in_charset The input charset.
* @param string $out_charset The output charset.
* @param string $from_encoding The current encoding used to interpret string.
* @param string $to_encoding The desired encoding of the result.
*
* If you append the string //TRANSLIT to
* out_charset transliteration is activated. This
* 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 can be approximated through one or several similarly looking
* characters. If you append the string //IGNORE,
* 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.
@@ -79,16 +78,16 @@ function iconv_set_encoding(string $type, string $charset): void
* 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 out_charset.
* @param string $str The string to be converted.
* the to_encoding.
* @param string $string The string to be converted.
* @return string Returns the converted string.
* @throws IconvException
*
*/
function iconv(string $in_charset, string $out_charset, string $str): string
function iconv(string $from_encoding, string $to_encoding, string $string): string
{
error_clear_last();
$result = \iconv($in_charset, $out_charset, $str);
$result = \iconv($from_encoding, $to_encoding, $string);
if ($result === false) {
throw IconvException::createFromPhpError();
}