summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-07-12 22:26:21 +0300
committerAndrew Dolgov <[email protected]>2022-07-12 22:26:21 +0300
commit80d3db1dcf8fe9ca66d4e3f2e2116d3bc39ae2b4 (patch)
tree04b33bfb9c9368c4a31e287153abec690b9014e0
parent4b6161892000cb2b8392dce92a9cf2cabdf2d20e (diff)
upgrade idiorm to php8.1-patched version (aaronpk/idiorm)
-rw-r--r--composer.json9
-rw-r--r--composer.lock267
-rw-r--r--vendor/autoload.php5
l---------[-rwxr-xr-x]vendor/bin/php-parse121
l---------[-rwxr-xr-x]vendor/bin/phpstan121
l---------[-rwxr-xr-x]vendor/bin/phpstan.phar121
-rw-r--r--vendor/chillerlan/php-settings-container/.github/workflows/tests.yml14
-rw-r--r--vendor/chillerlan/php-settings-container/README.md2
-rw-r--r--vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php1
-rw-r--r--vendor/composer/ClassLoader.php2
-rw-r--r--vendor/composer/InstalledVersions.php16
-rw-r--r--vendor/composer/autoload_classmap.php89
-rw-r--r--vendor/composer/autoload_files.php21
-rw-r--r--vendor/composer/autoload_namespaces.php2
-rw-r--r--vendor/composer/autoload_psr4.php4
-rw-r--r--vendor/composer/autoload_real.php40
-rw-r--r--vendor/composer/autoload_static.php121
-rw-r--r--vendor/composer/installed.json283
-rw-r--r--vendor/composer/installed.php143
-rw-r--r--vendor/composer/platform_check.php4
-rw-r--r--vendor/j4mie/idiorm/idiorm.php18
-rw-r--r--vendor/nikic/php-parser/README.md4
-rw-r--r--vendor/nikic/php-parser/grammar/php5.y10
-rw-r--r--vendor/nikic/php-parser/grammar/php7.y20
-rw-r--r--vendor/nikic/php-parser/grammar/phpyLang.php8
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php10
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php4
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php13
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php4
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php16
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php2
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php25
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php2
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php8
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php1863
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php9
-rw-r--r--vendor/paragonie/constant_time_encoding/.gitignore2
-rw-r--r--vendor/paragonie/constant_time_encoding/.travis.yml24
-rw-r--r--vendor/paragonie/constant_time_encoding/LICENSE.txt2
-rw-r--r--vendor/paragonie/constant_time_encoding/README.md8
-rw-r--r--vendor/paragonie/constant_time_encoding/composer.json5
-rw-r--r--vendor/paragonie/constant_time_encoding/phpunit.xml.dist13
-rw-r--r--vendor/paragonie/constant_time_encoding/psalm.xml9
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base32.php78
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base32Hex.php2
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base64.php71
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php2
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php2
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php2
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Binary.php11
-rw-r--r--vendor/paragonie/constant_time_encoding/src/EncoderInterface.php2
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Encoding.php36
-rw-r--r--vendor/paragonie/constant_time_encoding/src/Hex.php47
-rw-r--r--vendor/paragonie/constant_time_encoding/src/RFC4648.php31
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php49
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base32Test.php50
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php34
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php34
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base64Test.php79
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php58
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/EncodingTest.php307
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/HexTest.php39
-rw-r--r--vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php84
-rw-r--r--vendor/phpdocumentor/type-resolver/src/TypeResolver.php2
-rw-r--r--vendor/phpstan/phpstan/README.md19
-rw-r--r--vendor/phpstan/phpstan/composer.json7
-rwxr-xr-xvendor/phpstan/phpstan/phpstan.pharbin19215905 -> 21183785 bytes
-rw-r--r--vendor/phpstan/phpstan/phpstan.phar.asc26
-rw-r--r--vendor/sebastian/environment/ChangeLog.md7
-rw-r--r--vendor/sebastian/environment/LICENSE2
-rw-r--r--vendor/sebastian/environment/README.md1
-rw-r--r--vendor/sebastian/environment/src/Console.php10
-rw-r--r--vendor/sebastian/environment/src/Runtime.php8
-rw-r--r--vendor/spomky-labs/otphp/.github/CONTRIBUTING.md25
-rw-r--r--vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md16
-rw-r--r--vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md21
-rw-r--r--vendor/spomky-labs/otphp/.github/stale.yml17
-rw-r--r--vendor/spomky-labs/otphp/SECURITY.md88
-rw-r--r--vendor/spomky-labs/otphp/composer.json4
-rw-r--r--vendor/spomky-labs/otphp/src/ParameterTrait.php2
-rw-r--r--vendor/symfony/polyfill-ctype/Ctype.php232
-rw-r--r--vendor/symfony/polyfill-ctype/LICENSE19
-rw-r--r--vendor/symfony/polyfill-ctype/README.md12
-rw-r--r--vendor/symfony/polyfill-ctype/bootstrap.php50
-rw-r--r--vendor/symfony/polyfill-ctype/bootstrap80.php46
-rw-r--r--vendor/symfony/polyfill-ctype/composer.json41
-rw-r--r--vendor/thecodingmachine/safe/README.md6
-rw-r--r--vendor/thecodingmachine/safe/composer.json39
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php (renamed from vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php)0
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php (renamed from vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php)4
-rw-r--r--vendor/thecodingmachine/safe/deprecated/array.php228
-rw-r--r--vendor/thecodingmachine/safe/deprecated/datetime.php36
-rw-r--r--vendor/thecodingmachine/safe/deprecated/functionsList.php13
-rw-r--r--vendor/thecodingmachine/safe/deprecated/mysqli.php (renamed from vendor/thecodingmachine/safe/generated/mysqli.php)20
-rw-r--r--vendor/thecodingmachine/safe/deprecated/password.php (renamed from vendor/thecodingmachine/safe/generated/password.php)1
-rw-r--r--vendor/thecodingmachine/safe/deprecated/strings.php677
-rw-r--r--vendor/thecodingmachine/safe/docker-compose.yml7
-rw-r--r--vendor/thecodingmachine/safe/generated/Exceptions/GettextException.php (renamed from vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php)2
-rw-r--r--vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php11
-rw-r--r--vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php11
-rw-r--r--vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php11
-rw-r--r--vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php11
-rw-r--r--vendor/thecodingmachine/safe/generated/apache.php68
-rw-r--r--vendor/thecodingmachine/safe/generated/array.php372
-rw-r--r--vendor/thecodingmachine/safe/generated/bzip2.php5
-rw-r--r--vendor/thecodingmachine/safe/generated/calendar.php21
-rw-r--r--vendor/thecodingmachine/safe/generated/classobj.php8
-rw-r--r--vendor/thecodingmachine/safe/generated/com.php113
-rw-r--r--vendor/thecodingmachine/safe/generated/cubrid.php1691
-rw-r--r--vendor/thecodingmachine/safe/generated/curl.php410
-rw-r--r--vendor/thecodingmachine/safe/generated/datetime.php625
-rw-r--r--vendor/thecodingmachine/safe/generated/dir.php37
-rw-r--r--vendor/thecodingmachine/safe/generated/eio.php97
-rw-r--r--vendor/thecodingmachine/safe/generated/errorfunc.php10
-rw-r--r--vendor/thecodingmachine/safe/generated/exec.php167
-rw-r--r--vendor/thecodingmachine/safe/generated/fileinfo.php26
-rw-r--r--vendor/thecodingmachine/safe/generated/filesystem.php446
-rw-r--r--vendor/thecodingmachine/safe/generated/filter.php30
-rw-r--r--vendor/thecodingmachine/safe/generated/ftp.php251
-rw-r--r--vendor/thecodingmachine/safe/generated/funchand.php20
-rw-r--r--vendor/thecodingmachine/safe/generated/functionsList.php387
-rw-r--r--vendor/thecodingmachine/safe/generated/gettext.php27
-rw-r--r--vendor/thecodingmachine/safe/generated/gmp.php64
-rw-r--r--vendor/thecodingmachine/safe/generated/gnupg.php20
-rw-r--r--vendor/thecodingmachine/safe/generated/hash.php18
-rw-r--r--vendor/thecodingmachine/safe/generated/ibase.php42
-rw-r--r--vendor/thecodingmachine/safe/generated/iconv.php33
-rw-r--r--vendor/thecodingmachine/safe/generated/image.php1133
-rw-r--r--vendor/thecodingmachine/safe/generated/imap.php1104
-rw-r--r--vendor/thecodingmachine/safe/generated/info.php253
-rw-r--r--vendor/thecodingmachine/safe/generated/ingres-ii.php720
-rw-r--r--vendor/thecodingmachine/safe/generated/json.php28
-rw-r--r--vendor/thecodingmachine/safe/generated/ldap.php821
-rw-r--r--vendor/thecodingmachine/safe/generated/libxml.php43
-rw-r--r--vendor/thecodingmachine/safe/generated/mbstring.php236
-rw-r--r--vendor/thecodingmachine/safe/generated/misc.php126
-rw-r--r--vendor/thecodingmachine/safe/generated/msql.php443
-rw-r--r--vendor/thecodingmachine/safe/generated/mysqlndMs.php119
-rw-r--r--vendor/thecodingmachine/safe/generated/mysqlndQc.php103
-rw-r--r--vendor/thecodingmachine/safe/generated/network.php247
-rw-r--r--vendor/thecodingmachine/safe/generated/oci8.php512
-rw-r--r--vendor/thecodingmachine/safe/generated/opcache.php15
-rw-r--r--vendor/thecodingmachine/safe/generated/openssl.php878
-rw-r--r--vendor/thecodingmachine/safe/generated/outcontrol.php151
-rw-r--r--vendor/thecodingmachine/safe/generated/pcntl.php203
-rw-r--r--vendor/thecodingmachine/safe/generated/pcre.php36
-rw-r--r--vendor/thecodingmachine/safe/generated/pdf.php1553
-rw-r--r--vendor/thecodingmachine/safe/generated/pgsql.php986
-rw-r--r--vendor/thecodingmachine/safe/generated/posix.php504
-rw-r--r--vendor/thecodingmachine/safe/generated/ps.php2
-rw-r--r--vendor/thecodingmachine/safe/generated/pspell.php194
-rw-r--r--vendor/thecodingmachine/safe/generated/readline.php44
-rw-r--r--vendor/thecodingmachine/safe/generated/rrd.php167
-rw-r--r--vendor/thecodingmachine/safe/generated/sem.php300
-rw-r--r--vendor/thecodingmachine/safe/generated/session.php219
-rw-r--r--vendor/thecodingmachine/safe/generated/shmop.php39
-rw-r--r--vendor/thecodingmachine/safe/generated/simplexml.php94
-rw-r--r--vendor/thecodingmachine/safe/generated/sockets.php224
-rw-r--r--vendor/thecodingmachine/safe/generated/sodium.php316
-rw-r--r--vendor/thecodingmachine/safe/generated/spl.php61
-rw-r--r--vendor/thecodingmachine/safe/generated/ssh2.php108
-rw-r--r--vendor/thecodingmachine/safe/generated/stream.php287
-rw-r--r--vendor/thecodingmachine/safe/generated/strings.php782
-rw-r--r--vendor/thecodingmachine/safe/generated/swoole.php40
-rw-r--r--vendor/thecodingmachine/safe/generated/uodbc.php477
-rw-r--r--vendor/thecodingmachine/safe/generated/url.php90
-rw-r--r--vendor/thecodingmachine/safe/generated/xml.php711
-rw-r--r--vendor/thecodingmachine/safe/generated/yaml.php18
-rw-r--r--vendor/thecodingmachine/safe/generated/zip.php93
-rw-r--r--vendor/thecodingmachine/safe/generated/zlib.php224
-rw-r--r--vendor/thecodingmachine/safe/lib/DateTime.php2
-rw-r--r--vendor/thecodingmachine/safe/lib/DateTimeImmutable.php30
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php4
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php2
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php (renamed from vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php)2
-rw-r--r--vendor/thecodingmachine/safe/lib/special_cases.php178
-rw-r--r--vendor/thecodingmachine/safe/phpunit.xml.dist14
-rw-r--r--vendor/thecodingmachine/safe/rector-migrate.php (renamed from vendor/thecodingmachine/safe/rector-migrate-0.7.php)391
-rw-r--r--vendor/thecodingmachine/safe/tests/DateTimeImmutableTest.php21
-rw-r--r--vendor/webmozart/assert/.editorconfig12
-rw-r--r--vendor/webmozart/assert/.github/workflows/ci.yaml120
-rw-r--r--vendor/webmozart/assert/.php_cs24
-rw-r--r--vendor/webmozart/assert/CHANGELOG.md17
-rw-r--r--vendor/webmozart/assert/README.md4
-rw-r--r--vendor/webmozart/assert/composer.json20
-rw-r--r--vendor/webmozart/assert/psalm.xml14
-rw-r--r--vendor/webmozart/assert/src/Assert.php38
-rw-r--r--vendor/webmozart/assert/src/Mixin.php2551
189 files changed, 16849 insertions, 12511 deletions
diff --git a/composer.json b/composer.json
index 1b4566e22..88b8f0fe6 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,16 @@
{
+ "repositories": [
+ {
+ "name": "j4mie/idiorm",
+ "type": "vcs",
+ "url": "https://github.com/aaronpk/idiorm"
+ }
+ ],
"require": {
"spomky-labs/otphp": "^10.0",
"chillerlan/php-qrcode": "^4.3.3",
"mervick/material-design-icons": "^2.2",
- "j4mie/idiorm": "^1.5"
+ "j4mie/idiorm": "dev-master"
},
"require-dev": {
"phpstan/phpstan": "^1.",
diff --git a/composer.lock b/composer.lock
index 8471ee42a..378e5a263 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8bb918e9a6d0b833ebcb0b525885d36d",
+ "content-hash": "410a7fb5a8fb00f33c59de3b78057604",
"packages": [
{
"name": "beberlei/assert",
@@ -153,16 +153,16 @@
},
{
"name": "chillerlan/php-settings-container",
- "version": "2.1.3",
+ "version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-settings-container.git",
- "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602"
+ "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/125dd573b45ffc7cabecf385986a356ba2c6f602",
- "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602",
+ "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
+ "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
"shasum": ""
},
"require": {
@@ -213,20 +213,20 @@
"type": "ko_fi"
}
],
- "time": "2022-03-09T13:18:58+00:00"
+ "time": "2022-07-05T22:32:14+00:00"
},
{
"name": "j4mie/idiorm",
- "version": "v1.5.7",
+ "version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/j4mie/idiorm.git",
- "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4"
+ "url": "https://github.com/aaronpk/idiorm.git",
+ "reference": "efc8ea06698f53e2c479c7696f2b154c47c3a3cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/j4mie/idiorm/zipball/d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4",
- "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4",
+ "url": "https://api.github.com/repos/aaronpk/idiorm/zipball/efc8ea06698f53e2c479c7696f2b154c47c3a3cb",
+ "reference": "efc8ea06698f53e2c479c7696f2b154c47c3a3cb",
"shasum": ""
},
"require": {
@@ -236,13 +236,18 @@
"ext-pdo_sqlite": "*",
"phpunit/phpunit": "^4.8"
},
+ "default-branch": true,
"type": "library",
"autoload": {
"classmap": [
"idiorm.php"
]
},
- "notification-url": "https://packagist.org/downloads/",
+ "scripts": {
+ "test": [
+ "phpunit -c ./phpunit.xml"
+ ]
+ },
"license": [
"BSD-2-Clause",
"BSD-3-Clause",
@@ -279,7 +284,7 @@
"issues": "https://github.com/j4mie/idiorm/issues",
"source": "https://github.com/j4mie/idiorm"
},
- "time": "2020-04-29T00:37:09+00:00"
+ "time": "2022-03-26T15:19:01+00:00"
},
{
"name": "mervick/material-design-icons",
@@ -326,16 +331,16 @@
},
{
"name": "paragonie/constant_time_encoding",
- "version": "v2.4.0",
+ "version": "v2.6.3",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c"
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
- "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938",
"shasum": ""
},
"require": {
@@ -389,20 +394,20 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding"
},
- "time": "2020-12-06T15:14:20+00:00"
+ "time": "2022-06-14T06:56:20+00:00"
},
{
"name": "spomky-labs/otphp",
- "version": "v10.0.1",
+ "version": "v10.0.3",
"source": {
"type": "git",
"url": "https://github.com/Spomky-Labs/otphp.git",
- "reference": "f44cce5a9db4b8da410215d992110482c931232f"
+ "reference": "9784d9f7c790eed26e102d6c78f12c754036c366"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/f44cce5a9db4b8da410215d992110482c931232f",
- "reference": "f44cce5a9db4b8da410215d992110482c931232f",
+ "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/9784d9f7c790eed26e102d6c78f12c754036c366",
+ "reference": "9784d9f7c790eed26e102d6c78f12c754036c366",
"shasum": ""
},
"require": {
@@ -410,7 +415,7 @@
"ext-mbstring": "*",
"paragonie/constant_time_encoding": "^2.0",
"php": "^7.2|^8.0",
- "thecodingmachine/safe": "^0.1.14|^1.0"
+ "thecodingmachine/safe": "^0.1.14|^1.0|^2.0"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.0",
@@ -420,7 +425,7 @@
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.0",
- "thecodingmachine/phpstan-safe-rule": "^1.0"
+ "thecodingmachine/phpstan-safe-rule": "^1.0 || ^2.0"
},
"type": "library",
"extra": {
@@ -462,52 +467,51 @@
],
"support": {
"issues": "https://github.com/Spomky-Labs/otphp/issues",
- "source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.1"
+ "source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.3"
},
- "time": "2020-01-28T09:24:19+00:00"
+ "time": "2022-03-17T08:00:35+00:00"
},
{
"name": "thecodingmachine/safe",
- "version": "v1.3.3",
+ "version": "v2.2.1",
"source": {
"type": "git",
"url": "https://github.com/thecodingmachine/safe.git",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc"
+ "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
+ "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2a8d758fd17763faf86e4aa798193e17b9fac38c",
+ "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c",
"shasum": ""
},
"require": {
- "php": ">=7.2"
+ "php": "^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12",
+ "phpstan/phpstan": "^1.5",
+ "phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.2",
- "thecodingmachine/phpstan-strict-rules": "^0.12"
+ "thecodingmachine/phpstan-strict-rules": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.1-dev"
+ "dev-master": "2.2.x-dev"
}
},
"autoload": {
- "psr-4": {
- "Safe\\": [
- "lib/",
- "deprecated/",
- "generated/"
- ]
- },
"files": [
"deprecated/apc.php",
+ "deprecated/array.php",
+ "deprecated/datetime.php",
"deprecated/libevent.php",
+ "deprecated/password.php",
"deprecated/mssql.php",
"deprecated/stats.php",
+ "deprecated/strings.php",
"lib/special_cases.php",
+ "deprecated/mysqli.php",
"generated/apache.php",
"generated/apcu.php",
"generated/array.php",
@@ -528,6 +532,7 @@
"generated/fpm.php",
"generated/ftp.php",
"generated/funchand.php",
+ "generated/gettext.php",
"generated/gmp.php",
"generated/gnupg.php",
"generated/hash.php",
@@ -537,7 +542,6 @@
"generated/image.php",
"generated/imap.php",
"generated/info.php",
- "generated/ingres-ii.php",
"generated/inotify.php",
"generated/json.php",
"generated/ldap.php",
@@ -546,20 +550,14 @@
"generated/mailparse.php",
"generated/mbstring.php",
"generated/misc.php",
- "generated/msql.php",
"generated/mysql.php",
- "generated/mysqli.php",
- "generated/mysqlndMs.php",
- "generated/mysqlndQc.php",
"generated/network.php",
"generated/oci8.php",
"generated/opcache.php",
"generated/openssl.php",
"generated/outcontrol.php",
- "generated/password.php",
"generated/pcntl.php",
"generated/pcre.php",
- "generated/pdf.php",
"generated/pgsql.php",
"generated/posix.php",
"generated/ps.php",
@@ -570,7 +568,6 @@
"generated/sem.php",
"generated/session.php",
"generated/shmop.php",
- "generated/simplexml.php",
"generated/sockets.php",
"generated/sodium.php",
"generated/solr.php",
@@ -592,6 +589,13 @@
"generated/yaz.php",
"generated/zip.php",
"generated/zlib.php"
+ ],
+ "classmap": [
+ "lib/DateTime.php",
+ "lib/DateTimeImmutable.php",
+ "lib/Exceptions/",
+ "deprecated/Exceptions/",
+ "generated/Exceptions/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -601,9 +605,9 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"support": {
"issues": "https://github.com/thecodingmachine/safe/issues",
- "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3"
+ "source": "https://github.com/thecodingmachine/safe/tree/v2.2.1"
},
- "time": "2020-10-28T17:51:34+00:00"
+ "time": "2022-06-09T15:36:45+00:00"
}
],
"packages-dev": [
@@ -738,16 +742,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.13.2",
+ "version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "210577fe3cf7badcc5814d99455df46564f3c077"
+ "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
- "reference": "210577fe3cf7badcc5814d99455df46564f3c077",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
+ "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"shasum": ""
},
"require": {
@@ -788,9 +792,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
},
- "time": "2021-11-30T19:35:32+00:00"
+ "time": "2022-05-31T20:59:12+00:00"
},
{
"name": "phar-io/manifest",
@@ -1015,16 +1019,16 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.6.0",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
+ "reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
- "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
+ "reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
@@ -1059,9 +1063,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
},
- "time": "2022-01-04T19:58:01+00:00"
+ "time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
@@ -1132,20 +1136,20 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.1.2",
+ "version": "1.8.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934"
+ "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bcea0ae85868a89d5789c75f012c93129f842934",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67",
+ "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67",
"shasum": ""
},
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -1155,11 +1159,6 @@
"phpstan.phar"
],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": [
"bootstrap.php"
@@ -1170,6 +1169,10 @@
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/1.8.1"
+ },
"funding": [
{
"url": "https://github.com/ondrejmirtes",
@@ -1188,7 +1191,7 @@
"type": "tidelift"
}
],
- "time": "2021-11-09T12:41:09+00:00"
+ "time": "2022-07-12T16:08:06+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -1977,16 +1980,16 @@
},
{
"name": "sebastian/environment",
- "version": "5.1.3",
+ "version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
@@ -2028,7 +2031,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
@@ -2036,7 +2039,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:52:38+00:00"
+ "time": "2022-04-03T09:37:03+00:00"
},
{
"name": "sebastian/exporter",
@@ -2576,88 +2579,6 @@
"time": "2020-09-28T06:39:44+00:00"
},
{
- "name": "symfony/polyfill-ctype",
- "version": "v1.25.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "30885182c981ab175d4d034db0f6f469898070ab"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
- "reference": "30885182c981ab175d4d034db0f6f469898070ab",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.23-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-10-20T20:35:02+00:00"
- },
- {
"name": "theseer/tokenizer",
"version": "1.2.1",
"source": {
@@ -2709,21 +2630,21 @@
},
{
"name": "webmozart/assert",
- "version": "1.10.0",
+ "version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
- "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
- "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
- "php": "^7.2 || ^8.0",
- "symfony/polyfill-ctype": "^1.8"
+ "ext-ctype": "*",
+ "php": "^7.2 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
@@ -2761,17 +2682,19 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
- "source": "https://github.com/webmozarts/assert/tree/1.10.0"
+ "source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
- "time": "2021-03-09T10:59:23+00:00"
+ "time": "2022-06-03T18:03:27+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {
+ "j4mie/idiorm": 20
+ },
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.1.0"
}
diff --git a/vendor/autoload.php b/vendor/autoload.php
index df8e3fc4e..e6e3ad736 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -2,11 +2,6 @@
// autoload.php @generated by Composer
-if (PHP_VERSION_ID < 50600) {
- echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
- exit(1);
-}
-
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056::getLoader();
diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse
index 1bd2c838c..062d66a3e 100755..120000
--- a/vendor/bin/php-parse
+++ b/vendor/bin/php-parse
@@ -1,120 +1 @@
-#!/usr/bin/env php
-<?php
-
-/**
- * Proxy PHP file generated by Composer
- *
- * This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
- * using a stream wrapper to prevent the shebang from being output on PHP<8
- *
- * @generated
- */
-
-namespace Composer;
-
-$GLOBALS['_composer_bin_dir'] = __DIR__;
-$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
-
-if (PHP_VERSION_ID < 80000) {
- if (!class_exists('Composer\BinProxyWrapper')) {
- /**
- * @internal
- */
- final class BinProxyWrapper
- {
- private $handle;
- private $position;
- private $realpath;
-
- public function stream_open($path, $mode, $options, &$opened_path)
- {
- // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
- $opened_path = substr($path, 17);
- $this->realpath = realpath($opened_path) ?: $opened_path;
- $opened_path = $this->realpath;
- $this->handle = fopen($this->realpath, $mode);
- $this->position = 0;
-
- return (bool) $this->handle;
- }
-
- public function stream_read($count)
- {
- $data = fread($this->handle, $count);
-
- if ($this->position === 0) {
- $data = preg_replace('{^#!.*\r?\n}', '', $data);
- }
-
- $this->position += strlen($data);
-
- return $data;
- }
-
- public function stream_cast($castAs)
- {
- return $this->handle;
- }
-
- public function stream_close()
- {
- fclose($this->handle);
- }
-
- public function stream_lock($operation)
- {
- return $operation ? flock($this->handle, $operation) : true;
- }
-
- public function stream_seek($offset, $whence)
- {
- if (0 === fseek($this->handle, $offset, $whence)) {
- $this->position = ftell($this->handle);
- return true;
- }
-
- return false;
- }
-
- public function stream_tell()
- {
- return $this->position;
- }
-
- public function stream_eof()
- {
- return feof($this->handle);
- }
-
- public function stream_stat()
- {
- return array();
- }
-
- public function stream_set_option($option, $arg1, $arg2)
- {
- return true;
- }
-
- public function url_stat($path, $flags)
- {
- $path = substr($path, 17);
- if (file_exists($path)) {
- return stat($path);
- }
-
- return false;
- }
- }
- }
-
- if (
- (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
- || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
- ) {
- include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
- exit(0);
- }
-}
-
-include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';
+../nikic/php-parser/bin/php-parse \ No newline at end of file
diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan
index 20451337e..959384f7f 100755..120000
--- a/vendor/bin/phpstan
+++ b/vendor/bin/phpstan
@@ -1,120 +1 @@
-#!/usr/bin/env php
-<?php
-
-/**
- * Proxy PHP file generated by Composer
- *
- * This file includes the referenced bin path (../phpstan/phpstan/phpstan)
- * using a stream wrapper to prevent the shebang from being output on PHP<8
- *
- * @generated
- */
-
-namespace Composer;
-
-$GLOBALS['_composer_bin_dir'] = __DIR__;
-$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
-
-if (PHP_VERSION_ID < 80000) {
- if (!class_exists('Composer\BinProxyWrapper')) {
- /**
- * @internal
- */
- final class BinProxyWrapper
- {
- private $handle;
- private $position;
- private $realpath;
-
- public function stream_open($path, $mode, $options, &$opened_path)
- {
- // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
- $opened_path = substr($path, 17);
- $this->realpath = realpath($opened_path) ?: $opened_path;
- $opened_path = $this->realpath;
- $this->handle = fopen($this->realpath, $mode);
- $this->position = 0;
-
- return (bool) $this->handle;
- }
-
- public function stream_read($count)
- {
- $data = fread($this->handle, $count);
-
- if ($this->position === 0) {
- $data = preg_replace('{^#!.*\r?\n}', '', $data);
- }
-
- $this->position += strlen($data);
-
- return $data;
- }
-
- public function stream_cast($castAs)
- {
- return $this->handle;
- }
-
- public function stream_close()
- {
- fclose($this->handle);
- }
-
- public function stream_lock($operation)
- {
- return $operation ? flock($this->handle, $operation) : true;
- }
-
- public function stream_seek($offset, $whence)
- {
- if (0 === fseek($this->handle, $offset, $whence)) {
- $this->position = ftell($this->handle);
- return true;
- }
-
- return false;
- }
-
- public function stream_tell()
- {
- return $this->position;
- }
-
- public function stream_eof()
- {
- return feof($this->handle);
- }
-
- public function stream_stat()
- {
- return array();
- }
-
- public function stream_set_option($option, $arg1, $arg2)
- {
- return true;
- }
-
- public function url_stat($path, $flags)
- {
- $path = substr($path, 17);
- if (file_exists($path)) {
- return stat($path);
- }
-
- return false;
- }
- }
- }
-
- if (
- (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
- || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
- ) {
- include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan');
- exit(0);
- }
-}
-
-include __DIR__ . '/..'.'/phpstan/phpstan/phpstan';
+../phpstan/phpstan/phpstan \ No newline at end of file
diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar
index caa3e24f8..502769bef 100755..120000
--- a/vendor/bin/phpstan.phar
+++ b/vendor/bin/phpstan.phar
@@ -1,120 +1 @@
-#!/usr/bin/env php
-<?php
-
-/**
- * Proxy PHP file generated by Composer
- *
- * This file includes the referenced bin path (../phpstan/phpstan/phpstan.phar)
- * using a stream wrapper to prevent the shebang from being output on PHP<8
- *
- * @generated
- */
-
-namespace Composer;
-
-$GLOBALS['_composer_bin_dir'] = __DIR__;
-$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
-
-if (PHP_VERSION_ID < 80000) {
- if (!class_exists('Composer\BinProxyWrapper')) {
- /**
- * @internal
- */
- final class BinProxyWrapper
- {
- private $handle;
- private $position;
- private $realpath;
-
- public function stream_open($path, $mode, $options, &$opened_path)
- {
- // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
- $opened_path = substr($path, 17);
- $this->realpath = realpath($opened_path) ?: $opened_path;
- $opened_path = $this->realpath;
- $this->handle = fopen($this->realpath, $mode);
- $this->position = 0;
-
- return (bool) $this->handle;
- }
-
- public function stream_read($count)
- {
- $data = fread($this->handle, $count);
-
- if ($this->position === 0) {
- $data = preg_replace('{^#!.*\r?\n}', '', $data);
- }
-
- $this->position += strlen($data);
-
- return $data;
- }
-
- public function stream_cast($castAs)
- {
- return $this->handle;
- }
-
- public function stream_close()
- {
- fclose($this->handle);
- }
-
- public function stream_lock($operation)
- {
- return $operation ? flock($this->handle, $operation) : true;
- }
-
- public function stream_seek($offset, $whence)
- {
- if (0 === fseek($this->handle, $offset, $whence)) {
- $this->position = ftell($this->handle);
- return true;
- }
-
- return false;
- }
-
- public function stream_tell()
- {
- return $this->position;
- }
-
- public function stream_eof()
- {
- return feof($this->handle);
- }
-
- public function stream_stat()
- {
- return array();
- }
-
- public function stream_set_option($option, $arg1, $arg2)
- {
- return true;
- }
-
- public function url_stat($path, $flags)
- {
- $path = substr($path, 17);
- if (file_exists($path)) {
- return stat($path);
- }
-
- return false;
- }
- }
- }
-
- if (
- (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
- || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
- ) {
- include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar');
- exit(0);
- }
-}
-
-include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar';
+../phpstan/phpstan/phpstan.phar \ No newline at end of file
diff --git a/vendor/chillerlan/php-settings-container/.github/workflows/tests.yml b/vendor/chillerlan/php-settings-container/.github/workflows/tests.yml
index e52681849..8f108f0dd 100644
--- a/vendor/chillerlan/php-settings-container/.github/workflows/tests.yml
+++ b/vendor/chillerlan/php-settings-container/.github/workflows/tests.yml
@@ -25,7 +25,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
@@ -48,12 +48,12 @@ jobs:
steps:
- name: "Checkout sources"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
- php-version: "7.4"
+ php-version: "8.1"
coverage: none
tools: phpDocumentor
extensions: json
@@ -62,7 +62,7 @@ jobs:
run: phpdoc --config=phpdoc.xml
- name: "Publish Docs to gh-pages"
- uses: JamesIves/[email protected]
+ uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
@@ -86,7 +86,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
@@ -102,6 +102,4 @@ jobs:
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml
- name: "Send code coverage report to Codecov.io"
- uses: codecov/codecov-action@v1
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
+ uses: codecov/codecov-action@v3
diff --git a/vendor/chillerlan/php-settings-container/README.md b/vendor/chillerlan/php-settings-container/README.md
index b5fd4ad27..579696b6e 100644
--- a/vendor/chillerlan/php-settings-container/README.md
+++ b/vendor/chillerlan/php-settings-container/README.md
@@ -35,7 +35,7 @@ A container class for immutable settings objects. Not a DI container. PHP 7.4+
```json
{
"require": {
- "php": "^7.4",
+ "php": "^7.4 || ^8.0",
"chillerlan/php-settings-container": "dev-main"
}
}
diff --git a/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php b/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php
index f643f73d0..6b7a1ecc2 100644
--- a/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php
+++ b/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php
@@ -154,6 +154,7 @@ abstract class SettingsContainerAbstract implements SettingsContainerInterface{
/**
* @inheritdoc
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize():array{
return $this->toArray();
}
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index afef3fa2a..0cd6055d1 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -149,7 +149,7 @@ class ClassLoader
/**
* @return string[] Array of classname => path
- * @psalm-return array<string, string>
+ * @psalm-var array<string, string>
*/
public function getClassMap()
{
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index c6b54af7b..d50e0c9fc 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -21,14 +21,12 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
- *
- * @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
- * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed;
@@ -39,7 +37,7 @@ class InstalledVersions
/**
* @var array[]
- * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array();
@@ -243,7 +241,7 @@ class InstalledVersions
/**
* @return array
- * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
@@ -257,7 +255,7 @@ class InstalledVersions
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
- * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@@ -280,7 +278,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
- * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
@@ -303,7 +301,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
- * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
@@ -313,7 +311,7 @@ class InstalledVersions
/**
* @return array[]
- * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 0f1bbc310..9e751e17c 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
@@ -430,6 +430,93 @@ return array(
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
+ 'Safe\\DateTime' => $vendorDir . '/thecodingmachine/safe/lib/DateTime.php',
+ 'Safe\\DateTimeImmutable' => $vendorDir . '/thecodingmachine/safe/lib/DateTimeImmutable.php',
+ 'Safe\\Exceptions\\ApacheException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ApacheException.php',
+ 'Safe\\Exceptions\\ApcException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/ApcException.php',
+ 'Safe\\Exceptions\\ApcuException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ApcuException.php',
+ 'Safe\\Exceptions\\ArrayException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ArrayException.php',
+ 'Safe\\Exceptions\\Bzip2Exception' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/Bzip2Exception.php',
+ 'Safe\\Exceptions\\CalendarException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/CalendarException.php',
+ 'Safe\\Exceptions\\ClassobjException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ClassobjException.php',
+ 'Safe\\Exceptions\\ComException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ComException.php',
+ 'Safe\\Exceptions\\CubridException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/CubridException.php',
+ 'Safe\\Exceptions\\CurlException' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/CurlException.php',
+ 'Safe\\Exceptions\\DatetimeException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/DatetimeException.php',
+ 'Safe\\Exceptions\\DirException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/DirException.php',
+ 'Safe\\Exceptions\\EioException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/EioException.php',
+ 'Safe\\Exceptions\\ErrorfuncException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ErrorfuncException.php',
+ 'Safe\\Exceptions\\ExecException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ExecException.php',
+ 'Safe\\Exceptions\\FileinfoException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FileinfoException.php',
+ 'Safe\\Exceptions\\FilesystemException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FilesystemException.php',
+ 'Safe\\Exceptions\\FilterException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FilterException.php',
+ 'Safe\\Exceptions\\FpmException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FpmException.php',
+ 'Safe\\Exceptions\\FtpException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FtpException.php',
+ 'Safe\\Exceptions\\FunchandException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/FunchandException.php',
+ 'Safe\\Exceptions\\GettextException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/GettextException.php',
+ 'Safe\\Exceptions\\GmpException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/GmpException.php',
+ 'Safe\\Exceptions\\GnupgException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/GnupgException.php',
+ 'Safe\\Exceptions\\HashException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/HashException.php',
+ 'Safe\\Exceptions\\IbaseException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/IbaseException.php',
+ 'Safe\\Exceptions\\IbmDb2Exception' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/IbmDb2Exception.php',
+ 'Safe\\Exceptions\\IconvException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/IconvException.php',
+ 'Safe\\Exceptions\\ImageException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ImageException.php',
+ 'Safe\\Exceptions\\ImapException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ImapException.php',
+ 'Safe\\Exceptions\\InfoException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/InfoException.php',
+ 'Safe\\Exceptions\\InotifyException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/InotifyException.php',
+ 'Safe\\Exceptions\\JsonException' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/JsonException.php',
+ 'Safe\\Exceptions\\LdapException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/LdapException.php',
+ 'Safe\\Exceptions\\LibeventException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php',
+ 'Safe\\Exceptions\\LibxmlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/LibxmlException.php',
+ 'Safe\\Exceptions\\LzfException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/LzfException.php',
+ 'Safe\\Exceptions\\MailparseException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/MailparseException.php',
+ 'Safe\\Exceptions\\MbstringException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/MbstringException.php',
+ 'Safe\\Exceptions\\MiscException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/MiscException.php',
+ 'Safe\\Exceptions\\MssqlException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php',
+ 'Safe\\Exceptions\\MysqlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/MysqlException.php',
+ 'Safe\\Exceptions\\MysqliException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php',
+ 'Safe\\Exceptions\\NetworkException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/NetworkException.php',
+ 'Safe\\Exceptions\\Oci8Exception' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/Oci8Exception.php',
+ 'Safe\\Exceptions\\OpcacheException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/OpcacheException.php',
+ 'Safe\\Exceptions\\OpensslException' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/OpensslException.php',
+ 'Safe\\Exceptions\\OutcontrolException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/OutcontrolException.php',
+ 'Safe\\Exceptions\\PasswordException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php',
+ 'Safe\\Exceptions\\PcntlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/PcntlException.php',
+ 'Safe\\Exceptions\\PcreException' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/PcreException.php',
+ 'Safe\\Exceptions\\PgsqlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/PgsqlException.php',
+ 'Safe\\Exceptions\\PosixException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/PosixException.php',
+ 'Safe\\Exceptions\\PsException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/PsException.php',
+ 'Safe\\Exceptions\\PspellException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/PspellException.php',
+ 'Safe\\Exceptions\\ReadlineException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ReadlineException.php',
+ 'Safe\\Exceptions\\RpminfoException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/RpminfoException.php',
+ 'Safe\\Exceptions\\RrdException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/RrdException.php',
+ 'Safe\\Exceptions\\SafeExceptionInterface' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php',
+ 'Safe\\Exceptions\\SemException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SemException.php',
+ 'Safe\\Exceptions\\SessionException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SessionException.php',
+ 'Safe\\Exceptions\\ShmopException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ShmopException.php',
+ 'Safe\\Exceptions\\SimplexmlException' => $vendorDir . '/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php',
+ 'Safe\\Exceptions\\SocketsException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SocketsException.php',
+ 'Safe\\Exceptions\\SodiumException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SodiumException.php',
+ 'Safe\\Exceptions\\SolrException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SolrException.php',
+ 'Safe\\Exceptions\\SplException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SplException.php',
+ 'Safe\\Exceptions\\SqlsrvException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SqlsrvException.php',
+ 'Safe\\Exceptions\\SsdeepException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SsdeepException.php',
+ 'Safe\\Exceptions\\Ssh2Exception' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/Ssh2Exception.php',
+ 'Safe\\Exceptions\\StatsException' => $vendorDir . '/thecodingmachine/safe/deprecated/Exceptions/StatsException.php',
+ 'Safe\\Exceptions\\StreamException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/StreamException.php',
+ 'Safe\\Exceptions\\StringsException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/StringsException.php',
+ 'Safe\\Exceptions\\SwooleException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/SwooleException.php',
+ 'Safe\\Exceptions\\UodbcException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/UodbcException.php',
+ 'Safe\\Exceptions\\UopzException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/UopzException.php',
+ 'Safe\\Exceptions\\UrlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/UrlException.php',
+ 'Safe\\Exceptions\\VarException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/VarException.php',
+ 'Safe\\Exceptions\\XdiffException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/XdiffException.php',
+ 'Safe\\Exceptions\\XmlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/XmlException.php',
+ 'Safe\\Exceptions\\XmlrpcException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/XmlrpcException.php',
+ 'Safe\\Exceptions\\YamlException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/YamlException.php',
+ 'Safe\\Exceptions\\YazException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/YazException.php',
+ 'Safe\\Exceptions\\ZipException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ZipException.php',
+ 'Safe\\Exceptions\\ZlibException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ZlibException.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php',
'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 6cdb4a017..99c5d33ff 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -2,18 +2,24 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
- '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php',
+ '288267919fedd3829a7732b5fb202197' => $vendorDir . '/thecodingmachine/safe/deprecated/array.php',
+ 'a88cd08cfbf1600f7d5de6e587eee1fa' => $vendorDir . '/thecodingmachine/safe/deprecated/datetime.php',
'47f619d9197b36cf5ab70738d7743fe2' => $vendorDir . '/thecodingmachine/safe/deprecated/libevent.php',
+ '213c1c2258e2e5aa409a0af3e993b3a9' => $vendorDir . '/thecodingmachine/safe/deprecated/password.php',
'ea6bb8a12ef9b68f6ada99058e530760' => $vendorDir . '/thecodingmachine/safe/deprecated/mssql.php',
'9a29089eb3ce41a446744c68a00f118c' => $vendorDir . '/thecodingmachine/safe/deprecated/stats.php',
+ 'd5947c9df62650029c674c79176af68d' => $vendorDir . '/thecodingmachine/safe/deprecated/strings.php',
'72243e5536b63e298acb6476f01f1aff' => $vendorDir . '/thecodingmachine/safe/lib/special_cases.php',
+ '09f92ed6301edc510574c196c2b7d1af' => $vendorDir . '/thecodingmachine/safe/deprecated/mysqli.php',
'3f648889e687f31c52f949ba8a9d0873' => $vendorDir . '/thecodingmachine/safe/generated/apache.php',
'eeb4581d958421a4244aaa4167c6a575' => $vendorDir . '/thecodingmachine/safe/generated/apcu.php',
'04cb0b3c1dac5b5ddb23c14e3d66dbe9' => $vendorDir . '/thecodingmachine/safe/generated/array.php',
@@ -34,6 +40,7 @@ return array(
'fbd163fc68c5faf73d5ed4002ffd836d' => $vendorDir . '/thecodingmachine/safe/generated/fpm.php',
'21b511999d61411fab0692ff8795bbed' => $vendorDir . '/thecodingmachine/safe/generated/ftp.php',
'85fbd73fc92365cd90526b0ea03cae3a' => $vendorDir . '/thecodingmachine/safe/generated/funchand.php',
+ 'a2e4c6dfdbf36f56f1945ddcbd54e289' => $vendorDir . '/thecodingmachine/safe/generated/gettext.php',
'51df9c146e0b7dcbdf358d8abd24dbdc' => $vendorDir . '/thecodingmachine/safe/generated/gmp.php',
'93bb7fe678d7dcfb1322f8e3475a48b0' => $vendorDir . '/thecodingmachine/safe/generated/gnupg.php',
'c171ba99cf316379ff66468392bf4950' => $vendorDir . '/thecodingmachine/safe/generated/hash.php',
@@ -43,7 +50,6 @@ return array(
'c28a05f498c01b810a714f7214b7a8da' => $vendorDir . '/thecodingmachine/safe/generated/image.php',
'8063cd92acdf00fd978b5599eb7cc142' => $vendorDir . '/thecodingmachine/safe/generated/imap.php',
'8bd26dbe768e9c9599edad7b198e5446' => $vendorDir . '/thecodingmachine/safe/generated/info.php',
- '0c577fe603b029d4b65c84376b15dbd5' => $vendorDir . '/thecodingmachine/safe/generated/ingres-ii.php',
'd4362910bde43c0f956b52527effd7d4' => $vendorDir . '/thecodingmachine/safe/generated/inotify.php',
'696ba49197d9b55f0428a12bb5a818e1' => $vendorDir . '/thecodingmachine/safe/generated/json.php',
'9818aaa99c8647c63f8ef62b7a368160' => $vendorDir . '/thecodingmachine/safe/generated/ldap.php',
@@ -52,20 +58,14 @@ return array(
'bdca804bb0904ea9f53f328dfc0bb8a5' => $vendorDir . '/thecodingmachine/safe/generated/mailparse.php',
'b0a3fcac3eaf55445796d6af26b89366' => $vendorDir . '/thecodingmachine/safe/generated/mbstring.php',
'98de16b8db03eb0cb4d318b4402215a6' => $vendorDir . '/thecodingmachine/safe/generated/misc.php',
- 'c112440003b56e243b192c11fa9d836e' => $vendorDir . '/thecodingmachine/safe/generated/msql.php',
'7cefd81607cd21b8b3a15656eb6465f5' => $vendorDir . '/thecodingmachine/safe/generated/mysql.php',
- 'aaf438b080089c6d0686679cd34aa72e' => $vendorDir . '/thecodingmachine/safe/generated/mysqli.php',
- 'df0ef890e9afbf95f3924feb1c7a89f3' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndMs.php',
- 'db595fee5972867e45c5327010d78735' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndQc.php',
'cbac956836b72483dcff1ac39d5c0a0f' => $vendorDir . '/thecodingmachine/safe/generated/network.php',
'6c8f89dfbdc117d7871f572269363f25' => $vendorDir . '/thecodingmachine/safe/generated/oci8.php',
'169a669966a45c06bf55ed029122729b' => $vendorDir . '/thecodingmachine/safe/generated/opcache.php',
'def61bf4fecd4d4bca7354919cd69302' => $vendorDir . '/thecodingmachine/safe/generated/openssl.php',
'26bb010649a6d32d4120181458aa6ef2' => $vendorDir . '/thecodingmachine/safe/generated/outcontrol.php',
- '1212c201fe43c7492a085b2c71505e0f' => $vendorDir . '/thecodingmachine/safe/generated/password.php',
'002ebcb842e2c0d5b7f67fe64cc93158' => $vendorDir . '/thecodingmachine/safe/generated/pcntl.php',
'86df38612982dade72c7085ce7eca81f' => $vendorDir . '/thecodingmachine/safe/generated/pcre.php',
- '1cacc3e65f82a473fbd5507c7ce4385d' => $vendorDir . '/thecodingmachine/safe/generated/pdf.php',
'1fc22f445c69ea8706e82fce301c0831' => $vendorDir . '/thecodingmachine/safe/generated/pgsql.php',
'c70b42561584f7144bff38cd63c4eef3' => $vendorDir . '/thecodingmachine/safe/generated/posix.php',
'9923214639c32ca5173db03a177d3b63' => $vendorDir . '/thecodingmachine/safe/generated/ps.php',
@@ -76,7 +76,6 @@ return array(
'775b964f72f827a1bf87c65ab5b10800' => $vendorDir . '/thecodingmachine/safe/generated/sem.php',
'816428bd69c29ab5e1ed622af5dca0cd' => $vendorDir . '/thecodingmachine/safe/generated/session.php',
'5093e233bedbefaef0df262bfbab0a5c' => $vendorDir . '/thecodingmachine/safe/generated/shmop.php',
- '01352920b0151f17e671266e44b52536' => $vendorDir . '/thecodingmachine/safe/generated/simplexml.php',
'b080617b1d949683c2e37f8f01dc0e15' => $vendorDir . '/thecodingmachine/safe/generated/sockets.php',
'2708aa182ddcfe6ce27c96acaaa40f69' => $vendorDir . '/thecodingmachine/safe/generated/sodium.php',
'f1b96cb260a5baeea9a7285cda82a1ec' => $vendorDir . '/thecodingmachine/safe/generated/solr.php',
@@ -98,6 +97,4 @@ return array(
'4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php',
- '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index 15a2ff3ad..b7fc0125d 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index d818c3598..330e532d3 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(__DIR__);
+$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
@@ -10,8 +10,6 @@ return array(
'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'),
'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
- 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
- 'Safe\\' => array($vendorDir . '/thecodingmachine/safe/lib', $vendorDir . '/thecodingmachine/safe/deprecated', $vendorDir . '/thecodingmachine/safe/generated'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'),
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index f6be2dd43..34b3b7ad0 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -25,15 +25,38 @@ class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'));
- require __DIR__ . '/autoload_static.php';
- call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
$loader->register(true);
- $includeFiles = \Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
+ if ($useStaticLoader) {
+ $includeFiles = Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
+ } else {
+ $includeFiles = require __DIR__ . '/autoload_files.php';
+ }
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file);
}
@@ -42,16 +65,11 @@ class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056
}
}
-/**
- * @param string $fileIdentifier
- * @param string $file
- * @return void
- */
function composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
-
require $file;
+
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 14f635b92..4555210e9 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -7,14 +7,20 @@ namespace Composer\Autoload;
class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
{
public static $files = array (
- '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => __DIR__ . '/..' . '/beberlei/assert/lib/Assert/functions.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/apc.php',
+ '288267919fedd3829a7732b5fb202197' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/array.php',
+ 'a88cd08cfbf1600f7d5de6e587eee1fa' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/datetime.php',
'47f619d9197b36cf5ab70738d7743fe2' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/libevent.php',
+ '213c1c2258e2e5aa409a0af3e993b3a9' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/password.php',
'ea6bb8a12ef9b68f6ada99058e530760' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/mssql.php',
'9a29089eb3ce41a446744c68a00f118c' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/stats.php',
+ 'd5947c9df62650029c674c79176af68d' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/strings.php',
'72243e5536b63e298acb6476f01f1aff' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/special_cases.php',
+ '09f92ed6301edc510574c196c2b7d1af' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/mysqli.php',
'3f648889e687f31c52f949ba8a9d0873' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apache.php',
'eeb4581d958421a4244aaa4167c6a575' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apcu.php',
'04cb0b3c1dac5b5ddb23c14e3d66dbe9' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/array.php',
@@ -35,6 +41,7 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'fbd163fc68c5faf73d5ed4002ffd836d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/fpm.php',
'21b511999d61411fab0692ff8795bbed' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ftp.php',
'85fbd73fc92365cd90526b0ea03cae3a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/funchand.php',
+ 'a2e4c6dfdbf36f56f1945ddcbd54e289' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gettext.php',
'51df9c146e0b7dcbdf358d8abd24dbdc' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gmp.php',
'93bb7fe678d7dcfb1322f8e3475a48b0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gnupg.php',
'c171ba99cf316379ff66468392bf4950' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/hash.php',
@@ -44,7 +51,6 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'c28a05f498c01b810a714f7214b7a8da' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/image.php',
'8063cd92acdf00fd978b5599eb7cc142' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/imap.php',
'8bd26dbe768e9c9599edad7b198e5446' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/info.php',
- '0c577fe603b029d4b65c84376b15dbd5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ingres-ii.php',
'd4362910bde43c0f956b52527effd7d4' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/inotify.php',
'696ba49197d9b55f0428a12bb5a818e1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/json.php',
'9818aaa99c8647c63f8ef62b7a368160' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ldap.php',
@@ -53,20 +59,14 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'bdca804bb0904ea9f53f328dfc0bb8a5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mailparse.php',
'b0a3fcac3eaf55445796d6af26b89366' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mbstring.php',
'98de16b8db03eb0cb4d318b4402215a6' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/misc.php',
- 'c112440003b56e243b192c11fa9d836e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/msql.php',
'7cefd81607cd21b8b3a15656eb6465f5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysql.php',
- 'aaf438b080089c6d0686679cd34aa72e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqli.php',
- 'df0ef890e9afbf95f3924feb1c7a89f3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndMs.php',
- 'db595fee5972867e45c5327010d78735' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndQc.php',
'cbac956836b72483dcff1ac39d5c0a0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/network.php',
'6c8f89dfbdc117d7871f572269363f25' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/oci8.php',
'169a669966a45c06bf55ed029122729b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/opcache.php',
'def61bf4fecd4d4bca7354919cd69302' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/openssl.php',
'26bb010649a6d32d4120181458aa6ef2' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/outcontrol.php',
- '1212c201fe43c7492a085b2c71505e0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/password.php',
'002ebcb842e2c0d5b7f67fe64cc93158' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcntl.php',
'86df38612982dade72c7085ce7eca81f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcre.php',
- '1cacc3e65f82a473fbd5507c7ce4385d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pdf.php',
'1fc22f445c69ea8706e82fce301c0831' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pgsql.php',
'c70b42561584f7144bff38cd63c4eef3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/posix.php',
'9923214639c32ca5173db03a177d3b63' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ps.php',
@@ -77,7 +77,6 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'775b964f72f827a1bf87c65ab5b10800' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sem.php',
'816428bd69c29ab5e1ed622af5dca0cd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/session.php',
'5093e233bedbefaef0df262bfbab0a5c' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/shmop.php',
- '01352920b0151f17e671266e44b52536' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/simplexml.php',
'b080617b1d949683c2e37f8f01dc0e15' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sockets.php',
'2708aa182ddcfe6ce27c96acaaa40f69' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sodium.php',
'f1b96cb260a5baeea9a7285cda82a1ec' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/solr.php',
@@ -99,8 +98,6 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php',
- '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
public static $prefixLengthsPsr4 = array (
@@ -117,11 +114,6 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
array (
'Webmozart\\Assert\\' => 17,
),
- 'S' =>
- array (
- 'Symfony\\Polyfill\\Ctype\\' => 23,
- 'Safe\\' => 5,
- ),
'P' =>
array (
'Prophecy\\' => 9,
@@ -162,16 +154,6 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
array (
0 => __DIR__ . '/..' . '/webmozart/assert/src',
),
- 'Symfony\\Polyfill\\Ctype\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
- ),
- 'Safe\\' =>
- array (
- 0 => __DIR__ . '/..' . '/thecodingmachine/safe/lib',
- 1 => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated',
- 2 => __DIR__ . '/..' . '/thecodingmachine/safe/generated',
- ),
'Prophecy\\' =>
array (
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
@@ -627,6 +609,93 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
+ 'Safe\\DateTime' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/DateTime.php',
+ 'Safe\\DateTimeImmutable' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/DateTimeImmutable.php',
+ 'Safe\\Exceptions\\ApacheException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ApacheException.php',
+ 'Safe\\Exceptions\\ApcException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/ApcException.php',
+ 'Safe\\Exceptions\\ApcuException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ApcuException.php',
+ 'Safe\\Exceptions\\ArrayException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ArrayException.php',
+ 'Safe\\Exceptions\\Bzip2Exception' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/Bzip2Exception.php',
+ 'Safe\\Exceptions\\CalendarException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/CalendarException.php',
+ 'Safe\\Exceptions\\ClassobjException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ClassobjException.php',
+ 'Safe\\Exceptions\\ComException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ComException.php',
+ 'Safe\\Exceptions\\CubridException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/CubridException.php',
+ 'Safe\\Exceptions\\CurlException' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/CurlException.php',
+ 'Safe\\Exceptions\\DatetimeException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/DatetimeException.php',
+ 'Safe\\Exceptions\\DirException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/DirException.php',
+ 'Safe\\Exceptions\\EioException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/EioException.php',
+ 'Safe\\Exceptions\\ErrorfuncException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ErrorfuncException.php',
+ 'Safe\\Exceptions\\ExecException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ExecException.php',
+ 'Safe\\Exceptions\\FileinfoException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FileinfoException.php',
+ 'Safe\\Exceptions\\FilesystemException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FilesystemException.php',
+ 'Safe\\Exceptions\\FilterException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FilterException.php',
+ 'Safe\\Exceptions\\FpmException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FpmException.php',
+ 'Safe\\Exceptions\\FtpException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FtpException.php',
+ 'Safe\\Exceptions\\FunchandException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/FunchandException.php',
+ 'Safe\\Exceptions\\GettextException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/GettextException.php',
+ 'Safe\\Exceptions\\GmpException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/GmpException.php',
+ 'Safe\\Exceptions\\GnupgException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/GnupgException.php',
+ 'Safe\\Exceptions\\HashException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/HashException.php',
+ 'Safe\\Exceptions\\IbaseException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/IbaseException.php',
+ 'Safe\\Exceptions\\IbmDb2Exception' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/IbmDb2Exception.php',
+ 'Safe\\Exceptions\\IconvException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/IconvException.php',
+ 'Safe\\Exceptions\\ImageException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ImageException.php',
+ 'Safe\\Exceptions\\ImapException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ImapException.php',
+ 'Safe\\Exceptions\\InfoException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/InfoException.php',
+ 'Safe\\Exceptions\\InotifyException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/InotifyException.php',
+ 'Safe\\Exceptions\\JsonException' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/JsonException.php',
+ 'Safe\\Exceptions\\LdapException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/LdapException.php',
+ 'Safe\\Exceptions\\LibeventException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php',
+ 'Safe\\Exceptions\\LibxmlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/LibxmlException.php',
+ 'Safe\\Exceptions\\LzfException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/LzfException.php',
+ 'Safe\\Exceptions\\MailparseException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/MailparseException.php',
+ 'Safe\\Exceptions\\MbstringException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/MbstringException.php',
+ 'Safe\\Exceptions\\MiscException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/MiscException.php',
+ 'Safe\\Exceptions\\MssqlException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php',
+ 'Safe\\Exceptions\\MysqlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/MysqlException.php',
+ 'Safe\\Exceptions\\MysqliException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php',
+ 'Safe\\Exceptions\\NetworkException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/NetworkException.php',
+ 'Safe\\Exceptions\\Oci8Exception' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/Oci8Exception.php',
+ 'Safe\\Exceptions\\OpcacheException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/OpcacheException.php',
+ 'Safe\\Exceptions\\OpensslException' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/OpensslException.php',
+ 'Safe\\Exceptions\\OutcontrolException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/OutcontrolException.php',
+ 'Safe\\Exceptions\\PasswordException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php',
+ 'Safe\\Exceptions\\PcntlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/PcntlException.php',
+ 'Safe\\Exceptions\\PcreException' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/PcreException.php',
+ 'Safe\\Exceptions\\PgsqlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/PgsqlException.php',
+ 'Safe\\Exceptions\\PosixException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/PosixException.php',
+ 'Safe\\Exceptions\\PsException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/PsException.php',
+ 'Safe\\Exceptions\\PspellException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/PspellException.php',
+ 'Safe\\Exceptions\\ReadlineException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ReadlineException.php',
+ 'Safe\\Exceptions\\RpminfoException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/RpminfoException.php',
+ 'Safe\\Exceptions\\RrdException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/RrdException.php',
+ 'Safe\\Exceptions\\SafeExceptionInterface' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php',
+ 'Safe\\Exceptions\\SemException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SemException.php',
+ 'Safe\\Exceptions\\SessionException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SessionException.php',
+ 'Safe\\Exceptions\\ShmopException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ShmopException.php',
+ 'Safe\\Exceptions\\SimplexmlException' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php',
+ 'Safe\\Exceptions\\SocketsException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SocketsException.php',
+ 'Safe\\Exceptions\\SodiumException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SodiumException.php',
+ 'Safe\\Exceptions\\SolrException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SolrException.php',
+ 'Safe\\Exceptions\\SplException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SplException.php',
+ 'Safe\\Exceptions\\SqlsrvException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SqlsrvException.php',
+ 'Safe\\Exceptions\\SsdeepException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SsdeepException.php',
+ 'Safe\\Exceptions\\Ssh2Exception' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/Ssh2Exception.php',
+ 'Safe\\Exceptions\\StatsException' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/Exceptions/StatsException.php',
+ 'Safe\\Exceptions\\StreamException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/StreamException.php',
+ 'Safe\\Exceptions\\StringsException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/StringsException.php',
+ 'Safe\\Exceptions\\SwooleException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/SwooleException.php',
+ 'Safe\\Exceptions\\UodbcException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/UodbcException.php',
+ 'Safe\\Exceptions\\UopzException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/UopzException.php',
+ 'Safe\\Exceptions\\UrlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/UrlException.php',
+ 'Safe\\Exceptions\\VarException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/VarException.php',
+ 'Safe\\Exceptions\\XdiffException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/XdiffException.php',
+ 'Safe\\Exceptions\\XmlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/XmlException.php',
+ 'Safe\\Exceptions\\XmlrpcException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/XmlrpcException.php',
+ 'Safe\\Exceptions\\YamlException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/YamlException.php',
+ 'Safe\\Exceptions\\YazException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/YazException.php',
+ 'Safe\\Exceptions\\ZipException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ZipException.php',
+ 'Safe\\Exceptions\\ZlibException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ZlibException.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php',
'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index f3065c328..935e86201 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -153,17 +153,17 @@
},
{
"name": "chillerlan/php-settings-container",
- "version": "2.1.3",
- "version_normalized": "2.1.3.0",
+ "version": "2.1.4",
+ "version_normalized": "2.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-settings-container.git",
- "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602"
+ "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/125dd573b45ffc7cabecf385986a356ba2c6f602",
- "reference": "125dd573b45ffc7cabecf385986a356ba2c6f602",
+ "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
+ "reference": "1beb7df3c14346d4344b0b2e12f6f9a74feabd4a",
"shasum": ""
},
"require": {
@@ -174,7 +174,7 @@
"phan/phan": "^5.3",
"phpunit/phpunit": "^9.5"
},
- "time": "2022-03-09T13:18:58+00:00",
+ "time": "2022-07-05T22:32:14+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -293,17 +293,17 @@
},
{
"name": "j4mie/idiorm",
- "version": "v1.5.7",
- "version_normalized": "1.5.7.0",
+ "version": "dev-master",
+ "version_normalized": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/j4mie/idiorm.git",
- "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4"
+ "url": "https://github.com/aaronpk/idiorm.git",
+ "reference": "efc8ea06698f53e2c479c7696f2b154c47c3a3cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/j4mie/idiorm/zipball/d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4",
- "reference": "d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4",
+ "url": "https://api.github.com/repos/aaronpk/idiorm/zipball/efc8ea06698f53e2c479c7696f2b154c47c3a3cb",
+ "reference": "efc8ea06698f53e2c479c7696f2b154c47c3a3cb",
"shasum": ""
},
"require": {
@@ -313,7 +313,8 @@
"ext-pdo_sqlite": "*",
"phpunit/phpunit": "^4.8"
},
- "time": "2020-04-29T00:37:09+00:00",
+ "time": "2022-03-26T15:19:01+00:00",
+ "default-branch": true,
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -321,7 +322,11 @@
"idiorm.php"
]
},
- "notification-url": "https://packagist.org/downloads/",
+ "scripts": {
+ "test": [
+ "phpunit -c ./phpunit.xml"
+ ]
+ },
"license": [
"BSD-2-Clause",
"BSD-3-Clause",
@@ -470,17 +475,17 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.13.2",
- "version_normalized": "4.13.2.0",
+ "version": "v4.14.0",
+ "version_normalized": "4.14.0.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "210577fe3cf7badcc5814d99455df46564f3c077"
+ "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
- "reference": "210577fe3cf7badcc5814d99455df46564f3c077",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
+ "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"shasum": ""
},
"require": {
@@ -491,7 +496,7 @@
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
- "time": "2021-11-30T19:35:32+00:00",
+ "time": "2022-05-31T20:59:12+00:00",
"bin": [
"bin/php-parse"
],
@@ -523,23 +528,23 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
},
"install-path": "../nikic/php-parser"
},
{
"name": "paragonie/constant_time_encoding",
- "version": "v2.4.0",
- "version_normalized": "2.4.0.0",
+ "version": "v2.6.3",
+ "version_normalized": "2.6.3.0",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c"
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
- "reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938",
"shasum": ""
},
"require": {
@@ -549,7 +554,7 @@
"phpunit/phpunit": "^6|^7|^8|^9",
"vimeo/psalm": "^1|^2|^3|^4"
},
- "time": "2020-12-06T15:14:20+00:00",
+ "time": "2022-06-14T06:56:20+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -832,17 +837,17 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.6.0",
- "version_normalized": "1.6.0.0",
+ "version": "1.6.1",
+ "version_normalized": "1.6.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
+ "reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
- "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
+ "reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
@@ -853,7 +858,7 @@
"ext-tokenizer": "*",
"psalm/phar": "^4.8"
},
- "time": "2022-01-04T19:58:01+00:00",
+ "time": "2022-03-15T21:29:03+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -879,7 +884,7 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
},
"install-path": "../phpdocumentor/type-resolver"
},
@@ -955,36 +960,31 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.1.2",
- "version_normalized": "1.1.2.0",
+ "version": "1.8.1",
+ "version_normalized": "1.8.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934"
+ "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bcea0ae85868a89d5789c75f012c93129f842934",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67",
+ "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67",
"shasum": ""
},
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
- "time": "2021-11-09T12:41:09+00:00",
+ "time": "2022-07-12T16:08:06+00:00",
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"installation-source": "dist",
"autoload": {
"files": [
@@ -996,6 +996,10 @@
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/1.8.1"
+ },
"funding": [
{
"url": "https://github.com/ondrejmirtes",
@@ -1839,17 +1843,17 @@
},
{
"name": "sebastian/environment",
- "version": "5.1.3",
- "version_normalized": "5.1.3.0",
+ "version": "5.1.4",
+ "version_normalized": "5.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
+ "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"shasum": ""
},
"require": {
@@ -1861,7 +1865,7 @@
"suggest": {
"ext-posix": "*"
},
- "time": "2020-09-28T05:52:38+00:00",
+ "time": "2022-04-03T09:37:03+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1893,7 +1897,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
},
"funding": [
{
@@ -2469,17 +2473,17 @@
},
{
"name": "spomky-labs/otphp",
- "version": "v10.0.1",
- "version_normalized": "10.0.1.0",
+ "version": "v10.0.3",
+ "version_normalized": "10.0.3.0",
"source": {
"type": "git",
"url": "https://github.com/Spomky-Labs/otphp.git",
- "reference": "f44cce5a9db4b8da410215d992110482c931232f"
+ "reference": "9784d9f7c790eed26e102d6c78f12c754036c366"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/f44cce5a9db4b8da410215d992110482c931232f",
- "reference": "f44cce5a9db4b8da410215d992110482c931232f",
+ "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/9784d9f7c790eed26e102d6c78f12c754036c366",
+ "reference": "9784d9f7c790eed26e102d6c78f12c754036c366",
"shasum": ""
},
"require": {
@@ -2487,7 +2491,7 @@
"ext-mbstring": "*",
"paragonie/constant_time_encoding": "^2.0",
"php": "^7.2|^8.0",
- "thecodingmachine/safe": "^0.1.14|^1.0"
+ "thecodingmachine/safe": "^0.1.14|^1.0|^2.0"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.0",
@@ -2497,9 +2501,9 @@
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.0",
- "thecodingmachine/phpstan-safe-rule": "^1.0"
+ "thecodingmachine/phpstan-safe-rule": "^1.0 || ^2.0"
},
- "time": "2020-01-28T09:24:19+00:00",
+ "time": "2022-03-17T08:00:35+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -2541,140 +2545,54 @@
],
"support": {
"issues": "https://github.com/Spomky-Labs/otphp/issues",
- "source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.1"
+ "source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.3"
},
"install-path": "../spomky-labs/otphp"
},
{
- "name": "symfony/polyfill-ctype",
- "version": "v1.25.0",
- "version_normalized": "1.25.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "30885182c981ab175d4d034db0f6f469898070ab"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
- "reference": "30885182c981ab175d4d034db0f6f469898070ab",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "time": "2021-10-20T20:35:02+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.23-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-ctype"
- },
- {
"name": "thecodingmachine/safe",
- "version": "v1.3.3",
- "version_normalized": "1.3.3.0",
+ "version": "v2.2.1",
+ "version_normalized": "2.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/thecodingmachine/safe.git",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc"
+ "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
+ "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2a8d758fd17763faf86e4aa798193e17b9fac38c",
+ "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c",
"shasum": ""
},
"require": {
- "php": ">=7.2"
+ "php": "^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12",
+ "phpstan/phpstan": "^1.5",
+ "phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.2",
- "thecodingmachine/phpstan-strict-rules": "^0.12"
+ "thecodingmachine/phpstan-strict-rules": "^1.0"
},
- "time": "2020-10-28T17:51:34+00:00",
+ "time": "2022-06-09T15:36:45+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.1-dev"
+ "dev-master": "2.2.x-dev"
}
},
"installation-source": "dist",
"autoload": {
- "psr-4": {
- "Safe\\": [
- "lib/",
- "deprecated/",
- "generated/"
- ]
- },
"files": [
"deprecated/apc.php",
+ "deprecated/array.php",
+ "deprecated/datetime.php",
"deprecated/libevent.php",
+ "deprecated/password.php",
"deprecated/mssql.php",
"deprecated/stats.php",
+ "deprecated/strings.php",
"lib/special_cases.php",
+ "deprecated/mysqli.php",
"generated/apache.php",
"generated/apcu.php",
"generated/array.php",
@@ -2695,6 +2613,7 @@
"generated/fpm.php",
"generated/ftp.php",
"generated/funchand.php",
+ "generated/gettext.php",
"generated/gmp.php",
"generated/gnupg.php",
"generated/hash.php",
@@ -2704,7 +2623,6 @@
"generated/image.php",
"generated/imap.php",
"generated/info.php",
- "generated/ingres-ii.php",
"generated/inotify.php",
"generated/json.php",
"generated/ldap.php",
@@ -2713,20 +2631,14 @@
"generated/mailparse.php",
"generated/mbstring.php",
"generated/misc.php",
- "generated/msql.php",
"generated/mysql.php",
- "generated/mysqli.php",
- "generated/mysqlndMs.php",
- "generated/mysqlndQc.php",
"generated/network.php",
"generated/oci8.php",
"generated/opcache.php",
"generated/openssl.php",
"generated/outcontrol.php",
- "generated/password.php",
"generated/pcntl.php",
"generated/pcre.php",
- "generated/pdf.php",
"generated/pgsql.php",
"generated/posix.php",
"generated/ps.php",
@@ -2737,7 +2649,6 @@
"generated/sem.php",
"generated/session.php",
"generated/shmop.php",
- "generated/simplexml.php",
"generated/sockets.php",
"generated/sodium.php",
"generated/solr.php",
@@ -2759,6 +2670,13 @@
"generated/yaz.php",
"generated/zip.php",
"generated/zlib.php"
+ ],
+ "classmap": [
+ "lib/DateTime.php",
+ "lib/DateTimeImmutable.php",
+ "lib/Exceptions/",
+ "deprecated/Exceptions/",
+ "generated/Exceptions/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2768,7 +2686,7 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"support": {
"issues": "https://github.com/thecodingmachine/safe/issues",
- "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3"
+ "source": "https://github.com/thecodingmachine/safe/tree/v2.2.1"
},
"install-path": "../thecodingmachine/safe"
},
@@ -2827,22 +2745,22 @@
},
{
"name": "webmozart/assert",
- "version": "1.10.0",
- "version_normalized": "1.10.0.0",
+ "version": "1.11.0",
+ "version_normalized": "1.11.0.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
- "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
- "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
- "php": "^7.2 || ^8.0",
- "symfony/polyfill-ctype": "^1.8"
+ "ext-ctype": "*",
+ "php": "^7.2 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
@@ -2851,7 +2769,7 @@
"require-dev": {
"phpunit/phpunit": "^8.5.13"
},
- "time": "2021-03-09T10:59:23+00:00",
+ "time": "2022-06-03T18:03:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -2882,7 +2800,7 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
- "source": "https://github.com/webmozarts/assert/tree/1.10.0"
+ "source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
"install-path": "../webmozart/assert"
}
@@ -2921,7 +2839,6 @@
"sebastian/resource-operations",
"sebastian/type",
"sebastian/version",
- "symfony/polyfill-ctype",
"theseer/tokenizer",
"webmozart/assert"
]
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index ad956d21b..6f5250cc9 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,409 +1,402 @@
<?php return array(
'root' => array(
- 'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '1e668c7572346f6adc47cc0359c2fd616481e730',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
+ 'reference' => '4b6161892000cb2b8392dce92a9cf2cabdf2d20e',
+ 'name' => '__root__',
'dev' => true,
),
'versions' => array(
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '1e668c7572346f6adc47cc0359c2fd616481e730',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
+ 'reference' => '4b6161892000cb2b8392dce92a9cf2cabdf2d20e',
'dev_requirement' => false,
),
'beberlei/assert' => array(
'pretty_version' => 'v3.3.2',
'version' => '3.3.2.0',
- 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
'type' => 'library',
'install_path' => __DIR__ . '/../beberlei/assert',
'aliases' => array(),
+ 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
'dev_requirement' => false,
),
'chillerlan/php-qrcode' => array(
'pretty_version' => '4.3.3',
'version' => '4.3.3.0',
- 'reference' => '6356b246948ac1025882b3f55e7c68ebd4515ae3',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-qrcode',
'aliases' => array(),
+ 'reference' => '6356b246948ac1025882b3f55e7c68ebd4515ae3',
'dev_requirement' => false,
),
'chillerlan/php-settings-container' => array(
- 'pretty_version' => '2.1.3',
- 'version' => '2.1.3.0',
- 'reference' => '125dd573b45ffc7cabecf385986a356ba2c6f602',
+ 'pretty_version' => '2.1.4',
+ 'version' => '2.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-settings-container',
'aliases' => array(),
+ 'reference' => '1beb7df3c14346d4344b0b2e12f6f9a74feabd4a',
'dev_requirement' => false,
),
'doctrine/instantiator' => array(
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
- 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/instantiator',
'aliases' => array(),
+ 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
'dev_requirement' => true,
),
'j4mie/idiorm' => array(
- 'pretty_version' => 'v1.5.7',
- 'version' => '1.5.7.0',
- 'reference' => 'd23f97053ef5d0b988a02c6a71eb5c6118b2f5b4',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../j4mie/idiorm',
- 'aliases' => array(),
+ 'aliases' => array(
+ 0 => '9999999-dev',
+ ),
+ 'reference' => 'efc8ea06698f53e2c479c7696f2b154c47c3a3cb',
'dev_requirement' => false,
),
'mervick/material-design-icons' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
- 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
'type' => 'library',
'install_path' => __DIR__ . '/../mervick/material-design-icons',
'aliases' => array(),
+ 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
'dev_requirement' => false,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.11.0',
'version' => '1.11.0.0',
- 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(),
+ 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
'dev_requirement' => true,
),
'nikic/php-parser' => array(
- 'pretty_version' => 'v4.13.2',
- 'version' => '4.13.2.0',
- 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077',
+ 'pretty_version' => 'v4.14.0',
+ 'version' => '4.14.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
+ 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1',
'dev_requirement' => true,
),
'paragonie/constant_time_encoding' => array(
- 'pretty_version' => 'v2.4.0',
- 'version' => '2.4.0.0',
- 'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c',
+ 'pretty_version' => 'v2.6.3',
+ 'version' => '2.6.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../paragonie/constant_time_encoding',
'aliases' => array(),
+ 'reference' => '58c3f47f650c94ec05a151692652a868995d2938',
'dev_requirement' => false,
),
'phar-io/manifest' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
- 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/manifest',
'aliases' => array(),
+ 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
'dev_requirement' => true,
),
'phar-io/version' => array(
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
- 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/version',
'aliases' => array(),
+ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
'dev_requirement' => true,
),
'phpdocumentor/reflection-common' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
- 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-common',
'aliases' => array(),
+ 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
'dev_requirement' => true,
),
'phpdocumentor/reflection-docblock' => array(
'pretty_version' => '5.3.0',
'version' => '5.3.0.0',
- 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock',
'aliases' => array(),
+ 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
'dev_requirement' => true,
),
'phpdocumentor/type-resolver' => array(
- 'pretty_version' => '1.6.0',
- 'version' => '1.6.0.0',
- 'reference' => '93ebd0014cab80c4ea9f5e297ea48672f1b87706',
+ 'pretty_version' => '1.6.1',
+ 'version' => '1.6.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/type-resolver',
'aliases' => array(),
+ 'reference' => '77a32518733312af16a44300404e945338981de3',
'dev_requirement' => true,
),
'phpspec/prophecy' => array(
'pretty_version' => 'v1.15.0',
'version' => '1.15.0.0',
- 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
'type' => 'library',
'install_path' => __DIR__ . '/../phpspec/prophecy',
'aliases' => array(),
+ 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
'dev_requirement' => true,
),
'phpstan/phpstan' => array(
- 'pretty_version' => '1.1.2',
- 'version' => '1.1.2.0',
- 'reference' => 'bcea0ae85868a89d5789c75f012c93129f842934',
+ 'pretty_version' => '1.8.1',
+ 'version' => '1.8.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpstan',
'aliases' => array(),
+ 'reference' => '8dbba631fa32f4b289404469c2afd6122fd61d67',
'dev_requirement' => true,
),
'phpunit/php-code-coverage' => array(
'pretty_version' => '9.2.15',
'version' => '9.2.15.0',
- 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(),
+ 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
'dev_requirement' => true,
),
'phpunit/php-file-iterator' => array(
'pretty_version' => '3.0.6',
'version' => '3.0.6.0',
- 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
'aliases' => array(),
+ 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
'dev_requirement' => true,
),
'phpunit/php-invoker' => array(
'pretty_version' => '3.1.1',
'version' => '3.1.1.0',
- 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-invoker',
'aliases' => array(),
+ 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
'dev_requirement' => true,
),
'phpunit/php-text-template' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
- 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-text-template',
'aliases' => array(),
+ 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
'dev_requirement' => true,
),
'phpunit/php-timer' => array(
'pretty_version' => '5.0.3',
'version' => '5.0.3.0',
- 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-timer',
'aliases' => array(),
+ 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '9.5.16',
'version' => '9.5.16.0',
- 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
+ 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
'dev_requirement' => true,
),
'sebastian/cli-parser' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
- 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/cli-parser',
'aliases' => array(),
+ 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
'dev_requirement' => true,
),
'sebastian/code-unit' => array(
'pretty_version' => '1.0.8',
'version' => '1.0.8.0',
- 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit',
'aliases' => array(),
+ 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
'dev_requirement' => true,
),
'sebastian/code-unit-reverse-lookup' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
- 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
'aliases' => array(),
+ 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
'dev_requirement' => true,
),
'sebastian/comparator' => array(
'pretty_version' => '4.0.6',
'version' => '4.0.6.0',
- 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
+ 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
'dev_requirement' => true,
),
'sebastian/complexity' => array(
'pretty_version' => '2.0.2',
'version' => '2.0.2.0',
- 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/complexity',
'aliases' => array(),
+ 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
'dev_requirement' => true,
),
'sebastian/diff' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
- 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(),
+ 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
'dev_requirement' => true,
),
'sebastian/environment' => array(
- 'pretty_version' => '5.1.3',
- 'version' => '5.1.3.0',
- 'reference' => '388b6ced16caa751030f6a69e588299fa09200ac',
+ 'pretty_version' => '5.1.4',
+ 'version' => '5.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/environment',
'aliases' => array(),
+ 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7',
'dev_requirement' => true,
),
'sebastian/exporter' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
- 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/exporter',
'aliases' => array(),
+ 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
'dev_requirement' => true,
),
'sebastian/global-state' => array(
'pretty_version' => '5.0.5',
'version' => '5.0.5.0',
- 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/global-state',
'aliases' => array(),
+ 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
'dev_requirement' => true,
),
'sebastian/lines-of-code' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
- 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/lines-of-code',
'aliases' => array(),
+ 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
'dev_requirement' => true,
),
'sebastian/object-enumerator' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
- 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-enumerator',
'aliases' => array(),
+ 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
'dev_requirement' => true,
),
'sebastian/object-reflector' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
- 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-reflector',
'aliases' => array(),
+ 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
'dev_requirement' => true,
),
'sebastian/recursion-context' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
- 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/recursion-context',
'aliases' => array(),
+ 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
'dev_requirement' => true,
),
'sebastian/resource-operations' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
- 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/resource-operations',
'aliases' => array(),
+ 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
'dev_requirement' => true,
),
'sebastian/type' => array(
'pretty_version' => '2.3.4',
'version' => '2.3.4.0',
- 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/type',
'aliases' => array(),
+ 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
'dev_requirement' => true,
),
'sebastian/version' => array(
'pretty_version' => '3.0.2',
'version' => '3.0.2.0',
- 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/version',
'aliases' => array(),
+ 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
'dev_requirement' => true,
),
'spomky-labs/otphp' => array(
- 'pretty_version' => 'v10.0.1',
- 'version' => '10.0.1.0',
- 'reference' => 'f44cce5a9db4b8da410215d992110482c931232f',
+ 'pretty_version' => 'v10.0.3',
+ 'version' => '10.0.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../spomky-labs/otphp',
'aliases' => array(),
+ 'reference' => '9784d9f7c790eed26e102d6c78f12c754036c366',
'dev_requirement' => false,
),
- 'symfony/polyfill-ctype' => array(
- 'pretty_version' => 'v1.25.0',
- 'version' => '1.25.0.0',
- 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
'thecodingmachine/safe' => array(
- 'pretty_version' => 'v1.3.3',
- 'version' => '1.3.3.0',
- 'reference' => 'a8ab0876305a4cdaef31b2350fcb9811b5608dbc',
+ 'pretty_version' => 'v2.2.1',
+ 'version' => '2.2.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../thecodingmachine/safe',
'aliases' => array(),
+ 'reference' => '2a8d758fd17763faf86e4aa798193e17b9fac38c',
'dev_requirement' => false,
),
'theseer/tokenizer' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
- 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
'type' => 'library',
'install_path' => __DIR__ . '/../theseer/tokenizer',
'aliases' => array(),
+ 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
'dev_requirement' => true,
),
'webmozart/assert' => array(
- 'pretty_version' => '1.10.0',
- 'version' => '1.10.0.0',
- 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25',
+ 'pretty_version' => '1.11.0',
+ 'version' => '1.11.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../webmozart/assert',
'aliases' => array(),
+ 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
'dev_requirement' => true,
),
),
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
index 580fa9609..adfb472fb 100644
--- a/vendor/composer/platform_check.php
+++ b/vendor/composer/platform_check.php
@@ -4,8 +4,8 @@
$issues = array();
-if (!(PHP_VERSION_ID >= 70400)) {
- $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
+if (!(PHP_VERSION_ID >= 80000)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
diff --git a/vendor/j4mie/idiorm/idiorm.php b/vendor/j4mie/idiorm/idiorm.php
index 2b1f38ca0..06253020c 100644
--- a/vendor/j4mie/idiorm/idiorm.php
+++ b/vendor/j4mie/idiorm/idiorm.php
@@ -2209,14 +2209,17 @@
// --- ArrayAccess --- //
// --------------------- //
+ #[\ReturnTypeWillChange]
public function offsetExists($key) {
return array_key_exists($key, $this->_data);
}
+ #[\ReturnTypeWillChange]
public function offsetGet($key) {
return $this->get($key);
}
+ #[\ReturnTypeWillChange]
public function offsetSet($key, $value) {
if(is_null($key)) {
throw new InvalidArgumentException('You must specify a key/array index.');
@@ -2224,6 +2227,7 @@
$this->set($key, $value);
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($key) {
unset($this->_data[$key]);
unset($this->_dirty_fields[$key]);
@@ -2445,6 +2449,7 @@
* Get the number of records in the result set
* @return int
*/
+ #[\ReturnTypeWillChange]
public function count() {
return count($this->_results);
}
@@ -2454,6 +2459,7 @@
* over the result set.
* @return \ArrayIterator
*/
+ #[\ReturnTypeWillChange]
public function getIterator() {
return new ArrayIterator($this->_results);
}
@@ -2463,6 +2469,7 @@
* @param int|string $offset
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset) {
return isset($this->_results[$offset]);
}
@@ -2472,6 +2479,7 @@
* @param int|string $offset
* @return mixed
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset) {
return $this->_results[$offset];
}
@@ -2481,6 +2489,7 @@
* @param int|string $offset
* @param mixed $value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
$this->_results[$offset] = $value;
}
@@ -2489,10 +2498,19 @@
* ArrayAccess
* @param int|string $offset
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset) {
unset($this->_results[$offset]);
}
+ public function __serialize() {
+ return $this->serialize();
+ }
+
+ public function __unserialize($data) {
+ $this->unserialize($data);
+ }
+
/**
* Serializable
* @return string
diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md
index e5b26bf5c..708cdfcbd 100644
--- a/vendor/nikic/php-parser/README.md
+++ b/vendor/nikic/php-parser/README.md
@@ -3,10 +3,10 @@ PHP Parser
[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
-This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and
+This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and
manipulation.
-[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.0).
+[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1).
[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).
diff --git a/vendor/nikic/php-parser/grammar/php5.y b/vendor/nikic/php-parser/grammar/php5.y
index f9e7e7dd1..a62e9a310 100644
--- a/vendor/nikic/php-parser/grammar/php5.y
+++ b/vendor/nikic/php-parser/grammar/php5.y
@@ -689,9 +689,7 @@ array_expr:
scalar_dereference:
array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
- | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']'
- { $attrs = attributes(); $attrs['kind'] = strKind($1);
- $$ = Expr\ArrayDimFetch[new Scalar\String_(Scalar\String_::parse($1), $attrs), $3]; }
+ | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; }
| constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
/* alternative array syntax missing intentionally */
@@ -793,10 +791,8 @@ ctor_arguments:
common_scalar:
T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); }
- | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; }
- | T_CONSTANT_ENCAPSED_STRING
- { $attrs = attributes(); $attrs['kind'] = strKind($1);
- $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); }
+ | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); }
+ | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); }
| T_LINE { $$ = Scalar\MagicConst\Line[]; }
| T_FILE { $$ = Scalar\MagicConst\File[]; }
| T_DIR { $$ = Scalar\MagicConst\Dir[]; }
diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y
index eac68d095..087bc7392 100644
--- a/vendor/nikic/php-parser/grammar/php7.y
+++ b/vendor/nikic/php-parser/grammar/php7.y
@@ -382,8 +382,18 @@ enum_case_expr:
class_entry_type:
T_CLASS { $$ = 0; }
- | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
- | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; }
+ | class_modifiers T_CLASS { $$ = $1; }
+;
+
+class_modifiers:
+ class_modifier { $$ = $1; }
+ | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; }
+;
+
+class_modifier:
+ T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; }
+ | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; }
;
extends_from:
@@ -1014,9 +1024,7 @@ dereferencable_scalar:
{ $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
$$ = new Expr\Array_($3, $attrs); }
| array_short_syntax { $$ = $1; }
- | T_CONSTANT_ENCAPSED_STRING
- { $attrs = attributes(); $attrs['kind'] = strKind($1);
- $$ = new Scalar\String_(Scalar\String_::parse($1), $attrs); }
+ | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); }
| '"' encaps_list '"'
{ $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); }
@@ -1024,7 +1032,7 @@ dereferencable_scalar:
scalar:
T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); }
- | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; }
+ | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); }
| dereferencable_scalar { $$ = $1; }
| constant { $$ = $1; }
| class_constant { $$ = $1; }
diff --git a/vendor/nikic/php-parser/grammar/phpyLang.php b/vendor/nikic/php-parser/grammar/phpyLang.php
index 1a9808dcf..663c2a144 100644
--- a/vendor/nikic/php-parser/grammar/phpyLang.php
+++ b/vendor/nikic/php-parser/grammar/phpyLang.php
@@ -128,14 +128,6 @@ function resolveMacros($code) {
. ' else { ' . $args[0] . ' = null; }';
}
- if ('strKind' === $name) {
- assertArgs(1, $args, $name);
-
- return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && '
- . '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) '
- . '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)';
- }
-
if ('prependLeadingComments' === $name) {
assertArgs(1, $args, $name);
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
index 87e2901a9..35b54d041 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
@@ -67,7 +67,7 @@ class Class_ extends Declaration
* @return $this The builder instance (for fluid interface)
*/
public function makeAbstract() {
- $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT);
return $this;
}
@@ -78,7 +78,13 @@ class Class_ extends Declaration
* @return $this The builder instance (for fluid interface)
*/
public function makeFinal() {
- $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ public function makeReadonly() {
+ $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY);
return $this;
}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
index 2f0e91273..b8839db32 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php
@@ -310,4 +310,13 @@ final class BuilderHelpers
Stmt\Class_::verifyModifier($modifiers, $modifier);
return $modifiers | $modifier;
}
+
+ /**
+ * Adds a modifier and returns new modifier bitmask.
+ * @return int New modifiers
+ */
+ public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int {
+ Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet);
+ return $existingModifiers | $modifierToSet;
+ }
}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
index b69eb16fa..07a74df80 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
@@ -11,7 +11,7 @@ class Const_ extends NodeAbstract
/** @var Expr Value */
public $value;
- /** @var Name Namespaced name (if using NameResolver) */
+ /** @var Name|null Namespaced name (if using NameResolver) */
public $namespacedName;
/**
@@ -30,7 +30,7 @@ class Const_ extends NodeAbstract
public function getSubNodeNames() : array {
return ['name', 'value'];
}
-
+
public function getType() : string {
return 'Const';
}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
index 29ce0dd40..d4796d65b 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
@@ -25,6 +25,17 @@ class DNumber extends Scalar
}
/**
+ * @param mixed[] $attributes
+ */
+ public static function fromString(string $str, array $attributes = []): DNumber
+ {
+ $attributes['rawValue'] = $str;
+ $float = self::parse($str);
+
+ return new DNumber($float, $attributes);
+ }
+
+ /**
* @internal
*
* Parses a DNUMBER token like PHP would.
@@ -63,7 +74,7 @@ class DNumber extends Scalar
// dec
return (float) $str;
}
-
+
public function getType() : string {
return 'Scalar_DNumber';
}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
index f17dd1f8a..2cc2b22c8 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
@@ -41,6 +41,8 @@ class LNumber extends Scalar
* @return LNumber The constructed LNumber, including kind attribute
*/
public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber {
+ $attributes['rawValue'] = $str;
+
$str = str_replace('_', '', $str);
if ('0' !== $str[0] || '0' === $str) {
@@ -71,7 +73,7 @@ class LNumber extends Scalar
$attributes['kind'] = LNumber::KIND_OCT;
return new LNumber(intval($str, 8), $attributes);
}
-
+
public function getType() : string {
return 'Scalar_LNumber';
}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
index 8a6d93a47..6690a16bf 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
@@ -43,6 +43,22 @@ class String_ extends Scalar
}
/**
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ */
+ public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self
+ {
+ $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')))
+ ? Scalar\String_::KIND_SINGLE_QUOTED
+ : Scalar\String_::KIND_DOUBLE_QUOTED;
+
+ $attributes['rawValue'] = $str;
+
+ $string = self::parse($str, $parseUnicodeEscape);
+
+ return new self($string, $attributes);
+ }
+
+ /**
* @internal
*
* Parses a string token.
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
index 6c3369172..2fa4e861b 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
@@ -13,7 +13,7 @@ abstract class ClassLike extends Node\Stmt
/** @var Node\AttributeGroup[] PHP attribute groups */
public $attrGroups;
- /** @var Node\Name Namespaced name (if using NameResolver) */
+ /** @var Node\Name|null Namespaced name (if using NameResolver) */
public $namespacedName;
/**
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
index b290aaf6d..52ed6c6cd 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
@@ -68,6 +68,10 @@ class Class_ extends ClassLike
return (bool) ($this->flags & self::MODIFIER_FINAL);
}
+ public function isReadonly() : bool {
+ return (bool) ($this->flags & self::MODIFIER_READONLY);
+ }
+
/**
* Whether the class is anonymous.
*
@@ -80,6 +84,27 @@ class Class_ extends ClassLike
/**
* @internal
*/
+ public static function verifyClassModifier($a, $b) {
+ if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
+ throw new Error('Multiple abstract modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
+ throw new Error('Multiple final modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) {
+ throw new Error('Multiple readonly modifiers are not allowed');
+ }
+
+ if ($a & 48 && $b & 48) {
+ throw new Error('Cannot use the final modifier on an abstract class');
+ }
+ }
+
+ /**
+ * @internal
+ */
public static function verifyModifier($a, $b) {
if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) {
throw new Error('Multiple access type modifiers are not allowed');
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
index abb7ee5c8..c2ccae24e 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
@@ -20,7 +20,7 @@ class Function_ extends Node\Stmt implements FunctionLike
/** @var Node\AttributeGroup[] PHP attribute groups */
public $attrGroups;
- /** @var Node\Name Namespaced name (if using NameResolver) */
+ /** @var Node\Name|null Namespaced name (if using NameResolver) */
public $namespacedName;
/**
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
index c62adfd2c..d9c8fe049 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
@@ -2147,8 +2147,7 @@ class Php5 extends \PhpParser\ParserAbstract
$this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
392 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
- $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
393 => function ($stackPos) {
$this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
@@ -2275,11 +2274,10 @@ class Php5 extends \PhpParser\ParserAbstract
$this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true);
},
434 => function ($stackPos) {
- $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
435 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
- $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)], false), $attrs);
+ $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false);
},
436 => function ($stackPos) {
$this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
index 7a0854b30..71ba0187e 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
@@ -18,16 +18,16 @@ use PhpParser\Node\Stmt;
class Php7 extends \PhpParser\ParserAbstract
{
protected $tokenToSymbolMapSize = 396;
- protected $actionTableSize = 1196;
- protected $gotoTableSize = 545;
+ protected $actionTableSize = 1189;
+ protected $gotoTableSize = 611;
protected $invalidSymbol = 168;
protected $errorSymbol = 1;
protected $defaultAction = -32766;
protected $unexpectedTokenRule = 32767;
- protected $YY2TBLSTATE = 420;
- protected $numNonLeafStates = 710;
+ protected $YY2TBLSTATE = 421;
+ protected $numNonLeafStates = 709;
protected $symbolToName = array(
"EOF",
@@ -244,153 +244,152 @@ class Php7 extends \PhpParser\ParserAbstract
);
protected $action = array(
- 132, 133, 134, 569, 135, 136, 0, 722, 723, 724,
- 137, 37, 834, 911, 835, 469,-32766,-32766,-32766,-32767,
- -32767,-32767,-32767, 101, 102, 103, 104, 105, 1068, 1069,
- 1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766,
+ 132, 133, 134, 568, 135, 136, 0, 721, 722, 723,
+ 137, 37, 921, 448, 449, 450,-32766,-32766,-32766,-32767,
+ -32767,-32767,-32767, 101, 102, 103, 104, 105, 1071, 1072,
+ 1073, 1070, 1069, 1068, 1074, 715, 714,-32766,-32766,-32766,
-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
- -32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998,
- 999, 806, 922, 447, 448, 449, 370, 371, 2, 267,
- 138, 396, 729, 730, 731, 732, 414,-32766, 420,-32766,
- -32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737,
- 738, 739, 740, 741, 742, 743, 763, 570, 764, 765,
- 766, 767, 755, 756, 336, 337, 758, 759, 744, 745,
- 746, 748, 749, 750, 346, 790, 791, 792, 793, 794,
- 795, 751, 752, 571, 572, 784, 775, 773, 774, 787,
- 770, 771, 283, 420, 573, 574, 769, 575, 576, 577,
- 578, 579, 580, 598, -575, 470, 14, 798, 772, 581,
- 582, -575, 139,-32766,-32766,-32766, 132, 133, 134, 569,
- 135, 136, 1017, 722, 723, 724, 137, 37, 1060,-32766,
- -32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766,
- -32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071,
- -32766, 716, 715, 372, 371, 1258,-32766,-32766,-32766, -572,
- 106, 107, 108, 414, 270, 891, -572, 240, 1193, 1192,
- 1194, 725,-32766,-32766,-32766, 1046, 109,-32766,-32766,-32766,
- -32766, 986, 985, 984, 987, 267, 138, 396, 729, 730,
- 731, 732, 12,-32766, 420,-32766,-32766,-32766,-32766, 998,
- 999, 733, 734, 735, 736, 737, 738, 739, 740, 741,
- 742, 743, 763, 570, 764, 765, 766, 767, 755, 756,
- 336, 337, 758, 759, 744, 745, 746, 748, 749, 750,
- 346, 790, 791, 792, 793, 794, 795, 751, 752, 571,
- 572, 784, 775, 773, 774, 787, 770, 771, 881, 321,
- 573, 574, 769, 575, 576, 577, 578, 579, 580,-32766,
- 82, 83, 84, -575, 772, 581, 582, -575, 148, 747,
- 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760,
- 761, 36, 1277, 85, 86, 87, 88, 89, 90, 91,
+ -32767, 371, 372, 240, 2, 724,-32766,-32766,-32766, 1001,
+ 1002, 415, 956,-32766,-32766,-32766, 373, 372, 12, 267,
+ 138, 397, 728, 729, 730, 731, 415,-32766, 421,-32766,
+ -32766,-32766,-32766,-32766,-32766, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 762, 569, 763, 764,
+ 765, 766, 754, 755, 337, 338, 757, 758, 743, 744,
+ 745, 747, 748, 749, 347, 789, 790, 791, 792, 793,
+ 794, 750, 751, 570, 571, 783, 774, 772, 773, 786,
+ 769, 770, 284, 421, 572, 573, 768, 574, 575, 576,
+ 577, 578, 579, 597, -579,-32766,-32766, 797, 771, 580,
+ 581, -579, 139,-32766,-32766,-32766, 132, 133, 134, 568,
+ 135, 136, 1020, 721, 722, 723, 137, 37,-32766,-32766,
+ -32766, 542, 1306, 126,-32766, 1307,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766, 1071, 1072, 1073, 1070, 1069, 1068, 1074,
+ 957, 715, 714, -318, 993, 1261,-32766,-32766,-32766, -576,
+ 106, 107, 108, -268, 270, 890, -576, 910, 1196, 1195,
+ 1197, 724,-32766,-32766,-32766, 1049, 109,-32766,-32766,-32766,
+ -32766, 989, 988, 987, 990, 267, 138, 397, 728, 729,
+ 730, 731, 1233,-32766, 421,-32766,-32766,-32766,-32766, 1001,
+ 1002, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 762, 569, 763, 764, 765, 766, 754, 755,
+ 337, 338, 757, 758, 743, 744, 745, 747, 748, 749,
+ 347, 789, 790, 791, 792, 793, 794, 750, 751, 570,
+ 571, 783, 774, 772, 773, 786, 769, 770, 880, 321,
+ 572, 573, 768, 574, 575, 576, 577, 578, 579,-32766,
+ 82, 83, 84, -579, 771, 580, 581, -579, 148, 746,
+ 716, 717, 718, 719, 720, 1281, 721, 722, 723, 759,
+ 760, 36, 1280, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 996, 270, 150,
- -32766,-32766,-32766, 455, 456, 81, 34, -264, -572, 1016,
- 109, 320, -572, 893, 725, 682, 803, 128, 998, 999,
- 592,-32766, 1044,-32766,-32766,-32766, 809, 151, 726, 727,
- 728, 729, 730, 731, 732, -88, 1198, 796, 278, -526,
- 283,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738,
- 739, 740, 741, 742, 743, 763, 786, 764, 765, 766,
- 767, 755, 756, 757, 785, 758, 759, 744, 745, 746,
- 748, 749, 750, 789, 790, 791, 792, 793, 794, 795,
- 751, 752, 753, 754, 784, 775, 773, 774, 787, 770,
- 771, 144, 804, 762, 768, 769, 776, 777, 779, 778,
- 780, 781, -314, -526, -526, -193, -192, 772, 783, 782,
- 49, 50, 51, 500, 52, 53, 239, 807, -526, -86,
- 54, 55, -111, 56, 996, 253,-32766, -111, 800, -111,
- -526, 541, -532, -352, 300, -352, 304, -111, -111, -111,
- -111, -111, -111, -111, -111, 998, 999, 998, 999, 153,
- -32766,-32766,-32766, 1191, 807, 126, 306, 1293, 57, 58,
- 103, 104, 105, -111, 59, 1218, 60, 246, 247, 61,
- 62, 63, 64, 65, 66, 67, 68, -525, 27, 268,
- 69, 436, 501, -328, 808, -86, 1224, 1225, 502, 1189,
- 807, 1198, 1230, 293, 1222, 41, 24, 503, 74, 504,
- 953, 505, 320, 506, 802, 154, 507, 508, 279, 684,
- 280, 43, 44, 437, 367, 366, 891, 45, 509, 35,
- 249, -16, -566, 358, 332, 318, -566, 1198, 1193, 1192,
- 1194, -527, 510, 511, 512, 333, -524, 1274, 48, 716,
- 715, -525, -525, 334, 513, 514, 807, 1212, 1213, 1214,
- 1215, 1209, 1210, 292, 360, 284, -525, 285, -314, 1216,
- 1211, -193, -192, 1193, 1192, 1194, 293, 891, -525, 364,
- -531, 70, 807, 316, 317, 320, 31, 110, 111, 112,
- 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
- -153, -153, -153, 638, 25, -527, -527, 687, 379, 881,
- -524, -524, 296, 297, 891, -153, 432, -153, 807, -153,
- -527, -153, 716, 715, 433, -524, 798, 363, -111, 1105,
- 1107, 365, -527, 434, 891, 140, 435, -524, 954, 127,
- -524, 320, -111, -111, 688, 813, 381, -529, 11, 834,
- 155, 835, 867, -111, -111, -111, -111, 47, 293,-32766,
- 881, 654, 655, 74, 689, 1191, 1045, 320, 708, 149,
- 399, 157,-32766,-32766,-32766, 32,-32766, -79,-32766, 123,
- -32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766,
- -32766, 716, 715, 891,-32766,-32766, 124, 881, 129, 74,
- -32766, 411, 130, 320, -524, -524, 143, 141, -75,-32766,
- 158, -529, -529, 320, 27, 691, 159, 881, 160, -524,
- 161, 294, 295, 698, 368, 369, 807, -73,-32766, -72,
- 1222, -524, 373, 374, 1191, 893, -71, 682, -529, 73,
- -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 125,-32766,
- 630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766,
- -18, 147, 271,-32766,-32766, 277, 697, 700, 881,-32766,
- 411, 890, 893, 146, 682, 282, 881, 907,-32766, 281,
- 513, 514, 286, 1212, 1213, 1214, 1215, 1209, 1210, 326,
- 131, 145, 939, 287, 682, 1216, 1211, 109, 270,-32766,
- 798, 807,-32766, 662, 639, 1191, 657, 72, 675, 1075,
- 317, 320,-32766,-32766,-32766, 1305,-32766, 301,-32766, 628,
- -32766, 431, 543,-32766,-32766, 923, 555, 924,-32766,-32766,
- -32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191,
- -32766, 411, 644, 893, 299, 682,-32766,-32766,-32766,-32766,
- -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 452, 480,
- 645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766,
- 0, 1191, 0, 0,-32766, 411, 0, 298,-32766,-32766,
- -32766, 305,-32766,-32766,-32766, 0,-32766, 0, 806,-32766,
- 0, 0, 0, 475,-32766,-32766,-32766,-32766, 0, 7,
- -32766,-32766, 16, 1191, 561, 596,-32766, 411, 1219, 891,
- -32766,-32766,-32766, 362,-32766,-32766,-32766, 818,-32766, -267,
- 881,-32766, 39, 293, 0, 0,-32766,-32766,-32766, 40,
- 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 411,
- 937, 948, 365, 870, 427, 891, 935,-32766, 1049, 291,
- 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262,
- 1296, 633, 0, 826, -111, -111, -111, -111, 33, 315,
- -32766, 361, 683, 686, 690, 692, 1191, 693, 694, 695,
- 699, 685, 320,-32766,-32766,-32766, 9,-32766, 702,-32766,
- 868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766,
- -32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242,
- -242,-32766, 411, 955, 365, 27, 836, 1301, 915, 917,
- -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898,
- 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111,
- 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531,
- 365, -530, 1, 28, 29, 38, 42, 46, 71, 0,
- 75, -111, -111, 76, 77, 78, 79, 893, 80, 682,
- -242, 867, -111, -111, -111, -111, 142, 152, 156, 245,
- 322, 347, 514, 348, 1212, 1213, 1214, 1215, 1209, 1210,
- 349, 350, 351, 352, 353, 354, 1216, 1211, 355, 356,
- 357, 359, 428, 893, -265, 682, -241, -264, 72, 0,
- 18, 317, 320, 19, 20, 21, 23, 398, 471, 472,
- 479, 482, 483, 484, 485, 489, 490, 491, 498, 669,
- 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 17, 22,
- 26, 290, 397, 589, 593, 620, 674, 1149, 1197, 1146,
- 1275, 0, -494, 1162, 0, 1223
+ 102, 103, 104, 105, 106, 107, 108, 999, 270, -318,
+ -32766,-32766,-32766, 456, 457, 81, -193, 808, -576, 1019,
+ 109, 320, -576, 892, 724, 681, 802, 695, 1001, 1002,
+ 591,-32766, 1047,-32766,-32766,-32766, 715, 714, 725, 726,
+ 727, 728, 729, 730, 731, -192, -86, 795, 279, -530,
+ 284,-32766,-32766,-32766, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 762, 785, 763, 764, 765,
+ 766, 754, 755, 756, 784, 757, 758, 743, 744, 745,
+ 747, 748, 749, 788, 789, 790, 791, 792, 793, 794,
+ 750, 751, 752, 753, 783, 774, 772, 773, 786, 769,
+ 770, 470, 803, 761, 767, 768, 775, 776, 778, 777,
+ 779, 780, -86, -530, -530, 637, 25, 771, 782, 781,
+ 49, 50, 51, 501, 52, 53, 239, 34, -530, 890,
+ 54, 55, -111, 56, 999, 128,-32766, -111, 1201, -111,
+ -530, -570, -536, 890, 300, -570, 144, -111, -111, -111,
+ -111, -111, -111, -111, -111, 1001, 1002, 1001, 1002, 686,
+ 1201, 925, 926, 1194, 806, 890, 927, 1296, 57, 58,
+ 799, 253, -193, 687, 59, 807, 60, 246, 247, 61,
+ 62, 63, 64, 65, 66, 67, 68, 304, 27, 268,
+ 69, 437, 502, -332, 306, 688, 1227, 1228, 503, 1192,
+ 806, -192, 318, 890, 1225, 41, 24, 504, 334, 505,
+ 14, 506, 880, 507, 653, 654, 508, 509, 280, 806,
+ 281, 43, 44, 438, 368, 367, 880, 45, 510, 35,
+ 249, 471, 1063, 359, 333, 103, 104, 105, 1196, 1195,
+ 1197, 806, 511, 512, 513, 335, 801, 1221, 880, 361,
+ 285, 683, 286, 365, 514, 515, 380, 1215, 1216, 1217,
+ 1218, 1212, 1213, 292, 433, -111, 715, 714, 434, 1219,
+ 1214, 149, 400, 1196, 1195, 1197, 293, -153, -153, -153,
+ -356, 70, -356, 316, 317, 320, 880, 892, -531, 681,
+ 435, 1048, -153, 707, -153, 293, -153, 1277, -153, 27,
+ 74, 892, 436, 681, 320, 369, 370, 833, 366, 834,
+ -529, 806, 382, 812, 11, 1225, 833, 150, 834, -111,
+ -111, 151, 74, 942, -111, 681, 320, 153, 806, 866,
+ -111, -111, -111, -111, 31, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 715, 714,
+ 374, 375, -531, -531, 890, 154, 805, 155, -4, 890,
+ 157, 892, -88, 681, -153, 514, 515, -531, 1215, 1216,
+ 1217, 1218, 1212, 1213, -529, -529, 797, 1108, 1110, -531,
+ 1219, 1214, 715, 714, 690,-32766, 629, 630, -528, -529,
+ 32, 1194, 72, 123, 124, 317, 320, 129,-32766,-32766,
+ -32766, -529,-32766, -535,-32766, 130,-32766, 140, 143,-32766,
+ 158, 159, 160, 320,-32766,-32766,-32766, 161, -528,-32766,
+ -32766,-32766, -79, 282, -75, 1194,-32766, 412, -73, 27,
+ -72, -71,-32766,-32766,-32766,-32766,-32766, 880,-32766, 287,
+ -32766, 806, 880,-32766, -70, 1225, -69, -68,-32766,-32766,
+ -32766, -67, -528, -528,-32766,-32766, -66, 141, -47, -18,
+ -32766, 412, 147, 320, 366, 73, 428, -528, 271,-32766,
+ 278, 291, -51, 696, 699, -111, -111, 1201, -533, -528,
+ -111, 889, -528, -528, 48, 825, -111, -111, -111, -111,
+ 146, 327, 283, 270, 288, 109, 515, -528, 1215, 1216,
+ 1217, 1218, 1212, 1213, 131, 906, 661, -16, 9, -528,
+ 1219, 1214, 892, 797, 681,-32766, 145, 892, 1308, 681,
+ -4, 1194, 72,-32766, 638, 317, 320, 806,-32766,-32766,
+ -32766, 1078,-32766, 544,-32766, 627,-32766, 13, 656,-32766,
+ 548, 298, -533, -533,-32766,-32766,-32766,-32766, 296, 297,
+ -32766,-32766, 674, 1194, 643, 890,-32766, 412, 806, 453,
+ -32766,-32766,-32766, 364,-32766,-32766,-32766, 481,-32766, -533,
+ -32766,-32766, 47, -494, 890, 127,-32766,-32766,-32766,-32766,
+ 644, 657,-32766,-32766, 305, 1194, 890, 805,-32766, 412,
+ 1222, 301,-32766,-32766,-32766, 0,-32766,-32766,-32766, 432,
+ -32766, 299, 922,-32766, -111, 293, 554, 476,-32766,-32766,
+ -32766,-32766, 1232, -484,-32766,-32766, 697, 1194, 560, 908,
+ -32766, 412, 595, 817,-32766,-32766,-32766, 7,-32766,-32766,
+ -32766, 1234,-32766, 16, 293,-32766, 294, 295, 880, 74,
+ -32766,-32766,-32766, 320, 363, 39,-32766,-32766, 40, 704,
+ 705, 871,-32766, 412, -246, -246, -246, 880, 966, 943,
+ 366,-32766, 950, 125, 1247, 940, 951, 869, 938, 880,
+ 1052, -111, -111, -245, -245, -245, -111, 1055, 1056, 366,
+ 1053, 866, -111, -111, -111, -111, 1054, 1060, 701, 1265,
+ -111, -111, 1299, 632, -564, -111, 33, 315, -271, 362,
+ 866, -111, -111, -111, -111, 682, 685, 689, 691, 692,
+ 693, 694,-32766, 892, 698, 681, -246, 684, 1194, 867,
+ 1303, 1305, 828, 827, 836,-32766,-32766,-32766, 915,-32766,
+ 958,-32766, 892,-32766, 681, -245,-32766, 835, 1304, 914,
+ 916,-32766,-32766,-32766, 892, 913, 681,-32766,-32766, 1180,
+ 899, 909, 897,-32766, 412, 948, 949, 1302, 1259, 1248,
+ 1266, 1272,-32766, 1275, -269, -562, -536, -535, -534, 1,
+ 28, 29, 38, 42, 46, 71, 75, 76, 77, 78,
+ 79, 80, 142, 152, 156, 245, 322, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 360, 429,
+ 0, -268, 0, 18, 19, 20, 21, 23, 399, 472,
+ 473, 480, 483, 484, 485, 486, 490, 491, 492, 499,
+ 668, 1205, 1148, 1223, 1022, 1021, 1184, -273, -103, 17,
+ 22, 26, 290, 398, 588, 592, 619, 673, 1152, 1200,
+ 1149, 1278, 0, -498, 1165, 0, 1226, 0, 320
);
protected $actionCheck = array(
2, 3, 4, 5, 6, 7, 0, 9, 10, 11,
- 12, 13, 106, 1, 108, 31, 9, 10, 11, 44,
+ 12, 13, 128, 129, 130, 131, 9, 10, 11, 44,
45, 46, 47, 48, 49, 50, 51, 52, 116, 117,
118, 119, 120, 121, 122, 37, 38, 30, 116, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 117, 118, 9, 10, 57, 9, 10, 11, 137,
- 138, 155, 128, 129, 130, 131, 106, 107, 8, 71,
+ 43, 106, 107, 14, 8, 57, 9, 10, 11, 137,
+ 138, 116, 31, 9, 10, 11, 106, 107, 8, 71,
72, 73, 74, 75, 76, 77, 116, 30, 80, 32,
- 33, 34, 35, 36, 1, 87, 88, 89, 90, 91,
+ 33, 34, 35, 36, 30, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 30, 80, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 51, 1, 161, 101, 80, 150, 151,
+ 142, 143, 144, 51, 1, 9, 10, 80, 150, 151,
152, 8, 154, 9, 10, 11, 2, 3, 4, 5,
- 6, 7, 164, 9, 10, 11, 12, 13, 123, 9,
- 10, 11, 80, 161, 30, 83, 32, 33, 34, 35,
+ 6, 7, 164, 9, 10, 11, 12, 13, 9, 10,
+ 11, 85, 80, 14, 30, 83, 32, 33, 34, 35,
36, 37, 38, 116, 117, 118, 119, 120, 121, 122,
- 30, 37, 38, 106, 107, 1, 9, 10, 11, 1,
- 53, 54, 55, 116, 57, 1, 8, 14, 155, 156,
+ 159, 37, 38, 8, 1, 1, 9, 10, 11, 1,
+ 53, 54, 55, 164, 57, 1, 8, 1, 155, 156,
157, 57, 9, 10, 11, 162, 69, 30, 116, 32,
33, 119, 120, 121, 122, 71, 72, 73, 74, 75,
- 76, 77, 8, 30, 80, 32, 33, 34, 35, 137,
+ 76, 77, 146, 30, 80, 32, 33, 34, 35, 137,
138, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
@@ -401,168 +400,167 @@ class Php7 extends \PhpParser\ParserAbstract
3, 4, 5, 6, 7, 1, 9, 10, 11, 12,
13, 30, 8, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 116, 57, 14,
- 9, 10, 11, 134, 135, 161, 8, 164, 160, 1,
- 69, 167, 164, 159, 57, 161, 80, 8, 137, 138,
- 1, 30, 1, 32, 33, 34, 1, 14, 71, 72,
- 73, 74, 75, 76, 77, 31, 1, 80, 30, 70,
+ 49, 50, 51, 52, 53, 54, 55, 116, 57, 164,
+ 9, 10, 11, 134, 135, 161, 8, 1, 160, 1,
+ 69, 167, 164, 159, 57, 161, 80, 161, 137, 138,
+ 1, 30, 1, 32, 33, 34, 37, 38, 71, 72,
+ 73, 74, 75, 76, 77, 8, 31, 80, 30, 70,
30, 9, 10, 11, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
- 133, 8, 156, 136, 137, 138, 139, 140, 141, 142,
- 143, 144, 8, 134, 135, 8, 8, 150, 151, 152,
- 2, 3, 4, 5, 6, 7, 97, 82, 149, 31,
- 12, 13, 101, 15, 116, 8, 116, 106, 80, 108,
- 161, 85, 163, 106, 113, 108, 8, 116, 117, 118,
- 119, 120, 121, 122, 123, 137, 138, 137, 138, 14,
- 9, 10, 11, 80, 82, 14, 8, 85, 50, 51,
- 50, 51, 52, 128, 56, 1, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 70, 70, 71,
- 72, 73, 74, 162, 159, 97, 78, 79, 80, 116,
- 82, 1, 146, 158, 86, 87, 88, 89, 163, 91,
- 31, 93, 167, 95, 156, 14, 98, 99, 35, 161,
- 37, 103, 104, 105, 106, 107, 1, 109, 110, 147,
- 148, 31, 160, 115, 116, 8, 164, 1, 155, 156,
- 157, 70, 124, 125, 126, 8, 70, 1, 70, 37,
- 38, 134, 135, 8, 136, 137, 82, 139, 140, 141,
- 142, 143, 144, 145, 8, 35, 149, 37, 164, 151,
- 152, 164, 164, 155, 156, 157, 158, 1, 161, 8,
- 163, 163, 82, 165, 166, 167, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 75, 76, 77, 75, 76, 134, 135, 31, 8, 84,
- 134, 135, 134, 135, 1, 90, 8, 92, 82, 94,
- 149, 96, 37, 38, 8, 149, 80, 149, 128, 59,
- 60, 106, 161, 8, 1, 161, 8, 161, 159, 161,
- 70, 167, 117, 118, 31, 8, 106, 70, 108, 106,
- 14, 108, 127, 128, 129, 130, 131, 70, 158, 74,
- 84, 75, 76, 163, 31, 80, 159, 167, 161, 101,
- 102, 14, 87, 88, 89, 14, 91, 31, 93, 16,
- 95, 37, 38, 98, 159, 1, 161, 162, 103, 104,
- 105, 37, 38, 1, 109, 110, 16, 84, 16, 163,
- 115, 116, 16, 167, 134, 135, 16, 161, 31, 124,
- 16, 134, 135, 167, 70, 31, 16, 84, 16, 149,
- 16, 134, 135, 31, 106, 107, 82, 31, 74, 31,
- 86, 161, 106, 107, 80, 159, 31, 161, 161, 154,
- 31, 87, 88, 89, 31, 91, 31, 93, 161, 95,
- 111, 112, 98, 31, 31, 31, 31, 103, 104, 105,
- 31, 31, 31, 109, 110, 31, 31, 31, 84, 115,
- 116, 31, 159, 31, 161, 37, 84, 38, 124, 35,
- 136, 137, 35, 139, 140, 141, 142, 143, 144, 35,
- 31, 70, 159, 37, 161, 151, 152, 69, 57, 74,
- 80, 82, 85, 77, 90, 80, 94, 163, 92, 82,
- 166, 167, 87, 88, 89, 83, 91, 114, 93, 113,
- 95, 128, 85, 98, 116, 128, 153, 128, 103, 104,
- 105, 146, 89, 74, 109, 110, 0, 1, 149, 80,
- 115, 116, 96, 159, 133, 161, 87, 88, 89, 124,
- 91, 159, 93, 161, 95, 97, 146, 98, 97, 97,
- 100, 154, 103, 104, 105, 74, 100, 149, 109, 110,
- -1, 80, -1, -1, 115, 116, -1, 132, 87, 88,
- 89, 132, 91, 124, 93, -1, 95, -1, 155, 98,
- -1, -1, -1, 102, 103, 104, 105, 74, -1, 149,
- 109, 110, 149, 80, 81, 153, 115, 116, 160, 1,
- 87, 88, 89, 149, 91, 124, 93, 160, 95, 164,
- 84, 98, 159, 158, -1, -1, 103, 104, 105, 159,
- 159, 159, 109, 110, 159, 159, 159, 159, 115, 116,
- 159, 159, 106, 159, 108, 1, 159, 124, 159, 113,
- 160, 159, 159, 117, 118, 159, 159, 159, 163, 160,
- 160, 160, -1, 127, 128, 129, 130, 131, 161, 161,
- 74, 161, 161, 161, 161, 161, 80, 161, 161, 161,
- 161, 161, 167, 87, 88, 89, 150, 91, 162, 93,
- 162, 95, 84, 162, 98, 159, 162, 161, 162, 103,
- 104, 105, 162, 162, 162, 109, 110, 162, 100, 101,
- 102, 115, 116, 162, 106, 70, 162, 162, 162, 162,
- 124, 162, 162, 162, 162, 117, 118, 82, 84, 162,
- 162, 86, 162, 162, 162, 127, 128, 129, 130, 131,
- 162, 162, 162, 162, 100, 101, 102, 163, 163, 163,
- 106, 163, 163, 163, 163, 163, 163, 163, 163, -1,
- 163, 117, 118, 163, 163, 163, 163, 159, 163, 161,
- 162, 127, 128, 129, 130, 131, 163, 163, 163, 163,
- 163, 163, 137, 163, 139, 140, 141, 142, 143, 144,
- 163, 163, 163, 163, 163, 163, 151, 152, 163, 163,
- 163, 163, 163, 159, 164, 161, 162, 164, 163, -1,
- 164, 166, 167, 164, 164, 164, 164, 164, 164, 164,
+ 133, 31, 156, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 97, 134, 135, 75, 76, 150, 151, 152,
+ 2, 3, 4, 5, 6, 7, 97, 8, 149, 1,
+ 12, 13, 101, 15, 116, 8, 116, 106, 1, 108,
+ 161, 160, 163, 1, 113, 164, 8, 116, 117, 118,
+ 119, 120, 121, 122, 123, 137, 138, 137, 138, 31,
+ 1, 117, 118, 80, 82, 1, 122, 85, 50, 51,
+ 80, 8, 164, 31, 56, 159, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 8, 70, 71,
+ 72, 73, 74, 162, 8, 31, 78, 79, 80, 116,
+ 82, 164, 8, 1, 86, 87, 88, 89, 8, 91,
+ 101, 93, 84, 95, 75, 76, 98, 99, 35, 82,
+ 37, 103, 104, 105, 106, 107, 84, 109, 110, 147,
+ 148, 161, 123, 115, 116, 50, 51, 52, 155, 156,
+ 157, 82, 124, 125, 126, 8, 156, 1, 84, 8,
+ 35, 161, 37, 8, 136, 137, 8, 139, 140, 141,
+ 142, 143, 144, 145, 8, 128, 37, 38, 8, 151,
+ 152, 101, 102, 155, 156, 157, 158, 75, 76, 77,
+ 106, 163, 108, 165, 166, 167, 84, 159, 70, 161,
+ 8, 159, 90, 161, 92, 158, 94, 1, 96, 70,
+ 163, 159, 8, 161, 167, 106, 107, 106, 106, 108,
+ 70, 82, 106, 8, 108, 86, 106, 14, 108, 117,
+ 118, 14, 163, 159, 122, 161, 167, 14, 82, 127,
+ 128, 129, 130, 131, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 37, 38,
+ 106, 107, 134, 135, 1, 14, 155, 14, 0, 1,
+ 14, 159, 31, 161, 162, 136, 137, 149, 139, 140,
+ 141, 142, 143, 144, 134, 135, 80, 59, 60, 161,
+ 151, 152, 37, 38, 31, 74, 111, 112, 70, 149,
+ 14, 80, 163, 16, 16, 166, 167, 16, 87, 88,
+ 89, 161, 91, 163, 93, 16, 95, 161, 16, 98,
+ 16, 16, 16, 167, 103, 104, 105, 16, 70, 74,
+ 109, 110, 31, 35, 31, 80, 115, 116, 31, 70,
+ 31, 31, 87, 88, 89, 124, 91, 84, 93, 35,
+ 95, 82, 84, 98, 31, 86, 31, 31, 103, 104,
+ 105, 31, 134, 135, 109, 110, 31, 161, 31, 31,
+ 115, 116, 31, 167, 106, 154, 108, 149, 31, 124,
+ 31, 113, 31, 31, 31, 117, 118, 1, 70, 161,
+ 122, 31, 134, 135, 70, 127, 128, 129, 130, 131,
+ 31, 35, 37, 57, 37, 69, 137, 149, 139, 140,
+ 141, 142, 143, 144, 31, 38, 77, 31, 150, 161,
+ 151, 152, 159, 80, 161, 74, 70, 159, 83, 161,
+ 162, 80, 163, 85, 90, 166, 167, 82, 87, 88,
+ 89, 82, 91, 85, 93, 113, 95, 97, 94, 98,
+ 89, 132, 134, 135, 103, 104, 105, 74, 134, 135,
+ 109, 110, 92, 80, 96, 1, 115, 116, 82, 97,
+ 87, 88, 89, 149, 91, 124, 93, 97, 95, 161,
+ 116, 98, 70, 149, 1, 161, 103, 104, 105, 74,
+ 100, 100, 109, 110, 132, 80, 1, 155, 115, 116,
+ 160, 114, 87, 88, 89, -1, 91, 124, 93, 128,
+ 95, 133, 128, 98, 128, 158, 153, 102, 103, 104,
+ 105, 74, 146, 149, 109, 110, 31, 80, 81, 154,
+ 115, 116, 153, 160, 87, 88, 89, 149, 91, 124,
+ 93, 146, 95, 149, 158, 98, 134, 135, 84, 163,
+ 103, 104, 105, 167, 149, 159, 109, 110, 159, 159,
+ 159, 159, 115, 116, 100, 101, 102, 84, 159, 159,
+ 106, 124, 159, 161, 160, 159, 159, 159, 159, 84,
+ 159, 117, 118, 100, 101, 102, 122, 159, 159, 106,
+ 159, 127, 128, 129, 130, 131, 159, 159, 162, 160,
+ 117, 118, 160, 160, 163, 122, 161, 161, 164, 161,
+ 127, 128, 129, 130, 131, 161, 161, 161, 161, 161,
+ 161, 161, 74, 159, 161, 161, 162, 161, 80, 162,
+ 162, 162, 162, 162, 162, 87, 88, 89, 162, 91,
+ 162, 93, 159, 95, 161, 162, 98, 162, 162, 162,
+ 162, 103, 104, 105, 159, 162, 161, 109, 110, 162,
+ 162, 162, 162, 115, 116, 162, 162, 162, 162, 162,
+ 162, 162, 124, 162, 164, 163, 163, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ -1, 164, -1, 164, 164, 164, 164, 164, 164, 164,
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
- 164, -1, 165, 165, -1, 166
+ 164, 164, -1, 165, 165, -1, 166, -1, 167
);
protected $actionBase = array(
- 0, -2, 154, 565, 876, 948, 984, 514, 53, 398,
- 837, 307, 307, 67, 307, 307, 307, 653, 724, 724,
- 732, 724, 616, 673, 204, 204, 204, 625, 625, 625,
- 625, 694, 694, 831, 831, 863, 799, 765, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 936, 936, 936, 936, 936, 936, 936, 936,
- 936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024,
- 1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919,
- 920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291,
+ 0, -2, 154, 542, 698, 894, 913, 586, 53, 430,
+ 867, 307, 307, 67, 307, 307, 307, 482, 693, 693,
+ 925, 693, 468, 504, 204, 204, 204, 651, 651, 651,
+ 651, 685, 685, 845, 845, 877, 813, 781, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 356, 31, 369, 716, 1008, 1014, 1010, 1015,
+ 1006, 1005, 1009, 1011, 1016, 935, 936, 799, 937, 938,
+ 939, 941, 1012, 873, 1007, 1013, 291, 291, 291, 291,
291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
- 291, 291, 290, 491, 44, 382, 382, 382, 382, 382,
+ 291, 291, 290, 159, 136, 382, 382, 382, 382, 382,
382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
- 382, 382, 382, 382, 382, 160, 160, 160, 187, 684,
- 684, 341, 203, 610, 47, 985, 985, 985, 985, 985,
- 985, 985, 985, 985, 985, 144, 144, 7, 7, 7,
- 7, 7, 371, -25, -25, -25, -25, 540, 385, 102,
- 576, 358, 45, 377, 460, 460, 360, 231, 231, 231,
- 231, 231, 231, -78, -78, -78, -78, -78, -66, 319,
- 457, -94, 396, 423, 586, 586, 586, 586, 423, 423,
- 423, 423, 750, 1029, 423, 423, 423, 511, 516, 516,
- 518, 147, 147, 147, 516, 583, 777, 422, 583, 422,
- 194, 92, 748, -40, 87, 412, 748, 617, 627, 198,
- 143, 773, 658, 773, 1013, 757, 764, 717, 838, 860,
- 1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552,
- 1013, 286, 855, 855, 855, 552, 552, 552, 552, 552,
- 552, 552, 552, 552, 552, 679, 286, 568, 626, 286,
- 794, 552, 375, 758, 375, 375, 375, 375, 958, 375,
- 375, 375, 375, 375, 375, 970, 769, -16, 375, 519,
- 12, 12, 547, 83, 12, 12, 12, 12, 375, 375,
- 375, 658, 781, 713, 666, 792, 448, 781, 781, 781,
- 438, 444, 193, 447, 570, 523, 580, 760, 760, 767,
- 929, 929, 760, 759, 760, 767, 934, 760, 929, 805,
- 359, 648, 577, 611, 656, 929, 478, 760, 760, 760,
- 760, 665, 760, 467, 433, 760, 760, 785, 774, 789,
- 60, 929, 929, 929, 789, 596, 751, 751, 751, 811,
- 812, 746, 771, 567, 498, 677, 348, 779, 771, 771,
- 760, 640, 746, 771, 746, 771, 747, 771, 771, 771,
- 746, 771, 759, 585, 771, 734, 668, 224, 771, 6,
- 935, 937, 354, 940, 932, 941, 979, 942, 943, 851,
- 956, 933, 945, 931, 930, 780, 703, 720, 790, 729,
- 928, 768, 768, 768, 925, 768, 768, 768, 768, 768,
- 768, 768, 768, 703, 788, 804, 733, 783, 960, 722,
- 726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953,
- 803, 730, 992, 967, 866, 848, 968, 969, 993, 1007,
- 1008, 871, 761, 874, 880, 797, 971, 852, 768, 935,
- 943, 933, 945, 931, 930, 763, 762, 753, 755, 749,
- 745, 736, 738, 770, 1009, 924, 835, 830, 970, 926,
- 703, 839, 986, 847, 994, 995, 850, 801, 772, 840,
- 881, 972, 975, 976, 853, 1010, 810, 989, 795, 996,
- 802, 882, 997, 998, 999, 1000, 885, 854, 856, 857,
- 815, 754, 980, 786, 891, 335, 787, 796, 978, 363,
- 957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816,
- 990, 752, 991, 983, 817, 818, 485, 784, 778, 541,
- 676, 897, 899, 900, 955, 775, 766, 821, 822, 1011,
- 901, 697, 824, 740, 902, 1005, 742, 744, 756, 859,
- 793, 743, 798, 977, 776, 827, 907, 829, 832, 833,
- 1004, 836, 0, 0, 0, 0, 0, 0, 0, 0,
+ 382, 382, 382, 382, 382, 54, 54, 54, 187, 569,
+ 569, 341, 203, 658, 47, 699, 699, 699, 699, 699,
+ 699, 699, 699, 699, 699, 144, 144, 7, 7, 7,
+ 7, 7, 371, -25, -25, -25, -25, 816, 477, 102,
+ 499, 358, 449, 514, 525, 525, 360, -116, 231, 231,
+ 231, 231, 231, 231, -78, -78, -78, -78, -78, 319,
+ 580, 541, 86, 423, 636, 636, 636, 636, 423, 423,
+ 423, 423, 825, 1020, 423, 423, 423, 558, 688, 688,
+ 754, 147, 147, 147, 688, 550, 788, 422, 550, 422,
+ 194, 92, 794, -55, -40, 321, 814, 794, 748, 842,
+ 198, 143, 772, 539, 772, 1004, 778, 767, 733, 868,
+ 896, 1017, 820, 933, 821, 934, 219, 731, 1003, 1003,
+ 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1021,
+ 339, 1004, 286, 1021, 1021, 1021, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 615, 286, 380, 479,
+ 286, 796, 339, 356, 804, 356, 356, 356, 356, 964,
+ 356, 356, 356, 356, 356, 356, 969, 768, 410, 356,
+ 31, 206, 206, 472, 193, 206, 206, 206, 206, 356,
+ 356, 356, 539, 776, 793, 584, 809, 377, 776, 776,
+ 776, 355, 185, 39, 348, 555, 523, 546, 773, 773,
+ 789, 946, 946, 773, 785, 773, 789, 951, 773, 946,
+ 787, 467, 596, 540, 585, 600, 946, 519, 773, 773,
+ 773, 773, 622, 773, 503, 478, 773, 773, 749, 779,
+ 792, 46, 946, 946, 946, 792, 581, 808, 808, 808,
+ 830, 831, 762, 777, 534, 526, 645, 459, 807, 777,
+ 777, 773, 588, 762, 777, 762, 777, 805, 777, 777,
+ 777, 762, 777, 785, 577, 777, 734, 634, 60, 777,
+ 6, 952, 953, 671, 954, 949, 955, 976, 956, 957,
+ 884, 962, 950, 958, 948, 947, 790, 717, 718, 818,
+ 764, 945, 766, 766, 766, 943, 766, 766, 766, 766,
+ 766, 766, 766, 766, 717, 770, 835, 811, 791, 965,
+ 721, 729, 806, 897, 1018, 1019, 964, 997, 959, 826,
+ 732, 983, 966, 866, 876, 967, 968, 984, 998, 999,
+ 898, 786, 899, 900, 803, 970, 885, 766, 952, 957,
+ 950, 958, 948, 947, 765, 760, 755, 756, 753, 740,
+ 737, 739, 771, 1000, 942, 871, 844, 969, 944, 717,
+ 869, 979, 875, 985, 986, 878, 802, 775, 872, 901,
+ 971, 972, 973, 886, 1001, 829, 980, 874, 987, 810,
+ 902, 988, 989, 990, 991, 906, 887, 888, 889, 832,
+ 774, 940, 798, 908, 643, 744, 797, 975, 647, 963,
+ 890, 915, 916, 992, 993, 994, 917, 960, 839, 981,
+ 784, 982, 977, 840, 843, 653, 728, 795, 681, 683,
+ 918, 923, 927, 961, 782, 769, 846, 847, 1002, 928,
+ 686, 848, 735, 929, 996, 736, 741, 800, 893, 824,
+ 817, 780, 974, 783, 849, 930, 851, 858, 859, 995,
+ 861, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 458, 458, 458, 458, 458, 458, 307, 307, 307,
- 307, 0, 0, 307, 0, 0, 0, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 307, 307, 307, 307,
+ 0, 0, 307, 0, 0, 0, 458, 458, 458, 458,
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
@@ -577,41 +575,41 @@ class Php7 extends \PhpParser\ParserAbstract
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
- 458, 458, 291, 291, 291, 291, 291, 291, 291, 291,
+ 458, 291, 291, 291, 291, 291, 291, 291, 291, 291,
291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
- 291, 291, 291, 291, 291, 291, 0, 0, 0, 0,
+ 291, 291, 291, 291, 291, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 291, 291, 291, 291, 291, 291, 291, 291,
+ 0, 291, 291, 291, 291, 291, 291, 291, 291, 291,
291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
- 291, 291, 291, 291, 291, 291, 291, 291, 291, 423,
- 423, 291, 291, 0, 291, 423, 423, 423, 423, 423,
- 423, 423, 423, 423, 423, 291, 291, 291, 291, 291,
- 291, 291, 805, 147, 147, 147, 147, 423, 423, 423,
- 423, 423, -88, -88, 147, 147, 423, 423, 423, 423,
+ 291, 291, 291, 291, 291, 291, 291, 291, 423, 423,
+ 291, 291, 0, 291, 423, 423, 423, 423, 423, 423,
+ 423, 423, 423, 423, 291, 291, 291, 291, 291, 291,
+ 291, 787, 147, 147, 147, 147, 423, 423, 423, 423,
+ 423, -88, -88, 147, 147, 423, 384, 423, 423, 423,
423, 423, 423, 423, 423, 423, 423, 423, 0, 0,
- 0, 286, 422, 0, 759, 759, 759, 759, 0, 0,
- 0, 0, 422, 422, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 286, 422, 0, 286, 0,
- 759, 759, 423, 805, 805, 314, 423, 0, 0, 0,
- 0, 286, 759, 286, 552, 422, 552, 552, 12, 375,
- 314, 608, 608, 608, 608, 0, 658, 805, 805, 805,
- 805, 805, 805, 805, 805, 805, 805, 805, 759, 0,
- 805, 0, 759, 759, 759, 0, 0, 0, 0, 0,
+ 286, 422, 0, 785, 785, 785, 785, 0, 0, 0,
+ 0, 422, 422, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 286, 422, 0, 286, 0, 785,
+ 785, 423, 787, 787, 314, 384, 423, 0, 0, 0,
+ 0, 286, 785, 286, 339, 422, 339, 339, 206, 356,
+ 314, 510, 510, 510, 510, 0, 539, 787, 787, 787,
+ 787, 787, 787, 787, 787, 787, 787, 787, 785, 0,
+ 787, 0, 785, 785, 785, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 759, 0, 0, 929, 0, 0, 0, 0, 760, 0,
- 0, 0, 0, 0, 0, 760, 934, 0, 0, 0,
- 0, 0, 0, 759, 0, 0, 0, 0, 0, 0,
- 0, 0, 768, 801, 0, 801, 0, 768, 768, 768
+ 785, 0, 0, 946, 0, 0, 0, 0, 773, 0,
+ 0, 0, 0, 0, 0, 773, 951, 0, 0, 0,
+ 0, 0, 0, 785, 0, 0, 0, 0, 0, 0,
+ 0, 0, 766, 802, 0, 802, 0, 766, 766, 766
);
protected $actionDefault = array(
3,32767, 103,32767,32767,32767,32767,32767,32767,32767,
32767,32767, 101,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767, 578, 578, 578,
- 578,32767,32767, 246, 103,32767,32767, 454, 372, 372,
- 372,32767,32767, 522, 522, 522, 522, 522, 522,32767,
- 32767,32767,32767,32767,32767, 454,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 582, 582, 582,
+ 582,32767,32767, 250, 103,32767,32767, 458, 376, 376,
+ 376,32767,32767, 526, 526, 526, 526, 526, 526,32767,
+ 32767,32767,32767,32767,32767, 458,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
@@ -619,128 +617,135 @@ class Php7 extends \PhpParser\ParserAbstract
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767, 101,32767,
- 32767,32767, 37, 7, 8, 10, 11, 50, 17, 310,
+ 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314,
32767,32767,32767,32767, 103,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767, 571,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 575,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767, 462, 441, 442, 444,
+ 445, 375, 527, 581, 317, 578, 374, 146, 329, 319,
+ 238, 320, 254, 463, 255, 464, 467, 468, 211, 283,
+ 371, 150, 405, 459, 407, 457, 461, 406, 381, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 379, 380, 460, 438, 437, 436, 403,32767,
+ 32767, 404, 408, 378, 411,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 103,32767, 409, 410, 427, 428, 425,
+ 426, 429,32767, 430, 431, 432, 433,32767,32767, 306,
+ 32767,32767, 355, 353, 418, 419, 306,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 520,
+ 435,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 103,32767, 101, 522, 400, 402,
+ 490, 413, 414, 412, 382,32767, 497,32767, 103, 499,
+ 32767,32767,32767, 112,32767,32767,32767,32767, 521,32767,
+ 528, 528,32767, 483, 101, 194,32767, 194, 194,32767,
+ 32767,32767,32767,32767,32767,32767, 589, 483, 111, 111,
+ 111, 111, 111, 111, 111, 111, 111, 111, 111,32767,
+ 194, 111,32767,32767,32767, 101, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 189,32767, 264, 266,
+ 103, 543, 194,32767, 502,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 495,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767, 458, 437, 438, 440,
- 441, 371, 523, 577, 313, 574, 370, 146, 325, 315,
- 234, 316, 250, 459, 251, 460, 463, 464, 211, 279,
- 367, 150, 401, 455, 403, 453, 457, 402, 377, 382,
- 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
- 393, 394, 375, 376, 456, 434, 433, 432, 399,32767,
- 32767, 400, 404, 374, 407,32767,32767,32767,32767,32767,
- 32767,32767,32767, 103,32767, 405, 406, 423, 424, 421,
- 422, 425,32767, 426, 427, 428, 429,32767,32767, 302,
- 32767,32767, 351, 349, 414, 415, 302,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516,
- 431,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767, 103,32767, 101, 518, 396, 398,
- 486, 409, 410, 408, 378,32767, 493,32767, 103, 495,
- 32767,32767,32767, 112,32767,32767,32767, 517,32767, 524,
- 524,32767, 479, 101, 194,32767, 194, 194,32767,32767,
- 32767,32767,32767,32767,32767, 585, 479, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111,32767, 194,
- 111,32767,32767,32767, 101, 194, 194, 194, 194, 194,
- 194, 194, 194, 194, 194, 189,32767, 260, 262, 103,
- 539, 194,32767, 498,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767, 491,32767,32767,32767,
+ 32767,32767, 483, 423, 139,32767, 139, 528, 415, 416,
+ 417, 485, 528, 528, 528, 302, 285,32767,32767,32767,
+ 32767, 500, 500, 101, 101, 101, 101, 495,32767,32767,
+ 112, 100, 100, 100, 100, 100, 104, 102,32767,32767,
+ 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208,
+ 219, 102,32767, 547, 548, 219, 102, 223, 223, 223,
+ 243, 243, 474, 308, 102, 100, 102, 102, 196, 308,
+ 308,32767, 102, 474, 308, 474, 308, 198, 308, 308,
+ 308, 474, 308,32767, 102, 308, 210, 100, 100, 308,
+ 32767,32767,32767, 485,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 515,32767,
+ 532, 545, 421, 422, 424, 530, 446, 447, 448, 449,
+ 450, 451, 452, 454, 577,32767, 489,32767,32767,32767,
+ 32767, 328, 587,32767, 587,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767, 479, 419, 139,32767, 139, 524, 411, 412, 413,
- 481, 524, 524, 524, 298, 281,32767,32767,32767,32767,
- 496, 496, 101, 101, 101, 101, 491,32767,32767, 112,
- 100, 100, 100, 100, 100, 104, 102,32767,32767,32767,
- 32767, 100,32767, 102, 102,32767,32767, 217, 208, 215,
- 102,32767, 543, 544, 215, 102, 219, 219, 219, 239,
- 239, 470, 304, 102, 100, 102, 102, 196, 304, 304,
- 32767, 102, 470, 304, 470, 304, 198, 304, 304, 304,
- 470, 304,32767, 102, 304, 210, 100, 100, 304,32767,
- 32767,32767, 481,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767, 511,32767, 528,
- 541, 417, 418, 420, 526, 442, 443, 444, 445, 446,
- 447, 448, 450, 573,32767, 485,32767,32767,32767,32767,
- 324, 583,32767, 583,32767,32767,32767,32767,32767,32767,
+ 588,32767, 528,32767,32767,32767,32767, 420, 9, 76,
+ 43, 44, 52, 58, 506, 507, 508, 509, 503, 504,
+ 510, 505,32767,32767, 511, 553,32767,32767, 529, 580,
+ 32767,32767,32767,32767,32767,32767, 139,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 515,32767, 137,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767, 584,32767, 524,32767,32767,32767,32767, 416, 9,
- 76, 43, 44, 52, 58, 502, 503, 504, 505, 499,
- 500, 506, 501,32767,32767, 507, 549,32767,32767, 525,
- 576,32767,32767,32767,32767,32767,32767, 139,32767,32767,
- 32767,32767,32767,32767,32767,32767,32767,32767, 511,32767,
- 137,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767, 524,32767,32767,32767, 300, 301,32767,32767,
+ 32767, 528,32767,32767,32767, 304, 305,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767, 524,32767,32767,32767, 283, 284,32767,
+ 32767,32767, 528,32767,32767,32767, 287, 288,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767,32767, 278,32767,32767, 366,32767,32767,32767,
- 32767, 345,32767,32767,32767,32767,32767,32767,32767,32767,
- 32767,32767, 152, 152, 3, 3, 327, 152, 152, 152,
- 327, 152, 327, 327, 327, 152, 152, 152, 152, 152,
- 152, 272, 184, 254, 257, 239, 239, 152, 337, 152
+ 32767,32767, 282,32767,32767, 370,32767,32767,32767,32767,
+ 349,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 152, 152, 3, 3, 331, 152, 152, 152, 331,
+ 152, 331, 331, 331, 152, 152, 152, 152, 152, 152,
+ 276, 184, 258, 261, 243, 243, 152, 341, 152
);
protected $goto = array(
- 194, 194, 670, 422, 643, 463, 1264, 1265, 1022, 416,
- 308, 309, 329, 563, 314, 421, 330, 423, 622, 801,
- 678, 637, 586, 651, 652, 653, 165, 165, 165, 165,
+ 194, 194, 669, 423, 642, 883, 839, 884, 1025, 417,
+ 308, 309, 330, 562, 314, 422, 331, 424, 621, 823,
+ 677, 851, 824, 585, 838, 857, 165, 165, 165, 165,
218, 195, 191, 191, 175, 177, 213, 191, 191, 191,
191, 191, 192, 192, 192, 192, 192, 192, 186, 187,
- 188, 189, 190, 215, 213, 216, 521, 522, 412, 523,
- 525, 526, 527, 528, 529, 530, 531, 532, 1091, 166,
+ 188, 189, 190, 215, 213, 216, 522, 523, 413, 524,
+ 526, 527, 528, 529, 530, 531, 532, 533, 1094, 166,
167, 168, 193, 169, 170, 171, 164, 172, 173, 174,
176, 212, 214, 217, 235, 238, 241, 242, 244, 255,
256, 257, 258, 259, 260, 261, 263, 264, 265, 266,
- 274, 275, 311, 312, 313, 417, 418, 419, 568, 219,
+ 274, 275, 311, 312, 313, 418, 419, 420, 567, 219,
220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
230, 231, 232, 233, 178, 234, 179, 196, 197, 198,
- 236, 186, 187, 188, 189, 190, 215, 1091, 199, 180,
+ 236, 186, 187, 188, 189, 190, 215, 1094, 199, 180,
181, 182, 200, 196, 183, 237, 201, 199, 163, 202,
203, 184, 204, 205, 206, 185, 207, 208, 209, 210,
- 211, 323, 323, 323, 323, 827, 608, 608, 824, 547,
- 538, 342, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221,
- 1221, 1221, 1239, 1239, 288, 288, 288, 288, 1239, 1239,
- 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 388, 538,
- 547, 556, 557, 395, 566, 588, 602, 603, 832, 825,
- 880, 875, 876, 889, 15, 833, 877, 830, 878, 879,
- 831, 799, 251, 251, 883, 919, 992, 1000, 1004, 1001,
- 1005, 1237, 1237, 938, 1043, 1039, 1040, 1237, 1237, 1237,
- 1237, 1237, 1237, 1237, 1237, 1237, 1237, 858, 248, 248,
- 248, 248, 250, 252, 533, 533, 533, 533, 487, 590,
- 488, 1190, 1190, 997, 1190, 997, 494, 1290, 1290, 560,
- 997, 997, 997, 997, 997, 997, 997, 997, 997, 997,
- 997, 997, 1261, 1261, 1290, 1261, 340, 1190, 930, 402,
- 677, 1279, 1190, 1190, 1190, 1190, 959, 345, 1190, 1190,
- 1190, 1271, 1271, 1271, 1271, 606, 640, 345, 345, 1273,
- 1273, 1273, 1273, 820, 820, 805, 896, 884, 840, 885,
- 897, 345, 345, 5, 345, 6, 1306, 384, 535, 535,
- 559, 535, 415, 852, 597, 1257, 839, 540, 524, 524,
- 345, 1289, 1289, 642, 524, 524, 524, 524, 524, 524,
- 524, 524, 524, 524, 445, 805, 1140, 805, 1289, 932,
- 932, 932, 932, 1063, 1064, 445, 926, 933, 386, 390,
- 548, 587, 591, 1030, 1292, 331, 554, 1259, 1259, 1030,
- 704, 621, 623, 823, 641, 1250, 319, 303, 660, 664,
- 973, 668, 676, 969, 429, 553, 962, 936, 936, 934,
- 936, 703, 601, 537, 971, 966, 343, 344, 663, 817,
- 595, 609, 612, 613, 614, 615, 634, 635, 636, 680,
- 439, 1186, 845, 454, 454, 439, 439, 1266, 1267, 820,
- 901, 1079, 454, 394, 539, 551, 1183, 605, 540, 539,
- 842, 551, 978, 272, 387, 618, 619, 981, 536, 536,
- 844, 707, 646, 957, 567, 457, 458, 459, 838, 850,
- 254, 254, 1297, 1298, 400, 401, 976, 976, 464, 649,
- 1182, 650, 1028, 404, 405, 406, 1187, 661, 424, 1032,
- 407, 564, 600, 815, 338, 424, 854, 848, 853, 841,
- 1027, 1031, 1009, 1002, 1006, 1003, 1007, 1185, 941, 1188,
- 1247, 1248, 943, 0, 1074, 439, 439, 439, 439, 439,
- 439, 439, 439, 439, 439, 439, 0, 468, 439, 585,
- 1056, 931, 681, 667, 667, 0, 495, 673, 1054, 1171,
- 912, 0, 0, 1172, 1175, 913, 1176, 0, 0, 0,
- 0, 0, 0, 1072, 857
+ 211, 323, 323, 323, 323, 826, 607, 607, 800, 546,
+ 539, 1189, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224,
+ 1224, 1224, 1242, 1242, 343, 464, 1267, 1268, 1242, 1242,
+ 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 389, 539,
+ 546, 555, 556, 396, 565, 587, 601, 602, 831, 798,
+ 879, 874, 875, 888, 15, 832, 876, 829, 877, 878,
+ 830, 455, 455, 941, 882, 804, 1190, 251, 251, 559,
+ 455, 1240, 1240, 814, 1046, 1042, 1043, 1240, 1240, 1240,
+ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 605, 639, 1191,
+ 1250, 1251, 341, 248, 248, 248, 248, 250, 252, 819,
+ 819, 1193, 1193, 1000, 1193, 1000, 804, 416, 804, 596,
+ 1000, 1282, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
+ 1000, 1000, 1000, 1264, 1264, 962, 1264, 1193, 488, 5,
+ 489, 6, 1193, 1193, 1193, 1193, 495, 385, 1193, 1193,
+ 1193, 1274, 1274, 1274, 1274, 277, 277, 277, 277, 558,
+ 1276, 1276, 1276, 1276, 1066, 1067, 895, 346, 553, 319,
+ 303, 896, 703, 620, 622, 641, 640, 346, 346, 1143,
+ 659, 663, 976, 667, 675, 972, 1260, 430, 1292, 1292,
+ 332, 346, 346, 816, 346, 636, 1309, 650, 651, 652,
+ 844, 536, 536, 924, 536, 1292, 525, 525, 541, 1269,
+ 1270, 346, 525, 525, 525, 525, 525, 525, 525, 525,
+ 525, 525, 1295, 617, 618, 1033, 819, 446, 395, 1262,
+ 1262, 1033, 935, 935, 935, 935, 563, 599, 446, 929,
+ 936, 933, 403, 676, 822, 1186, 552, 534, 534, 534,
+ 534, 841, 589, 600, 984, 1031, 1253, 965, 939, 939,
+ 937, 939, 702, 465, 538, 974, 969, 344, 345, 706,
+ 440, 900, 1082, 853, 946, 440, 440, 1035, 604, 662,
+ 469, 1293, 1293, 981, 1077, 540, 550, 0, 0, 0,
+ 540, 843, 550, 645, 960, 388, 1174, 911, 1293, 837,
+ 1175, 1178, 912, 1179, 0, 566, 458, 459, 460, 541,
+ 849, 1185, 0, 1300, 1301, 254, 254, 401, 402, 0,
+ 0, 0, 648, 0, 649, 0, 405, 406, 407, 0,
+ 660, 0, 0, 408, 0, 0, 0, 339, 847, 594,
+ 608, 611, 612, 613, 614, 633, 634, 635, 679, 918,
+ 995, 1003, 1007, 1004, 1008, 0, 440, 440, 440, 440,
+ 440, 440, 440, 440, 440, 440, 440, 0, 1188, 440,
+ 852, 840, 1030, 1034, 584, 1059, 0, 680, 666, 666,
+ 944, 496, 672, 1057, 387, 391, 547, 586, 590, 425,
+ 0, 0, 0, 0, 0, 0, 425, 0, 0, 0,
+ 0, 0, 0, 934, 1012, 1005, 1009, 1006, 1010, 0,
+ 0, 0, 0, 0, 272, 0, 0, 0, 0, 537,
+ 537, 0, 0, 0, 0, 1075, 856, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 979,
+ 979
);
protected $gotoCheck = array(
- 42, 42, 72, 65, 65, 166, 166, 166, 119, 65,
- 65, 65, 65, 65, 65, 65, 65, 65, 65, 7,
- 9, 84, 122, 84, 84, 84, 42, 42, 42, 42,
+ 42, 42, 72, 65, 65, 64, 35, 64, 121, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 26,
+ 9, 35, 27, 124, 35, 45, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
@@ -754,87 +759,94 @@ class Php7 extends \PhpParser\ParserAbstract
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 23, 23, 23, 23, 15, 104, 104, 26, 75,
- 75, 93, 104, 104, 104, 104, 104, 104, 104, 104,
- 104, 104, 160, 160, 24, 24, 24, 24, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 160, 75, 75,
- 75, 75, 75, 75, 75, 75, 75, 75, 15, 27,
+ 42, 23, 23, 23, 23, 15, 106, 106, 7, 75,
+ 75, 20, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 162, 162, 95, 168, 168, 168, 162, 162,
+ 162, 162, 162, 162, 162, 162, 162, 162, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 15, 6,
15, 15, 15, 15, 75, 15, 15, 15, 15, 15,
- 15, 6, 5, 5, 15, 87, 87, 87, 87, 87,
- 87, 161, 161, 49, 15, 15, 15, 161, 161, 161,
- 161, 161, 161, 161, 161, 161, 161, 45, 5, 5,
- 5, 5, 5, 5, 103, 103, 103, 103, 147, 103,
- 147, 72, 72, 72, 72, 72, 147, 173, 173, 162,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 122, 122, 173, 122, 169, 72, 89, 89,
- 89, 171, 72, 72, 72, 72, 99, 14, 72, 72,
- 72, 9, 9, 9, 9, 55, 55, 14, 14, 122,
- 122, 122, 122, 22, 22, 12, 72, 64, 35, 64,
- 72, 14, 14, 46, 14, 46, 14, 61, 19, 19,
- 100, 19, 13, 35, 13, 122, 35, 14, 163, 163,
- 14, 172, 172, 63, 163, 163, 163, 163, 163, 163,
- 163, 163, 163, 163, 19, 12, 143, 12, 172, 19,
- 19, 19, 19, 136, 136, 19, 19, 19, 58, 58,
- 58, 58, 58, 122, 172, 29, 48, 122, 122, 122,
- 48, 48, 48, 25, 48, 14, 159, 159, 48, 48,
- 48, 48, 48, 48, 109, 9, 25, 25, 25, 25,
- 25, 25, 9, 25, 25, 25, 93, 93, 14, 18,
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
- 23, 20, 39, 141, 141, 23, 23, 168, 168, 22,
- 17, 17, 141, 28, 9, 9, 152, 17, 14, 9,
- 37, 9, 17, 24, 9, 83, 83, 106, 24, 24,
- 17, 95, 17, 17, 9, 9, 9, 9, 17, 9,
- 5, 5, 9, 9, 80, 80, 103, 103, 149, 80,
- 17, 80, 121, 80, 80, 80, 20, 80, 113, 124,
- 80, 2, 2, 20, 80, 113, 41, 9, 16, 16,
- 16, 16, 113, 113, 113, 113, 113, 14, 16, 20,
- 20, 20, 92, -1, 139, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, -1, 82, 23, 8,
- 8, 16, 8, 8, 8, -1, 8, 8, 8, 78,
- 78, -1, -1, 78, 78, 78, 78, -1, -1, -1,
- -1, -1, -1, 16, 16
+ 15, 143, 143, 49, 15, 12, 20, 5, 5, 164,
+ 143, 163, 163, 20, 15, 15, 15, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 55, 55, 20,
+ 20, 20, 171, 5, 5, 5, 5, 5, 5, 22,
+ 22, 72, 72, 72, 72, 72, 12, 13, 12, 13,
+ 72, 173, 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 124, 124, 101, 124, 72, 149, 46,
+ 149, 46, 72, 72, 72, 72, 149, 61, 72, 72,
+ 72, 9, 9, 9, 9, 24, 24, 24, 24, 102,
+ 124, 124, 124, 124, 138, 138, 72, 14, 48, 161,
+ 161, 72, 48, 48, 48, 63, 48, 14, 14, 145,
+ 48, 48, 48, 48, 48, 48, 124, 111, 174, 174,
+ 29, 14, 14, 18, 14, 84, 14, 84, 84, 84,
+ 39, 19, 19, 90, 19, 174, 165, 165, 14, 170,
+ 170, 14, 165, 165, 165, 165, 165, 165, 165, 165,
+ 165, 165, 174, 83, 83, 124, 22, 19, 28, 124,
+ 124, 124, 19, 19, 19, 19, 2, 2, 19, 19,
+ 19, 91, 91, 91, 25, 154, 9, 105, 105, 105,
+ 105, 37, 105, 9, 108, 123, 14, 25, 25, 25,
+ 25, 25, 25, 151, 25, 25, 25, 95, 95, 97,
+ 23, 17, 17, 41, 94, 23, 23, 126, 17, 14,
+ 82, 175, 175, 17, 141, 9, 9, -1, -1, -1,
+ 9, 17, 9, 17, 17, 9, 78, 78, 175, 17,
+ 78, 78, 78, 78, -1, 9, 9, 9, 9, 14,
+ 9, 17, -1, 9, 9, 5, 5, 80, 80, -1,
+ -1, -1, 80, -1, 80, -1, 80, 80, 80, -1,
+ 80, -1, -1, 80, -1, -1, -1, 80, 9, 79,
+ 79, 79, 79, 79, 79, 79, 79, 79, 79, 87,
+ 87, 87, 87, 87, 87, -1, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, -1, 14, 23,
+ 16, 16, 16, 16, 8, 8, -1, 8, 8, 8,
+ 16, 8, 8, 8, 58, 58, 58, 58, 58, 115,
+ -1, -1, -1, -1, -1, -1, 115, -1, -1, -1,
+ -1, -1, -1, 16, 115, 115, 115, 115, 115, -1,
+ -1, -1, -1, -1, 24, -1, -1, -1, -1, 24,
+ 24, -1, -1, -1, -1, 16, 16, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 105,
+ 105
);
protected $gotoBase = array(
- 0, 0, -203, 0, 0, 221, 208, 10, 512, 7,
- 0, 0, 24, 1, 5, -174, 47, -23, 105, 61,
- 38, 0, -10, 158, 181, 379, 164, 205, 102, 84,
- 0, 0, 0, 0, 0, -43, 0, 107, 0, 104,
- 0, 54, -1, 0, 0, 235, -384, 0, -307, 210,
- 0, 0, 0, 0, 0, 266, 0, 0, 324, 0,
- 0, 286, 0, 103, 298, -236, 0, 0, 0, 0,
- 0, 0, -6, 0, 0, -167, 0, 0, 129, 62,
- -14, 0, 53, -22, -669, 0, 0, -52, 0, -11,
- 0, 0, 68, -299, 0, 52, 0, 0, 0, 262,
- 288, 0, 0, 227, -73, 0, 87, 0, 0, 118,
- 0, 0, 0, 209, 0, 0, 0, 0, 0, 6,
- 0, 108, 15, 0, 46, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 91, 0, 0, 69,
- 0, 390, 0, 86, 0, 0, 0, -224, 0, 37,
- 0, 0, 77, 0, 0, 0, 0, 0, 0, 70,
- -57, -8, 241, 99, 0, 0, -290, 0, 65, 257,
- 0, 261, 39, -35, 0, 0
+ 0, 0, -297, 0, 0, 226, 196, 159, 517, 7,
+ 0, 0, -66, -65, 25, -175, 78, -33, 39, 84,
+ -213, 0, -64, 158, 302, 390, 15, 18, 46, 49,
+ 0, 0, 0, 0, 0, -356, 0, 67, 0, 32,
+ 0, -10, -1, 0, 0, 13, -417, 0, -364, 200,
+ 0, 0, 0, 0, 0, 208, 0, 0, 490, 0,
+ 0, 256, 0, 85, -14, -236, 0, 0, 0, 0,
+ 0, 0, -6, 0, 0, -168, 0, 0, 45, 140,
+ -12, 0, -35, -95, -344, 0, 0, 221, 0, 0,
+ 27, 92, 0, 0, -11, -287, 0, 19, 0, 0,
+ 0, 251, 267, 0, 0, 370, -73, 0, 43, 0,
+ 0, 61, 0, 0, 0, 270, 0, 0, 0, 0,
+ 0, 6, 0, 40, 16, 0, -7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 42, 0,
+ 0, -2, 0, 188, 0, 59, 0, 0, 0, -195,
+ 0, -19, 0, 0, 35, 0, 0, 0, 0, 0,
+ 0, 3, -57, -8, 201, 117, 0, 0, -110, 0,
+ -4, 223, 0, 241, 36, 129, 0, 0
);
protected $gotoDefault = array(
- -32768, 499, 711, 4, 712, 905, 788, 797, 583, 515,
- 679, 339, 610, 413, 1255, 882, 1078, 565, 816, 1199,
- 1207, 446, 819, 324, 701, 864, 865, 866, 391, 376,
- 382, 389, 632, 611, 481, 851, 442, 843, 473, 846,
- 441, 855, 162, 410, 497, 859, 3, 861, 542, 892,
- 377, 869, 378, 656, 871, 550, 873, 874, 385, 392,
- 393, 1083, 558, 607, 886, 243, 552, 887, 375, 888,
- 895, 380, 383, 665, 453, 492, 486, 403, 1058, 594,
- 629, 450, 467, 617, 616, 604, 466, 425, 408, 928,
- 474, 451, 942, 341, 950, 709, 1090, 624, 476, 958,
- 625, 965, 968, 516, 517, 465, 980, 269, 983, 477,
- 1015, 647, 648, 995, 626, 627, 1013, 460, 584, 1021,
- 443, 1029, 1243, 444, 1033, 262, 1036, 276, 409, 426,
- 1041, 1042, 8, 1048, 671, 672, 10, 273, 496, 1073,
- 666, 440, 1089, 430, 1159, 1161, 544, 478, 1179, 1178,
- 659, 493, 1184, 1246, 438, 518, 461, 310, 519, 302,
- 327, 307, 534, 289, 328, 520, 462, 1252, 1260, 325,
- 30, 1280, 1291, 335, 562, 599
+ -32768, 500, 710, 4, 711, 904, 787, 796, 582, 516,
+ 678, 340, 609, 414, 1258, 881, 1081, 564, 815, 1202,
+ 1210, 447, 818, 324, 700, 863, 864, 865, 392, 377,
+ 383, 390, 631, 610, 482, 850, 443, 842, 474, 845,
+ 442, 854, 162, 411, 498, 858, 3, 860, 543, 891,
+ 378, 868, 379, 655, 870, 549, 872, 873, 386, 393,
+ 394, 1086, 557, 606, 885, 243, 551, 886, 376, 887,
+ 894, 381, 384, 664, 454, 493, 487, 404, 1061, 593,
+ 628, 451, 468, 616, 615, 603, 467, 426, 409, 326,
+ 923, 931, 475, 452, 945, 342, 953, 708, 1093, 623,
+ 477, 961, 624, 968, 971, 517, 518, 466, 983, 269,
+ 986, 478, 1018, 646, 647, 998, 625, 626, 1016, 461,
+ 583, 1024, 444, 1032, 1246, 445, 1036, 262, 1039, 276,
+ 410, 427, 1044, 1045, 8, 1051, 670, 671, 10, 273,
+ 497, 1076, 665, 441, 1092, 431, 1162, 1164, 545, 479,
+ 1182, 1181, 658, 494, 1187, 1249, 439, 519, 462, 310,
+ 520, 302, 328, 307, 535, 289, 329, 521, 463, 1255,
+ 1263, 325, 30, 1283, 1294, 336, 561, 598
);
protected $ruleToNonTerminal = array(
@@ -859,23 +871,24 @@ class Php7 extends \PhpParser\ParserAbstract
49, 49, 25, 25, 68, 68, 71, 71, 70, 69,
69, 62, 74, 74, 75, 75, 76, 76, 77, 77,
78, 78, 26, 26, 27, 27, 27, 27, 86, 86,
- 88, 88, 81, 81, 81, 82, 82, 85, 85, 83,
- 83, 89, 90, 90, 56, 56, 64, 64, 67, 67,
- 67, 66, 91, 91, 92, 57, 57, 57, 57, 93,
- 93, 94, 94, 95, 95, 96, 97, 97, 98, 98,
- 99, 99, 54, 54, 50, 50, 101, 52, 52, 102,
- 51, 51, 53, 53, 63, 63, 63, 63, 79, 79,
- 105, 105, 107, 107, 108, 108, 108, 108, 106, 106,
- 106, 110, 110, 110, 110, 87, 87, 113, 113, 113,
- 111, 111, 114, 114, 112, 112, 115, 115, 116, 116,
- 116, 116, 109, 109, 80, 80, 80, 20, 20, 20,
- 118, 117, 117, 119, 119, 119, 119, 59, 120, 120,
- 121, 60, 123, 123, 124, 124, 125, 125, 84, 126,
- 126, 126, 126, 126, 126, 131, 131, 132, 132, 133,
- 133, 133, 133, 133, 134, 135, 135, 130, 130, 127,
- 127, 129, 129, 137, 137, 136, 136, 136, 136, 136,
- 136, 136, 128, 138, 138, 140, 139, 139, 61, 100,
- 141, 141, 55, 55, 42, 42, 42, 42, 42, 42,
+ 88, 88, 81, 81, 89, 89, 90, 90, 90, 82,
+ 82, 85, 85, 83, 83, 91, 92, 92, 56, 56,
+ 64, 64, 67, 67, 67, 66, 93, 93, 94, 57,
+ 57, 57, 57, 95, 95, 96, 96, 97, 97, 98,
+ 99, 99, 100, 100, 101, 101, 54, 54, 50, 50,
+ 103, 52, 52, 104, 51, 51, 53, 53, 63, 63,
+ 63, 63, 79, 79, 107, 107, 109, 109, 110, 110,
+ 110, 110, 108, 108, 108, 112, 112, 112, 112, 87,
+ 87, 115, 115, 115, 113, 113, 116, 116, 114, 114,
+ 117, 117, 118, 118, 118, 118, 111, 111, 80, 80,
+ 80, 20, 20, 20, 120, 119, 119, 121, 121, 121,
+ 121, 59, 122, 122, 123, 60, 125, 125, 126, 126,
+ 127, 127, 84, 128, 128, 128, 128, 128, 128, 133,
+ 133, 134, 134, 135, 135, 135, 135, 135, 136, 137,
+ 137, 132, 132, 129, 129, 131, 131, 139, 139, 138,
+ 138, 138, 138, 138, 138, 138, 130, 140, 140, 142,
+ 141, 141, 61, 102, 143, 143, 55, 55, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
@@ -884,20 +897,20 @@ class Php7 extends \PhpParser\ParserAbstract
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 148, 142, 142,
- 147, 147, 150, 151, 151, 152, 153, 153, 153, 19,
- 19, 72, 72, 72, 72, 143, 143, 143, 143, 155,
- 155, 144, 144, 146, 146, 146, 149, 149, 160, 160,
- 160, 160, 160, 160, 160, 160, 160, 161, 161, 104,
- 163, 163, 163, 163, 145, 145, 145, 145, 145, 145,
- 145, 145, 58, 58, 158, 158, 158, 158, 164, 164,
- 154, 154, 154, 165, 165, 165, 165, 165, 165, 73,
- 73, 65, 65, 65, 65, 122, 122, 122, 122, 168,
- 167, 157, 157, 157, 157, 157, 157, 157, 156, 156,
- 156, 166, 166, 166, 166, 103, 162, 170, 170, 169,
- 169, 171, 171, 171, 171, 171, 171, 171, 171, 159,
- 159, 159, 159, 173, 174, 172, 172, 172, 172, 172,
- 172, 172, 172, 175, 175, 175, 175
+ 42, 150, 144, 144, 149, 149, 152, 153, 153, 154,
+ 155, 155, 155, 19, 19, 72, 72, 72, 72, 145,
+ 145, 145, 145, 157, 157, 146, 146, 148, 148, 148,
+ 151, 151, 162, 162, 162, 162, 162, 162, 162, 162,
+ 162, 163, 163, 106, 165, 165, 165, 165, 147, 147,
+ 147, 147, 147, 147, 147, 147, 58, 58, 160, 160,
+ 160, 160, 166, 166, 156, 156, 156, 167, 167, 167,
+ 167, 167, 167, 73, 73, 65, 65, 65, 65, 124,
+ 124, 124, 124, 170, 169, 159, 159, 159, 159, 159,
+ 159, 159, 158, 158, 158, 168, 168, 168, 168, 105,
+ 164, 172, 172, 171, 171, 173, 173, 173, 173, 173,
+ 173, 173, 173, 161, 161, 161, 161, 175, 176, 174,
+ 174, 174, 174, 174, 174, 174, 174, 177, 177, 177,
+ 177
);
protected $ruleToLength = array(
@@ -922,45 +935,46 @@ class Php7 extends \PhpParser\ParserAbstract
2, 1, 1, 1, 0, 2, 1, 3, 8, 0,
4, 2, 1, 3, 0, 1, 0, 1, 0, 1,
3, 1, 8, 9, 8, 7, 6, 8, 0, 2,
- 0, 2, 1, 2, 2, 0, 2, 0, 2, 0,
- 2, 2, 1, 3, 1, 4, 1, 4, 1, 1,
- 4, 2, 1, 3, 3, 3, 4, 4, 5, 0,
- 2, 4, 3, 1, 1, 7, 0, 2, 1, 3,
- 3, 4, 1, 4, 0, 2, 5, 0, 2, 6,
- 0, 2, 0, 3, 1, 2, 1, 1, 2, 0,
- 1, 3, 0, 2, 1, 1, 1, 1, 6, 8,
- 6, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 3, 3, 3, 3, 3, 3, 3, 3, 1, 2,
- 1, 1, 0, 1, 0, 2, 2, 2, 4, 3,
- 1, 1, 3, 1, 2, 2, 3, 2, 3, 1,
- 1, 2, 3, 1, 1, 3, 2, 0, 1, 5,
- 5, 10, 3, 5, 1, 1, 3, 0, 2, 4,
- 5, 4, 4, 4, 3, 1, 1, 1, 1, 1,
- 1, 0, 1, 1, 2, 1, 1, 1, 1, 1,
- 1, 1, 2, 1, 3, 1, 1, 3, 2, 2,
- 3, 1, 0, 1, 1, 3, 3, 3, 4, 1,
- 1, 2, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 2, 2, 2, 2, 3,
+ 0, 2, 1, 2, 1, 2, 1, 1, 1, 0,
+ 2, 0, 2, 0, 2, 2, 1, 3, 1, 4,
+ 1, 4, 1, 1, 4, 2, 1, 3, 3, 3,
+ 4, 4, 5, 0, 2, 4, 3, 1, 1, 7,
+ 0, 2, 1, 3, 3, 4, 1, 4, 0, 2,
+ 5, 0, 2, 6, 0, 2, 0, 3, 1, 2,
+ 1, 1, 2, 0, 1, 3, 0, 2, 1, 1,
+ 1, 1, 6, 8, 6, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
+ 3, 3, 1, 2, 1, 1, 0, 1, 0, 2,
+ 2, 2, 4, 3, 1, 1, 3, 1, 2, 2,
+ 3, 2, 3, 1, 1, 2, 3, 1, 1, 3,
+ 2, 0, 1, 5, 5, 10, 3, 5, 1, 1,
+ 3, 0, 2, 4, 5, 4, 4, 4, 3, 1,
+ 1, 1, 1, 1, 1, 0, 1, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 2, 1, 3, 1,
+ 1, 3, 2, 2, 3, 1, 0, 1, 1, 3,
+ 3, 3, 4, 1, 1, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
+ 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
- 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 5, 4, 3, 4, 4, 2, 2, 4,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 1, 3, 2, 1, 2, 4, 2, 2, 8,
- 9, 8, 9, 9, 10, 9, 10, 8, 3, 2,
- 0, 4, 2, 1, 3, 2, 2, 2, 4, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
- 1, 0, 3, 0, 1, 1, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
- 4, 1, 1, 3, 1, 1, 1, 1, 1, 3,
- 2, 3, 0, 1, 1, 3, 1, 1, 1, 1,
- 1, 3, 1, 1, 4, 4, 1, 4, 4, 0,
- 1, 1, 1, 3, 3, 1, 4, 2, 2, 1,
- 3, 1, 4, 4, 3, 3, 3, 3, 1, 3,
- 1, 1, 3, 1, 1, 4, 1, 1, 1, 3,
- 1, 1, 2, 1, 3, 4, 3, 2, 0, 2,
- 2, 1, 2, 1, 1, 1, 4, 3, 3, 3,
- 3, 6, 3, 1, 1, 2, 1
+ 3, 2, 2, 2, 2, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 5, 4, 3, 4,
+ 4, 2, 2, 4, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 3, 2, 1, 2,
+ 4, 2, 2, 8, 9, 8, 9, 9, 10, 9,
+ 10, 8, 3, 2, 0, 4, 2, 1, 3, 2,
+ 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 1, 1, 1, 0, 3, 0, 1, 1,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 3, 3, 4, 1, 1, 3, 1, 1,
+ 1, 1, 1, 3, 2, 3, 0, 1, 1, 3,
+ 1, 1, 1, 1, 1, 3, 1, 1, 4, 4,
+ 1, 4, 4, 0, 1, 1, 1, 3, 3, 1,
+ 4, 2, 2, 1, 3, 1, 4, 4, 3, 3,
+ 3, 3, 1, 3, 1, 1, 3, 1, 1, 4,
+ 1, 1, 1, 3, 1, 1, 2, 1, 3, 4,
+ 3, 2, 0, 2, 2, 1, 2, 1, 1, 1,
+ 4, 3, 3, 3, 3, 6, 3, 1, 1, 2,
+ 1
);
protected function initReduceCallbacks() {
@@ -1633,249 +1647,249 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = 0;
},
213 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
214 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
215 => function ($stackPos) {
- $this->semValue = null;
+ $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
},
216 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-2)];
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
},
217 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
},
218 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-2)];
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
},
219 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = null;
},
220 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(2-2)];
},
221 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = array();
},
222 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
},
223 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = array();
},
224 => function ($stackPos) {
- $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
},
225 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
226 => function ($stackPos) {
- $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
227 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
228 => function ($stackPos) {
$this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
},
229 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
230 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
},
231 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
232 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
},
233 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = null;
},
234 => function ($stackPos) {
- $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
235 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
236 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-3)];
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
237 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
238 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(5-3)];
+ $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
239 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
240 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
},
241 => function ($stackPos) {
- $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
242 => function ($stackPos) {
- $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(5-3)];
},
243 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos];
+ $this->semValue = array();
},
244 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos];
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
245 => function ($stackPos) {
- $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes);
+ $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
246 => function ($stackPos) {
- $this->semValue = [];
+ $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
247 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = $this->semStack[$stackPos];
},
248 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = $this->semStack[$stackPos];
},
249 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes);
},
250 => function ($stackPos) {
- $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = [];
},
251 => function ($stackPos) {
- $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
252 => function ($stackPos) {
- $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
253 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
254 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
255 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
256 => function ($stackPos) {
- $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
+ $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]);
},
257 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
258 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = array();
},
259 => function ($stackPos) {
- $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
260 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
},
261 => function ($stackPos) {
- $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = array();
},
262 => function ($stackPos) {
- $this->semValue = null;
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
263 => function ($stackPos) {
- $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
},
264 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ $this->semValue = null;
},
265 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(2-2)], true);
+ $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
266 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ $this->semValue = null;
},
267 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
+ $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
268 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
},
269 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = array($this->semStack[$stackPos-(2-2)], true);
},
270 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
},
271 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = array($this->semStack[$stackPos-(1-1)], false);
},
272 => function ($stackPos) {
- $this->semValue = 0;
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
273 => function ($stackPos) {
- $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
+ $this->semValue = array();
},
274 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
275 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
276 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ $this->semValue = 0;
},
277 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_READONLY;
+ $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
},
278 => function ($stackPos) {
- $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]);
- $this->checkParam($this->semValue);
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
},
279 => function ($stackPos) {
- $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]);
- $this->checkParam($this->semValue);
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
},
280 => function ($stackPos) {
- $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]);
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
},
281 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
},
282 => function ($stackPos) {
- $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]);
+ $this->checkParam($this->semValue);
},
283 => function ($stackPos) {
- $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]);
+ $this->checkParam($this->semValue);
},
284 => function ($stackPos) {
- $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]);
},
285 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
286 => function ($stackPos) {
- $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
287 => function ($stackPos) {
- $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
288 => function ($stackPos) {
- $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
289 => function ($stackPos) {
- $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
290 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
291 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]);
},
292 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
293 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
294 => function ($stackPos) {
$this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
@@ -1890,73 +1904,73 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
298 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
},
299 => function ($stackPos) {
- $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
300 => function ($stackPos) {
- $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
},
301 => function ($stackPos) {
- $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
302 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
303 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
304 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
305 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-2)];
+ $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
306 => function ($stackPos) {
$this->semValue = null;
},
307 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
308 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-2)];
+ $this->semValue = null;
},
309 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(3-2)]);
+ $this->semValue = $this->semStack[$stackPos-(2-2)];
},
310 => function ($stackPos) {
- $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = null;
},
311 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = array();
},
312 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = $this->semStack[$stackPos-(4-2)];
},
313 => function ($stackPos) {
- $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(3-2)]);
},
314 => function ($stackPos) {
- $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
315 => function ($stackPos) {
- $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
316 => function ($stackPos) {
- $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]);
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
317 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
318 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
319 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
320 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]);
},
321 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(2-1)];
@@ -1968,92 +1982,92 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
324 => function ($stackPos) {
- $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
325 => function ($stackPos) {
- $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
326 => function ($stackPos) {
- if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
327 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
328 => function ($stackPos) {
- $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; };
- if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
329 => function ($stackPos) {
- $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]);
- $this->checkProperty($this->semValue, $stackPos-(5-2));
+ $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
330 => function ($stackPos) {
- $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]);
- $this->checkClassConst($this->semValue, $stackPos-(5-2));
+ if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }
},
331 => function ($stackPos) {
- $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
- $this->checkClassMethod($this->semValue, $stackPos-(10-2));
+ $this->semValue = array();
},
332 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; };
+ if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)];
},
333 => function ($stackPos) {
- $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
+ $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]);
+ $this->checkProperty($this->semValue, $stackPos-(5-2));
},
334 => function ($stackPos) {
- $this->semValue = null; /* will be skipped */
+ $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]);
+ $this->checkClassConst($this->semValue, $stackPos-(5-2));
},
335 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
+ $this->checkClassMethod($this->semValue, $stackPos-(10-2));
},
336 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
337 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
},
338 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = null; /* will be skipped */
},
339 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = array();
},
340 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
341 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = array();
},
342 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
343 => function ($stackPos) {
- $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
344 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
},
345 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
346 => function ($stackPos) {
- $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]);
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
347 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
348 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]);
},
349 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
350 => function ($stackPos) {
- $this->semValue = 0;
+ $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]);
},
351 => function ($stackPos) {
- $this->semValue = 0;
+ $this->semValue = null;
},
352 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
@@ -2062,414 +2076,414 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
354 => function ($stackPos) {
- $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
+ $this->semValue = 0;
},
355 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ $this->semValue = 0;
},
356 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
357 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
358 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_STATIC;
+ $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)];
},
359 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
},
360 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
},
361 => function ($stackPos) {
- $this->semValue = Stmt\Class_::MODIFIER_READONLY;
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
},
362 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = Stmt\Class_::MODIFIER_STATIC;
},
363 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
},
364 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
},
365 => function ($stackPos) {
- $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = Stmt\Class_::MODIFIER_READONLY;
},
366 => function ($stackPos) {
- $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
367 => function ($stackPos) {
- $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
368 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
369 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
370 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
371 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
372 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
373 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
374 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
375 => function ($stackPos) {
- $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
376 => function ($stackPos) {
- $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = array();
},
377 => function ($stackPos) {
- $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
378 => function ($stackPos) {
- $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
379 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
380 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
381 => function ($stackPos) {
- $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
382 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
383 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
384 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
385 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
386 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
387 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
388 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
389 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
390 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
391 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
392 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
393 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
394 => function ($stackPos) {
- $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
395 => function ($stackPos) {
- $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
396 => function ($stackPos) {
- $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
397 => function ($stackPos) {
- $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
398 => function ($stackPos) {
- $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
399 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
400 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
401 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
402 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
403 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
404 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
405 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
406 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
407 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
408 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
409 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
410 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
411 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
412 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
413 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
414 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
415 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
416 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
417 => function ($stackPos) {
- $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
418 => function ($stackPos) {
- $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
419 => function ($stackPos) {
- $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
420 => function ($stackPos) {
- $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
421 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
422 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
423 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
424 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
425 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
426 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
427 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
428 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
429 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
430 => function ($stackPos) {
- $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
431 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
432 => function ($stackPos) {
- $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
433 => function ($stackPos) {
- $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
434 => function ($stackPos) {
- $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
435 => function ($stackPos) {
- $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
436 => function ($stackPos) {
- $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes);
},
437 => function ($stackPos) {
- $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
438 => function ($stackPos) {
- $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
439 => function ($stackPos) {
- $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
440 => function ($stackPos) {
- $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
441 => function ($stackPos) {
- $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
442 => function ($stackPos) {
- $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
443 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes;
- $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]);
- $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs);
+ $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
444 => function ($stackPos) {
- $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
445 => function ($stackPos) {
- $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
446 => function ($stackPos) {
- $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
447 => function ($stackPos) {
- $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes;
+ $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]);
+ $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs);
},
448 => function ($stackPos) {
- $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
449 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes;
- $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
- $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs);
+ $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
450 => function ($stackPos) {
- $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
451 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
452 => function ($stackPos) {
- $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
453 => function ($stackPos) {
- $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes;
+ $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
+ $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs);
},
454 => function ($stackPos) {
- $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
455 => function ($stackPos) {
- $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
456 => function ($stackPos) {
- $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
457 => function ($stackPos) {
- $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
458 => function ($stackPos) {
- $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
459 => function ($stackPos) {
- $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
460 => function ($stackPos) {
- $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
461 => function ($stackPos) {
- $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes);
+ $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
462 => function ($stackPos) {
- $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
463 => function ($stackPos) {
- $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes);
},
464 => function ($stackPos) {
- $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
},
465 => function ($stackPos) {
- $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes);
},
466 => function ($stackPos) {
- $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
},
467 => function ($stackPos) {
- $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]);
- $this->checkClass($this->semValue[0], -1);
+ $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
},
468 => function ($stackPos) {
- $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
},
469 => function ($stackPos) {
- list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes);
},
470 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes);
},
471 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(4-3)];
+ $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]);
+ $this->checkClass($this->semValue[0], -1);
},
472 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
473 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
474 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = array();
},
475 => function ($stackPos) {
- $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(4-3)];
},
476 => function ($stackPos) {
- $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(2-1)];
},
477 => function ($stackPos) {
- $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
478 => function ($stackPos) {
- $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
479 => function ($stackPos) {
- $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
480 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
481 => function ($stackPos) {
- $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
482 => function ($stackPos) {
- $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
483 => function ($stackPos) {
- $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
484 => function ($stackPos) {
- $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
485 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
486 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
487 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
488 => function ($stackPos) {
- $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
489 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
@@ -2478,116 +2492,115 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
491 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
492 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
},
493 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
494 => function ($stackPos) {
- $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes));
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
495 => function ($stackPos) {
- foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = null;
},
496 => function ($stackPos) {
- $this->semValue = array();
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
497 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = array();
},
498 => function ($stackPos) {
- $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes));
},
499 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)];
},
500 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = array();
},
501 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
502 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
503 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
504 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
505 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
506 => function ($stackPos) {
- $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
507 => function ($stackPos) {
- $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
508 => function ($stackPos) {
- $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2;
+ $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
509 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT;
- $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs);
+ $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
510 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG;
- $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs);
+ $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
511 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
512 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
- $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)]), $attrs);
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2;
},
513 => function ($stackPos) {
- $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
- foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs);
+ $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT;
+ $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs);
},
514 => function ($stackPos) {
- $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG;
+ $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs);
},
515 => function ($stackPos) {
- $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
516 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
517 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
+ foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs);
},
518 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
519 => function ($stackPos) {
- $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true);
+ $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
520 => function ($stackPos) {
- $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
521 => function ($stackPos) {
- $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
522 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
523 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true);
},
524 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true);
},
525 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true);
},
526 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = null;
},
527 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
@@ -2596,13 +2609,13 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
529 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
530 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
531 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
532 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
@@ -2611,192 +2624,204 @@ class Php7 extends \PhpParser\ParserAbstract
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
534 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
535 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
536 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
537 => function ($stackPos) {
- $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
538 => function ($stackPos) {
- $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
539 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
540 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
541 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
542 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
543 => function ($stackPos) {
- $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = null;
},
544 => function ($stackPos) {
- $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
545 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
546 => function ($stackPos) {
- $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
547 => function ($stackPos) {
- $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
548 => function ($stackPos) {
- $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2;
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
549 => function ($stackPos) {
- $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
550 => function ($stackPos) {
- $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
551 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
552 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2;
},
553 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var;
},
554 => function ($stackPos) {
- $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
555 => function ($stackPos) {
- $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
556 => function ($stackPos) {
- $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
557 => function ($stackPos) {
- $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
558 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
559 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
560 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
561 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
562 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
563 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
564 => function ($stackPos) {
- $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
565 => function ($stackPos) {
- $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
566 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue);
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
},
567 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos];
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
568 => function ($stackPos) {
- /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */
+ $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
},
569 => function ($stackPos) {
- $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
+ $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
570 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue);
},
571 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos];
},
572 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */
},
573 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)];
},
574 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
575 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
576 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
577 => function ($stackPos) {
- $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
578 => function ($stackPos) {
- $this->semValue = null;
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
579 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
580 => function ($stackPos) {
- $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
581 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(1-1)]);
+ $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
},
582 => function ($stackPos) {
- $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]);
+ $this->semValue = null;
},
583 => function ($stackPos) {
- $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
584 => function ($stackPos) {
- $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)];
},
585 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(1-1)];
+ $this->semValue = array($this->semStack[$stackPos-(1-1)]);
},
586 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
+ $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]);
},
587 => function ($stackPos) {
- $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
588 => function ($stackPos) {
- $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
},
589 => function ($stackPos) {
- $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = $this->semStack[$stackPos-(1-1)];
},
590 => function ($stackPos) {
- $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes);
},
591 => function ($stackPos) {
- $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
592 => function ($stackPos) {
- $this->semValue = $this->semStack[$stackPos-(3-2)];
+ $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
593 => function ($stackPos) {
- $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
594 => function ($stackPos) {
- $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes);
},
595 => function ($stackPos) {
- $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes);
},
596 => function ($stackPos) {
+ $this->semValue = $this->semStack[$stackPos-(3-2)];
+ },
+ 597 => function ($stackPos) {
+ $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 598 => function ($stackPos) {
+ $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes);
+ },
+ 599 => function ($stackPos) {
+ $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes);
+ },
+ 600 => function ($stackPos) {
$this->semValue = $this->semStack[$stackPos-(1-1)];
},
];
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php
index 5ee5a64bb..d485d78de 100644
--- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php
+++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php
@@ -875,6 +875,15 @@ abstract class ParserAbstract implements Parser
return $attributes;
}
+ protected function checkClassModifier($a, $b, $modifierPos) {
+ try {
+ Class_::verifyClassModifier($a, $b);
+ } catch (Error $error) {
+ $error->setAttributes($this->getAttributesAt($modifierPos));
+ $this->emitError($error);
+ }
+ }
+
protected function checkModifier($a, $b, $modifierPos) {
// Jumping through some hoops here because verifyModifier() is also used elsewhere
try {
diff --git a/vendor/paragonie/constant_time_encoding/.gitignore b/vendor/paragonie/constant_time_encoding/.gitignore
deleted file mode 100644
index e0caea8fc..000000000
--- a/vendor/paragonie/constant_time_encoding/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.idea/
-vendor/ \ No newline at end of file
diff --git a/vendor/paragonie/constant_time_encoding/.travis.yml b/vendor/paragonie/constant_time_encoding/.travis.yml
deleted file mode 100644
index 117c114a1..000000000
--- a/vendor/paragonie/constant_time_encoding/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: php
-sudo: false
-
-matrix:
- fast_finish: true
- include:
- - php: "7.1"
- - php: "7.2"
- - php: "7.3"
- - php: "7.4"
- - php: "8.0"
- - php: "nightly"
- allow_failures:
- - php: "nightly"
- - php: "7.4"
- - php: "8.0"
-
-install:
- - composer self-update
- - composer update
-
-script:
- - vendor/bin/phpunit
- - vendor/bin/psalm
diff --git a/vendor/paragonie/constant_time_encoding/LICENSE.txt b/vendor/paragonie/constant_time_encoding/LICENSE.txt
index f424f5ecc..91acaca67 100644
--- a/vendor/paragonie/constant_time_encoding/LICENSE.txt
+++ b/vendor/paragonie/constant_time_encoding/LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016 - 2020 Paragon Initiative Enterprises
+Copyright (c) 2016 - 2022 Paragon Initiative Enterprises
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/paragonie/constant_time_encoding/README.md b/vendor/paragonie/constant_time_encoding/README.md
index d7db2a2d0..cedddd863 100644
--- a/vendor/paragonie/constant_time_encoding/README.md
+++ b/vendor/paragonie/constant_time_encoding/README.md
@@ -1,6 +1,6 @@
# Constant-Time Encoding
-[![Build Status](https://travis-ci.org/paragonie/constant_time_encoding.svg?branch=master)](https://travis-ci.org/paragonie/constant_time_encoding)
+[![Build Status](https://github.com/paragonie/constant_time_encoding/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/constant_time_encoding/actions)
[![Latest Stable Version](https://poser.pugx.org/paragonie/constant_time_encoding/v/stable)](https://packagist.org/packages/paragonie/constant_time_encoding)
[![Latest Unstable Version](https://poser.pugx.org/paragonie/constant_time_encoding/v/unstable)](https://packagist.org/packages/paragonie/constant_time_encoding)
[![License](https://poser.pugx.org/paragonie/constant_time_encoding/license)](https://packagist.org/packages/paragonie/constant_time_encoding)
@@ -36,7 +36,7 @@ composer require paragonie/constant_time_encoding
## How to Use
```php
-use \ParagonIE\ConstantTime\Encoding;
+use ParagonIE\ConstantTime\Encoding;
// possibly (if applicable):
// require 'vendor/autoload.php';
@@ -63,8 +63,8 @@ If you only need a particular variant, you can just reference the
required class like so:
```php
-use \ParagonIE\ConstantTime\Base64;
-use \ParagonIE\ConstantTime\Base32;
+use ParagonIE\ConstantTime\Base64;
+use ParagonIE\ConstantTime\Base32;
$data = random_bytes(32);
echo Base64::encode($data), "\n";
diff --git a/vendor/paragonie/constant_time_encoding/composer.json b/vendor/paragonie/constant_time_encoding/composer.json
index 583fe366f..2fe9717ad 100644
--- a/vendor/paragonie/constant_time_encoding/composer.json
+++ b/vendor/paragonie/constant_time_encoding/composer.json
@@ -47,5 +47,10 @@
"psr-4": {
"ParagonIE\\ConstantTime\\": "src/"
}
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "ParagonIE\\ConstantTime\\Tests\\": "tests/"
+ }
}
}
diff --git a/vendor/paragonie/constant_time_encoding/phpunit.xml.dist b/vendor/paragonie/constant_time_encoding/phpunit.xml.dist
deleted file mode 100644
index 4d090343e..000000000
--- a/vendor/paragonie/constant_time_encoding/phpunit.xml.dist
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnError="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
- <coverage processUncoveredFiles="true">
- <include>
- <directory suffix=".php">./src</directory>
- </include>
- </coverage>
- <testsuites>
- <testsuite name="Constant Time Encoding Test Suite">
- <directory suffix="Test.php">./tests</directory>
- </testsuite>
- </testsuites>
-</phpunit>
diff --git a/vendor/paragonie/constant_time_encoding/psalm.xml b/vendor/paragonie/constant_time_encoding/psalm.xml
deleted file mode 100644
index 0a17264b0..000000000
--- a/vendor/paragonie/constant_time_encoding/psalm.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<psalm
- useDocblockTypes="true"
- totallyTyped="true"
->
- <projectFiles>
- <directory name="src" />
- </projectFiles>
-</psalm>
diff --git a/vendor/paragonie/constant_time_encoding/src/Base32.php b/vendor/paragonie/constant_time_encoding/src/Base32.php
index 7784bafbf..7508b3df6 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base32.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base32.php
@@ -2,8 +2,12 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use InvalidArgumentException;
+use RangeException;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -60,20 +64,20 @@ abstract class Base32 implements EncoderInterface
/**
* Encode into Base32 (RFC 4648)
*
- * @param string $src
+ * @param string $binString
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
- public static function encode(string $src): string
+ public static function encode(string $binString): string
{
- return static::doEncode($src, false, true);
+ return static::doEncode($binString, false, true);
}
/**
* Encode into Base32 (RFC 4648)
*
* @param string $src
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function encodeUnpadded(string $src): string
{
@@ -85,7 +89,7 @@ abstract class Base32 implements EncoderInterface
*
* @param string $src
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function encodeUpper(string $src): string
{
@@ -97,7 +101,7 @@ abstract class Base32 implements EncoderInterface
*
* @param string $src
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function encodeUpperUnpadded(string $src): string
{
@@ -182,6 +186,32 @@ abstract class Base32 implements EncoderInterface
return \pack('C', $src + $diff);
}
+ /**
+ * @param string $encodedString
+ * @param bool $upper
+ * @return string
+ */
+ public static function decodeNoPadding(string $encodedString, bool $upper = false): string
+ {
+ $srcLen = Binary::safeStrlen($encodedString);
+ if ($srcLen === 0) {
+ return '';
+ }
+ if (($srcLen & 7) === 0) {
+ for ($j = 0; $j < 7 && $j < $srcLen; ++$j) {
+ if ($encodedString[$srcLen - $j - 1] === '=') {
+ throw new InvalidArgumentException(
+ "decodeNoPadding() doesn't tolerate padding"
+ );
+ }
+ }
+ }
+ return static::doDecode(
+ $encodedString,
+ $upper,
+ true
+ );
+ }
/**
* Base32 decoding
@@ -190,11 +220,15 @@ abstract class Base32 implements EncoderInterface
* @param bool $upper
* @param bool $strictPadding
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
* @psalm-suppress RedundantCondition
*/
- protected static function doDecode(string $src, bool $upper = false, bool $strictPadding = false): string
- {
+ protected static function doDecode(
+ string $src,
+ bool $upper = false,
+ bool $strictPadding = false
+ ): string {
// We do this to reduce code duplication:
$method = $upper
? 'decode5BitsUpper'
@@ -216,7 +250,7 @@ abstract class Base32 implements EncoderInterface
}
}
if (($srcLen & 7) === 1) {
- throw new \RangeException(
+ throw new RangeException(
'Incorrect padding'
);
}
@@ -287,6 +321,9 @@ abstract class Base32 implements EncoderInterface
(($c4 << 7) | ($c5 << 2) | ($c6 >> 3)) & 0xff
);
$err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5 | $c6) >> 8;
+ if ($strictPadding) {
+ $err |= ($c6 << 5) & 0xff;
+ }
} elseif ($i + 5 < $srcLen) {
/** @var int $c1 */
$c1 = static::$method($chunk[2]);
@@ -324,6 +361,9 @@ abstract class Base32 implements EncoderInterface
(($c3 << 4) | ($c4 >> 1) ) & 0xff
);
$err |= ($c0 | $c1 | $c2 | $c3 | $c4) >> 8;
+ if ($strictPadding) {
+ $err |= ($c4 << 7) & 0xff;
+ }
} elseif ($i + 3 < $srcLen) {
/** @var int $c1 */
$c1 = static::$method($chunk[2]);
@@ -338,6 +378,9 @@ abstract class Base32 implements EncoderInterface
(($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff
);
$err |= ($c0 | $c1 | $c2 | $c3) >> 8;
+ if ($strictPadding) {
+ $err |= ($c3 << 4) & 0xff;
+ }
} elseif ($i + 2 < $srcLen) {
/** @var int $c1 */
$c1 = static::$method($chunk[2]);
@@ -350,6 +393,9 @@ abstract class Base32 implements EncoderInterface
(($c1 << 6) | ($c2 << 1) ) & 0xff
);
$err |= ($c0 | $c1 | $c2) >> 8;
+ if ($strictPadding) {
+ $err |= ($c2 << 6) & 0xff;
+ }
} elseif ($i + 1 < $srcLen) {
/** @var int $c1 */
$c1 = static::$method($chunk[2]);
@@ -359,6 +405,9 @@ abstract class Base32 implements EncoderInterface
(($c0 << 3) | ($c1 >> 2) ) & 0xff
);
$err |= ($c0 | $c1) >> 8;
+ if ($strictPadding) {
+ $err |= ($c1 << 6) & 0xff;
+ }
} else {
$dest .= \pack(
'C',
@@ -367,10 +416,9 @@ abstract class Base32 implements EncoderInterface
$err |= ($c0) >> 8;
}
}
- /** @var bool $check */
$check = ($err === 0);
if (!$check) {
- throw new \RangeException(
+ throw new RangeException(
'Base32::doDecode() only expects characters in the correct base32 alphabet'
);
}
@@ -384,7 +432,7 @@ abstract class Base32 implements EncoderInterface
* @param bool $upper
* @param bool $pad
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
protected static function doEncode(string $src, bool $upper = false, $pad = true): string
{
diff --git a/vendor/paragonie/constant_time_encoding/src/Base32Hex.php b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
index 68fdad52c..b868dd048 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace ParagonIE\ConstantTime;
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/vendor/paragonie/constant_time_encoding/src/Base64.php b/vendor/paragonie/constant_time_encoding/src/Base64.php
index 4739e4895..f5716179f 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base64.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base64.php
@@ -2,8 +2,12 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use InvalidArgumentException;
+use RangeException;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -38,13 +42,14 @@ abstract class Base64 implements EncoderInterface
*
* Base64 character set "[A-Z][a-z][0-9]+/"
*
- * @param string $src
+ * @param string $binString
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
- public static function encode(string $src): string
+ public static function encode(string $binString): string
{
- return static::doEncode($src, true);
+ return static::doEncode($binString, true);
}
/**
@@ -54,7 +59,8 @@ abstract class Base64 implements EncoderInterface
*
* @param string $src
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function encodeUnpadded(string $src): string
{
@@ -65,7 +71,8 @@ abstract class Base64 implements EncoderInterface
* @param string $src
* @param bool $pad Include = padding?
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
protected static function doEncode(string $src, bool $pad = true): string
{
@@ -119,8 +126,9 @@ abstract class Base64 implements EncoderInterface
* @param string $encodedString
* @param bool $strictPadding
* @return string
- * @throws \RangeException
- * @throws \TypeError
+ *
+ * @throws RangeException
+ * @throws TypeError
* @psalm-suppress RedundantCondition
*/
public static function decode(string $encodedString, bool $strictPadding = false): string
@@ -141,12 +149,12 @@ abstract class Base64 implements EncoderInterface
}
}
if (($srcLen & 3) === 1) {
- throw new \RangeException(
+ throw new RangeException(
'Incorrect padding'
);
}
if ($encodedString[$srcLen - 1] === '=') {
- throw new \RangeException(
+ throw new RangeException(
'Incorrect padding'
);
}
@@ -189,6 +197,9 @@ abstract class Base64 implements EncoderInterface
((($c1 << 4) | ($c2 >> 2)) & 0xff)
);
$err |= ($c0 | $c1 | $c2) >> 8;
+ if ($strictPadding) {
+ $err |= ($c2 << 6) & 0xff;
+ }
} elseif ($i + 1 < $srcLen) {
$c1 = static::decode6Bits($chunk[2]);
$dest .= \pack(
@@ -196,14 +207,16 @@ abstract class Base64 implements EncoderInterface
((($c0 << 2) | ($c1 >> 4)) & 0xff)
);
$err |= ($c0 | $c1) >> 8;
- } elseif ($i < $srcLen && $strictPadding) {
+ if ($strictPadding) {
+ $err |= ($c1 << 4) & 0xff;
+ }
+ } elseif ($strictPadding) {
$err |= 1;
}
}
- /** @var bool $check */
$check = ($err === 0);
if (!$check) {
- throw new \RangeException(
+ throw new RangeException(
'Base64::decode() only expects characters in the correct base64 alphabet'
);
}
@@ -211,6 +224,36 @@ abstract class Base64 implements EncoderInterface
}
/**
+ * @param string $encodedString
+ * @return string
+ */
+ public static function decodeNoPadding(string $encodedString): string
+ {
+ $srcLen = Binary::safeStrlen($encodedString);
+ if ($srcLen === 0) {
+ return '';
+ }
+ if (($srcLen & 3) === 0) {
+ if ($encodedString[$srcLen - 1] === '=') {
+ throw new InvalidArgumentException(
+ "decodeNoPadding() doesn't tolerate padding"
+ );
+ }
+ if (($srcLen & 3) > 1) {
+ if ($encodedString[$srcLen - 2] === '=') {
+ throw new InvalidArgumentException(
+ "decodeNoPadding() doesn't tolerate padding"
+ );
+ }
+ }
+ }
+ return static::decode(
+ $encodedString,
+ true
+ );
+ }
+
+ /**
* Uses bitwise operators instead of table-lookups to turn 6-bit integers
* into 8-bit integers.
*
diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
index 8ad2e2bf1..5e98a8f79 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace ParagonIE\ConstantTime;
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
index dd1459e85..9780b14bb 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace ParagonIE\ConstantTime;
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
index 1a4107527..8192c63d5 100644
--- a/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
+++ b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace ParagonIE\ConstantTime;
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/vendor/paragonie/constant_time_encoding/src/Binary.php b/vendor/paragonie/constant_time_encoding/src/Binary.php
index 38dbc4e66..828f3e0f6 100644
--- a/vendor/paragonie/constant_time_encoding/src/Binary.php
+++ b/vendor/paragonie/constant_time_encoding/src/Binary.php
@@ -2,8 +2,10 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -46,6 +48,8 @@ abstract class Binary
public static function safeStrlen(string $str): int
{
if (\function_exists('mb_strlen')) {
+ // mb_strlen in PHP 7.x can return false.
+ /** @psalm-suppress RedundantCast */
return (int) \mb_strlen($str, '8bit');
} else {
return \strlen($str);
@@ -60,9 +64,10 @@ abstract class Binary
* @staticvar boolean $exists
* @param string $str
* @param int $start
- * @param int $length
+ * @param ?int $length
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function safeSubstr(
string $str,
diff --git a/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
index 7aeee55a8..9cafbf96c 100644
--- a/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
+++ b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace ParagonIE\ConstantTime;
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/vendor/paragonie/constant_time_encoding/src/Encoding.php b/vendor/paragonie/constant_time_encoding/src/Encoding.php
index 896a66841..8649f31fc 100644
--- a/vendor/paragonie/constant_time_encoding/src/Encoding.php
+++ b/vendor/paragonie/constant_time_encoding/src/Encoding.php
@@ -2,8 +2,10 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -36,7 +38,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32Encode(string $str): string
{
@@ -48,7 +50,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32EncodeUpper(string $str): string
{
@@ -60,7 +62,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32Decode(string $str): string
{
@@ -72,7 +74,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32DecodeUpper(string $str): string
{
@@ -84,7 +86,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32HexEncode(string $str): string
{
@@ -96,7 +98,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32HexEncodeUpper(string $str): string
{
@@ -108,7 +110,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32HexDecode(string $str): string
{
@@ -120,7 +122,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base32HexDecodeUpper(string $str): string
{
@@ -132,7 +134,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64Encode(string $str): string
{
@@ -144,7 +146,7 @@ abstract class Encoding
*
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64Decode(string $str): string
{
@@ -157,7 +159,7 @@ abstract class Encoding
* Base64 character set "./[A-Z][a-z][0-9]"
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64EncodeDotSlash(string $str): string
{
@@ -172,7 +174,7 @@ abstract class Encoding
* @param string $str
* @return string
* @throws \RangeException
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64DecodeDotSlash(string $str): string
{
@@ -185,7 +187,7 @@ abstract class Encoding
* Base64 character set "[.-9][A-Z][a-z]" or "./[0-9][A-Z][a-z]"
* @param string $str
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64EncodeDotSlashOrdered(string $str): string
{
@@ -200,7 +202,7 @@ abstract class Encoding
* @param string $str
* @return string
* @throws \RangeException
- * @throws \TypeError
+ * @throws TypeError
*/
public static function base64DecodeDotSlashOrdered(string $str): string
{
@@ -213,7 +215,7 @@ abstract class Encoding
*
* @param string $bin_string (raw binary)
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function hexEncode(string $bin_string): string
{
@@ -239,7 +241,7 @@ abstract class Encoding
*
* @param string $bin_string (raw binary)
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function hexEncodeUpper(string $bin_string): string
{
diff --git a/vendor/paragonie/constant_time_encoding/src/Hex.php b/vendor/paragonie/constant_time_encoding/src/Hex.php
index b1b05a098..a9e058cd3 100644
--- a/vendor/paragonie/constant_time_encoding/src/Hex.php
+++ b/vendor/paragonie/constant_time_encoding/src/Hex.php
@@ -2,8 +2,11 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use RangeException;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -37,22 +40,19 @@ abstract class Hex implements EncoderInterface
*
* @param string $binString (raw binary)
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function encode(string $binString): string
{
- /** @var string $hex */
$hex = '';
$len = Binary::safeStrlen($binString);
for ($i = 0; $i < $len; ++$i) {
/** @var array<int, int> $chunk */
- $chunk = \unpack('C', Binary::safeSubstr($binString, $i, 1));
- /** @var int $c */
+ $chunk = \unpack('C', $binString[$i]);
$c = $chunk[1] & 0xf;
- /** @var int $b */
$b = $chunk[1] >> 4;
- $hex .= pack(
+ $hex .= \pack(
'CC',
(87 + $b + ((($b - 10) >> 8) & ~38)),
(87 + $c + ((($c - 10) >> 8) & ~38))
@@ -67,24 +67,20 @@ abstract class Hex implements EncoderInterface
*
* @param string $binString (raw binary)
* @return string
- * @throws \TypeError
+ * @throws TypeError
*/
public static function encodeUpper(string $binString): string
{
- /** @var string $hex */
$hex = '';
- /** @var int $len */
$len = Binary::safeStrlen($binString);
for ($i = 0; $i < $len; ++$i) {
/** @var array<int, int> $chunk */
- $chunk = \unpack('C', Binary::safeSubstr($binString, $i, 2));
- /** @var int $c */
+ $chunk = \unpack('C', $binString[$i]);
$c = $chunk[1] & 0xf;
- /** @var int $b */
$b = $chunk[1] >> 4;
- $hex .= pack(
+ $hex .= \pack(
'CC',
(55 + $b + ((($b - 10) >> 8) & ~6)),
(55 + $c + ((($c - 10) >> 8) & ~6))
@@ -100,23 +96,20 @@ abstract class Hex implements EncoderInterface
* @param string $encodedString
* @param bool $strictPadding
* @return string (raw binary)
- * @throws \RangeException
+ * @throws RangeException
*/
- public static function decode(string $encodedString, bool $strictPadding = false): string
- {
- /** @var int $hex_pos */
+ public static function decode(
+ string $encodedString,
+ bool $strictPadding = false
+ ): string {
$hex_pos = 0;
- /** @var string $bin */
$bin = '';
- /** @var int $c_acc */
$c_acc = 0;
- /** @var int $hex_len */
$hex_len = Binary::safeStrlen($encodedString);
- /** @var int $state */
$state = 0;
if (($hex_len & 1) !== 0) {
if ($strictPadding) {
- throw new \RangeException(
+ throw new RangeException(
'Expected an even number of hexadecimal characters'
);
} else {
@@ -129,23 +122,17 @@ abstract class Hex implements EncoderInterface
$chunk = \unpack('C*', $encodedString);
while ($hex_pos < $hex_len) {
++$hex_pos;
- /** @var int $c */
$c = $chunk[$hex_pos];
- /** @var int $c_num */
$c_num = $c ^ 48;
- /** @var int $c_num0 */
$c_num0 = ($c_num - 10) >> 8;
- /** @var int $c_alpha */
$c_alpha = ($c & ~32) - 55;
- /** @var int $c_alpha0 */
$c_alpha0 = (($c_alpha - 10) ^ ($c_alpha - 16)) >> 8;
if (($c_num0 | $c_alpha0) === 0) {
- throw new \RangeException(
+ throw new RangeException(
'Expected hexadecimal character'
);
}
- /** @var int $c_val */
$c_val = ($c_num0 & $c_num) | ($c_alpha & $c_alpha0);
if ($state === 0) {
$c_acc = $c_val * 16;
diff --git a/vendor/paragonie/constant_time_encoding/src/RFC4648.php b/vendor/paragonie/constant_time_encoding/src/RFC4648.php
index 492cad00e..f124d65bf 100644
--- a/vendor/paragonie/constant_time_encoding/src/RFC4648.php
+++ b/vendor/paragonie/constant_time_encoding/src/RFC4648.php
@@ -2,8 +2,10 @@
declare(strict_types=1);
namespace ParagonIE\ConstantTime;
+use TypeError;
+
/**
- * Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
+ * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -41,7 +43,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base64Encode(string $str): string
{
@@ -55,7 +58,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base64Decode(string $str): string
{
@@ -69,7 +73,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base64UrlSafeEncode(string $str): string
{
@@ -83,7 +88,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base64UrlSafeDecode(string $str): string
{
@@ -97,7 +103,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base32Encode(string $str): string
{
@@ -111,7 +118,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base32Decode(string $str): string
{
@@ -125,7 +133,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base32HexEncode(string $str): string
{
@@ -139,7 +148,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base32HexDecode(string $str): string
{
@@ -153,7 +163,8 @@ abstract class RFC4648
*
* @param string $str
* @return string
- * @throws \TypeError
+ *
+ * @throws TypeError
*/
public static function base16Encode(string $str): string
{
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php b/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php
deleted file mode 100644
index ed19f336f..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base32Hex;
-
-class Base32HexTest extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base32Hex::encode()
- * @covers Base32Hex::decode()
- * @covers Base32Hex::encodeUpper()
- * @covers Base32Hex::decodeUpper()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base32Hex::encode($random);
- $this->assertSame(
- $random,
- Base32Hex::decode($enc)
- );
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $unpadded,
- Base32Hex::encodeUnpadded($random)
- );
- $this->assertSame(
- $random,
- Base32Hex::decode($unpadded)
- );
-
- $enc = Base32Hex::encodeUpper($random);
- $this->assertSame(
- $random,
- Base32Hex::decodeUpper($enc)
- ); $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $unpadded,
- Base32Hex::encodeUpperUnpadded($random)
- );
- $this->assertSame(
- $random,
- Base32Hex::decodeUpper($unpadded)
- );
- }
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base32Test.php b/vendor/paragonie/constant_time_encoding/tests/Base32Test.php
deleted file mode 100644
index 65e8e7c56..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base32Test.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base32;
-
-class Base32Test extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base32::encode()
- * @covers Base32::decode()
- * @covers Base32::encodeUpper()
- * @covers Base32::decodeUpper()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base32::encode($random);
- $this->assertSame(
- $random,
- Base32::decode($enc)
- );
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $unpadded,
- Base32::encodeUnpadded($random)
- );
- $this->assertSame(
- $random,
- Base32::decode($unpadded)
- );
-
- $enc = Base32::encodeUpper($random);
- $this->assertSame(
- $random,
- Base32::decodeUpper($enc)
- );
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $unpadded,
- Base32::encodeUpperUnpadded($random)
- );
- $this->assertSame(
- $random,
- Base32::decodeUpper($unpadded)
- );
- }
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php
deleted file mode 100644
index f7dc828b1..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base64DotSlashOrdered;
-
-class Base64DotSlashOrderedTest extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base64DotSlashOrdered::encode()
- * @covers Base64DotSlashOrdered::decode()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base64DotSlashOrdered::encode($random);
- $this->assertSame(
- $random,
- Base64DotSlashOrdered::decode($enc)
- );
-
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $random,
- Base64DotSlashOrdered::decode($unpadded)
- );
- $this->assertSame(
- $random,
- Base64DotSlashOrdered::decode($unpadded)
- );
- }
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php
deleted file mode 100644
index 257a3d549..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base64DotSlash;
-
-class Base64DotSlashTest extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base64DotSlash::encode()
- * @covers Base64DotSlash::decode()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base64DotSlash::encode($random);
- $this->assertSame(
- $random,
- Base64DotSlash::decode($enc)
- );
-
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $random,
- Base64DotSlash::decode($unpadded)
- );
- $this->assertSame(
- $random,
- Base64DotSlash::decode($unpadded)
- );
- }
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64Test.php b/vendor/paragonie/constant_time_encoding/tests/Base64Test.php
deleted file mode 100644
index 16ab47da0..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base64Test.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base64;
-
-class Base64Test extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base64::encode()
- * @covers Base64::decode()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base64::encode($random);
- $this->assertSame(
- $random,
- Base64::decode($enc)
- );
- $this->assertSame(
- \base64_encode($random),
- $enc
- );
-
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $random,
- Base64::decode($unpadded)
- );
- $this->assertSame(
- $random,
- Base64::decode($unpadded)
- );
- }
- }
- $str = 'MIIFzzCCBLegAwIBAgIDAfdlMA0GCSqGSIb3DQEBBQUAMHMxCzAJBgNVBAYTAlBM' .
- 'MSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMSQwIgYDVQQ' .
- 'DDBtDT1BFIFNaQUZJUiAtIEt3YWxpZmlrb3dhbnkxFDASBgNVBAUTC05yIHdwaXN1Oi' .
- 'A2MB4XDTExMTEwOTA2MDAwMFoXDTEzMTEwOTA2MDAwMFowgdkxCzAJBgNVBAYTAlBMM' .
- 'RwwGgYDVQQKDBNVcnrEhWQgTWlhc3RhIEdkeW5pMRswGQYDVQQFExJQRVNFTDogNjEw' .
- 'NjA2MDMxMTgxGTAXBgNVBAMMEEplcnp5IFByemV3b3Jza2kxTzBNBgNVBBAwRgwiQWw' .
- 'uIE1hcnN6YcWCa2EgUGnFgnN1ZHNraWVnbyA1Mi81NAwNODEtMzgyIEdkeW5pYQwGUG' .
- '9sc2thDAlwb21vcnNraWUxDjAMBgNVBCoMBUplcnp5MRMwEQYDVQQEDApQcnpld29yc' .
- '2tpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMm5vjGqHPthJCMqKpqssSISRo' .
- 's0PYDTcEQzyyurfX67EJWKtZj6HNwuDMEGJ02iBNZfjUl7r8dIi28bSKhNlsfycXZKY' .
- 'RcIjp0+r5RqtR2auo9GQ6veKb61DEAGIqaR+uLLcJVTHCu0w9oXLGbRlGth5eNoj03C' .
- 'xXVAH2IfhbNwIDAQABo4IChzCCAoMwDAYDVR0TAQH/BAIwADCCAUgGA1UdIAEB/wSCA' .
- 'TwwggE4MIIBNAYJKoRoAYb3IwEBMIIBJTCB3QYIKwYBBQUHAgIwgdAMgc1EZWtsYXJh' .
- 'Y2phIHRhIGplc3Qgb8Wbd2lhZGN6ZW5pZW0gd3lkYXdjeSwgxbxlIHRlbiBjZXJ0eWZ' .
- 'pa2F0IHpvc3RhxYIgd3lkYW55IGpha28gY2VydHlmaWthdCBrd2FsaWZpa293YW55IH' .
- 'pnb2RuaWUgeiB3eW1hZ2FuaWFtaSB1c3Rhd3kgbyBwb2RwaXNpZSBlbGVrdHJvbmlje' .
- 'm55bSBvcmF6IHRvd2FyenlzesSFY3ltaSBqZWogcm96cG9yesSFZHplbmlhbWkuMEMG' .
- 'CCsGAQUFBwIBFjdodHRwOi8vd3d3Lmtpci5jb20ucGwvY2VydHlmaWthY2phX2tsdWN' .
- '6eS9wb2xpdHlrYS5odG1sMAkGA1UdCQQCMAAwIQYDVR0RBBowGIEWai5wcnpld29yc2' .
- 'tpQGdkeW5pYS5wbDAOBgNVHQ8BAf8EBAMCBkAwgZ4GA1UdIwSBljCBk4AU3TGldJXip' .
- 'N4oGS3ZYmnBDMFs8gKhd6R1MHMxCzAJBgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dh' .
- 'IEl6YmEgUm96bGljemVuaW93YSBTLkEuMSQwIgYDVQQDDBtDT1BFIFNaQUZJUiAtIEt' .
- '3YWxpZmlrb3dhbnkxFDASBgNVBAUTC05yIHdwaXN1OiA2ggJb9jBIBgNVHR8EQTA/MD' .
- '2gO6A5hjdodHRwOi8vd3d3Lmtpci5jb20ucGwvY2VydHlmaWthY2phX2tsdWN6eS9DU' .
- 'kxfT1pLMzIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQBYPIqnAreyeql7/opJjcar/qWZ' .
- 'y9ruhB2q0lZFsJOhwgMnbQXzp/4vv93YJqcHGAXdHP6EO8FQX47mjo2ZKQmi+cIHJHL' .
- 'ONdX/3Im+M17V0iNAh7Z1lOSfTRT+iiwe/F8phcEaD5q2RmvYusR7zXZq/cLL0If0hX' .
- 'oPZ/EHQxjN8pxzxiUx6bJAgturnIMEfRNesxwghdr1dkUjOhGLf3kHVzgM6j3VAM7oF' .
- 'mMUb5y5s96Bzl10DodWitjOEH0vvnIcsppSxH1C1dCAi0o9f/1y2XuLNhBNHMAyTqpY' .
- 'PX8Yvav1c+Z50OMaSXHAnTa20zv8UtiHbaAhwlifCelUMj93S';
-
- try {
- Base64::decode($str, true);
- $this->fail('Strict padding not enforced');
- } catch (\Exception $ex) {
-
- $this->assertSame(
- Base64::decode($str),
- \base64_decode($str)
- );
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php b/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php
deleted file mode 100644
index 136ed611c..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-use ParagonIE\ConstantTime\Base64UrlSafe;
-use ParagonIE\ConstantTime\Binary;
-
-/**
- * Class Base64UrlSafeTest
- */
-class Base64UrlSafeTest extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Base64UrlSafe::encode()
- * @covers Base64UrlSafe::decode()
- *
- * @throws Exception
- * @throws TypeError
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Base64UrlSafe::encode($random);
- $this->assertSame(
- $random,
- Base64UrlSafe::decode($enc)
- );
- $this->assertSame(
- \strtr(\base64_encode($random), '+/', '-_'),
- $enc
- );
-
- $unpadded = \rtrim($enc, '=');
- $this->assertSame(
- $unpadded,
- Base64UrlSafe::encodeUnpadded($random)
- );
- $this->assertSame(
- $random,
- Base64UrlSafe::decode($unpadded)
- );
- }
- }
-
- $random = \random_bytes(1 << 20);
- $enc = Base64UrlSafe::encode($random);
- $this->assertTrue(Binary::safeStrlen($enc) > 65536);
- $this->assertSame(
- $random,
- Base64UrlSafe::decode($enc)
- );
- $this->assertSame(
- \strtr(\base64_encode($random), '+/', '-_'),
- $enc
- );
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php b/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php
deleted file mode 100644
index 6f774d8c0..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php
+++ /dev/null
@@ -1,307 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base32;
-use \ParagonIE\ConstantTime\Base32Hex;
-use \ParagonIE\ConstantTime\Base64;
-use \ParagonIE\ConstantTime\Base64DotSlash;
-use \ParagonIE\ConstantTime\Base64DotSlashOrdered;
-use \ParagonIE\ConstantTime\Base64UrlSafe;
-use \ParagonIE\ConstantTime\Encoding;
-use \ParagonIE\ConstantTime\Hex;
-
-class EncodingTest extends PHPUnit\Framework\TestCase
-{
- public function testBase32Encode()
- {
- $this->assertSame(
- Encoding::base32Encode("\x00"),
- 'aa======'
- );
- $this->assertSame(
- Encoding::base32Encode("\x00\x00"),
- 'aaaa===='
- );
- $this->assertSame(
- Encoding::base32Encode("\x00\x00\x00"),
- 'aaaaa==='
- );
- $this->assertSame(
- Encoding::base32Encode("\x00\x00\x00\x00"),
- 'aaaaaaa='
- );
- $this->assertSame(
- Encoding::base32Encode("\x00\x00\x00\x00\x00"),
- 'aaaaaaaa'
- );
- $this->assertSame(
- Encoding::base32Encode("\x00\x00\x0F\xFF\xFF"),
- 'aaaa7777'
- );
- $this->assertSame(
- Encoding::base32Encode("\xFF\xFF\xF0\x00\x00"),
- '7777aaaa'
- );
-
- $this->assertSame(
- Encoding::base32Encode("\xce\x73\x9c\xe7\x39"),
- 'zzzzzzzz'
- );
- $this->assertSame(
- Encoding::base32Encode("\xd6\xb5\xad\x6b\x5a"),
- '22222222'
- );
- $this->assertSame(
- Base32::encodeUpper("\x00"),
- 'AA======'
- );
- $this->assertSame(
- Base32::encodeUpper("\x00\x00"),
- 'AAAA===='
- );
- $this->assertSame(
- Base32::encodeUpper("\x00\x00\x00"),
- 'AAAAA==='
- );
- $this->assertSame(
- Base32::encodeUpper("\x00\x00\x00\x00"),
- 'AAAAAAA='
- );
- $this->assertSame(
- Base32::encodeUpper("\x00\x00\x00\x00\x00"),
- 'AAAAAAAA'
- );
- $this->assertSame(
- Base32::encodeUpper("\x00\x00\x0F\xFF\xFF"),
- 'AAAA7777'
- );
- $this->assertSame(
- Base32::encodeUpper("\xFF\xFF\xF0\x00\x00"),
- '7777AAAA'
- );
-
- $this->assertSame(
- Base32::encodeUpper("\xce\x73\x9c\xe7\x39"),
- 'ZZZZZZZZ'
- );
- $this->assertSame(
- Base32::encodeUpper("\xd6\xb5\xad\x6b\x5a"),
- '22222222'
- );
- }
-
- public function testBase32Hex()
- {
- $this->assertSame(
- Base32Hex::encode("\x00"),
- '00======'
- );
- $this->assertSame(
- Base32Hex::encode("\x00\x00"),
- '0000===='
- );
- $this->assertSame(
- Base32Hex::encode("\x00\x00\x00"),
- '00000==='
- );
- $this->assertSame(
- Base32Hex::encode("\x00\x00\x00\x00"),
- '0000000='
- );
- $this->assertSame(
- Base32Hex::encode("\x00\x00\x00\x00\x00"),
- '00000000'
- );
- $this->assertSame(
- Base32Hex::encode("\x00\x00\x0F\xFF\xFF"),
- '0000vvvv'
- );
- $this->assertSame(
- Base32Hex::encode("\xFF\xFF\xF0\x00\x00"),
- 'vvvv0000'
- );
-
-
- }
-
- /**
- * Based on test vectors from RFC 4648
- */
- public function testBase32Decode()
- {
- $this->assertSame(
- "\x00\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaaaa======')
- );
- $this->assertSame(
- "\x00\x00\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaaaaaa====')
- );
- $this->assertSame(
- "\x00\x00\x00\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaaaaaaa===')
- );
- $this->assertSame(
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaaaaaaaaa=')
- );
- $this->assertSame(
- "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaaaaaaaaaa')
- );
- $this->assertSame(
- "\x00",
- Encoding::base32Decode('aa======')
- );
- $this->assertSame(
- "\x00\x00",
- Encoding::base32Decode('aaaa====')
- );
- $this->assertSame(
- "\x00\x00\x00",
- Encoding::base32Decode('aaaaa===')
- );
- $this->assertSame(
- "\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaa=')
- );
- $this->assertSame(
- "\x00\x00\x00\x00\x00",
- Encoding::base32Decode('aaaaaaaa')
- );
- $this->assertSame(
- "\x00\x00\x0F\xFF\xFF",
- Encoding::base32Decode('aaaa7777')
- );
- $this->assertSame(
- "\xFF\xFF\xF0\x00\x00",
- Encoding::base32Decode('7777aaaa')
- );
- $this->assertSame(
- "\xce\x73\x9c\xe7\x39",
- Encoding::base32Decode('zzzzzzzz')
- );
- $this->assertSame(
- "\xd6\xb5\xad\x6b\x5a",
- Encoding::base32Decode('22222222')
- );
- $this->assertSame(
- 'foobar',
- Encoding::base32Decode('mzxw6ytboi======')
- );
-
- $rand = random_bytes(9);
- $enc = Encoding::base32Encode($rand);
-
- $this->assertSame(
- Encoding::base32Encode($rand),
- Encoding::base32Encode(Encoding::base32Decode($enc))
- );
- $this->assertSame(
- $rand,
- Encoding::base32Decode($enc)
- );
- }
-
- /**
- * @covers Encoding::hexDecode()
- * @covers Encoding::hexEncode()
- * @covers Encoding::base32Decode()
- * @covers Encoding::base32Encode()
- * @covers Encoding::base64Decode()
- * @covers Encoding::base64Encode()
- * @covers Encoding::base64DotSlashDecode()
- * @covers Encoding::base64DotSlashEncode()
- * @covers Encoding::base64DotSlashOrderedDecode()
- * @covers Encoding::base64DotSlashOrderedEncode()
- */
- public function testBasicEncoding()
- {
- // Re-run the test at least 3 times for each length
- for ($j = 0; $j < 3; ++$j) {
- for ($i = 1; $i < 84; ++$i) {
- $rand = random_bytes($i);
- $enc = Encoding::hexEncode($rand);
- $this->assertSame(
- \bin2hex($rand),
- $enc,
- "Hex Encoding - Length: " . $i
- );
- $this->assertSame(
- $rand,
- Encoding::hexDecode($enc),
- "Hex Encoding - Length: " . $i
- );
-
- // Uppercase variant:
- $enc = Hex::encodeUpper($rand);
- $this->assertSame(
- \strtoupper(\bin2hex($rand)),
- $enc,
- "Hex Encoding - Length: " . $i
- );
- $this->assertSame(
- $rand,
- Hex::decode($enc),
- "HexUpper Encoding - Length: " . $i
- );
-
- $enc = Encoding::base32Encode($rand);
- $this->assertSame(
- $rand,
- Encoding::base32Decode($enc),
- "Base32 Encoding - Length: " . $i
- );
-
- $enc = Encoding::base32EncodeUpper($rand);
- $this->assertSame(
- $rand,
- Encoding::base32DecodeUpper($enc),
- "Base32Upper Encoding - Length: " . $i
- );
-
- $enc = Encoding::base32HexEncode($rand);
- $this->assertSame(
- bin2hex($rand),
- bin2hex(Encoding::base32HexDecode($enc)),
- "Base32Hex Encoding - Length: " . $i
- );
-
- $enc = Encoding::base32HexEncodeUpper($rand);
- $this->assertSame(
- bin2hex($rand),
- bin2hex(Encoding::base32HexDecodeUpper($enc)),
- "Base32HexUpper Encoding - Length: " . $i
- );
-
- $enc = Encoding::base64Encode($rand);
- $this->assertSame(
- $rand,
- Encoding::base64Decode($enc),
- "Base64 Encoding - Length: " . $i
- );
-
- $enc = Encoding::base64EncodeDotSlash($rand);
- $this->assertSame(
- $rand,
- Encoding::base64DecodeDotSlash($enc),
- "Base64 DotSlash Encoding - Length: " . $i
- );
- $enc = Encoding::base64EncodeDotSlashOrdered($rand);
- $this->assertSame(
- $rand,
- Encoding::base64DecodeDotSlashOrdered($enc),
- "Base64 Ordered DotSlash Encoding - Length: " . $i
- );
-
- $enc = Base64UrlSafe::encode($rand);
- $this->assertSame(
- \strtr(\base64_encode($rand), '+/', '-_'),
- $enc
- );
- $this->assertSame(
- $rand,
- Base64UrlSafe::decode($enc)
- );
- }
- }
- }
-} \ No newline at end of file
diff --git a/vendor/paragonie/constant_time_encoding/tests/HexTest.php b/vendor/paragonie/constant_time_encoding/tests/HexTest.php
deleted file mode 100644
index 5c31f6d15..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/HexTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Hex;
-
-class HexTest extends PHPUnit\Framework\TestCase
-{
- /**
- * @covers Hex::encode()
- * @covers Hex::decode()
- * @covers Hex::encodeUpper()
- */
- public function testRandom()
- {
- for ($i = 1; $i < 32; ++$i) {
- for ($j = 0; $j < 50; ++$j) {
- $random = \random_bytes($i);
-
- $enc = Hex::encode($random);
- $this->assertSame(
- $random,
- Hex::decode($enc)
- );
- $this->assertSame(
- \bin2hex($random),
- $enc
- );
-
- $enc = Hex::encodeUpper($random);
- $this->assertSame(
- $random,
- Hex::decode($enc)
- );
- $this->assertSame(
- \strtoupper(\bin2hex($random)),
- $enc
- );
- }
- }
- }
-}
diff --git a/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php b/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php
deleted file mode 100644
index a6653de88..000000000
--- a/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-use \ParagonIE\ConstantTime\Base32;
-use \ParagonIE\ConstantTime\Base32Hex;
-use \ParagonIE\ConstantTime\Base64;
-use \ParagonIE\ConstantTime\Base64DotSlash;
-use \ParagonIE\ConstantTime\Base64DotSlashOrdered;
-use \ParagonIE\ConstantTime\Encoding;
-use \ParagonIE\ConstantTime\Hex;
-
-/**
- * Class RFC4648Test
- *
- * @ref https://tools.ietf.org/html/rfc4648#section-10
- */
-class RFC4648Test extends PHPUnit\Framework\TestCase
-{
- public function testVectorBase64()
- {
- $this->assertSame(Base64::encode(''), '');
- $this->assertSame(Base64::encode('f'), 'Zg==');
- $this->assertSame(Base64::encode('fo'), 'Zm8=');
- $this->assertSame(Base64::encode('foo'), 'Zm9v');
- $this->assertSame(Base64::encode('foob'), 'Zm9vYg==');
- $this->assertSame(Base64::encode('fooba'), 'Zm9vYmE=');
- $this->assertSame(Base64::encode('foobar'), 'Zm9vYmFy');
- }
-
- public function testVectorBase32()
- {
- $this->assertSame(Base32::encode(''), '');
- $this->assertSame(Base32::encode('f'), 'my======');
- $this->assertSame(Base32::encode('fo'), 'mzxq====');
- $this->assertSame(Base32::encode('foo'), 'mzxw6===');
- $this->assertSame(Base32::encode('foob'), 'mzxw6yq=');
- $this->assertSame(Base32::encode('fooba'), 'mzxw6ytb');
- $this->assertSame(Base32::encode('foobar'), 'mzxw6ytboi======');
-
- $this->assertSame(Base32::encodeUpper(''), '');
- $this->assertSame(Base32::encodeUpper('f'), 'MY======');
- $this->assertSame(Base32::encodeUpper('fo'), 'MZXQ====');
- $this->assertSame(Base32::encodeUpper('foo'), 'MZXW6===');
- $this->assertSame(Base32::encodeUpper('foob'), 'MZXW6YQ=');
- $this->assertSame(Base32::encodeUpper('fooba'), 'MZXW6YTB');
- $this->assertSame(Base32::encodeUpper('foobar'), 'MZXW6YTBOI======');
- }
-
- public function testVectorBase32Hex()
- {
- $this->assertSame(Base32Hex::encode(''), '');
- $this->assertSame(Base32Hex::encode('f'), 'co======');
- $this->assertSame(Base32Hex::encode('fo'), 'cpng====');
- $this->assertSame(Base32Hex::encode('foo'), 'cpnmu===');
- $this->assertSame(Base32Hex::encode('foob'), 'cpnmuog=');
- $this->assertSame(Base32Hex::encode('fooba'), 'cpnmuoj1');
- $this->assertSame(Base32Hex::encode('foobar'), 'cpnmuoj1e8======');
-
- $this->assertSame(Base32Hex::encodeUpper(''), '');
- $this->assertSame(Base32Hex::encodeUpper('f'), 'CO======');
- $this->assertSame(Base32Hex::encodeUpper('fo'), 'CPNG====');
- $this->assertSame(Base32Hex::encodeUpper('foo'), 'CPNMU===');
- $this->assertSame(Base32Hex::encodeUpper('foob'), 'CPNMUOG=');
- $this->assertSame(Base32Hex::encodeUpper('fooba'), 'CPNMUOJ1');
- $this->assertSame(Base32Hex::encodeUpper('foobar'), 'CPNMUOJ1E8======');
- }
-
- public function testVectorBase16()
- {
- $this->assertSame(Hex::encode(''), '');
- $this->assertSame(Hex::encode('f'), '66');
- $this->assertSame(Hex::encode('fo'), '666f');
- $this->assertSame(Hex::encode('foo'), '666f6f');
- $this->assertSame(Hex::encode('foob'), '666f6f62');
- $this->assertSame(Hex::encode('fooba'), '666f6f6261');
- $this->assertSame(Hex::encode('foobar'), '666f6f626172');
-
- $this->assertSame(Hex::encodeUpper(''), '');
- $this->assertSame(Hex::encodeUpper('f'), '66');
- $this->assertSame(Hex::encodeUpper('fo'), '666F');
- $this->assertSame(Hex::encodeUpper('foo'), '666F6F');
- $this->assertSame(Hex::encodeUpper('foob'), '666F6F62');
- $this->assertSame(Hex::encodeUpper('fooba'), '666F6F6261');
- $this->assertSame(Hex::encodeUpper('foobar'), '666F6F626172');
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/TypeResolver.php b/vendor/phpdocumentor/type-resolver/src/TypeResolver.php
index 0c9a73cb3..ca360266d 100644
--- a/vendor/phpdocumentor/type-resolver/src/TypeResolver.php
+++ b/vendor/phpdocumentor/type-resolver/src/TypeResolver.php
@@ -550,7 +550,7 @@ final class TypeResolver
);
}
- if (!$minValue || !$maxValue || $tokenCounter > 4) {
+ if ($minValue === null || $maxValue === null || $tokenCounter > 4) {
throw new RuntimeException(
'int<min,max> has not the correct format'
);
diff --git a/vendor/phpstan/phpstan/README.md b/vendor/phpstan/phpstan/README.md
index e4953b4a4..a1e47fdb9 100644
--- a/vendor/phpstan/phpstan/README.md
+++ b/vendor/phpstan/phpstan/README.md
@@ -5,7 +5,7 @@
</p>
<p align="center">
- <a href="https://github.com/phpstan/phpstan/actions"><img src="https://github.com/phpstan/phpstan/workflows/Build/badge.svg" alt="Build Status"></a>
+ <a href="https://github.com/phpstan/phpstan/actions"><img src="https://github.com/phpstan/phpstan/workflows/Tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/phpstan/phpstan"><img src="https://poser.pugx.org/phpstan/phpstan/v/stable" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/phpstan/phpstan/stats"><img src="https://poser.pugx.org/phpstan/phpstan/downloads" alt="Total Downloads"></a>
<a href="https://choosealicense.com/licenses/mit/"><img src="https://poser.pugx.org/phpstan/phpstan/license" alt="License"></a>
@@ -26,13 +26,13 @@ can be checked before you run the actual line.
<a href="https://coders.thecodingmachine.com/phpstan"><img src="https://i.imgur.com/kQhNOTP.png" alt="TheCodingMachine" width="247" height="64"></a>
&nbsp;&nbsp;&nbsp;
-<a href="https://packagist.com/?utm_source=phpstan&utm_medium=readme&utm_campaign=sponsorlogo"><img src="https://i.imgur.com/PmMC45f.png" alt="Private Packagist" width="326" height="64"></a>
+<a href="https://packagist.com/?utm_source=phpstan&utm_medium=readme&utm_campaign=sponsorlogo"><img src="https://i.imgur.com/B2T63Do.png" alt="Private Packagist" width="283" height="64"></a>
<br>
<a href="https://careers.tuigroup.com/jobs/"><img src="https://i.imgur.com/uw5rAlR.png" alt="Musement" width="247" height="49"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://blackfire.io/docs/introduction?utm_source=phpstan&utm_medium=github_readme&utm_campaign=logo"><img src="https://i.imgur.com/zR8rsqk.png" alt="Blackfire.io" width="254" height="64"></a>
<br>
-<a href="https://www.intracto.com/"><img src="https://i.imgur.com/XRCDGZi.png" alt="Intracto" width="254" height="65"></a>
+<a href="https://www.iodigital.com/"><img src="https://i.imgur.com/fJlw1n9.png" alt="iO" width="254" height="65"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://jobs.ticketswap.com/"><img src="https://i.imgur.com/lhzcutK.png" alt="TicketSwap" width="269" height="64"></a>
<br>
@@ -40,9 +40,9 @@ can be checked before you run the actual line.
&nbsp;&nbsp;&nbsp;
<a href="https://togetter.com/"><img src="https://i.imgur.com/x9n5cj3.png" alt="Togetter" width="283" height="64"></a>
<br>
-<a href="https://join.rightcapital.com/?utm_source=phpstan&utm_medium=github&utm_campaign=sponsorship"><img src="https://i.imgur.com/EuIgI08.png" alt="RightCapital" width="283" height="64"></a>
+<a href="https://join.rightcapital.com/?utm_source=phpstan&utm_medium=github&utm_campaign=sponsorship"><img src="https://i.imgur.com/1AhB5tW.png" alt="RightCapital" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
-<a href="https://www.contentkingapp.com/?ref=php-developer&utm_source=phpstan&utm_medium=referral&utm_campaign=sponsorship"><img src="https://i.imgur.com/0blm7ki.png" alt="ContentKing" width="283" height="64"></a>
+<a href="https://www.contentkingapp.com/?ref=php-developer&utm_source=phpstan&utm_medium=referral&utm_campaign=sponsorship"><img src="https://i.imgur.com/HHhbPGN.png" alt="ContentKing" width="283" height="64"></a>
<br>
<a href="https://zol.fr?utm_source=phpstan"><img src="https://i.imgur.com/dzDgd4s.png" alt="ZOL" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
@@ -53,6 +53,14 @@ can be checked before you run the actual line.
<a href="https://craftcms.com/"><img src="https://i.imgur.com/xJWThke.png" alt="Craft CMS" width="283" height="64"></a>
<br>
<a href="https://www.worksome.com/"><img src="https://i.imgur.com/TQKSwOl.png" alt="Worksome" width="283" height="64"></a>
+&nbsp;&nbsp;&nbsp;
+<a href="https://www.campoint.net/"><img src="https://i.imgur.com/fR6eMUm.png" alt="campoint AG" width="283" height="64"></a>
+<br>
+<a href="https://www.crisp.nl/"><img src="https://i.imgur.com/jRJyPve.png" alt="Crisp.nl" width="283" height="64"></a>
+&nbsp;&nbsp;&nbsp;
+<a href="https://inviqa.com/"><img src="https://i.imgur.com/G99rj45.png" alt="Inviqa" width="254" height="65"></a>
+<br>
+<a href="https://www.psyonix.com/"><img src="https://i.imgur.com/p8svxQZ.png" alt="Psyonix" width="254" height="65"></a>
[**You can now sponsor my open-source work on PHPStan through GitHub Sponsors.**](https://github.com/sponsors/ondrejmirtes)
@@ -69,6 +77,7 @@ All the documentation lives on the [phpstan.org website](https://phpstan.org/):
* [PHPDocs Basics](https://phpstan.org/writing-php-code/phpdocs-basics) & [PHPDoc Types](https://phpstan.org/writing-php-code/phpdoc-types)
* [Extension Library](https://phpstan.org/user-guide/extension-library)
* [Developing Extensions](https://phpstan.org/developing-extensions/extension-types)
+* [API Reference](https://apiref.phpstan.org/)
## PHPStan Pro
diff --git a/vendor/phpstan/phpstan/composer.json b/vendor/phpstan/phpstan/composer.json
index 2c9e27962..498cc3816 100644
--- a/vendor/phpstan/phpstan/composer.json
+++ b/vendor/phpstan/phpstan/composer.json
@@ -3,7 +3,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"license": ["MIT"],
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -12,11 +12,6 @@
"phpstan",
"phpstan.phar"
],
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": ["bootstrap.php"]
}
diff --git a/vendor/phpstan/phpstan/phpstan.phar b/vendor/phpstan/phpstan/phpstan.phar
index 306020e3a..34f9e46ce 100755
--- a/vendor/phpstan/phpstan/phpstan.phar
+++ b/vendor/phpstan/phpstan/phpstan.phar
Binary files differ
diff --git a/vendor/phpstan/phpstan/phpstan.phar.asc b/vendor/phpstan/phpstan/phpstan.phar.asc
index 9110c4aa3..2c3f9b152 100644
--- a/vendor/phpstan/phpstan/phpstan.phar.asc
+++ b/vendor/phpstan/phpstan/phpstan.phar.asc
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
-iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmGKbGQACgkQzxoQjQ56
-5yAy7BAAgT9+V81RuOMz6F16uqm4gXH1ebioWokEvVb6ZR2fk7p3/m14STmmRkwe
-MIkxzWKtx/wSC6VafqAtkBPNxpo2j5QU0pmfMAvkPHh79d2lWmUaJmF71I/DCNnh
-pcZNJLe5x+YTDKU6NnwMlyZEvdaWmyJ2MCf2apBZIJ7axefEJRVVin2pshhXwbtN
-dHhrT9yFYe/vqOkOLtGDWw+yT1I6he7IpoYZUTyO9b7eadC0ga6Bet7jibNL8JBE
-cGcB2MFg9bvif0PgIOio0jQXAWjf0ZBXPvoOwTRCqq/UOPTL8SRtiflAFiFOAzk/
-FRQVC0+26NsGx7R8kS5FZNOHYTIElY1ElyzFk8HWgqrYIvzDNLtkJ68178rDJ29f
-GyAax4P+gN13biyXQycQHhXDfHN1UytopldiRkitXVFGq92sz6BFgQDLF9yxQOm1
-iL5oxWSVf6rM8AOc3DV9Aa1kCpG6FrZPJ66NBgJLzTpKARzt7CM+M8VQNA/KnHB3
-8Mt0WmAeRORSnBWQksOlnA4VUkxWDGkZGVBWMRist7gghfG7n7HxTAUAk1oo7j2b
-/gTwbeOjv/330uZG31e+hCcaj/EcocHvglegWCPMmIhpXqn25TC+87QkGt2wb6z6
-dpzTdy3Pimr5BK2YrN1+Le33CYeHKlc+6XL34BEVebAQ/A9OB/M=
-=k3NZ
+iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmLNnFgACgkQzxoQjQ56
+5yBvLA//Y9vKwT9O1c1dWc/vEs2qCRedQLuFYJTJKbwTvqNJwJN5GT1umpsi7KCN
+MCoDzfutVkITEVZAYmlEUKowi0U+STYSs52guw6VoepC0eTW+b8VLOREo1UpAASb
+VrCvEsRf6xrfslKqWnbl1RNNhBHpn7+UMloZcawEy7Jpp5G7JIGRhmBGQOVkvymA
+0+UDw/UiWr+rZFbO5h3JlwFkwRjgzcCVZeNeyrd2oIFKgp8DmN9Kwq6tulGD3V1j
+oJJh/8liFQrj3DFUz6yIczZcuTtbGcWmIhTQxtlJJczZyGXlK8aXIqac3/YbBIqo
+4tvCgpLJjGQ8WouVUURGy/AXiUJulnBpDGUAmbdWrwDE3oxx2IPJ+OrmtZVcK2Q1
+30+jLvdb5NasGTRV84aB7lLKrifde6qFWaXh+s1b/A8znnjHdFMTvYn2F6/xFWdO
+u0GU5wIcLrWMvmQNA7mRPiV8e7KtOoCggCm923TDJ9Ov56ZL5N+iPCW+7TZWOuM9
+L2JLhN26WCZzVn/ODuxpIKzz07UGCTcaKzNFYL/V/+Oly7JEub6nNI90SNHRcOt4
+Iq+EoO8/jW2WZsnBHqP8o88ii9I+DEOYt60csVGVp4sZ3RDgSwXiC5eV0rDvz/0F
+32oPtYAe5cRIwVriKhGlLM74eozaLmENgtMLePkclpNarFtdwFg=
+=AySM
-----END PGP SIGNATURE-----
diff --git a/vendor/sebastian/environment/ChangeLog.md b/vendor/sebastian/environment/ChangeLog.md
index 67daf0356..8943aee4c 100644
--- a/vendor/sebastian/environment/ChangeLog.md
+++ b/vendor/sebastian/environment/ChangeLog.md
@@ -2,6 +2,12 @@
All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+## [5.1.4] - 2022-04-03
+
+### Fixed
+
+* [#63](https://github.com/sebastianbergmann/environment/pull/63): `Runtime::getCurrentSettings()` does not correctly process INI settings
+
## [5.1.3] - 2020-09-28
### Changed
@@ -145,6 +151,7 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi
* This component is no longer supported on PHP 5.6
+[5.1.4]: https://github.com/sebastianbergmann/environment/compare/5.1.3...5.1.4
[5.1.3]: https://github.com/sebastianbergmann/environment/compare/5.1.2...5.1.3
[5.1.2]: https://github.com/sebastianbergmann/environment/compare/5.1.1...5.1.2
[5.1.1]: https://github.com/sebastianbergmann/environment/compare/5.1.0...5.1.1
diff --git a/vendor/sebastian/environment/LICENSE b/vendor/sebastian/environment/LICENSE
index c58093991..42546339c 100644
--- a/vendor/sebastian/environment/LICENSE
+++ b/vendor/sebastian/environment/LICENSE
@@ -1,6 +1,6 @@
sebastian/environment
-Copyright (c) 2014-2020, Sebastian Bergmann <[email protected]>.
+Copyright (c) 2014-2022, Sebastian Bergmann <[email protected]>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/vendor/sebastian/environment/README.md b/vendor/sebastian/environment/README.md
index 24a9831e4..1fead13ef 100644
--- a/vendor/sebastian/environment/README.md
+++ b/vendor/sebastian/environment/README.md
@@ -1,7 +1,6 @@
# sebastian/environment
[![Latest Stable Version](https://img.shields.io/packagist/v/sebastian/environment.svg?style=flat-square)](https://packagist.org/packages/sebastian/environment)
-[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg?style=flat-square)](https://php.net/)
[![CI Status](https://github.com/sebastianbergmann/environment/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/environment/actions)
[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/environment/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/environment)
diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php
index c4a2348f0..e7fd1643f 100644
--- a/vendor/sebastian/environment/src/Console.php
+++ b/vendor/sebastian/environment/src/Console.php
@@ -34,7 +34,7 @@ final class Console
/**
* @var int
*/
- public const STDIN = 0;
+ public const STDIN = 0;
/**
* @var int
@@ -60,10 +60,10 @@ final class Console
if ($this->isWindows()) {
// @codeCoverageIgnoreStart
- return (defined('STDOUT') && function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support(STDOUT))
- || false !== getenv('ANSICON')
- || 'ON' === getenv('ConEmuANSI')
- || 'xterm' === getenv('TERM');
+ return (defined('STDOUT') && function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support(STDOUT)) ||
+ false !== getenv('ANSICON') ||
+ 'ON' === getenv('ConEmuANSI') ||
+ 'xterm' === getenv('TERM');
// @codeCoverageIgnoreEnd
}
diff --git a/vendor/sebastian/environment/src/Runtime.php b/vendor/sebastian/environment/src/Runtime.php
index 311aefcb6..d1b92d620 100644
--- a/vendor/sebastian/environment/src/Runtime.php
+++ b/vendor/sebastian/environment/src/Runtime.php
@@ -289,8 +289,12 @@ final class Runtime
foreach ($values as $value) {
$set = ini_get($value);
- if (isset($config[$value]) && $set != $config[$value]) {
- $diff[] = sprintf('%s=%s', $value, $set);
+ if (empty($set)) {
+ continue;
+ }
+
+ if ((!isset($config[$value]) || ($set !== $config[$value]))) {
+ $diff[$value] = sprintf('%s=%s', $value, $set);
}
}
}
diff --git a/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md b/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md
deleted file mode 100644
index 871735ad1..000000000
--- a/vendor/spomky-labs/otphp/.github/CONTRIBUTING.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Contributing
-
-First of all, **thank you** for contributing.
-
-Bugs or feature requests can be posted online on the GitHub issues section of the project.
-
-Few rules to ease code reviews and merges:
-
-- You MUST follow the [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/) coding standards.
-- You MUST run the test suite.
-- You MUST write (or update) unit tests when bugs are fixed or features are added.
-- You SHOULD write documentation.
-
-We use [Git-Flow](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) to automate our git branching workflow.
-
-To contribute use [Pull Requests](https://help.github.com/articles/using-pull-requests), please, write commit messages that make sense, and rebase your branch before submitting your PR.
-
-May be asked to squash your commits too. This is used to "clean" your Pull Request before merging it, avoiding commits such as fix tests, fix 2, fix 3, etc.
-
-Run test suite
-------------
-
-* install composer: `curl -s http://getcomposer.org/installer | php`
-* install dependencies: `php composer.phar install`
-* run tests: `vendor/bin/phpunit`
diff --git a/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md b/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 2ceb8da6a..000000000
--- a/vendor/spomky-labs/otphp/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-| Q | A
-| -------------------- | -----
-| Bug report? | yes/no
-| Feature request? | yes/no
-| BC Break report? | yes/no
-| RFC? / Specification | yes/no
-| Library version | x.y(.z)
-
-<!--
-Fill in this template according to your issue.
-Otherwise, replace this comment by the description of your issue.
-
-Please consider the following requirements
-* You MUST never send security issues here. If you think that your issue is a security one then contact Spomky in private at https://gitter.im/Spomky/
-* You should not post many lines of source code or console logs. Small inputs (approx 5 lines) are acceptable otherwize you should use a third party service (e.g. Pastebin, Chop...).
--->
diff --git a/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md b/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index acd0be9fc..000000000
--- a/vendor/spomky-labs/otphp/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-| Q | A
-| ------------- | ---
-| Branch? | master
-| Bug fix? | yes/no
-| New feature? | yes/no
-| BC breaks? | yes/no
-| Deprecations? | yes/no
-| Tests pass? | yes/no
-| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
-| License | MIT
-| Tests added | <!--highly recommended for new features-->
-| Doc PR | <!--highly recommended for new features-->
-
-<!--
-Fill in this template according to the PR you're about to submit.
-Replace this comment by a description of what your PR is solving.
-
-Please consider the following requirement:
-* Modification of existing tests should be avoided unless deemed necessary.
-* You MUST never open a PR related to a security issue. Contact Spomky in private at https://gitter.im/Spomky/
--->
diff --git a/vendor/spomky-labs/otphp/.github/stale.yml b/vendor/spomky-labs/otphp/.github/stale.yml
deleted file mode 100644
index dc90e5a1c..000000000
--- a/vendor/spomky-labs/otphp/.github/stale.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# Number of days of inactivity before an issue becomes stale
-daysUntilStale: 60
-# Number of days of inactivity before a stale issue is closed
-daysUntilClose: 7
-# Issues with these labels will never be considered stale
-exemptLabels:
- - pinned
- - security
-# Label to use when marking an issue as stale
-staleLabel: wontfix
-# Comment to post when marking an issue as stale. Set to `false` to disable
-markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
-# Comment to post when closing a stale issue. Set to `false` to disable
-closeComment: false
diff --git a/vendor/spomky-labs/otphp/SECURITY.md b/vendor/spomky-labs/otphp/SECURITY.md
new file mode 100644
index 000000000..3c21578c6
--- /dev/null
+++ b/vendor/spomky-labs/otphp/SECURITY.md
@@ -0,0 +1,88 @@
+# Security Policy
+
+## Supported Versions
+
+
+| Version | Supported |
+| ------- | ------------------ |
+| 11.0.x | :white_check_mark: |
+| 10.0.x | :white_check_mark: |
+| < 10.0 | :x: |
+
+## Reporting a Vulnerability
+
+Please send an email to `[email protected]`.
+If deemed necessary, you can encrypt your message using one of the following GPG key
+
+```
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+xjMEXTsJVxYJKwYBBAHaRw8BAQdAZCS93eHRx97V+LQbAWuAaeKIdUZ9YIkn
+QH5pQ7dDU0TNMWNvbnRhY3RAc3BvbWt5LWxhYnMuY29tIDxjb250YWN0QHNw
+b21reS1sYWJzLmNvbT7CdwQQFgoAHwUCXTsJVwYLCQcIAwIEFQgKAgMWAgEC
+GQECGwMCHgEACgkQG6hbCDSDj+1/tgEAoy11uHvDV7kkG/iN2/0ylV72hU8y
+c/xoqGd7qFaKD6ABANcthlg63OrQVTf0dUPOT9Y2BJpOOA88JJWgILtuUPIO
+zjgEXTsJVxIKKwYBBAGXVQEFAQEHQKiX7nldkmICePhzwReZnBPmjpsmNt7V
+Y8xHdICKsr8cAwEIB8JhBBgWCAAJBQJdOwlXAhsMAAoJEBuoWwg0g4/t0KgA
+/31ucb/bL/MGpWFrpSjTs6uQhZWlBmcFoeMhwCYepIpZAQDd65UBqFDKXJWv
+Xy3zoMQQzD9Z6fUATnFrWkzjHwhvDQ==
+=j4dw
+-----END PGP PUBLIC KEY BLOCK-----
+```
+
+
+```
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+xsFNBGILZFoBEADo9pzAMRVxL5typ22Ywifdyi3CMHgg7zptfb8otrQci8IX
+m7B8/NTA0I9EkenzSW/Mf4k2iPNCwXc+qVEHPvPNvr3WazcdiDQJjXqMtkxG
+l2dvdQHdBxN46v+mvWDVGf9anYQxIAmZrj7CDLOfD/cG/8STL4hSbFjRBOKs
+xAP8wgRA/amcrf9WcCDxURGIq8mDPcECR8fca+iukTmMe2NDEc56pJi0KVoF
+pFhOMMfjgP/XvtGjjSNZNGRgHSLTQs8UiK+5BjPh+iWFIPV5+ZPLpbSOcoma
+GyeX5i1DmAh7cWx/FphvFzOun6to3ERuy82+zW54iA9zS8+kIfV4Wjr2qE7l
+Ctc9l8RIv/6dMXoW2Y42CTuywlAMnlP7XaaUgE++CXTIuO7+6Gp0E5NlmqB5
+lb+CZLV/LS27gUcajs23ve5B3UId2bGUflvTtY/J0VPzrJMoEErVnkCsnD7W
+Oiwe8GiSNMJmTGu/A45xf5nuYNcuU7blA5XXwPoHZuALj1zv6eCWVxWz02l9
+Fc/T+gNkOEErlXOcldyXxQ5Qb99TU5NgdqzbibyR9QAqdfwtgg19oFbiSP7t
+8b5P2qAIW2GaOCkX007cBCzTXNrcQNruTwUD59LZQLhdGz5WJo/gefC/3ZvR
+vKoJKCRlk7s43aUjeZzE+Engpr5e1wl63WjAzQARAQABzTNzZWN1cml0eUBz
+cG9ta3ktbGFicy5jb20gPHNlY3VyaXR5QHNwb21reS1sYWJzLmNvbT7CwY0E
+EAEIACAFAmILZFoGCwkHCAMCBBUICgIEFgIBAAIZAQIbAwIeAQAhCRBy14gx
+FHv4aBYhBKgF8zJv89FYVv0RFHLXiDEUe/hoA+YP/ijaePtilKURzNVrPWfc
+gDw/ZNCR+dVAgwGo9VcbOvkyZmyqD6yBjuDWvG96KQs0LRrqWKonAvnewNtp
+wQruuvrlcCuNE6TTfvx0wh2+lwKD7MH5dKutHUCowVNAsZ5uZxHVF9RGLBh+
+JRofklupcGqUx+Jtx4uq2gAGOqV4/QdvneMjkLwqVu8FGIM59LfdNfp/iA3p
+wX2DvfxBO58Gu6hilmf7R+b9nX0U7xYJM6QJb7H89cV3/AoTh2kf1wtFY+Py
+Di6VZTMUBYOoz2iSnvCE8KlBWDu98/A2EJ7kDGQdmnuIgsURsyap3yKioaUr
+LGTaG0OiC/gkXkKisH6eff6Gw06qelBarf5N/GgoeAN/amE8twy3a+Hx1pyw
+ZzkjPsL7uWg3Koy5mPuCtWfPtIBcJaTLS5d8ESlJ8/CfaVaDludzYQZo70Xn
+m4KzjPnptm3djpZNwoFEUxrHVREOEe69/MnEL2PNcEMQkapg16PnH4phajnC
+7bYOPDteMJlHjNmQzz9d25ZwzVBHDDT50mHDijR2D/OgKx3NQr88fiFAWhKG
+lEu1ZuOkKIKV5VIFbocTWSoV7bkzIfrll49xWou+4VOxgRuqjquFC4RV8fea
+lLbHOcJlOR00aFDmoOWQ3/QNvajaWJFzDdocGbgbnEBMDFRoUkuhqOBcnzA+
+apW/zsFNBGILZFoBEADSwiM49wObRpxOyas91M6WvJ4Gt3iXqj+L8dmcw0FW
+UdDpwOxy8tuZx+OfXEBBH3eJHOobC66vN+E9WYobVkJ5zfbGxfQruTuvUZNl
+X9Lo0UwoP+AP21AKUUvsf48iZGWzmlkxgPnhAQS4ECkkWCKPf7nFTk+V+jIN
+nf6ZDZLXaRUnG0nLvzs0raG1eTVrGvPSCC8u3R2zIh9SvoeEgTnT/Re0mhCu
+ah3fwG+4vXc6VIjR1ZtpM9+Y8sl+PFZ/Oiisc+46oU5qXVVLtHfLdxYZ4vl2
+IflHDKKmrfbfGY1hJl/foBLglT3Cd8GTu3FjiAJX9PpkiWbsflc0OUBQf9aC
+73W5FLS4P4clm4nNzVGkNucWHvk+urM6nEUf02bhsfF0TPeos3QcJorfKNUS
+TvuGYccENuK5cVOzEcU+VhN08GT0pr0CpqJnsw+zV8vD4k3aPmMFmSVog+bY
+NhfB7AgwbOjd6MhQJcP7YjYTHaa6YsnKMSg4RhkDjvMa3421hfaWsVvlIb0f
+AZJ8BnXgfE0uI8CKA9dc6I2Posl33zC8HI2sS1MEJ90Am68P+uJt61LdJeD5
+VXSrCkzBhUBds0hbGR6+DF20UD496m7Lw3VBoWOl2bMeLdERDarFMDYsPH47
+rie9wlrnPNR57HUqK4bpkFwqTStRkRFUhFv7LLWZ1QARAQABwsF2BBgBCAAJ
+BQJiC2RaAhsMACEJEHLXiDEUe/hoFiEEqAXzMm/z0VhW/REUcteIMRR7+GhI
+lQ/9GbSwIdGue6Gw0msYAEoER9HhpYB//9/GG7/c4ZW60nLSSYuhNWIo0Akl
+10CzeApezf/O9/1EExqZ9ygj4wtUphcQOdRJVhXPt+gskw7/NHoXUJ+Z1rbb
+EWbKle9YufZ4PAKYhlxdqTlWyQvPVxrRvbuhYeQG4S412VzKjH0/x1Fh2CfV
+hFuyOaRjg89T6rihXL1rCSJ/PDQeQtvtXeJ30yFj+aapCj+VqUl+2D+N0bzS
+LL18kEPQnJw4BOHOXrw349dAKmHN/QkRH8DINlXLyaOlABglnSViDQL3Q1t3
+sBuIeClsl3brQNJRp/RKOdTBMNAX+BhAjqodbwwT+UkJl9xJKw0Cla4wtbs2
+T0yoK/Z1iFfvPdufkK4q6ocAHJUp3+XckFIZxsHQvhQPbm9XoOt1RTO29MOw
+EYo8UjFQCnXJVsj1/6XMgIUe5tPYvS/ZZZNJFF4j+OE8xRKLKqg/DFcpEipC
+LCmzzr/hhWx0XP4CIK2tYsAMk3ieCZuk1Wa+NGLL4WfALWsNHq3wg5Wzv+yJ
+dp14fv711BVYlriI+VKggGFgBdz0dWkgrBk4+thLatJFcjFYr8BLkbtPraa3
+sFI/cGxvOXSIy4GEALdfnozyU3RJtMNtVi3IzGeIFAOb457y/IrMqpWLp1FX
+BUqlX5YJHneD9Q8Sfz/HKDQDCqg=
+=o+4z
+-----END PGP PUBLIC KEY BLOCK-----
+```
diff --git a/vendor/spomky-labs/otphp/composer.json b/vendor/spomky-labs/otphp/composer.json
index 8979e8f06..583fbf9ef 100644
--- a/vendor/spomky-labs/otphp/composer.json
+++ b/vendor/spomky-labs/otphp/composer.json
@@ -20,7 +20,7 @@
"ext-mbstring": "*",
"paragonie/constant_time_encoding": "^2.0",
"beberlei/assert": "^3.0",
- "thecodingmachine/safe": "^0.1.14|^1.0"
+ "thecodingmachine/safe": "^0.1.14|^1.0|^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
@@ -30,7 +30,7 @@
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
- "thecodingmachine/phpstan-safe-rule": "^1.0"
+ "thecodingmachine/phpstan-safe-rule": "^1.0 || ^2.0"
},
"suggest": {
},
diff --git a/vendor/spomky-labs/otphp/src/ParameterTrait.php b/vendor/spomky-labs/otphp/src/ParameterTrait.php
index 69fa774db..326109da3 100644
--- a/vendor/spomky-labs/otphp/src/ParameterTrait.php
+++ b/vendor/spomky-labs/otphp/src/ParameterTrait.php
@@ -59,7 +59,7 @@ trait ParameterTrait
return $this->getParameter('secret');
}
- private function setSecret(?string $secret): void
+ public function setSecret(?string $secret): void
{
$this->setParameter('secret', $secret);
}
diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/symfony/polyfill-ctype/Ctype.php
deleted file mode 100644
index ba75a2c95..000000000
--- a/vendor/symfony/polyfill-ctype/Ctype.php
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <[email protected]>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Ctype;
-
-/**
- * Ctype implementation through regex.
- *
- * @internal
- *
- * @author Gert de Pagter <[email protected]>
- */
-final class Ctype
-{
- /**
- * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-alnum
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_alnum($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a letter, FALSE otherwise.
- *
- * @see https://php.net/ctype-alpha
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_alpha($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
- *
- * @see https://php.net/ctype-cntrl
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_cntrl($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
- }
-
- /**
- * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-digit
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_digit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
- *
- * @see https://php.net/ctype-graph
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_graph($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a lowercase letter.
- *
- * @see https://php.net/ctype-lower
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_lower($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
- *
- * @see https://php.net/ctype-print
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_print($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
- *
- * @see https://php.net/ctype-punct
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_punct($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
- *
- * @see https://php.net/ctype-space
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_space($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is an uppercase letter.
- *
- * @see https://php.net/ctype-upper
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_upper($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
- *
- * @see https://php.net/ctype-xdigit
- *
- * @param mixed $text
- *
- * @return bool
- */
- public static function ctype_xdigit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
- }
-
- /**
- * Converts integers to their char versions according to normal ctype behaviour, if needed.
- *
- * If an integer between -128 and 255 inclusive is provided,
- * it is interpreted as the ASCII value of a single character
- * (negative values have 256 added in order to allow characters in the Extended ASCII range).
- * Any other integer is interpreted as a string containing the decimal digits of the integer.
- *
- * @param mixed $int
- * @param string $function
- *
- * @return mixed
- */
- private static function convert_int_to_char_for_ctype($int, $function)
- {
- if (!\is_int($int)) {
- return $int;
- }
-
- if ($int < -128 || $int > 255) {
- return (string) $int;
- }
-
- if (\PHP_VERSION_ID >= 80100) {
- @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
- }
-
- if ($int < 0) {
- $int += 256;
- }
-
- return \chr($int);
- }
-}
diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE
deleted file mode 100644
index 3f853aaf3..000000000
--- a/vendor/symfony/polyfill-ctype/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-ctype/README.md b/vendor/symfony/polyfill-ctype/README.md
deleted file mode 100644
index 8add1ab00..000000000
--- a/vendor/symfony/polyfill-ctype/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Symfony Polyfill / Ctype
-========================
-
-This component provides `ctype_*` functions to users who run php versions without the ctype extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-ctype/bootstrap.php b/vendor/symfony/polyfill-ctype/bootstrap.php
deleted file mode 100644
index d54524b31..000000000
--- a/vendor/symfony/polyfill-ctype/bootstrap.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <[email protected]>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (\PHP_VERSION_ID >= 80000) {
- return require __DIR__.'/bootstrap80.php';
-}
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
-}
-if (!function_exists('ctype_alpha')) {
- function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
-}
-if (!function_exists('ctype_cntrl')) {
- function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
-}
-if (!function_exists('ctype_digit')) {
- function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
-}
-if (!function_exists('ctype_graph')) {
- function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
-}
-if (!function_exists('ctype_lower')) {
- function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
-}
-if (!function_exists('ctype_print')) {
- function ctype_print($text) { return p\Ctype::ctype_print($text); }
-}
-if (!function_exists('ctype_punct')) {
- function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
-}
-if (!function_exists('ctype_space')) {
- function ctype_space($text) { return p\Ctype::ctype_space($text); }
-}
-if (!function_exists('ctype_upper')) {
- function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
-}
-if (!function_exists('ctype_xdigit')) {
- function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/vendor/symfony/polyfill-ctype/bootstrap80.php b/vendor/symfony/polyfill-ctype/bootstrap80.php
deleted file mode 100644
index ab2f8611d..000000000
--- a/vendor/symfony/polyfill-ctype/bootstrap80.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <[email protected]>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }
-}
-if (!function_exists('ctype_alpha')) {
- function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); }
-}
-if (!function_exists('ctype_cntrl')) {
- function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); }
-}
-if (!function_exists('ctype_digit')) {
- function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); }
-}
-if (!function_exists('ctype_graph')) {
- function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); }
-}
-if (!function_exists('ctype_lower')) {
- function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); }
-}
-if (!function_exists('ctype_print')) {
- function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); }
-}
-if (!function_exists('ctype_punct')) {
- function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); }
-}
-if (!function_exists('ctype_space')) {
- function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); }
-}
-if (!function_exists('ctype_upper')) {
- function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); }
-}
-if (!function_exists('ctype_xdigit')) {
- function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json
deleted file mode 100644
index ccb8e5703..000000000
--- a/vendor/symfony/polyfill-ctype/composer.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "symfony/polyfill-ctype",
- "type": "library",
- "description": "Symfony polyfill for ctype functions",
- "keywords": ["polyfill", "compatibility", "portable", "ctype"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "1.23-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- }
-}
diff --git a/vendor/thecodingmachine/safe/README.md b/vendor/thecodingmachine/safe/README.md
index 3c2ee624f..f0fbeb2fa 100644
--- a/vendor/thecodingmachine/safe/README.md
+++ b/vendor/thecodingmachine/safe/README.md
@@ -9,8 +9,6 @@
Safe PHP
========
-**Work in progress**
-
A set of core PHP functions rewritten to throw exceptions instead of returning `false` when an error is encountered.
## The problem
@@ -115,7 +113,7 @@ tool that performs instant refactoring of your application.
Run
```bash
-$ composer require --dev rector/rector:^0.7
+$ composer require --dev rector/rector
```
to install `rector/rector`.
@@ -123,7 +121,7 @@ to install `rector/rector`.
Run
```bash
-vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate-0.7.php
+vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate.php
```
to run `rector/rector`.
diff --git a/vendor/thecodingmachine/safe/composer.json b/vendor/thecodingmachine/safe/composer.json
index 2cd03fcc8..920c1776e 100644
--- a/vendor/thecodingmachine/safe/composer.json
+++ b/vendor/thecodingmachine/safe/composer.json
@@ -3,19 +3,24 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"license": "MIT",
"autoload": {
- "psr-4": {
- "Safe\\": [
- "lib/",
- "deprecated/",
- "generated/"
- ]
- },
+ "classmap": [
+ "lib/DateTime.php",
+ "lib/DateTimeImmutable.php",
+ "lib/Exceptions/",
+ "deprecated/Exceptions/",
+ "generated/Exceptions/"
+ ],
"files": [
"deprecated/apc.php",
+ "deprecated/array.php",
+ "deprecated/datetime.php",
"deprecated/libevent.php",
+ "deprecated/password.php",
"deprecated/mssql.php",
"deprecated/stats.php",
+ "deprecated/strings.php",
"lib/special_cases.php",
+ "deprecated/mysqli.php",
"generated/apache.php",
"generated/apcu.php",
"generated/array.php",
@@ -36,6 +41,7 @@
"generated/fpm.php",
"generated/ftp.php",
"generated/funchand.php",
+ "generated/gettext.php",
"generated/gmp.php",
"generated/gnupg.php",
"generated/hash.php",
@@ -45,7 +51,6 @@
"generated/image.php",
"generated/imap.php",
"generated/info.php",
- "generated/ingres-ii.php",
"generated/inotify.php",
"generated/json.php",
"generated/ldap.php",
@@ -54,20 +59,14 @@
"generated/mailparse.php",
"generated/mbstring.php",
"generated/misc.php",
- "generated/msql.php",
"generated/mysql.php",
- "generated/mysqli.php",
- "generated/mysqlndMs.php",
- "generated/mysqlndQc.php",
"generated/network.php",
"generated/oci8.php",
"generated/opcache.php",
"generated/openssl.php",
"generated/outcontrol.php",
- "generated/password.php",
"generated/pcntl.php",
"generated/pcre.php",
- "generated/pdf.php",
"generated/pgsql.php",
"generated/posix.php",
"generated/ps.php",
@@ -78,7 +77,6 @@
"generated/sem.php",
"generated/session.php",
"generated/shmop.php",
- "generated/simplexml.php",
"generated/sockets.php",
"generated/sodium.php",
"generated/solr.php",
@@ -103,12 +101,13 @@
]
},
"require": {
- "php": ">=7.2"
+ "php": "^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^0.12",
- "thecodingmachine/phpstan-strict-rules": "^0.12",
- "squizlabs/php_codesniffer": "^3.2"
+ "phpstan/phpstan": "^1.5",
+ "thecodingmachine/phpstan-strict-rules": "^1.0",
+ "squizlabs/php_codesniffer": "^3.2",
+ "phpunit/phpunit": "^9.5"
},
"scripts": {
"phpstan": "phpstan analyse lib -c phpstan.neon --level=max --no-progress -vvv",
@@ -117,7 +116,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "0.1-dev"
+ "dev-master": "2.2.x-dev"
}
}
} \ No newline at end of file
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php
index 4cadf6ca1..4cadf6ca1 100644
--- a/vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php
+++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
index f0edba123..9c183b8e4 100644
--- a/vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php
+++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
@@ -1,6 +1,10 @@
<?php
+
namespace Safe\Exceptions;
+/**
+ * @deprecated This exception is deprecated
+ */
class PasswordException extends \ErrorException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
diff --git a/vendor/thecodingmachine/safe/deprecated/array.php b/vendor/thecodingmachine/safe/deprecated/array.php
new file mode 100644
index 000000000..f0b3a20b7
--- /dev/null
+++ b/vendor/thecodingmachine/safe/deprecated/array.php
@@ -0,0 +1,228 @@
+<?php
+
+namespace Safe;
+
+use Safe\Exceptions\ArrayException;
+
+/**
+ * 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 integer 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.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function array_flip(array $array): array
+{
+ error_clear_last();
+ $result = \array_flip($array);
+ if ($result === null) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * This function sorts an array such that array indices maintain their
+ * correlation with the array elements they are associated with.
+ *
+ * This is used mainly when sorting associative arrays where the actual
+ * element order is significant.
+ *
+ * @param array $array The input array.
+ * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
+ * sort_flags, for details see
+ * sort.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function arsort(array &$array, int $sort_flags = SORT_REGULAR): void
+{
+ error_clear_last();
+ $result = \arsort($array, $sort_flags);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * This function sorts an array such that array indices maintain
+ * their correlation with the array elements they are associated
+ * with. This is used mainly when sorting associative arrays where
+ * the actual element order is significant.
+ *
+ * @param array $array The input array.
+ * @param int $sort_flags You may modify the behavior of the sort using the optional
+ * parameter sort_flags, for details
+ * see sort.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ */
+function asort(array &$array, int $sort_flags = SORT_REGULAR): void
+{
+ error_clear_last();
+ $result = \asort($array, $sort_flags);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * Sorts an array by key in reverse order, maintaining key to data
+ * correlations. This is useful mainly for associative arrays.
+ *
+ * @param array $array The input array.
+ * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
+ * sort_flags, for details see
+ * sort.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function krsort(array &$array, int $sort_flags = SORT_REGULAR): void
+{
+ error_clear_last();
+ $result = \krsort($array, $sort_flags);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * Sorts an array by key, maintaining key to data correlations. This is
+ * useful mainly for associative arrays.
+ *
+ * @param array $array The input array.
+ * @param int $sort_flags You may modify the behavior of the sort using the optional
+ * parameter sort_flags, for details
+ * see sort.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function ksort(array &$array, int $sort_flags = SORT_REGULAR): void
+{
+ error_clear_last();
+ $result = \ksort($array, $sort_flags);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * This function sorts an array. Elements will be arranged from
+ * lowest to highest when this function has completed.
+ *
+ * @param array $array The input array.
+ * @param int $sort_flags The optional second parameter sort_flags
+ * may be used to modify the sorting behavior using these values:
+ *
+ * Sorting type flags:
+ *
+ *
+ * SORT_REGULAR - compare items normally;
+ * the details are described in the comparison operators section
+ *
+ *
+ * SORT_NUMERIC - compare items numerically
+ *
+ *
+ * SORT_STRING - compare items as strings
+ *
+ *
+ *
+ * SORT_LOCALE_STRING - compare items as
+ * strings, based on the current locale. It uses the locale,
+ * which can be changed using setlocale
+ *
+ *
+ *
+ *
+ * SORT_NATURAL - compare items as strings
+ * using "natural ordering" like natsort
+ *
+ *
+ *
+ *
+ * SORT_FLAG_CASE - can be combined
+ * (bitwise OR) with
+ * SORT_STRING or
+ * SORT_NATURAL to sort strings case-insensitively
+ *
+ *
+ *
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ */
+function sort(array &$array, int $sort_flags = SORT_REGULAR): void
+{
+ error_clear_last();
+ $result = \sort($array, $sort_flags);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * This function will sort an array by its values using a user-supplied
+ * comparison function. If the array you wish to sort needs to be sorted by
+ * some non-trivial criteria, you should use this function.
+ *
+ * @param array $array The input array.
+ * @param callable $value_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
+ * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.
+ *
+ * Returning non-integer values from the comparison
+ * function, such as float, will result in an internal cast to
+ * integer of the callback's return value. So values such as
+ * 0.99 and 0.1 will both be cast to an integer value of 0, which will
+ * compare such values as equal.
+ * @throws ArrayException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function usort(array &$array, callable $value_compare_func): void
+{
+ error_clear_last();
+ $result = \usort($array, $value_compare_func);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+}
+
+/**
+ * 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.
+ * @throws ArrayException
+ * @deprecated
+ *
+ */
+function array_combine(array $keys, array $values): array
+{
+ error_clear_last();
+ $result = \array_combine($keys, $values);
+ if ($result === false) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/deprecated/datetime.php b/vendor/thecodingmachine/safe/deprecated/datetime.php
new file mode 100644
index 000000000..1bcb32275
--- /dev/null
+++ b/vendor/thecodingmachine/safe/deprecated/datetime.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Safe;
+
+use Safe\Exceptions\DatetimeException;
+
+/**
+ * Identical to the date function except that
+ * the time returned is Greenwich Mean Time (GMT).
+ *
+ * @param string $format The format of the outputted date string. See the formatting
+ * options for the date function.
+ * @param int $timestamp The optional timestamp parameter is an
+ * integer Unix timestamp that defaults to the current
+ * local time if a timestamp is not given. 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.
+ * @throws DatetimeException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function gmdate(string $format, int $timestamp = null): string
+{
+ error_clear_last();
+ if ($timestamp !== null) {
+ $result = \gmdate($format, $timestamp);
+ } else {
+ $result = \gmdate($format);
+ }
+ if ($result === false) {
+ throw DatetimeException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/deprecated/functionsList.php b/vendor/thecodingmachine/safe/deprecated/functionsList.php
index e430cd3b9..6b39199c8 100644
--- a/vendor/thecodingmachine/safe/deprecated/functionsList.php
+++ b/vendor/thecodingmachine/safe/deprecated/functionsList.php
@@ -11,6 +11,10 @@ return [
'apc_inc',
'apc_load_constants',
'apc_sma_info',
+ 'arsort',
+ 'array_combine',
+ 'array_flip',
+ 'asort',
'event_add',
'event_base_loopbreak',
'event_base_loopexit',
@@ -30,10 +34,13 @@ return [
'event_priority_set',
'event_set',
'event_timer_set',
+ 'gmdate',
'imagepsencodefont',
'imagepsextendfont',
'imagepsfreefont',
'imagepsslantfont',
+ 'krsort',
+ 'ksort',
'mssql_bind',
'mssql_close',
'mssql_connect',
@@ -48,9 +55,15 @@ return [
'mssql_pconnect',
'mssql_query',
'mssql_select_db',
+ 'mysqli_get_client_stats',
+ 'password_hash',
+ 'sort',
'stats_covariance',
'stats_standard_deviation',
'stats_stat_correlation',
'stats_stat_innerproduct',
'stats_variance',
+ 'substr',
+ 'usort',
+ 'vsprintf',
];
diff --git a/vendor/thecodingmachine/safe/generated/mysqli.php b/vendor/thecodingmachine/safe/deprecated/mysqli.php
index c8807af4a..13839c6c7 100644
--- a/vendor/thecodingmachine/safe/generated/mysqli.php
+++ b/vendor/thecodingmachine/safe/deprecated/mysqli.php
@@ -5,27 +5,7 @@ namespace Safe;
use Safe\Exceptions\MysqliException;
/**
- * Returns an empty array.
- * Available only with mysqlnd.
- *
- * @return array Returns an empty array on success, FALSE otherwise.
- * @throws MysqliException
- *
- */
-function mysqli_get_cache_stats(): array
-{
- error_clear_last();
- $result = \mysqli_get_cache_stats();
- if ($result === false) {
- throw MysqliException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* Returns client per-process statistics.
- * Available only with mysqlnd.
*
* @return array Returns an array with client stats if success, FALSE otherwise.
* @throws MysqliException
diff --git a/vendor/thecodingmachine/safe/generated/password.php b/vendor/thecodingmachine/safe/deprecated/password.php
index 3808e02b9..87d85a7b7 100644
--- a/vendor/thecodingmachine/safe/generated/password.php
+++ b/vendor/thecodingmachine/safe/deprecated/password.php
@@ -109,6 +109,7 @@ use Safe\Exceptions\PasswordException;
* the password_verify function to verify the hash without
* needing separate storage for the salt or algorithm information.
* @throws PasswordException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
*
*/
function password_hash(string $password, $algo, array $options = null): string
diff --git a/vendor/thecodingmachine/safe/deprecated/strings.php b/vendor/thecodingmachine/safe/deprecated/strings.php
new file mode 100644
index 000000000..de0c2e606
--- /dev/null
+++ b/vendor/thecodingmachine/safe/deprecated/strings.php
@@ -0,0 +1,677 @@
+<?php
+
+namespace Safe;
+
+use Safe\Exceptions\StringsException;
+
+/**
+ * Returns a string produced according to the formatting string
+ * format.
+ *
+ * @param string $format The format string is composed of zero or more directives:
+ * ordinary characters (excluding %) that are
+ * copied directly to the result and conversion
+ * specifications, each of which results in fetching its
+ * own parameter.
+ *
+ * A conversion specification follows this prototype:
+ * %[argnum$][flags][width][.precision]specifier.
+ *
+ * An integer followed by a dollar sign $,
+ * to specify which number argument to treat in the conversion.
+ *
+ *
+ * Flags
+ *
+ *
+ *
+ * Flag
+ * Description
+ *
+ *
+ *
+ *
+ * -
+ *
+ * Left-justify within the given field width;
+ * Right justification is the default
+ *
+ *
+ *
+ * +
+ *
+ * Prefix positive numbers with a plus sign
+ * +; Default only negative
+ * are prefixed with a negative sign.
+ *
+ *
+ *
+ * (space)
+ *
+ * Pads the result with spaces.
+ * This is the default.
+ *
+ *
+ *
+ * 0
+ *
+ * Only left-pads numbers with zeros.
+ * With s specifiers this can
+ * also right-pad with zeros.
+ *
+ *
+ *
+ * '(char)
+ *
+ * Pads the result with the character (char).
+ *
+ *
+ *
+ *
+ *
+ *
+ * An integer that says how many characters (minimum)
+ * this conversion should result in.
+ *
+ * A period . followed by an integer
+ * who's meaning depends on the specifier:
+ *
+ *
+ *
+ * For e, E,
+ * f and F
+ * specifiers: this is the number of digits to be printed
+ * after the decimal point (by default, this is 6).
+ *
+ *
+ *
+ *
+ * For g and G
+ * specifiers: this is the maximum number of significant
+ * digits to be printed.
+ *
+ *
+ *
+ *
+ * For s specifier: it acts as a cutoff point,
+ * setting a maximum character limit to the string.
+ *
+ *
+ *
+ *
+ *
+ * If the period is specified without an explicit value for precision,
+ * 0 is assumed.
+ *
+ *
+ *
+ *
+ * Specifiers
+ *
+ *
+ *
+ * Specifier
+ * Description
+ *
+ *
+ *
+ *
+ * %
+ *
+ * A literal percent character. No argument is required.
+ *
+ *
+ *
+ * b
+ *
+ * The argument is treated as an integer and presented
+ * as a binary number.
+ *
+ *
+ *
+ * c
+ *
+ * The argument is treated as an integer and presented
+ * as the character with that ASCII.
+ *
+ *
+ *
+ * d
+ *
+ * The argument is treated as an integer and presented
+ * as a (signed) decimal number.
+ *
+ *
+ *
+ * e
+ *
+ * The argument is treated as scientific notation (e.g. 1.2e+2).
+ * The precision specifier stands for the number of digits after the
+ * decimal point since PHP 5.2.1. In earlier versions, it was taken as
+ * number of significant digits (one less).
+ *
+ *
+ *
+ * E
+ *
+ * Like the e specifier but uses
+ * uppercase letter (e.g. 1.2E+2).
+ *
+ *
+ *
+ * f
+ *
+ * The argument is treated as a float and presented
+ * as a floating-point number (locale aware).
+ *
+ *
+ *
+ * F
+ *
+ * The argument is treated as a float and presented
+ * as a floating-point number (non-locale aware).
+ * Available as of PHP 5.0.3.
+ *
+ *
+ *
+ * g
+ *
+ *
+ * General format.
+ *
+ *
+ * Let P equal the precision if nonzero, 6 if the precision is omitted,
+ * or 1 if the precision is zero.
+ * Then, if a conversion with style E would have an exponent of X:
+ *
+ *
+ * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
+ * Otherwise, the conversion is with style e and precision P − 1.
+ *
+ *
+ *
+ *
+ * G
+ *
+ * Like the g specifier but uses
+ * E and f.
+ *
+ *
+ *
+ * o
+ *
+ * The argument is treated as an integer and presented
+ * as an octal number.
+ *
+ *
+ *
+ * s
+ *
+ * The argument is treated and presented as a string.
+ *
+ *
+ *
+ * u
+ *
+ * The argument is treated as an integer and presented
+ * as an unsigned decimal number.
+ *
+ *
+ *
+ * x
+ *
+ * The argument is treated as an integer and presented
+ * as a hexadecimal number (with lowercase letters).
+ *
+ *
+ *
+ * X
+ *
+ * The argument is treated as an integer and presented
+ * as a hexadecimal number (with uppercase letters).
+ *
+ *
+ *
+ *
+ *
+ *
+ * General format.
+ *
+ * Let P equal the precision if nonzero, 6 if the precision is omitted,
+ * or 1 if the precision is zero.
+ * Then, if a conversion with style E would have an exponent of X:
+ *
+ * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
+ * Otherwise, the conversion is with style e and precision P − 1.
+ *
+ * The c type specifier ignores padding and width
+ *
+ * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
+ *
+ * Variables will be co-erced to a suitable type for the specifier:
+ *
+ * Type Handling
+ *
+ *
+ *
+ * Type
+ * Specifiers
+ *
+ *
+ *
+ *
+ * string
+ * s
+ *
+ *
+ * integer
+ *
+ * d,
+ * u,
+ * c,
+ * o,
+ * x,
+ * X,
+ * b
+ *
+ *
+ *
+ * double
+ *
+ * g,
+ * G,
+ * e,
+ * E,
+ * f,
+ * F
+ *
+ *
+ *
+ *
+ *
+ * @param mixed $params
+ * @return string Returns a string produced according to the formatting string
+ * format.
+ * @throws StringsException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function sprintf(string $format, ...$params): string
+{
+ error_clear_last();
+ if ($params !== []) {
+ $result = \sprintf($format, ...$params);
+ } else {
+ $result = \sprintf($format);
+ }
+ if ($result === false) {
+ throw StringsException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * Returns the portion of string specified by the
+ * start and length parameters.
+ *
+ * @param string $string The input string.
+ * @param int $start If start is non-negative, the returned string
+ * will start at the start'th position in
+ * string, counting from zero. For instance,
+ * in the string 'abcdef', the character at
+ * position 0 is 'a', the
+ * character at position 2 is
+ * 'c', and so forth.
+ *
+ * If start is negative, the returned string
+ * will start at the start'th character
+ * from the end of string.
+ *
+ * If string is less than
+ * start characters long, FALSE will be returned.
+ *
+ *
+ * Using a negative start
+ *
+ *
+ * ]]>
+ *
+ *
+ * @param int $length If length is given and is positive, the string
+ * returned will contain at most length characters
+ * beginning from start (depending on the length of
+ * string).
+ *
+ * If length is given and is negative, then that many
+ * characters will be omitted from the end of string
+ * (after the start position has been calculated when a
+ * start is negative). If
+ * start denotes the position of this truncation or
+ * beyond, FALSE will be returned.
+ *
+ * If length is given and is 0,
+ * FALSE or NULL, an empty string will be returned.
+ *
+ * If length is omitted, the substring starting from
+ * start until the end of the string will be
+ * returned.
+ * @return string Returns the extracted part of string;, or
+ * an empty string.
+ * @throws StringsException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ *
+ */
+function substr(string $string, int $start, int $length = null): string
+{
+ error_clear_last();
+ if ($length !== null) {
+ $result = \substr($string, $start, $length);
+ } else {
+ $result = \substr($string, $start);
+ }
+ if ($result === false) {
+ throw StringsException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * Operates as sprintf but accepts an array of
+ * arguments, rather than a variable number of arguments.
+ *
+ * @param string $format The format string is composed of zero or more directives:
+ * ordinary characters (excluding %) that are
+ * copied directly to the result and conversion
+ * specifications, each of which results in fetching its
+ * own parameter.
+ *
+ * A conversion specification follows this prototype:
+ * %[argnum$][flags][width][.precision]specifier.
+ *
+ * An integer followed by a dollar sign $,
+ * to specify which number argument to treat in the conversion.
+ *
+ *
+ * Flags
+ *
+ *
+ *
+ * Flag
+ * Description
+ *
+ *
+ *
+ *
+ * -
+ *
+ * Left-justify within the given field width;
+ * Right justification is the default
+ *
+ *
+ *
+ * +
+ *
+ * Prefix positive numbers with a plus sign
+ * +; Default only negative
+ * are prefixed with a negative sign.
+ *
+ *
+ *
+ * (space)
+ *
+ * Pads the result with spaces.
+ * This is the default.
+ *
+ *
+ *
+ * 0
+ *
+ * Only left-pads numbers with zeros.
+ * With s specifiers this can
+ * also right-pad with zeros.
+ *
+ *
+ *
+ * '(char)
+ *
+ * Pads the result with the character (char).
+ *
+ *
+ *
+ *
+ *
+ *
+ * An integer that says how many characters (minimum)
+ * this conversion should result in.
+ *
+ * A period . followed by an integer
+ * who's meaning depends on the specifier:
+ *
+ *
+ *
+ * For e, E,
+ * f and F
+ * specifiers: this is the number of digits to be printed
+ * after the decimal point (by default, this is 6).
+ *
+ *
+ *
+ *
+ * For g and G
+ * specifiers: this is the maximum number of significant
+ * digits to be printed.
+ *
+ *
+ *
+ *
+ * For s specifier: it acts as a cutoff point,
+ * setting a maximum character limit to the string.
+ *
+ *
+ *
+ *
+ *
+ * If the period is specified without an explicit value for precision,
+ * 0 is assumed.
+ *
+ *
+ *
+ *
+ * Specifiers
+ *
+ *
+ *
+ * Specifier
+ * Description
+ *
+ *
+ *
+ *
+ * %
+ *
+ * A literal percent character. No argument is required.
+ *
+ *
+ *
+ * b
+ *
+ * The argument is treated as an integer and presented
+ * as a binary number.
+ *
+ *
+ *
+ * c
+ *
+ * The argument is treated as an integer and presented
+ * as the character with that ASCII.
+ *
+ *
+ *
+ * d
+ *
+ * The argument is treated as an integer and presented
+ * as a (signed) decimal number.
+ *
+ *
+ *
+ * e
+ *
+ * The argument is treated as scientific notation (e.g. 1.2e+2).
+ * The precision specifier stands for the number of digits after the
+ * decimal point since PHP 5.2.1. In earlier versions, it was taken as
+ * number of significant digits (one less).
+ *
+ *
+ *
+ * E
+ *
+ * Like the e specifier but uses
+ * uppercase letter (e.g. 1.2E+2).
+ *
+ *
+ *
+ * f
+ *
+ * The argument is treated as a float and presented
+ * as a floating-point number (locale aware).
+ *
+ *
+ *
+ * F
+ *
+ * The argument is treated as a float and presented
+ * as a floating-point number (non-locale aware).
+ * Available as of PHP 5.0.3.
+ *
+ *
+ *
+ * g
+ *
+ *
+ * General format.
+ *
+ *
+ * Let P equal the precision if nonzero, 6 if the precision is omitted,
+ * or 1 if the precision is zero.
+ * Then, if a conversion with style E would have an exponent of X:
+ *
+ *
+ * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
+ * Otherwise, the conversion is with style e and precision P − 1.
+ *
+ *
+ *
+ *
+ * G
+ *
+ * Like the g specifier but uses
+ * E and f.
+ *
+ *
+ *
+ * o
+ *
+ * The argument is treated as an integer and presented
+ * as an octal number.
+ *
+ *
+ *
+ * s
+ *
+ * The argument is treated and presented as a string.
+ *
+ *
+ *
+ * u
+ *
+ * The argument is treated as an integer and presented
+ * as an unsigned decimal number.
+ *
+ *
+ *
+ * x
+ *
+ * The argument is treated as an integer and presented
+ * as a hexadecimal number (with lowercase letters).
+ *
+ *
+ *
+ * X
+ *
+ * The argument is treated as an integer and presented
+ * as a hexadecimal number (with uppercase letters).
+ *
+ *
+ *
+ *
+ *
+ *
+ * General format.
+ *
+ * Let P equal the precision if nonzero, 6 if the precision is omitted,
+ * or 1 if the precision is zero.
+ * Then, if a conversion with style E would have an exponent of X:
+ *
+ * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
+ * Otherwise, the conversion is with style e and precision P − 1.
+ *
+ * The c type specifier ignores padding and width
+ *
+ * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
+ *
+ * Variables will be co-erced to a suitable type for the specifier:
+ *
+ * Type Handling
+ *
+ *
+ *
+ * Type
+ * Specifiers
+ *
+ *
+ *
+ *
+ * string
+ * s
+ *
+ *
+ * integer
+ *
+ * d,
+ * u,
+ * c,
+ * o,
+ * x,
+ * X,
+ * b
+ *
+ *
+ *
+ * double
+ *
+ * g,
+ * G,
+ * e,
+ * E,
+ * f,
+ * F
+ *
+ *
+ *
+ *
+ *
+ * @param array $args
+ * @return string Return array values as a formatted string according to
+ * format.
+ * @throws StringsException
+ * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
+ */
+function vsprintf(string $format, array $args): string
+{
+ error_clear_last();
+ $result = \vsprintf($format, $args);
+ if ($result === false) {
+ throw StringsException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/docker-compose.yml b/vendor/thecodingmachine/safe/docker-compose.yml
new file mode 100644
index 000000000..c4a24c466
--- /dev/null
+++ b/vendor/thecodingmachine/safe/docker-compose.yml
@@ -0,0 +1,7 @@
+version: '3.7'
+services:
+
+ app:
+ image: thecodingmachine/php:8.1-v4-apache
+ volumes:
+ - ./:/var/www/html
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php b/vendor/thecodingmachine/safe/generated/Exceptions/GettextException.php
index bcf36b3ce..0228ce234 100644
--- a/vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php
+++ b/vendor/thecodingmachine/safe/generated/Exceptions/GettextException.php
@@ -1,7 +1,7 @@
<?php
namespace Safe\Exceptions;
-class PdfException extends \ErrorException implements SafeExceptionInterface
+class GettextException extends \ErrorException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php b/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php
deleted file mode 100644
index ca40822e9..000000000
--- a/vendor/thecodingmachine/safe/generated/Exceptions/IngresiiException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class IngresiiException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php
deleted file mode 100644
index c67314ea8..000000000
--- a/vendor/thecodingmachine/safe/generated/Exceptions/MsqlException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class MsqlException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php
deleted file mode 100644
index 5e9b55944..000000000
--- a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndMsException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class MysqlndMsException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php b/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php
deleted file mode 100644
index 4db9f4911..000000000
--- a/vendor/thecodingmachine/safe/generated/Exceptions/MysqlndQcException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class MysqlndQcException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/apache.php b/vendor/thecodingmachine/safe/generated/apache.php
index e71c32d7b..2bb3632a9 100644
--- a/vendor/thecodingmachine/safe/generated/apache.php
+++ b/vendor/thecodingmachine/safe/generated/apache.php
@@ -26,8 +26,6 @@ function apache_get_version(): string
* Retrieve an Apache environment variable specified by
* variable.
*
- * This function requires Apache 2 otherwise it's undefined.
- *
* @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
@@ -46,18 +44,46 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string
/**
- * Fetches all HTTP request headers from the current request. Works in the
- * Apache, FastCGI, CLI, FPM and NSAPI server module
- * in Netscape/iPlanet/SunONE webservers.
- *
- * @return array An associative array of all the HTTP headers in the current request.
+ * 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.
* @throws ApacheException
*
*/
-function apache_request_headers(): array
+function apache_lookup_uri(string $filename): object
{
error_clear_last();
- $result = \apache_request_headers();
+ $result = \apache_lookup_uri($filename);
if ($result === false) {
throw ApacheException::createFromPhpError();
}
@@ -66,31 +92,27 @@ function apache_request_headers(): array
/**
- * apache_reset_timeout resets the Apache write timer,
- * which defaults to 300 seconds. With set_time_limit(0);
- * ignore_user_abort(true) and periodic
- * apache_reset_timeout calls, Apache can theoretically
- * run forever.
- *
- * This function requires Apache 1.
+ * 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.
* @throws ApacheException
*
*/
-function apache_reset_timeout(): void
+function apache_request_headers(): array
{
error_clear_last();
- $result = \apache_reset_timeout();
+ $result = \apache_request_headers();
if ($result === false) {
throw ApacheException::createFromPhpError();
}
+ return $result;
}
/**
* Fetch all HTTP response headers. Works in the
- * Apache, FastCGI, CLI, FPM and NSAPI server module
- * in Netscape/iPlanet/SunONE webservers.
+ * Apache, FastCGI, CLI, and FPM webservers.
*
* @return array An array of all Apache response headers on success.
* @throws ApacheException
@@ -163,14 +185,14 @@ function getallheaders(): array
* To run the sub-request, all buffers are terminated and flushed to the
* browser, pending headers are sent too.
*
- * @param string $filename The file that the virtual command will be performed on.
+ * @param string $uri The file that the virtual command will be performed on.
* @throws ApacheException
*
*/
-function virtual(string $filename): void
+function virtual(string $uri): void
{
error_clear_last();
- $result = \virtual($filename);
+ $result = \virtual($uri);
if ($result === false) {
throw ApacheException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/array.php b/vendor/thecodingmachine/safe/generated/array.php
index 80c90ff81..37fa077a6 100644
--- a/vendor/thecodingmachine/safe/generated/array.php
+++ b/vendor/thecodingmachine/safe/generated/array.php
@@ -5,62 +5,8 @@ namespace Safe;
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.
- * @throws ArrayException
- *
- */
-function array_combine(array $keys, array $values): array
-{
- error_clear_last();
- $result = \array_combine($keys, $values);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * 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 integer 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.
- * @throws ArrayException
- *
- */
-function array_flip(array $array): array
-{
- error_clear_last();
- $result = \array_flip($array);
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* array_replace_recursive replaces the values of
- * array1 with the same values from all the following
+ * 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.
@@ -77,19 +23,19 @@ function array_flip(array $array): array
* are both arrays, array_replace_recursive will replace
* their respective value recursively.
*
- * @param array $array1 The array in which elements are replaced.
- * @param array $params Optional. Arrays from which elements will be extracted.
+ * @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.
* @throws ArrayException
*
*/
-function array_replace_recursive(array $array1, array ...$params): array
+function array_replace_recursive(array $array, array ...$replacements): array
{
error_clear_last();
- if ($params !== []) {
- $result = \array_replace_recursive($array1, ...$params);
+ if ($replacements !== []) {
+ $result = \array_replace_recursive($array, ...$replacements);
} else {
- $result = \array_replace_recursive($array1);
+ $result = \array_replace_recursive($array);
}
if ($result === null) {
throw ArrayException::createFromPhpError();
@@ -100,7 +46,7 @@ function array_replace_recursive(array $array1, array ...$params): array
/**
* array_replace replaces the values of
- * array1 with values having the same keys in each of the following
+ * 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.
@@ -111,20 +57,20 @@ function array_replace_recursive(array $array1, array ...$params): array
* array_replace is not recursive : it will replace
* values in the first array by whatever type is in the second array.
*
- * @param array $array1 The array in which elements are replaced.
- * @param array $params Arrays from which elements will be extracted.
+ * @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.
* @throws ArrayException
*
*/
-function array_replace(array $array1, array ...$params): array
+function array_replace(array $array, array ...$replacements): array
{
error_clear_last();
- if ($params !== []) {
- $result = \array_replace($array1, ...$params);
+ if ($replacements !== []) {
+ $result = \array_replace($array, ...$replacements);
} else {
- $result = \array_replace($array1);
+ $result = \array_replace($array);
}
if ($result === null) {
throw ArrayException::createFromPhpError();
@@ -138,7 +84,7 @@ function array_replace(array $array1, array ...$params): array
* element of the array. This function will recurse
* into deeper arrays.
*
- * @param array $array The input array.
+ * @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.
@@ -149,168 +95,20 @@ function array_replace(array $array1, array ...$params): array
* reference. Then,
* any changes made to those elements will be made in the
* original array itself.
- * @param mixed $userdata If the optional userdata parameter is supplied,
+ * @param mixed $arg If the optional arg parameter is supplied,
* it will be passed as the third parameter to the
* callback.
* @throws ArrayException
*
*/
-function array_walk_recursive(array &$array, callable $callback, $userdata = null): void
-{
- error_clear_last();
- $result = \array_walk_recursive($array, $callback, $userdata);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * This function sorts an array such that array indices maintain their
- * correlation with the array elements they are associated with.
- *
- * This is used mainly when sorting associative arrays where the actual
- * element order is significant.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
- * sort_flags, for details see
- * sort.
- * @throws ArrayException
- *
- */
-function arsort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \arsort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * This function sorts an array such that array indices maintain
- * their correlation with the array elements they are associated
- * with. This is used mainly when sorting associative arrays where
- * the actual element order is significant.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional
- * parameter sort_flags, for details
- * see sort.
- * @throws ArrayException
- *
- */
-function asort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \asort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * Sorts an array by key in reverse order, maintaining key to data
- * correlations. This is useful mainly for associative arrays.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
- * sort_flags, for details see
- * sort.
- * @throws ArrayException
- *
- */
-function krsort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \krsort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * Sorts an array by key, maintaining key to data correlations. This is
- * useful mainly for associative arrays.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional
- * parameter sort_flags, for details
- * see sort.
- * @throws ArrayException
- *
- */
-function ksort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \ksort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * natcasesort is a case insensitive version of
- * natsort.
- *
- * This function implements a sort algorithm that orders
- * alphanumeric strings in the way a human being would while maintaining
- * key/value associations. This is described as a "natural ordering".
- *
- * @param array $array The input array.
- * @throws ArrayException
- *
- */
-function natcasesort(array &$array): void
-{
- error_clear_last();
- $result = \natcasesort($array);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * This function implements a sort algorithm that orders alphanumeric strings
- * in the way a human being would while maintaining key/value associations.
- * This is described as a "natural ordering". An example of the difference
- * between this algorithm and the regular computer string sorting algorithms
- * (used in sort) can be seen in the example below.
- *
- * @param array $array The input array.
- * @throws ArrayException
- *
- */
-function natsort(array &$array): void
+function array_walk_recursive(&$array, callable $callback, $arg = null): void
{
error_clear_last();
- $result = \natsort($array);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
+ if ($arg !== null) {
+ $result = \array_walk_recursive($array, $callback, $arg);
+ } else {
+ $result = \array_walk_recursive($array, $callback);
}
-}
-
-
-/**
- * This function sorts an array in reverse order (highest to lowest).
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional
- * parameter sort_flags, for details see
- * sort.
- * @throws ArrayException
- *
- */
-function rsort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \rsort($array, $sort_flags);
if ($result === false) {
throw ArrayException::createFromPhpError();
}
@@ -334,131 +132,3 @@ function shuffle(array &$array): void
throw ArrayException::createFromPhpError();
}
}
-
-
-/**
- * This function sorts an array. Elements will be arranged from
- * lowest to highest when this function has completed.
- *
- * @param array $array The input array.
- * @param int $sort_flags The optional second parameter sort_flags
- * may be used to modify the sorting behavior using these values:
- *
- * Sorting type flags:
- *
- *
- * SORT_REGULAR - compare items normally;
- * the details are described in the comparison operators section
- *
- *
- * SORT_NUMERIC - compare items numerically
- *
- *
- * SORT_STRING - compare items as strings
- *
- *
- *
- * SORT_LOCALE_STRING - compare items as
- * strings, based on the current locale. It uses the locale,
- * which can be changed using setlocale
- *
- *
- *
- *
- * SORT_NATURAL - compare items as strings
- * using "natural ordering" like natsort
- *
- *
- *
- *
- * SORT_FLAG_CASE - can be combined
- * (bitwise OR) with
- * SORT_STRING or
- * SORT_NATURAL to sort strings case-insensitively
- *
- *
- *
- * @throws ArrayException
- *
- */
-function sort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \sort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * This function sorts an array such that array indices maintain their
- * correlation with the array elements they are associated with, using a
- * user-defined comparison function.
- *
- * This is used mainly when sorting associative arrays where the actual
- * element order is significant.
- *
- * @param array $array The input array.
- * @param callable $value_compare_func See usort and uksort for
- * examples of user-defined comparison functions.
- * @throws ArrayException
- *
- */
-function uasort(array &$array, callable $value_compare_func): void
-{
- error_clear_last();
- $result = \uasort($array, $value_compare_func);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * uksort will sort the keys of an array using a
- * user-supplied comparison function. If the array you wish to sort
- * needs to be sorted by some non-trivial criteria, you should use
- * this function.
- *
- * @param array $array The input array.
- * @param callable $key_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
- * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.
- * @throws ArrayException
- *
- */
-function uksort(array &$array, callable $key_compare_func): void
-{
- error_clear_last();
- $result = \uksort($array, $key_compare_func);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-
-/**
- * This function will sort an array by its values using a user-supplied
- * comparison function. If the array you wish to sort needs to be sorted by
- * some non-trivial criteria, you should use this function.
- *
- * @param array $array The input array.
- * @param callable $value_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
- * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.
- *
- * Returning non-integer values from the comparison
- * function, such as float, will result in an internal cast to
- * integer of the callback's return value. So values such as
- * 0.99 and 0.1 will both be cast to an integer value of 0, which will
- * compare such values as equal.
- * @throws ArrayException
- *
- */
-function usort(array &$array, callable $value_compare_func): void
-{
- error_clear_last();
- $result = \usort($array, $value_compare_func);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/bzip2.php b/vendor/thecodingmachine/safe/generated/bzip2.php
index 77302aa00..8087c748a 100644
--- a/vendor/thecodingmachine/safe/generated/bzip2.php
+++ b/vendor/thecodingmachine/safe/generated/bzip2.php
@@ -23,8 +23,9 @@ function bzclose($bz): void
/**
- * Forces a write of all buffered bzip2 data for the file pointer
- * bz.
+ * 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.
diff --git a/vendor/thecodingmachine/safe/generated/calendar.php b/vendor/thecodingmachine/safe/generated/calendar.php
index aae699923..a5b03905e 100644
--- a/vendor/thecodingmachine/safe/generated/calendar.php
+++ b/vendor/thecodingmachine/safe/generated/calendar.php
@@ -5,21 +5,24 @@ namespace Safe;
use Safe\Exceptions\CalendarException;
/**
- * This function will return a Unix timestamp corresponding to the
- * Julian Day given in jday or FALSE if
- * jday is outside of the allowed range. The time returned is
- * UTC.
+ * 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 $jday A julian day number between 2440588 and 106751993607888
- * on 64bit systems, or between 2440588 and 2465443 on 32bit systems.
- * @return int The unix timestamp for the start (midnight, not noon) of the given Julian day.
+ * @param int $timestamp A unix timestamp to convert.
+ * @return int A julian day number as integer.
* @throws CalendarException
*
*/
-function jdtounix(int $jday): int
+function unixtojd(int $timestamp = null): int
{
error_clear_last();
- $result = \jdtounix($jday);
+ if ($timestamp !== null) {
+ $result = \unixtojd($timestamp);
+ } else {
+ $result = \unixtojd();
+ }
if ($result === false) {
throw CalendarException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/classobj.php b/vendor/thecodingmachine/safe/generated/classobj.php
index 98147ac26..dd2535aef 100644
--- a/vendor/thecodingmachine/safe/generated/classobj.php
+++ b/vendor/thecodingmachine/safe/generated/classobj.php
@@ -6,19 +6,19 @@ use Safe\Exceptions\ClassobjException;
/**
* Creates an alias named alias
- * based on the user defined class original.
+ * based on the user defined class class.
* The aliased class is exactly the same as the original class.
*
- * @param string $original 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.
* @throws ClassobjException
*
*/
-function class_alias(string $original, string $alias, bool $autoload = true): void
+function class_alias(string $class, string $alias, bool $autoload = true): void
{
error_clear_last();
- $result = \class_alias($original, $alias, $autoload);
+ $result = \class_alias($class, $alias, $autoload);
if ($result === false) {
throw ClassobjException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/com.php b/vendor/thecodingmachine/safe/generated/com.php
index 53643f9d7..68e058f2d 100644
--- a/vendor/thecodingmachine/safe/generated/com.php
+++ b/vendor/thecodingmachine/safe/generated/com.php
@@ -5,34 +5,55 @@ namespace Safe;
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.
+ * @throws ComException
+ *
+ */
+function com_create_guid(): string
+{
+ error_clear_last();
+ $result = \com_create_guid();
+ if ($result === false) {
+ throw ComException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Instructs COM to sink events generated by
- * comobject into the PHP object
- * sinkobject.
+ * 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 $comobject
- * @param object $sinkobject sinkobject should be an instance of a class with
+ * @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 $sinkinterface PHP will attempt to use the default dispinterface type specified by
- * the typelibrary associated with comobject, but
+ * @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
- * sinkinterface to the name of the dispinterface
+ * sink_interface to the name of the dispinterface
* that you want to use.
* @throws ComException
*
*/
-function com_event_sink(object $comobject, object $sinkobject, $sinkinterface = null): void
+function com_event_sink(object $variant, object $sink_object, $sink_interface = null): void
{
error_clear_last();
- if ($sinkinterface !== null) {
- $result = \com_event_sink($comobject, $sinkobject, $sinkinterface);
+ if ($sink_interface !== null) {
+ $result = \com_event_sink($variant, $sink_object, $sink_interface);
} else {
- $result = \com_event_sink($comobject, $sinkobject);
+ $result = \com_event_sink($variant, $sink_object);
}
if ($result === false) {
throw ComException::createFromPhpError();
@@ -44,15 +65,15 @@ function com_event_sink(object $comobject, object $sinkobject, $sinkinterface =
* 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
+ * 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 you have turned on , then
+ * 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_name typelib_name can be one of the following:
+ * @param string $typelib typelib can be one of the following:
*
*
*
@@ -86,16 +107,16 @@ function com_event_sink(object $comobject, object $sinkobject, $sinkinterface =
*
* The type library name, e.g. Microsoft OLE DB ActiveX Data
* Objects 1.0 Library.
- * @param bool $case_sensitive The case_sensitive behaves inversely to
+ * @param bool $case_insensitive The case_insensitive behaves inversely to
* the parameter $case_insensitive in the define
* function.
* @throws ComException
*
*/
-function com_load_typelib(string $typelib_name, bool $case_sensitive = true): void
+function com_load_typelib(string $typelib, bool $case_insensitive = true): void
{
error_clear_last();
- $result = \com_load_typelib($typelib_name, $case_sensitive);
+ $result = \com_load_typelib($typelib, $case_insensitive);
if ($result === false) {
throw ComException::createFromPhpError();
}
@@ -108,20 +129,68 @@ function com_load_typelib(string $typelib_name, bool $case_sensitive = true): vo
* 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 $comobject comobject should be either an instance of a COM
+ * @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 string $dispinterface The name of an IDispatch descendant interface that you want to display.
- * @param bool $wantsink If set to TRUE, the corresponding sink interface will be displayed
+ * @param 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.
* @throws ComException
*
*/
-function com_print_typeinfo(object $comobject, string $dispinterface = null, bool $wantsink = false): void
+function com_print_typeinfo(object $variant, string $dispatch_interface = null, bool $display_sink = false): void
{
error_clear_last();
- $result = \com_print_typeinfo($comobject, $dispinterface, $wantsink);
+ if ($display_sink !== false) {
+ $result = \com_print_typeinfo($variant, $dispatch_interface, $display_sink);
+ } elseif ($dispatch_interface !== null) {
+ $result = \com_print_typeinfo($variant, $dispatch_interface);
+ } else {
+ $result = \com_print_typeinfo($variant);
+ }
if ($result === false) {
throw ComException::createFromPhpError();
}
}
+
+
+/**
+ * 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.
+ * @throws ComException
+ *
+ */
+function variant_date_to_timestamp(object $variant): int
+{
+ error_clear_last();
+ $result = \variant_date_to_timestamp($variant);
+ if ($result === null) {
+ throw ComException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ComException
+ *
+ */
+function variant_round($value, int $decimals)
+{
+ error_clear_last();
+ $result = \variant_round($value, $decimals);
+ if ($result === null) {
+ throw ComException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/generated/cubrid.php b/vendor/thecodingmachine/safe/generated/cubrid.php
index f19f2d56e..559bc9735 100644
--- a/vendor/thecodingmachine/safe/generated/cubrid.php
+++ b/vendor/thecodingmachine/safe/generated/cubrid.php
@@ -5,6 +5,433 @@ namespace Safe;
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).
+ * @throws CubridException
+ *
+ */
+function cubrid_bind($req_identifier, int $bind_index, $bind_value, string $bind_value_type = null): void
+{
+ error_clear_last();
+ if ($bind_value_type !== null) {
+ $result = \cubrid_bind($req_identifier, $bind_index, $bind_value, $bind_value_type);
+ } else {
+ $result = \cubrid_bind($req_identifier, $bind_index, $bind_value);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int
+{
+ error_clear_last();
+ $result = \cubrid_col_size($conn_identifier, $oid, $attr_name);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_column_names($req_identifier): array
+{
+ error_clear_last();
+ $result = \cubrid_column_names($req_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_column_types($req_identifier): array
+{
+ error_clear_last();
+ $result = \cubrid_column_types($req_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_commit($conn_identifier): void
+{
+ error_clear_last();
+ $result = \cubrid_commit($conn_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ *
+ * &lt;url&gt; ::= CUBRID:&lt;host&gt;:&lt;db_name&gt;:&lt;db_user&gt;:&lt;db_password&gt;:[?&lt;properties&gt;]
+ *
+ * &lt;properties&gt; ::= &lt;property&gt; [&amp;&lt;property&gt;]
+ *
+ * &lt;properties&gt; ::= alhosts=&lt;alternative_hosts&gt;[ &amp;rctime=&lt;time&gt;]
+ *
+ * &lt;properties&gt; ::= login_timeout=&lt;milli_sec&gt;
+ *
+ * &lt;properties&gt; ::= query_timeout=&lt;milli_sec&gt;
+ *
+ * &lt;properties&gt; ::= disconnect_on_query_timeout=true|false
+ *
+ * &lt;alternative_hosts&gt; ::= &lt;standby_broker1_host&gt;:&lt;port&gt; [,&lt;standby_broker2_host&gt;:&lt;port&gt;]
+ *
+ * &lt;host&gt; := HOSTNAME | IP_ADDR
+ *
+ * &lt;time&gt; := SECOND
+ *
+ * &lt;milli_sec&gt; := 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_connect_with_url(string $conn_url, string $userid = null, string $passwd = null, bool $new_link = false)
+{
+ error_clear_last();
+ if ($new_link !== false) {
+ $result = \cubrid_connect_with_url($conn_url, $userid, $passwd, $new_link);
+ } elseif ($passwd !== null) {
+ $result = \cubrid_connect_with_url($conn_url, $userid, $passwd);
+ } elseif ($userid !== null) {
+ $result = \cubrid_connect_with_url($conn_url, $userid);
+ } else {
+ $result = \cubrid_connect_with_url($conn_url);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_connect(string $host, int $port, string $dbname, string $userid = null, string $passwd = null, bool $new_link = false)
+{
+ error_clear_last();
+ if ($new_link !== false) {
+ $result = \cubrid_connect($host, $port, $dbname, $userid, $passwd, $new_link);
+ } elseif ($passwd !== null) {
+ $result = \cubrid_connect($host, $port, $dbname, $userid, $passwd);
+ } elseif ($userid !== null) {
+ $result = \cubrid_connect($host, $port, $dbname, $userid);
+ } else {
+ $result = \cubrid_connect($host, $port, $dbname);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_current_oid($req_identifier): string
+{
+ error_clear_last();
+ $result = \cubrid_current_oid($req_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_disconnect($conn_identifier = null): void
+{
+ error_clear_last();
+ if ($conn_identifier !== null) {
+ $result = \cubrid_disconnect($conn_identifier);
+ } else {
+ $result = \cubrid_disconnect();
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_drop($conn_identifier, string $oid): void
+{
+ error_clear_last();
+ $result = \cubrid_drop($conn_identifier, $oid);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
* 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
@@ -30,9 +457,7 @@ function cubrid_free_result($req_identifier): void
* cubrid_client_encoding.
*
* @param resource $conn_identifier The CUBRID connection.
- * @return string A string that represents the CUBRID connection charset; on success.
- *
- * FALSE on failure.
+ * @return string A string that represents the CUBRID connection charset on success.
* @throws CubridException
*
*/
@@ -48,11 +473,31 @@ function cubrid_get_charset($conn_identifier): string
/**
- * This function returns a string that represents the client library version.
+ * 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.
*
- * @return string A string that represents the client library version; on success.
+ * @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.
+ * @throws CubridException
*
- * FALSE on failure.
+ */
+function cubrid_get_class_name($conn_identifier, string $oid): string
+{
+ error_clear_last();
+ $result = \cubrid_get_class_name($conn_identifier, $oid);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * This function returns a string that represents the client library version.
+ *
+ * @return string A string that represents the client library version on success.
* @throws CubridException
*
*/
@@ -68,9 +513,8 @@ function cubrid_get_client_info(): string
/**
- * This function returns the CUBRID database parameters or it returns FALSE on
- * failure. It returns an associative array with the values for the following
- * parameters:
+ * This function returns the CUBRID database parameters.
+ * It returns an associative array with the values for the following parameters:
*
*
* PARAM_ISOLATION_LEVEL
@@ -178,8 +622,6 @@ function cubrid_get_client_info(): string
* @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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -195,12 +637,30 @@ 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_get_query_timeout($req_identifier): int
+{
+ error_clear_last();
+ $result = \cubrid_get_query_timeout($req_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* 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.
- *
- * FALSE on failure.
+ * @return string A string that represents the CUBRID server version on success.
* @throws CubridException
*
*/
@@ -248,6 +708,199 @@ 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob_close(array $lob_identifier_array): void
+{
+ error_clear_last();
+ $result = \cubrid_lob_close($lob_identifier_array);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name): void
+{
+ error_clear_last();
+ $result = \cubrid_lob_export($conn_identifier, $lob_identifier, $path_name);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob_get($conn_identifier, string $sql): array
+{
+ error_clear_last();
+ $result = \cubrid_lob_get($conn_identifier, $sql);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob_send($conn_identifier, $lob_identifier): void
+{
+ error_clear_last();
+ $result = \cubrid_lob_send($conn_identifier, $lob_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob_size($lob_identifier): string
+{
+ error_clear_last();
+ $result = \cubrid_lob_size($lob_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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".
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, string $bind_value_type = null): void
+{
+ error_clear_last();
+ if ($bind_value_type !== null) {
+ $result = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value, $bind_value_type);
+ } else {
+ $result = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_close($lob_identifier): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_close($lob_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_export($lob_identifier, string $file_name): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_export($lob_identifier, $file_name);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_import($lob_identifier, string $file_name): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_import($lob_identifier, $file_name);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
* 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.
*
@@ -256,8 +909,6 @@ function cubrid_insert_id($conn_identifier = null): string
* 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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -279,12 +930,108 @@ 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_read($lob_identifier, int $len): string
+{
+ error_clear_last();
+ $result = \cubrid_lob2_read($lob_identifier, $len);
+ if ($result === null) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_seek($lob_identifier, $offset, $origin);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRID_CURSOR_CURRENT): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_seek64($lob_identifier, $offset, $origin);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
* 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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -307,8 +1054,6 @@ function cubrid_lob2_size($lob_identifier): int
*
* @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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -328,8 +1073,6 @@ function cubrid_lob2_size64($lob_identifier): string
*
* @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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -352,8 +1095,6 @@ function cubrid_lob2_tell($lob_identifier): int
*
* @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.
- *
- * FALSE on failure.
* @throws CubridException
*
*/
@@ -369,6 +1110,867 @@ 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lob2_write($lob_identifier, string $buf): void
+{
+ error_clear_last();
+ $result = \cubrid_lob2_write($lob_identifier, $buf);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lock_read($conn_identifier, string $oid): void
+{
+ error_clear_last();
+ $result = \cubrid_lock_read($conn_identifier, $oid);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_lock_write($conn_identifier, string $oid): void
+{
+ error_clear_last();
+ $result = \cubrid_lock_write($conn_identifier, $oid);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): int
+{
+ error_clear_last();
+ $result = \cubrid_move_cursor($req_identifier, $offset, $origin);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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
+ * @throws CubridException
+ *
+ */
+function cubrid_next_result($result): void
+{
+ error_clear_last();
+ $result = \cubrid_next_result($result);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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'.
+ *
+ * &lt;url&gt; ::= CUBRID:&lt;host&gt;:&lt;db_name&gt;:&lt;db_user&gt;:&lt;db_password&gt;:[?&lt;properties&gt;]
+ *
+ * &lt;properties&gt; ::= &lt;property&gt; [&amp;&lt;property&gt;]
+ *
+ * &lt;properties&gt; ::= alhosts=&lt;alternative_hosts&gt;[ &amp;rctime=&lt;time&gt;]
+ *
+ * &lt;properties&gt; ::= login_timeout=&lt;milli_sec&gt;
+ *
+ * &lt;properties&gt; ::= query_timeout=&lt;milli_sec&gt;
+ *
+ * &lt;properties&gt; ::= disconnect_on_query_timeout=true|false
+ *
+ * &lt;alternative_hosts&gt; ::= &lt;standby_broker1_host&gt;:&lt;port&gt; [,&lt;standby_broker2_host&gt;:&lt;port&gt;]
+ *
+ * &lt;host&gt; := HOSTNAME | IP_ADDR
+ *
+ * &lt;time&gt; := SECOND
+ *
+ * &lt;milli_sec&gt; := 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_pconnect_with_url(string $conn_url, string $userid = null, string $passwd = null)
+{
+ error_clear_last();
+ if ($passwd !== null) {
+ $result = \cubrid_pconnect_with_url($conn_url, $userid, $passwd);
+ } elseif ($userid !== null) {
+ $result = \cubrid_pconnect_with_url($conn_url, $userid);
+ } else {
+ $result = \cubrid_pconnect_with_url($conn_url);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_pconnect(string $host, int $port, string $dbname, string $userid = null, string $passwd = null)
+{
+ error_clear_last();
+ if ($passwd !== null) {
+ $result = \cubrid_pconnect($host, $port, $dbname, $userid, $passwd);
+ } elseif ($userid !== null) {
+ $result = \cubrid_pconnect($host, $port, $dbname, $userid);
+ } else {
+ $result = \cubrid_pconnect($host, $port, $dbname);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0)
+{
+ error_clear_last();
+ $result = \cubrid_prepare($conn_identifier, $prepare_stmt, $option);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_put($conn_identifier, string $oid, string $attr = null, $value = null): void
+{
+ error_clear_last();
+ if ($value !== null) {
+ $result = \cubrid_put($conn_identifier, $oid, $attr, $value);
+ } elseif ($attr !== null) {
+ $result = \cubrid_put($conn_identifier, $oid, $attr);
+ } else {
+ $result = \cubrid_put($conn_identifier, $oid);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_rollback($conn_identifier): void
+{
+ error_clear_last();
+ $result = \cubrid_rollback($conn_identifier);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_schema($conn_identifier, int $schema_type, string $class_name = null, string $attr_name = null): array
+{
+ error_clear_last();
+ if ($attr_name !== null) {
+ $result = \cubrid_schema($conn_identifier, $schema_type, $class_name, $attr_name);
+ } elseif ($class_name !== null) {
+ $result = \cubrid_schema($conn_identifier, $schema_type, $class_name);
+ } else {
+ $result = \cubrid_schema($conn_identifier, $schema_type);
+ }
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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).
+ * @throws CubridException
+ *
+ */
+function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $index): void
+{
+ error_clear_last();
+ $result = \cubrid_seq_drop($conn_identifier, $oid, $attr_name, $index);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void
+{
+ error_clear_last();
+ $result = \cubrid_seq_insert($conn_identifier, $oid, $attr_name, $index, $seq_element);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void
+{
+ error_clear_last();
+ $result = \cubrid_seq_put($conn_identifier, $oid, $attr_name, $index, $seq_element);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string $set_element): void
+{
+ error_clear_last();
+ $result = \cubrid_set_add($conn_identifier, $oid, $attr_name, $set_element);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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
+ *
+ * @throws CubridException
+ *
+ */
+function cubrid_set_autocommit($conn_identifier, bool $mode): void
+{
+ error_clear_last();
+ $result = \cubrid_set_autocommit($conn_identifier, $mode);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
* The cubrid_set_db_parameter function is used to set
* the CUBRID database parameters. It can set the following CUBRID database
* parameters:
@@ -393,3 +1995,44 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v
throw CubridException::createFromPhpError();
}
}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, string $set_element): void
+{
+ error_clear_last();
+ $result = \cubrid_set_drop($conn_identifier, $oid, $attr_name, $set_element);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws CubridException
+ *
+ */
+function cubrid_set_query_timeout($req_identifier, int $timeout): void
+{
+ error_clear_last();
+ $result = \cubrid_set_query_timeout($req_identifier, $timeout);
+ if ($result === false) {
+ throw CubridException::createFromPhpError();
+ }
+}
diff --git a/vendor/thecodingmachine/safe/generated/curl.php b/vendor/thecodingmachine/safe/generated/curl.php
index 53f925536..a85379a63 100644
--- a/vendor/thecodingmachine/safe/generated/curl.php
+++ b/vendor/thecodingmachine/safe/generated/curl.php
@@ -5,21 +5,41 @@ namespace Safe;
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();
+ $result = \curl_copy_handle($handle);
+ if ($result === false) {
+ throw CurlException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* This function URL encodes the given string according to RFC 3986.
*
- * @param resource $ch A cURL handle returned by
+ * @param \CurlHandle $handle A cURL handle returned by
* curl_init.
- * @param string $str The string to be encoded.
+ * @param string $string The string to be encoded.
* @return string Returns escaped string.
* @throws CurlException
*
*/
-function curl_escape($ch, string $str): string
+function curl_escape(\CurlHandle $handle, string $string): string
{
error_clear_last();
- $result = \curl_escape($ch, $str);
+ $result = \curl_escape($handle, $string);
if ($result === false) {
- throw CurlException::createFromCurlResource($ch);
+ throw CurlException::createFromPhpError();
}
return $result;
}
@@ -31,7 +51,7 @@ function curl_escape($ch, string $str): string
* This function should be called after initializing a cURL session and all
* the options for the session are set.
*
- * @param resource $ch A cURL handle returned by
+ * @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
@@ -39,12 +59,12 @@ function curl_escape($ch, string $str): string
* @throws CurlException
*
*/
-function curl_exec($ch)
+function curl_exec(\CurlHandle $handle)
{
error_clear_last();
- $result = \curl_exec($ch);
+ $result = \curl_exec($handle);
if ($result === false) {
- throw CurlException::createFromCurlResource($ch);
+ throw CurlException::createFromPhpError();
}
return $result;
}
@@ -53,9 +73,9 @@ function curl_exec($ch)
/**
* Gets information about the last transfer.
*
- * @param resource $ch A cURL handle returned by
+ * @param \CurlHandle $handle A cURL handle returned by
* curl_init.
- * @param int $opt This may be one of the following constants:
+ * @param int $option This may be one of the following constants:
*
*
*
@@ -65,7 +85,7 @@ function curl_exec($ch)
*
*
* CURLINFO_HTTP_CODE - The last response code.
- * As of PHP 5.5.0 and cURL 7.10.8, this is a legacy alias of
+ * As of cURL 7.10.8, this is a legacy alias of
* CURLINFO_RESPONSE_CODE
*
*
@@ -367,9 +387,9 @@ function curl_exec($ch)
*
*
*
- * @return mixed If opt is given, returns its value.
+ * @return mixed If option is given, returns its value.
* Otherwise, returns an associative array with the following elements
- * (which correspond to opt):
+ * (which correspond to option):
*
*
*
@@ -512,16 +532,16 @@ function curl_exec($ch)
* @throws CurlException
*
*/
-function curl_getinfo($ch, int $opt = null)
+function curl_getinfo(\CurlHandle $handle, int $option = null)
{
error_clear_last();
- if ($opt !== null) {
- $result = \curl_getinfo($ch, $opt);
+ if ($option !== null) {
+ $result = \curl_getinfo($handle, $option);
} else {
- $result = \curl_getinfo($ch);
+ $result = \curl_getinfo($handle);
}
if ($result === false) {
- throw CurlException::createFromCurlResource($ch);
+ throw CurlException::createFromPhpError();
}
return $result;
}
@@ -538,34 +558,18 @@ function curl_getinfo($ch, int $opt = null)
*
* The file protocol is disabled by cURL if
* open_basedir is set.
- * @return resource Returns a cURL handle on success, FALSE on errors.
+ * @return \CurlHandle Returns a cURL handle on success, FALSE on errors.
* @throws CurlException
*
*/
-function curl_init(string $url = null)
+function curl_init(string $url = null): \CurlHandle
{
error_clear_last();
- $result = \curl_init($url);
- if ($result === false) {
- throw CurlException::createFromPhpError();
+ if ($url !== null) {
+ $result = \curl_init($url);
+ } else {
+ $result = \curl_init();
}
- return $result;
-}
-
-
-/**
- * Return an integer containing the last multi curl error number.
- *
- * @param resource $mh A cURL multi handle returned by
- * curl_multi_init.
- * @return int Return an integer containing the last multi curl error number.
- * @throws CurlException
- *
- */
-function curl_multi_errno($mh): int
-{
- error_clear_last();
- $result = \curl_multi_errno($mh);
if ($result === false) {
throw CurlException::createFromPhpError();
}
@@ -580,12 +584,12 @@ function curl_multi_errno($mh): int
*
* 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
- * msgs_in_queue will contain the number of remaining messages after this
+ * queued_messages will contain the number of remaining messages after this
* function was called.
*
- * @param resource $mh A cURL multi handle returned by
+ * @param \CurlMultiHandle $multi_handle A cURL multi handle returned by
* curl_multi_init.
- * @param int|null $msgs_in_queue Number of messages that are still in the queue
+ * @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, FALSE on failure.
*
*
@@ -618,10 +622,10 @@ function curl_multi_errno($mh): int
* @throws CurlException
*
*/
-function curl_multi_info_read($mh, ?int &$msgs_in_queue = null): array
+function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array
{
error_clear_last();
- $result = \curl_multi_info_read($mh, $msgs_in_queue);
+ $result = \curl_multi_info_read($multi_handle, $queued_messages);
if ($result === false) {
throw CurlException::createFromPhpError();
}
@@ -632,11 +636,11 @@ function curl_multi_info_read($mh, ?int &$msgs_in_queue = null): array
/**
* Allows the processing of multiple cURL handles asynchronously.
*
- * @return resource Returns a cURL multi handle resource on success, FALSE on failure.
+ * @return \CurlMultiHandle Returns a cURL multi handle on success, FALSE on failure.
* @throws CurlException
*
*/
-function curl_multi_init()
+function curl_multi_init(): \CurlMultiHandle
{
error_clear_last();
$result = \curl_multi_init();
@@ -648,9 +652,154 @@ function curl_multi_init()
/**
+ *
+ *
+ * @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();
+ $result = \curl_multi_setopt($multi_handle, $option, $value);
+ if ($result === false) {
+ throw CurlException::createFromPhpError();
+ }
+}
+
+
+/**
* Sets an option on the given cURL session handle.
*
- * @param resource $ch A cURL handle returned by
+ * @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.
@@ -677,18 +826,6 @@ function curl_multi_init()
*
*
*
- * CURLOPT_BINARYTRANSFER
- *
- * TRUE to return the raw output when
- * CURLOPT_RETURNTRANSFER is used.
- *
- *
- * From PHP 5.1.3, this option has no effect: the raw output will
- * always be returned when
- * CURLOPT_RETURNTRANSFER is used.
- *
- *
- *
* CURLOPT_COOKIESESSION
*
* TRUE to mark this as a new cookie "session". It will force libcurl
@@ -709,7 +846,6 @@ function curl_multi_init()
*
*
* Added in cURL 7.19.1.
- * Available since PHP 5.3.2.
* Requires CURLOPT_VERBOSE to be on to have an effect.
*
*
@@ -722,7 +858,6 @@ function curl_multi_init()
*
*
* Added in 7.15.2.
- * Available since PHP 5.5.0.
*
*
*
@@ -819,9 +954,8 @@ function curl_multi_init()
*
* TRUE to follow any
* "Location: " header that the server sends as
- * part of the HTTP header (note this is recursive, PHP will follow as
- * many "Location: " headers that it is sent,
- * unless CURLOPT_MAXREDIRS is set).
+ * part of the HTTP header.
+ * See also CURLOPT_MAXREDIRS.
*
*
*
@@ -889,7 +1023,7 @@ function curl_multi_init()
* the number of small packets on the network.
*
*
- * Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or
+ * Available for versions compiled with libcurl 7.11.2 or
* greater.
*
*
@@ -925,7 +1059,7 @@ function curl_multi_init()
* TRUE to track the handle's request string.
*
*
- * Available since PHP 5.1.3. The CURLINFO_
+ * The CURLINFO_
* prefix is intentional.
*
*
@@ -963,7 +1097,7 @@ function curl_multi_init()
* FALSE to get the raw HTTP response body.
*
*
- * Available as of PHP 5.5.0 if built against libcurl &gt;= 7.16.2.
+ * Available if built against libcurl &gt;= 7.16.2.
*
*
*
@@ -1082,21 +1216,6 @@ function curl_multi_init()
*
*
*
- * CURLOPT_SAFE_UPLOAD
- *
- * TRUE to disable 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.
- *
- *
- * Added in PHP 5.5.0 with FALSE as the default value. PHP 5.6.0
- * changes the default value to TRUE. PHP 7 removes this option;
- * the CURLFile interface must be used to upload files.
- *
- *
- *
* CURLOPT_SASL_IR
*
* TRUE to enable sending the initial response in the first packet.
@@ -1248,7 +1367,7 @@ function curl_multi_init()
* PHP automatically sets this option to TRUE, this should only be
* changed for debugging purposes.
*
- * value should be an integer for the
+ * value should be an int for the
* following values of the option parameter:
*
*
@@ -1271,21 +1390,6 @@ function curl_multi_init()
*
*
*
- * CURLOPT_CLOSEPOLICY
- *
- * One of the CURLCLOSEPOLICY_* values.
- *
- *
- * This option is deprecated, as it was never implemented in cURL and
- * never had any effect.
- *
- *
- *
- *
- * Removed in PHP 5.6.0.
- *
- *
- *
* CURLOPT_CONNECTTIMEOUT
*
* The number of seconds to wait while trying to connect. Use 0 to
@@ -1305,7 +1409,7 @@ function curl_multi_init()
* timeouts with a minimum timeout allowed of one second.
*
*
- * Added in cURL 7.16.2. Available since PHP 5.2.3.
+ * Added in cURL 7.16.2.
*
*
*
@@ -1472,6 +1576,9 @@ function curl_multi_init()
*
* 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.
*
*
*
@@ -1493,7 +1600,7 @@ function curl_multi_init()
* specific type of redirect occurs.
*
*
- * Added in cURL 7.19.1. Available since PHP 5.3.2.
+ * Added in cURL 7.19.1.
*
*
*
@@ -1640,10 +1747,11 @@ function curl_multi_init()
*
* CURLOPT_SSL_VERIFYHOST
*
- * 1 to check the existence of a common name in the
- * SSL peer certificate. 2 to check the existence of
- * a common name and also verify that it matches the hostname
- * provided. 0 to not check the names. In production environments the value of this option
+ * 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).
*
*
@@ -1760,7 +1868,7 @@ function curl_multi_init()
* supports them. If set to 0 (default) keepalive probes are disabled.
*
*
- * Added in cURL 7.25.0. Available since PHP 5.5.0.
+ * Added in cURL 7.25.0.
*
*
*
@@ -1772,7 +1880,7 @@ function curl_multi_init()
* The default is 60.
*
*
- * Added in cURL 7.25.0. Available since PHP 5.5.0.
+ * Added in cURL 7.25.0.
*
*
*
@@ -1784,7 +1892,7 @@ function curl_multi_init()
* The default is 60.
*
*
- * Added in cURL 7.25.0. Available since PHP 5.5.0.
+ * Added in cURL 7.25.0.
*
*
*
@@ -1797,10 +1905,13 @@ function curl_multi_init()
* a "304 Not Modified" header will be returned
* assuming CURLOPT_HEADER is TRUE.
* Use CURL_TIMECOND_IFUNMODSINCE for the reverse
- * effect. CURL_TIMECOND_IFMODSINCE is the
- * default.
+ * 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.
*
*
*
@@ -1822,15 +1933,14 @@ function curl_multi_init()
* timeouts with a minimum timeout allowed of one second.
*
*
- * Added in cURL 7.16.2. Available since PHP 5.2.3.
+ * Added in cURL 7.16.2.
*
*
*
* CURLOPT_TIMEVALUE
*
* The time in seconds since January 1st, 1970. The time will be used
- * by CURLOPT_TIMECONDITION. By default,
- * CURL_TIMECOND_IFMODSINCE is used.
+ * by CURLOPT_TIMECONDITION.
*
*
*
@@ -1857,7 +1967,7 @@ function curl_multi_init()
* Defaults to unlimited speed.
*
*
- * Added in cURL 7.15.5. Available since PHP 5.4.0.
+ * Added in cURL 7.15.5.
*
*
*
@@ -1869,7 +1979,7 @@ function curl_multi_init()
* Defaults to unlimited speed.
*
*
- * Added in cURL 7.15.5. Available since PHP 5.4.0.
+ * Added in cURL 7.15.5.
*
*
*
@@ -1910,15 +2020,12 @@ function curl_multi_init()
* CURLFTPMETHOD_SINGLECWD.
*
*
- * Added in cURL 7.15.1. Available since PHP 5.3.0.
- *
+ * Added in cURL 7.15.1.
*
*
*
*
*
- * This option is deprecated, as it was never implemented in cURL and
- * never had any effect.
*
* The HTTP authentication method(s) to use. The options are:
* CURLAUTH_BASIC,
@@ -2074,7 +2181,7 @@ function curl_multi_init()
* "RELOAD" loads all cookies from the files specified by CURLOPT_COOKIEFILE.
*
*
- * Available since PHP 5.5.0 and cURL 7.14.1.
+ * Available since cURL 7.14.1.
*
*
*
@@ -2239,10 +2346,7 @@ function curl_multi_init()
*
*
* The full data to post in a HTTP "POST" operation.
- * To post a file, prepend a filename with @ and
- * use the full path. The filetype can be explicitly specified by
- * following the filename with the type in the format
- * ';type=mimetype'. This parameter can either be
+ * This parameter can either be
* passed as a urlencoded string like 'para1=val1&amp;para2=val2&amp;...'
* or as an array with the field name as key and field data as value.
* If value is an array, the
@@ -2250,15 +2354,8 @@ function curl_multi_init()
* multipart/form-data.
*
*
- * As of PHP 5.2.0, value must be an array if
- * files are passed to this option with the @ prefix.
- *
- *
- * As of PHP 5.5.0, the @ prefix is deprecated and
- * files can be sent using CURLFile. The
- * @ prefix can be disabled for safe passing of
- * values beginning with @ by setting the
- * CURLOPT_SAFE_UPLOAD option to TRUE.
+ * Files can be sent using CURLFile or CURLStringFile,
+ * in which case value must be an array.
*
*
*
@@ -2709,7 +2806,16 @@ function curl_multi_init()
* The user name to use in authentication.
*
*
- * Added in cURL 7.19.1. Available since PHP 5.5.0.
+ * Added in cURL 7.19.1.
+ *
+ *
+ *
+ * CURLOPT_PASSWORD
+ *
+ * The password to use in authentication.
+ *
+ *
+ * Added in cURL 7.19.1.
*
*
*
@@ -2864,7 +2970,7 @@ function curl_multi_init()
*
*
*
- * Added in cURL 7.21.3. Available since PHP 5.5.0.
+ * Added in cURL 7.21.3.
*
*
*
@@ -3031,12 +3137,12 @@ function curl_multi_init()
* @throws CurlException
*
*/
-function curl_setopt($ch, int $option, $value): void
+function curl_setopt(\CurlHandle $handle, int $option, $value): void
{
error_clear_last();
- $result = \curl_setopt($ch, $option, $value);
+ $result = \curl_setopt($handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromCurlResource($ch);
+ throw CurlException::createFromPhpError();
}
}
@@ -3044,15 +3150,16 @@ function curl_setopt($ch, int $option, $value): void
/**
* Return an integer containing the last share curl error number.
*
- * @param resource $sh A cURL share handle returned by curl_share_init.
+ * @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.
* @throws CurlException
*
*/
-function curl_share_errno($sh): int
+function curl_share_errno(\CurlShareHandle $share_handle): int
{
error_clear_last();
- $result = \curl_share_errno($sh);
+ $result = \curl_share_errno($share_handle);
if ($result === false) {
throw CurlException::createFromPhpError();
}
@@ -3063,7 +3170,8 @@ function curl_share_errno($sh): int
/**
* Sets an option on the given cURL share handle.
*
- * @param resource $sh A cURL share handle returned by curl_share_init.
+ * @param \CurlShareHandle $share_handle A cURL share handle returned by
+ * curl_share_init.
* @param int $option
*
*
@@ -3088,7 +3196,7 @@ function curl_share_errno($sh): int
*
*
*
- * @param string $value
+ * @param mixed $value
*
*
*
@@ -3125,10 +3233,10 @@ function curl_share_errno($sh): int
* @throws CurlException
*
*/
-function curl_share_setopt($sh, int $option, string $value): void
+function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): void
{
error_clear_last();
- $result = \curl_share_setopt($sh, $option, $value);
+ $result = \curl_share_setopt($share_handle, $option, $value);
if ($result === false) {
throw CurlException::createFromPhpError();
}
@@ -3138,19 +3246,19 @@ function curl_share_setopt($sh, int $option, string $value): void
/**
* This function decodes the given URL encoded string.
*
- * @param resource $ch A cURL handle returned by
+ * @param \CurlHandle $handle A cURL handle returned by
* curl_init.
- * @param string $str The URL encoded string to be decoded.
+ * @param string $string The URL encoded string to be decoded.
* @return string Returns decoded string.
* @throws CurlException
*
*/
-function curl_unescape($ch, string $str): string
+function curl_unescape(\CurlHandle $handle, string $string): string
{
error_clear_last();
- $result = \curl_unescape($ch, $str);
+ $result = \curl_unescape($handle, $string);
if ($result === false) {
- throw CurlException::createFromCurlResource($ch);
+ throw CurlException::createFromPhpError();
}
return $result;
}
diff --git a/vendor/thecodingmachine/safe/generated/datetime.php b/vendor/thecodingmachine/safe/generated/datetime.php
index 01bfa9364..9840ef5c6 100644
--- a/vendor/thecodingmachine/safe/generated/datetime.php
+++ b/vendor/thecodingmachine/safe/generated/datetime.php
@@ -9,11 +9,11 @@ use Safe\Exceptions\DatetimeException;
*
* @param string $format Format accepted by DateTime::createFromFormat.
* @param string $datetime String representing the date/time.
- * @return array Returns associative array with detailed info about given 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.
* @throws DatetimeException
*
*/
-function date_parse_from_format(string $format, string $datetime): array
+function date_parse_from_format(string $format, string $datetime): ?array
{
error_clear_last();
$result = \date_parse_from_format($format, $datetime);
@@ -25,16 +25,30 @@ 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 Returns array with information about the parsed 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 array with information about the parsed date/time
* on success.
* @throws DatetimeException
*
*/
-function date_parse(string $datetime): array
+function date_parse(string $datetime): ?array
{
error_clear_last();
$result = \date_parse($datetime);
@@ -180,7 +194,7 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array
*
*
* SUNFUNCS_RET_TIMESTAMP
- * returns the result as integer (timestamp)
+ * returns the result as int (timestamp)
* 1095034606
*
*
@@ -233,10 +247,10 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array
* @throws DatetimeException
*
*/
-function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0)
+function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = null)
{
error_clear_last();
- if ($utcOffset !== 0) {
+ if ($utcOffset !== null) {
$result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
} elseif ($zenith !== null) {
$result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith);
@@ -283,7 +297,7 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, f
*
*
* SUNFUNCS_RET_TIMESTAMP
- * returns the result as integer (timestamp)
+ * returns the result as int (timestamp)
* 1095034606
*
*
@@ -336,10 +350,10 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, f
* @throws DatetimeException
*
*/
-function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0)
+function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = null)
{
error_clear_last();
- if ($utcOffset !== 0) {
+ if ($utcOffset !== null) {
$result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
} elseif ($zenith !== null) {
$result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith);
@@ -359,14 +373,19 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, fl
/**
* 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
+ * 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.
*
+ * Unix timestamps do not handle timezones. Use the
+ * DateTimeImmutable class, and its
+ * DateTimeInterface::format formatting method to
+ * format date/time information with a timezone attached.
+ *
* @param string $format Format accepted by DateTimeInterface::format.
* @param int $timestamp The optional timestamp parameter is an
- * integer Unix timestamp that defaults to the current
- * local time if a timestamp is not given. In other
+ * 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
@@ -390,28 +409,219 @@ function date(string $format, int $timestamp = null): string
/**
- * Identical to the date function except that
- * the time returned is Greenwich Mean Time (GMT).
+ * 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 $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 $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 $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 $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 $year The year
+ * @return int Returns a int Unix timestamp on success.
+ * @throws DatetimeException
+ *
+ */
+function gmmktime(int $hour, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null): int
+{
+ error_clear_last();
+ if ($year !== null) {
+ $result = \gmmktime($hour, $minute, $second, $month, $day, $year);
+ } elseif ($day !== null) {
+ $result = \gmmktime($hour, $minute, $second, $month, $day);
+ } elseif ($month !== null) {
+ $result = \gmmktime($hour, $minute, $second, $month);
+ } elseif ($second !== null) {
+ $result = \gmmktime($hour, $minute, $second);
+ } elseif ($minute !== null) {
+ $result = \gmmktime($hour, $minute);
+ } else {
+ $result = \gmmktime($hour);
+ }
+ if ($result === false) {
+ throw DatetimeException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 The format of the outputted date string. See the formatting
- * options for the date function.
+ * @param string $format See description in strftime.
* @param int $timestamp The optional timestamp parameter is an
- * integer Unix timestamp that defaults to the current
- * local time if a timestamp is not given. In other
+ * 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.
+ * @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.
* @throws DatetimeException
*
*/
-function gmdate(string $format, int $timestamp = null): string
+function gmstrftime(string $format, int $timestamp = null): string
{
error_clear_last();
if ($timestamp !== null) {
- $result = \gmdate($format, $timestamp);
+ $result = \gmstrftime($format, $timestamp);
} else {
- $result = \gmdate($format);
+ $result = \gmstrftime($format);
+ }
+ if ($result === false) {
+ throw DatetimeException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 $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.
+ * @throws DatetimeException
+ *
+ */
+function idate(string $format, int $timestamp = null): int
+{
+ error_clear_last();
+ if ($timestamp !== null) {
+ $result = \idate($format, $timestamp);
+ } else {
+ $result = \idate($format);
}
if ($result === false) {
throw DatetimeException::createFromPhpError();
@@ -452,16 +662,14 @@ function gmdate(string $format, int $timestamp = null): string
* 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. However, before PHP 5.1.0 this
- * range was limited from 1970 to 2038 on some systems (e.g. Windows).
+ * 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 (before PHP 5.1
- * it returned -1).
+ * If the arguments are invalid, the function returns FALSE.
* @throws DatetimeException
*
*/
-function mktime(int $hour = null, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null): int
+function mktime(int $hour, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null): int
{
error_clear_last();
if ($year !== null) {
@@ -474,10 +682,336 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m
$result = \mktime($hour, $minute, $second);
} elseif ($minute !== null) {
$result = \mktime($hour, $minute);
- } elseif ($hour !== null) {
+ } else {
$result = \mktime($hour);
+ }
+ if ($result === false) {
+ throw DatetimeException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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. 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 $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.
+ * @throws DatetimeException
+ *
+ */
+function strftime(string $format, int $timestamp = null): string
+{
+ error_clear_last();
+ if ($timestamp !== null) {
+ $result = \strftime($format, $timestamp);
} else {
- $result = \mktime();
+ $result = \strftime($format);
}
if ($result === false) {
throw DatetimeException::createFromPhpError();
@@ -488,13 +1022,13 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m
/**
* strptime returns an array with the
- * date parsed.
+ * timestamp parsed.
*
* Month and weekday names and other language dependent strings respect the
* current locale set with setlocale (LC_TIME).
*
- * @param string $date The string to parse (e.g. returned from strftime).
- * @param string $format The format used in date (e.g. the same as
+ * @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
@@ -549,7 +1083,7 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m
*
*
* "unparsed"
- * the date part which was not
+ * the timestamp part which was not
* recognized using the specified format
*
*
@@ -558,10 +1092,10 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m
* @throws DatetimeException
*
*/
-function strptime(string $date, string $format): array
+function strptime(string $timestamp, string $format): array
{
error_clear_last();
- $result = \strptime($date, $format);
+ $result = \strptime($timestamp, $format);
if ($result === false) {
throw DatetimeException::createFromPhpError();
}
@@ -577,18 +1111,17 @@ function strptime(string $date, string $format): array
* 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 $now The timestamp which is used as a base for the calculation of relative
+ * @param int $baseTimestamp The timestamp which is used as a base for the calculation of relative
* dates.
- * @return int Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0,
- * this function would return -1 on failure.
+ * @return int Returns a timestamp on success, FALSE otherwise.
* @throws DatetimeException
*
*/
-function strtotime(string $datetime, int $now = null): int
+function strtotime(string $datetime, int $baseTimestamp = null): int
{
error_clear_last();
- if ($now !== null) {
- $result = \strtotime($datetime, $now);
+ if ($baseTimestamp !== null) {
+ $result = \strtotime($datetime, $baseTimestamp);
} else {
$result = \strtotime($datetime);
}
diff --git a/vendor/thecodingmachine/safe/generated/dir.php b/vendor/thecodingmachine/safe/generated/dir.php
index 628dec537..fe4ea5af5 100644
--- a/vendor/thecodingmachine/safe/generated/dir.php
+++ b/vendor/thecodingmachine/safe/generated/dir.php
@@ -31,6 +31,9 @@ function chdir(string $directory): void
* 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.
* @throws DirException
*
@@ -74,7 +77,7 @@ function getcwd(): string
* closedir, readdir, and
* rewinddir calls.
*
- * @param string $path The directory path that is to be opened
+ * @param string $directory The directory path that is to be opened
* @param resource $context For a description of the context parameter,
* refer to the streams section of
* the manual.
@@ -82,13 +85,13 @@ function getcwd(): string
* @throws DirException
*
*/
-function opendir(string $path, $context = null)
+function opendir(string $directory, $context = null)
{
error_clear_last();
if ($context !== null) {
- $result = \opendir($path, $context);
+ $result = \opendir($directory, $context);
} else {
- $result = \opendir($path);
+ $result = \opendir($directory);
}
if ($result === false) {
throw DirException::createFromPhpError();
@@ -98,32 +101,6 @@ function opendir(string $path, $context = null)
/**
- * Resets the directory stream indicated by
- * dir_handle to the beginning of the
- * directory.
- *
- * @param resource $dir_handle The directory handle resource previously opened
- * with opendir. If the directory handle is
- * not specified, the last link opened by opendir
- * is assumed.
- * @throws DirException
- *
- */
-function rewinddir($dir_handle = null): void
-{
- error_clear_last();
- if ($dir_handle !== null) {
- $result = \rewinddir($dir_handle);
- } else {
- $result = \rewinddir();
- }
- if ($result === false) {
- throw DirException::createFromPhpError();
- }
-}
-
-
-/**
* Returns an array of files and directories from the
* directory.
*
diff --git a/vendor/thecodingmachine/safe/generated/eio.php b/vendor/thecodingmachine/safe/generated/eio.php
index 8d2f538e8..1fffa9004 100644
--- a/vendor/thecodingmachine/safe/generated/eio.php
+++ b/vendor/thecodingmachine/safe/generated/eio.php
@@ -414,6 +414,57 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callba
/**
+ * 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 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_chmod returns request resource on success.
+ * @throws EioException
+ *
+ */
+function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null)
+{
+ error_clear_last();
+ $result = \eio_fchown($fd, $uid, $gid, $pri, $callback, $data);
+ if ($result === false) {
+ throw EioException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* 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.
@@ -1061,7 +1112,8 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
* 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_readdir returns request resource on success. Sets result argument of
+ * @return resource eio_readdir returns request resource on success.
+ * Sets result argument of
* callback function according to
* flags:
*
@@ -1071,7 +1123,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_READDIR_DENTS
- * (integer)
+ * (int)
*
*
*
@@ -1091,7 +1143,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_READDIR_DIRS_FIRST
- * (integer)
+ * (int)
*
*
*
@@ -1103,7 +1155,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_READDIR_STAT_ORDER
- * (integer)
+ * (int)
*
*
*
@@ -1118,7 +1170,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_READDIR_FOUND_UNKNOWN
- * (integer)
+ * (int)
*
*
*
@@ -1137,7 +1189,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_UNKNOWN
- * (integer)
+ * (int)
*
*
*
@@ -1148,7 +1200,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_FIFO
- * (integer)
+ * (int)
*
*
*
@@ -1159,7 +1211,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_CHR
- * (integer)
+ * (int)
*
*
*
@@ -1170,7 +1222,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_MPC
- * (integer)
+ * (int)
*
*
*
@@ -1181,7 +1233,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_DIR
- * (integer)
+ * (int)
*
*
*
@@ -1192,7 +1244,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_NAM
- * (integer)
+ * (int)
*
*
*
@@ -1203,7 +1255,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_BLK
- * (integer)
+ * (int)
*
*
*
@@ -1214,7 +1266,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_MPB
- * (integer)
+ * (int)
*
*
*
@@ -1225,7 +1277,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_REG
- * (integer)
+ * (int)
*
*
*
@@ -1236,7 +1288,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_NWK
- * (integer)
+ * (int)
*
*
*
@@ -1246,7 +1298,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_CMP
- * (integer)
+ * (int)
*
*
*
@@ -1257,7 +1309,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_LNK
- * (integer)
+ * (int)
*
*
*
@@ -1268,7 +1320,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_SOCK
- * (integer)
+ * (int)
*
*
*
@@ -1279,7 +1331,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_DOOR
- * (integer)
+ * (int)
*
*
*
@@ -1290,7 +1342,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_WHT
- * (integer)
+ * (int)
*
*
*
@@ -1301,7 +1353,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT
*
*
* EIO_DT_MAX
- * (integer)
+ * (int)
*
*
*
@@ -1672,7 +1724,8 @@ function eio_stat(string $path, int $pri, callable $callback, $data = null)
*
* 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
+ * @return resource eio_statvfs returns request resource on success.
+ * On success assigns result argument of
* callback to an array.
* @throws EioException
*
diff --git a/vendor/thecodingmachine/safe/generated/errorfunc.php b/vendor/thecodingmachine/safe/generated/errorfunc.php
index ac64a7d8b..9d3e98b2c 100644
--- a/vendor/thecodingmachine/safe/generated/errorfunc.php
+++ b/vendor/thecodingmachine/safe/generated/errorfunc.php
@@ -30,7 +30,7 @@ use Safe\Exceptions\ErrorfuncException;
* 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.
+ * additional_headers is used.
*
*
*
@@ -59,18 +59,18 @@ use Safe\Exceptions\ErrorfuncException;
*
* @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
+ * @param 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.
* @throws ErrorfuncException
*
*/
-function error_log(string $message, int $message_type = 0, string $destination = null, string $extra_headers = null): void
+function error_log(string $message, int $message_type = 0, string $destination = null, string $additional_headers = null): void
{
error_clear_last();
- if ($extra_headers !== null) {
- $result = \error_log($message, $message_type, $destination, $extra_headers);
+ if ($additional_headers !== null) {
+ $result = \error_log($message, $message_type, $destination, $additional_headers);
} elseif ($destination !== null) {
$result = \error_log($message, $message_type, $destination);
} else {
diff --git a/vendor/thecodingmachine/safe/generated/exec.php b/vendor/thecodingmachine/safe/generated/exec.php
index e9a40e08b..c4dd49114 100644
--- a/vendor/thecodingmachine/safe/generated/exec.php
+++ b/vendor/thecodingmachine/safe/generated/exec.php
@@ -5,122 +5,97 @@ namespace Safe;
use Safe\Exceptions\ExecException;
/**
- * proc_get_status fetches data about a
- * process opened using proc_open.
- *
- * @param resource $process The proc_open resource that will
- * be evaluated.
- * @return array An array of collected information on success. The returned array contains the following elements:
- *
- *
- *
- *
- * elementtypedescription
- *
- *
- *
- * command
- * string
- *
- * The command string that was passed to proc_open.
- *
- *
- *
- * pid
- * int
- * process id
- *
- *
- * running
- * bool
- *
- * TRUE if the process is still running, FALSE if it has
- * terminated.
- *
- *
- *
- * signaled
- * bool
- *
- * TRUE if the child process has been terminated by
- * an uncaught signal. Always set to FALSE on Windows.
- *
- *
- *
- * stopped
- * bool
- *
- * TRUE if the child process has been stopped by a
- * signal. Always set to FALSE on Windows.
- *
- *
- *
- * exitcode
- * int
- *
- * The exit code returned by the process (which is only
- * meaningful if running is FALSE).
- * Only first call of this function return real value, next calls return
- * -1.
- *
- *
- *
- * termsig
- * int
- *
- * The number of the signal that caused the child process to terminate
- * its execution (only meaningful if signaled is TRUE).
- *
- *
- *
- * stopsig
- * int
- *
- * The number of the signal that caused the child process to stop its
- * execution (only meaningful if stopped is TRUE).
+ * 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.
+ * @throws ExecException
*
+ */
+function exec(string $command, ?array &$output = null, ?int &$result_code = null): string
+{
+ error_clear_last();
+ $result = \exec($command, $output, $result_code);
+ if ($result === false) {
+ throw ExecException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * The passthru function is similar to the
+ * exec function in that it executes a
+ * command. This function
+ * should be used in place of exec or
+ * system when the output from the Unix command
+ * is binary data which needs to be passed directly back to the
+ * browser. A common use for this is to execute something like the
+ * pbmplus utilities that can output an image stream directly. By
+ * setting the Content-type to image/gif and
+ * then calling a pbmplus program to output a gif, you can create
+ * PHP scripts that output images directly.
*
+ * @param string $command The command that will be executed.
+ * @param int|null $result_code If the result_code argument is present, the
+ * return status of the Unix command will be placed here.
* @throws ExecException
*
*/
-function proc_get_status($process): array
+function passthru(string $command, ?int &$result_code = null): void
{
error_clear_last();
- $result = \proc_get_status($process);
+ $result = \passthru($command, $result_code);
if ($result === false) {
throw ExecException::createFromPhpError();
}
- return $result;
}
/**
* proc_nice changes the priority of the current
- * process by the amount specified in increment. A
- * positive increment will lower the priority of the
- * current process, whereas a negative increment
+ * 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 $increment The new priority value, the value of this may differ on platforms.
+ * @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 increment parameter have the
+ * For Windows the priority parameter have the
* following meanings:
* @throws ExecException
*
*/
-function proc_nice(int $increment): void
+function proc_nice(int $priority): void
{
error_clear_last();
- $result = \proc_nice($increment);
+ $result = \proc_nice($priority);
if ($result === false) {
throw ExecException::createFromPhpError();
}
@@ -128,6 +103,26 @@ function proc_nice(int $increment): void
/**
+ * This function is identical to the backtick operator.
+ *
+ * @param string $command The command that will be executed.
+ * @return string A string containing the output from the executed command, FALSE if the pipe
+ * cannot be established or NULL if an error occurs or the command produces no output.
+ * @throws ExecException
+ *
+ */
+function shell_exec(string $command): string
+{
+ error_clear_last();
+ $result = \shell_exec($command);
+ if ($result === null) {
+ throw ExecException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* system is just like the C version of the
* function in that it executes the given
* command and outputs the result.
@@ -141,17 +136,17 @@ function proc_nice(int $increment): void
* passthru function.
*
* @param string $command The command that will be executed.
- * @param int $return_var If the return_var argument is present, then the
+ * @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.
* @throws ExecException
*
*/
-function system(string $command, int &$return_var = null): string
+function system(string $command, ?int &$result_code = null): string
{
error_clear_last();
- $result = \system($command, $return_var);
+ $result = \system($command, $result_code);
if ($result === false) {
throw ExecException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/fileinfo.php b/vendor/thecodingmachine/safe/generated/fileinfo.php
index 50345b67c..8bbfd3c47 100644
--- a/vendor/thecodingmachine/safe/generated/fileinfo.php
+++ b/vendor/thecodingmachine/safe/generated/fileinfo.php
@@ -5,9 +5,9 @@ namespace Safe;
use Safe\Exceptions\FileinfoException;
/**
- * This function closes the resource opened by finfo_open.
+ * This function closes the instance opened by finfo_open.
*
- * @param resource $finfo Fileinfo resource returned by finfo_open.
+ * @param resource $finfo An finfo instance, returned by finfo_open.
* @throws FileinfoException
*
*/
@@ -24,13 +24,13 @@ function finfo_close($finfo): void
/**
* Procedural style
*
- * Object oriented style (constructor):
+ * Object-oriented style (constructor):
*
- * This function opens a magic database and returns its resource.
+ * This function opens a magic database and returns its instance.
*
- * @param int $options One or disjunction of more Fileinfo
+ * @param int $flags One or disjunction of more Fileinfo
* constants.
- * @param string $magic_file Name of a magic database file, usually something like
+ * @param 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
@@ -39,14 +39,18 @@ function finfo_close($finfo): void
* Passing NULL or an empty string will be equivalent to the default
* value.
* @return resource (Procedural style only)
- * Returns a magic database resource on success.
+ * Returns an finfo instance on success.
* @throws FileinfoException
*
*/
-function finfo_open(int $options = FILEINFO_NONE, string $magic_file = "")
+function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = null)
{
error_clear_last();
- $result = \finfo_open($options, $magic_file);
+ if ($magic_database !== null) {
+ $result = \finfo_open($flags, $magic_database);
+ } else {
+ $result = \finfo_open($flags);
+ }
if ($result === false) {
throw FileinfoException::createFromPhpError();
}
@@ -58,13 +62,13 @@ function finfo_open(int $options = FILEINFO_NONE, string $magic_file = "")
* Returns the MIME content type for a file as determined by using
* information from the magic.mime file.
*
- * @param string $filename Path to the tested file.
+ * @param string|resource $filename Path to the tested file.
* @return string Returns the content type in MIME format, like
* text/plain or application/octet-stream.
* @throws FileinfoException
*
*/
-function mime_content_type(string $filename): string
+function mime_content_type($filename): string
{
error_clear_last();
$result = \mime_content_type($filename);
diff --git a/vendor/thecodingmachine/safe/generated/filesystem.php b/vendor/thecodingmachine/safe/generated/filesystem.php
index ee0a4bdf1..7f1b08bb0 100644
--- a/vendor/thecodingmachine/safe/generated/filesystem.php
+++ b/vendor/thecodingmachine/safe/generated/filesystem.php
@@ -28,12 +28,12 @@ function chgrp(string $filename, $group): void
/**
* Attempts to change the mode of the specified file to that given in
- * mode.
+ * permissions.
*
* @param string $filename Path to the file.
- * @param int $mode Note that mode is not automatically
+ * @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 mode with a zero (0).
+ * you need to prefix permissions with a zero (0).
* Strings such as "g+w" will not work properly.
*
*
@@ -43,7 +43,7 @@ function chgrp(string $filename, $group): void
*
*
*
- * The mode parameter consists of three octal
+ * 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
@@ -58,10 +58,10 @@ function chgrp(string $filename, $group): void
*
*
*/
-function chmod(string $filename, int $mode): void
+function chmod(string $filename, int $permissions): void
{
error_clear_last();
- $result = \chmod($filename, $mode);
+ $result = \chmod($filename, $permissions);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -89,13 +89,13 @@ function chown(string $filename, $user): void
/**
- * Makes a copy of the file source to
- * dest.
+ * Makes a copy of the file from to
+ * to.
*
* 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
+ * @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.
*
@@ -105,13 +105,13 @@ function chown(string $filename, $user): void
* @throws FilesystemException
*
*/
-function copy(string $source, string $dest, $context = null): void
+function copy(string $from, string $to, $context = null): void
{
error_clear_last();
if ($context !== null) {
- $result = \copy($source, $dest, $context);
+ $result = \copy($from, $to, $context);
} else {
- $result = \copy($source, $dest);
+ $result = \copy($from, $to);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
@@ -165,17 +165,40 @@ function disk_total_space(string $directory): float
/**
- * The file pointed to by handle is closed.
+ * The file pointed to by stream is closed.
*
- * @param resource $handle The file pointer must be valid, and must point to a file successfully
+ * @param resource $stream The file pointer must be valid, and must point to a file successfully
* opened by fopen or fsockopen.
* @throws FilesystemException
*
*/
-function fclose($handle): void
+function fclose($stream): void
{
error_clear_last();
- $result = \fclose($handle);
+ $result = \fclose($stream);
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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).
+ * @throws FilesystemException
+ *
+ */
+function fdatasync($stream): void
+{
+ error_clear_last();
+ $result = \fdatasync($stream);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -184,19 +207,19 @@ function fclose($handle): void
/**
* This function forces a write of all buffered output to the resource
- * pointed to by the file handle.
+ * pointed to by the file stream.
*
- * @param resource $handle The file pointer must be valid, and must point to
+ * @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).
* @throws FilesystemException
*
*/
-function fflush($handle): void
+function fflush($stream): void
{
error_clear_last();
- $result = \fflush($handle);
+ $result = \fflush($stream);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -204,10 +227,56 @@ function fflush($handle): void
/**
+ * Similar to fgets except that
+ * fgetcsv parses the line it reads for fields in
+ * CSV format and returns an array containing the fields
+ * read.
+ *
+ * @param resource $stream A valid file pointer to a file successfully opened by
+ * fopen, popen, or
+ * fsockopen.
+ * @param int $length Must be greater than the longest line (in characters) to be found in
+ * the CSV file (allowing for trailing line-end characters). Otherwise the
+ * line is split in chunks of length characters,
+ * unless the split would occur inside an enclosure.
+ *
+ * Omitting this parameter (or setting it to 0,
+ * or NULL in PHP 8.0.0 or later) the maximum line length is not limited,
+ * which is slightly slower.
+ * @param string $separator The optional separator parameter sets the field separator (one single-byte character only).
+ * @param string $enclosure The optional enclosure parameter sets the field enclosure character (one single-byte character only).
+ * @param string $escape The optional escape parameter sets the escape character (at most one single-byte character).
+ * An empty string ("") disables the proprietary escape mechanism.
+ * @return array|null Returns an indexed array containing the fields read on success.
+ * @throws FilesystemException
+ *
+ */
+function fgetcsv($stream, int $length = null, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): ?array
+{
+ error_clear_last();
+ if ($escape !== "\\") {
+ $result = \fgetcsv($stream, $length, $separator, $enclosure, $escape);
+ } elseif ($enclosure !== "\"") {
+ $result = \fgetcsv($stream, $length, $separator, $enclosure);
+ } elseif ($separator !== ",") {
+ $result = \fgetcsv($stream, $length, $separator);
+ } elseif ($length !== null) {
+ $result = \fgetcsv($stream, $length);
+ } else {
+ $result = \fgetcsv($stream);
+ }
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* This function is similar to file, except that
* file_get_contents returns the file in a
* string, starting at the specified offset
- * up to maxlen bytes. On failure,
+ * up to length bytes. On failure,
* file_get_contents will return FALSE.
*
* file_get_contents is the preferred way to read the
@@ -230,18 +299,18 @@ function fflush($handle): void
* 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 int $maxlen Maximum length of data read. The default is to read until end
+ * @param 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.
* @throws FilesystemException
*
*/
-function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, int $maxlen = null): string
+function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, int $length = null): string
{
error_clear_last();
- if ($maxlen !== null) {
- $result = \file_get_contents($filename, $use_include_path, $context, $offset, $maxlen);
+ if ($length !== null) {
+ $result = \file_get_contents($filename, $use_include_path, $context, $offset, $length);
} elseif ($offset !== 0) {
$result = \file_get_contents($filename, $use_include_path, $context, $offset);
} elseif ($context !== null) {
@@ -324,7 +393,7 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co
*
*
*
- * @param resource $context A valid context resource created with
+ * @param resource|null $context A valid context resource created with
* stream_context_create.
* @return int This function returns the number of bytes that were written to the file.
* @throws FilesystemException
@@ -508,6 +577,39 @@ 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.
+ * @throws FilesystemException
+ *
+ */
+function fileperms(string $filename): int
+{
+ error_clear_last();
+ $result = \fileperms($filename);
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Gets the size for the given file.
*
* @param string $filename Path to the file.
@@ -532,16 +634,15 @@ function filesize(string $filename): int
* model which can be used on virtually every platform (including most Unix
* derivatives and even Windows).
*
- * On versions of PHP before 5.3.2, the lock is released also by
- * fclose (which is also called automatically when script
- * finished).
+ * 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 $handle A file system pointer resource
+ * @param resource $stream A file system pointer resource
* that is typically created using fopen.
* @param int $operation operation is one of the following:
*
@@ -565,15 +666,15 @@ function filesize(string $filename): int
* 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 int|null $wouldblock The optional third argument is set to 1 if the lock would block
+ * @param int|null $would_block The optional third argument is set to 1 if the lock would block
* (EWOULDBLOCK errno condition).
* @throws FilesystemException
*
*/
-function flock($handle, int $operation, ?int &$wouldblock = null): void
+function flock($stream, int $operation, ?int &$would_block = null): void
{
error_clear_last();
- $result = \flock($handle, $operation, $wouldblock);
+ $result = \flock($stream, $operation, $would_block);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -661,9 +762,8 @@ function flock($handle, int $operation, ?int &$wouldblock = null): void
*
* 'w+'
*
- * Open for reading and writing; 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.
+ * Open for reading and writing; otherwise it has the
+ * same behavior as 'w'.
*
*
*
@@ -774,7 +874,8 @@ function flock($handle, int $operation, ?int &$wouldblock = null): void
* @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 resource $context
+ * @param resource|null $context A context stream
+ * resource.
* @return resource Returns a file pointer resource on success
* @throws FilesystemException
*
@@ -795,41 +896,9 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $
/**
- * fputcsv formats a line (passed as a
- * fields array) as CSV and writes it (terminated by a
- * newline) to the specified file handle.
- *
- * @param resource $handle 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 array $fields An array of strings.
- * @param string $delimiter The optional delimiter parameter sets the field
- * delimiter (one character only).
- * @param string $enclosure The optional enclosure parameter sets the field
- * enclosure (one character only).
- * @param string $escape_char The optional escape_char parameter sets the
- * escape character (at most one character).
- * An empty string ("") disables the proprietary escape mechanism.
- * @return int Returns the length of the written string.
- * @throws FilesystemException
- *
- */
-function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = '"', string $escape_char = "\\"): int
-{
- error_clear_last();
- $result = \fputcsv($handle, $fields, $delimiter, $enclosure, $escape_char);
- if ($result === false) {
- throw FilesystemException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* fread reads up to
* length bytes from the file pointer
- * referenced by handle. Reading stops as soon as one
+ * referenced by stream. Reading stops as soon as one
* of the following conditions is met:
*
*
@@ -858,17 +927,42 @@ function fputcsv($handle, array $fields, string $delimiter = ",", string $enclos
*
*
*
- * @param resource $handle A file system pointer resource
+ * @param resource $stream A file system pointer resource
* that is typically created using fopen.
* @param int $length Up to length number of bytes read.
* @return string Returns the read string.
* @throws FilesystemException
*
*/
-function fread($handle, int $length): string
+function fread($stream, int $length): string
+{
+ error_clear_last();
+ $result = \fread($stream, $length);
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws FilesystemException
+ *
+ */
+function fstat($stream): array
{
error_clear_last();
- $result = \fread($handle, $length);
+ $result = \fstat($stream);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -877,12 +971,33 @@ function fread($handle, int $length): string
/**
- * Takes the filepointer, handle, and truncates the file to
+ * 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).
+ * @throws FilesystemException
+ *
+ */
+function fsync($stream): void
+{
+ error_clear_last();
+ $result = \fsync($stream);
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Takes the filepointer, stream, and truncates the file to
* length, size.
*
- * @param resource $handle The file pointer.
+ * @param resource $stream The file pointer.
*
- * The handle must be open for writing.
+ * The stream must be open for writing.
* @param int $size The size to truncate to.
*
* If size is larger than the file then the file
@@ -893,10 +1008,10 @@ function fread($handle, int $length): string
* @throws FilesystemException
*
*/
-function ftruncate($handle, int $size): void
+function ftruncate($stream, int $size): void
{
error_clear_last();
- $result = \ftruncate($handle, $size);
+ $result = \ftruncate($stream, $size);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -906,29 +1021,23 @@ function ftruncate($handle, int $size): void
/**
*
*
- * @param resource $handle A file system pointer resource
+ * @param resource $stream A file system pointer resource
* that is typically created using fopen.
- * @param string $string The string that is to be written.
- * @param 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.
- *
- * Note that if the length argument is given,
- * then the magic_quotes_runtime
- * configuration option will be ignored and no slashes will be
- * stripped from string.
+ * @param string $data The string that is to be written.
+ * @param 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 int
* @throws FilesystemException
*
*/
-function fwrite($handle, string $string, int $length = null): int
+function fwrite($stream, string $data, int $length = null): int
{
error_clear_last();
if ($length !== null) {
- $result = \fwrite($handle, $string, $length);
+ $result = \fwrite($stream, $data, $length);
} else {
- $result = \fwrite($handle, $string);
+ $result = \fwrite($stream, $data);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
@@ -1016,6 +1125,12 @@ function fwrite($handle, string $string, int $length = null): int
*
*
*
+ *
+ *
+ * The GLOB_BRACE flag is not available on some non GNU
+ * systems, like Solaris or Alpine Linux.
+ *
+ *
* @return array Returns an array containing the matched files/directories, an empty array
* if no file matched.
* @throws FilesystemException
@@ -1095,32 +1210,60 @@ function link(string $target, string $link): void
/**
- * Attempts to create the directory specified by pathname.
+ * 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.
+ * @throws FilesystemException
*
- * @param string $pathname The directory path.
- * @param int $mode The mode is 0777 by default, which means the widest possible
- * access. For more information on modes, read the details
+ */
+function lstat(string $filename): array
+{
+ error_clear_last();
+ $result = \lstat($filename);
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
*
- * mode is ignored on Windows.
+ * permissions is ignored on Windows.
*
- * Note that you probably want to specify the mode as an octal number,
- * which means it should have a leading zero. The mode is also modified
+ * 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
- * pathname.
- * @param resource $context
+ * directory.
+ * @param resource $context A context stream
+ * resource.
* @throws FilesystemException
*
*/
-function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): void
+function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context = null): void
{
error_clear_last();
if ($context !== null) {
- $result = \mkdir($pathname, $mode, $recursive, $context);
+ $result = \mkdir($directory, $permissions, $recursive, $context);
} else {
- $result = \mkdir($pathname, $mode, $recursive);
+ $result = \mkdir($directory, $permissions, $recursive);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
@@ -1170,11 +1313,11 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s
/**
* parse_ini_string returns the settings in string
- * ini in an associative array.
+ * ini_string in an associative array.
*
* The structure of the ini string is the same as the php.ini's.
*
- * @param string $ini The contents of the ini file being parsed.
+ * @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
@@ -1194,10 +1337,10 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s
* @throws FilesystemException
*
*/
-function parse_ini_string(string $ini, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array
+function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array
{
error_clear_last();
- $result = \parse_ini_string($ini, $process_sections, $scanner_mode);
+ $result = \parse_ini_string($ini_string, $process_sections, $scanner_mode);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -1211,7 +1354,8 @@ function parse_ini_string(string $ini, bool $process_sections = false, int $scan
* @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.
+ * @param resource $context A context stream
+ * resource.
* @return int Returns the number of bytes read from the file on success
* @throws FilesystemException
*
@@ -1287,30 +1431,37 @@ function realpath(string $path): string
/**
- * Attempts to rename oldname to
- * newname, moving it between directories if necessary.
- * If renaming a file and newname exists,
+ * 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
- * newname exists,
+ * to exists,
* this function will emit a warning.
*
- * @param string $oldname The old name.
+ * @param string $from The old name.
*
- * The wrapper used in oldname
+ * The wrapper used in from
* must match the wrapper used in
- * newname.
- * @param string $newname The new name.
- * @param resource $context
+ * 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 resource $context A context stream
+ * resource.
* @throws FilesystemException
*
*/
-function rename(string $oldname, string $newname, $context = null): void
+function rename(string $from, string $to, $context = null): void
{
error_clear_last();
if ($context !== null) {
- $result = \rename($oldname, $newname, $context);
+ $result = \rename($from, $to, $context);
} else {
- $result = \rename($oldname, $newname);
+ $result = \rename($from, $to);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
@@ -1319,18 +1470,18 @@ function rename(string $oldname, string $newname, $context = null): void
/**
- * Sets the file position indicator for handle
+ * Sets the file position indicator for stream
* to the beginning of the file stream.
*
- * @param resource $handle The file pointer must be valid, and must point to a file
+ * @param resource $stream The file pointer must be valid, and must point to a file
* successfully opened by fopen.
* @throws FilesystemException
*
*/
-function rewind($handle): void
+function rewind($stream): void
{
error_clear_last();
- $result = \rewind($handle);
+ $result = \rewind($stream);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -1338,22 +1489,23 @@ function rewind($handle): void
/**
- * Attempts to remove the directory named by dirname.
+ * 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 $dirname Path to the directory.
- * @param resource $context
+ * @param string $directory Path to the directory.
+ * @param resource $context A context stream
+ * resource.
* @throws FilesystemException
*
*/
-function rmdir(string $dirname, $context = null): void
+function rmdir(string $directory, $context = null): void
{
error_clear_last();
if ($context !== null) {
- $result = \rmdir($dirname, $context);
+ $result = \rmdir($directory, $context);
} else {
- $result = \rmdir($dirname);
+ $result = \rmdir($directory);
}
if ($result === false) {
throw FilesystemException::createFromPhpError();
@@ -1387,16 +1539,16 @@ function symlink(string $target, string $link): void
* generate a file in the system's temporary directory, and return
* the full path to that file, including its name.
*
- * @param string $dir The directory where the temporary filename will be created.
+ * @param string $directory The directory where the temporary filename will be created.
* @param string $prefix The prefix of the generated temporary filename.
* @return string Returns the new temporary filename (with path).
* @throws FilesystemException
*
*/
-function tempnam(string $dir, string $prefix): string
+function tempnam(string $directory, string $prefix): string
{
error_clear_last();
- $result = \tempnam($dir, $prefix);
+ $result = \tempnam($directory, $prefix);
if ($result === false) {
throw FilesystemException::createFromPhpError();
}
@@ -1432,29 +1584,29 @@ function tmpfile()
/**
* Attempts to set the access and modification times of the file named in the
* filename parameter to the value given in
- * time.
+ * 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 $time The touch time. If time is not supplied,
+ * @param int $mtime The touch time. If mtime is NULL,
* the current system time is used.
- * @param int $atime If present, the access time of the given filename is set to
+ * @param int $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 time parameter.
- * If neither are present, the current system time is used.
+ * the value passed to the mtime parameter.
+ * If both are NULL, the current system time is used.
* @throws FilesystemException
*
*/
-function touch(string $filename, int $time = null, int $atime = null): void
+function touch(string $filename, int $mtime = null, int $atime = null): void
{
error_clear_last();
if ($atime !== null) {
- $result = \touch($filename, $time, $atime);
- } elseif ($time !== null) {
- $result = \touch($filename, $time);
+ $result = \touch($filename, $mtime, $atime);
+ } elseif ($mtime !== null) {
+ $result = \touch($filename, $mtime);
} else {
$result = \touch($filename);
}
@@ -1470,7 +1622,11 @@ function touch(string $filename, int $time = null, int $atime = null): void
* failure.
*
* @param string $filename Path to the file.
- * @param resource $context
+ *
+ * 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.
* @throws FilesystemException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/filter.php b/vendor/thecodingmachine/safe/generated/filter.php
index 2d836c6c9..aba02b4d8 100644
--- a/vendor/thecodingmachine/safe/generated/filter.php
+++ b/vendor/thecodingmachine/safe/generated/filter.php
@@ -11,7 +11,7 @@ use Safe\Exceptions\FilterException;
* @param int $type One of INPUT_GET, INPUT_POST,
* INPUT_COOKIE, INPUT_SERVER, or
* INPUT_ENV.
- * @param int|array $definition An array defining the arguments. A valid key is a string
+ * @param int|array $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
@@ -23,7 +23,7 @@ use Safe\Exceptions\FilterException;
* 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 mixed An array containing the values of the requested variables on success.
+ * @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.
@@ -36,16 +36,10 @@ use Safe\Exceptions\FilterException;
* @throws FilterException
*
*/
-function filter_input_array(int $type, $definition = null, bool $add_empty = true)
+function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
{
error_clear_last();
- if ($add_empty !== true) {
- $result = \filter_input_array($type, $definition, $add_empty);
- } elseif ($definition !== null) {
- $result = \filter_input_array($type, $definition);
- } else {
- $result = \filter_input_array($type);
- }
+ $result = \filter_input_array($type, $options, $add_empty);
if ($result === false) {
throw FilterException::createFromPhpError();
}
@@ -57,8 +51,8 @@ function filter_input_array(int $type, $definition = null, bool $add_empty = tru
* This function is useful for retrieving many values without
* repetitively calling filter_var.
*
- * @param array $data An array with string keys containing the data to filter.
- * @param mixed $definition An array defining the arguments. A valid key is a string
+ * @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.
@@ -71,21 +65,15 @@ function filter_input_array(int $type, $definition = null, bool $add_empty = tru
* 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 mixed An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if
+ * @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.
* @throws FilterException
*
*/
-function filter_var_array(array $data, $definition = null, bool $add_empty = true)
+function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
{
error_clear_last();
- if ($add_empty !== true) {
- $result = \filter_var_array($data, $definition, $add_empty);
- } elseif ($definition !== null) {
- $result = \filter_var_array($data, $definition);
- } else {
- $result = \filter_var_array($data);
- }
+ $result = \filter_var_array($array, $options, $add_empty);
if ($result === false) {
throw FilterException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/ftp.php b/vendor/thecodingmachine/safe/generated/ftp.php
index 174882657..23846bf1f 100644
--- a/vendor/thecodingmachine/safe/generated/ftp.php
+++ b/vendor/thecodingmachine/safe/generated/ftp.php
@@ -8,17 +8,17 @@ use Safe\Exceptions\FtpException;
* Sends an ALLO command to the remote FTP server to
* allocate space for a file to be uploaded.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param int $filesize The number of bytes to allocate.
- * @param string $result A textual representation of the servers response will be returned by
- * reference in result if a variable is provided.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param int $size The number of bytes to allocate.
+ * @param string|null $response A textual representation of the servers response will be returned by
+ * reference in response if a variable is provided.
* @throws FtpException
*
*/
-function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void
+function ftp_alloc($ftp, int $size, ?string &$response = null): void
{
error_clear_last();
- $result = \ftp_alloc($ftp_stream, $filesize, $result);
+ $result = \ftp_alloc($ftp, $size, $response);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -28,17 +28,17 @@ function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void
/**
*
*
- * @param resource $ftp
- * @param string $remote_file
- * @param string $local_file
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $remote_filename
+ * @param string $local_filename
* @param int $mode
* @throws FtpException
*
*/
-function ftp_append($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY): void
+function ftp_append($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): void
{
error_clear_last();
- $result = \ftp_append($ftp, $remote_file, $local_file, $mode);
+ $result = \ftp_append($ftp, $remote_filename, $local_filename, $mode);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -48,14 +48,14 @@ function ftp_append($ftp, string $remote_file, string $local_file, int $mode = F
/**
* Changes to the parent directory.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @throws FtpException
*
*/
-function ftp_cdup($ftp_stream): void
+function ftp_cdup($ftp): void
{
error_clear_last();
- $result = \ftp_cdup($ftp_stream);
+ $result = \ftp_cdup($ftp);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -65,15 +65,15 @@ function ftp_cdup($ftp_stream): void
/**
* Changes the current directory to the specified one.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @param string $directory The target directory.
* @throws FtpException
*
*/
-function ftp_chdir($ftp_stream, string $directory): void
+function ftp_chdir($ftp, string $directory): void
{
error_clear_last();
- $result = \ftp_chdir($ftp_stream, $directory);
+ $result = \ftp_chdir($ftp, $directory);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -82,19 +82,19 @@ function ftp_chdir($ftp_stream, string $directory): void
/**
* Sets the permissions on the specified remote file to
- * mode.
+ * permissions.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param int $mode The new permissions, given as an octal value.
+ * @param resource $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.
* @throws FtpException
*
*/
-function ftp_chmod($ftp_stream, int $mode, string $filename): int
+function ftp_chmod($ftp, int $permissions, string $filename): int
{
error_clear_last();
- $result = \ftp_chmod($ftp_stream, $mode, $filename);
+ $result = \ftp_chmod($ftp, $permissions, $filename);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -106,14 +106,14 @@ function ftp_chmod($ftp_stream, int $mode, string $filename): int
* ftp_close closes the given link identifier
* and releases the resource.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @throws FtpException
*
*/
-function ftp_close($ftp_stream): void
+function ftp_close($ftp): void
{
error_clear_last();
- $result = \ftp_close($ftp_stream);
+ $result = \ftp_close($ftp);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -122,9 +122,9 @@ function ftp_close($ftp_stream): void
/**
* ftp_connect opens an FTP connection to the
- * specified host.
+ * specified hostname.
*
- * @param string $host The FTP server address. This parameter shouldn't have any trailing
+ * @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.
@@ -132,14 +132,14 @@ function ftp_close($ftp_stream): void
* 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 resource Returns a FTP stream on success.
+ * @return resource Returns an FTP\Connection instance on success.
* @throws FtpException
*
*/
-function ftp_connect(string $host, int $port = 21, int $timeout = 90)
+function ftp_connect(string $hostname, int $port = 21, int $timeout = 90)
{
error_clear_last();
- $result = \ftp_connect($host, $port, $timeout);
+ $result = \ftp_connect($hostname, $port, $timeout);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -149,17 +149,17 @@ function ftp_connect(string $host, int $port = 21, int $timeout = 90)
/**
* ftp_delete deletes the file specified by
- * path from the FTP server.
+ * filename from the FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param string $path The file to delete.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $filename The file to delete.
* @throws FtpException
*
*/
-function ftp_delete($ftp_stream, string $path): void
+function ftp_delete($ftp, string $filename): void
{
error_clear_last();
- $result = \ftp_delete($ftp_stream, $path);
+ $result = \ftp_delete($ftp, $filename);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -167,22 +167,22 @@ function ftp_delete($ftp_stream, string $path): void
/**
- * ftp_fget retrieves remote_file
+ * ftp_fget retrieves remote_filename
* from the FTP server, and writes it to the given file pointer.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param resource $handle An open file pointer in which we store the data.
- * @param string $remote_file The remote file path.
+ * @param resource $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 int $mode The transfer mode. Must be either FTP_ASCII or
* FTP_BINARY.
- * @param int $resumepos The position in the remote file to start downloading from.
+ * @param int $offset The position in the remote file to start downloading from.
* @throws FtpException
*
*/
-function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void
+function ftp_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
error_clear_last();
- $result = \ftp_fget($ftp_stream, $handle, $remote_file, $mode, $resumepos);
+ $result = \ftp_fget($ftp, $stream, $remote_filename, $mode, $offset);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -193,19 +193,19 @@ function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_BIN
* ftp_fput uploads the data from a file pointer
* to a remote file on the FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param string $remote_file The remote file path.
- * @param resource $handle An open file pointer on the local file. Reading stops at end of file.
+ * @param resource $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 int $mode The transfer mode. Must be either FTP_ASCII or
* FTP_BINARY.
- * @param int $startpos The position in the remote file to start uploading to.
+ * @param int $offset The position in the remote file to start uploading to.
* @throws FtpException
*
*/
-function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_BINARY, int $startpos = 0): void
+function ftp_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): void
{
error_clear_last();
- $result = \ftp_fput($ftp_stream, $remote_file, $handle, $mode, $startpos);
+ $result = \ftp_fput($ftp, $remote_filename, $stream, $mode, $offset);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -216,19 +216,19 @@ function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_BIN
* ftp_get retrieves a remote file from the FTP server,
* and saves it into a local file.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param string $local_file The local file path (will be overwritten if the file already exists).
- * @param string $remote_file The remote file path.
+ * @param resource $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 int $mode The transfer mode. Must be either FTP_ASCII or
* FTP_BINARY.
- * @param int $resumepos The position in the remote file to start downloading from.
+ * @param int $offset The position in the remote file to start downloading from.
* @throws FtpException
*
*/
-function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void
+function ftp_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
error_clear_last();
- $result = \ftp_get($ftp_stream, $local_file, $remote_file, $mode, $resumepos);
+ $result = \ftp_get($ftp, $local_filename, $remote_filename, $mode, $offset);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -236,18 +236,18 @@ function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode
/**
- * Logs in to the given FTP stream.
+ * Logs in to the given FTP connection.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @param string $username The username (USER).
* @param string $password The password (PASS).
* @throws FtpException
*
*/
-function ftp_login($ftp_stream, string $username, string $password): void
+function ftp_login($ftp, string $username, string $password): void
{
error_clear_last();
- $result = \ftp_login($ftp_stream, $username, $password);
+ $result = \ftp_login($ftp, $username, $password);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -257,16 +257,16 @@ function ftp_login($ftp_stream, string $username, string $password): void
/**
* Creates the specified directory on the FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $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.
* @throws FtpException
*
*/
-function ftp_mkdir($ftp_stream, string $directory): string
+function ftp_mkdir($ftp, string $directory): string
{
error_clear_last();
- $result = \ftp_mkdir($ftp_stream, $directory);
+ $result = \ftp_mkdir($ftp, $directory);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -277,16 +277,16 @@ function ftp_mkdir($ftp_stream, string $directory): string
/**
*
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $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.
* @throws FtpException
*
*/
-function ftp_mlsd($ftp_stream, string $directory): array
+function ftp_mlsd($ftp, string $directory): array
{
error_clear_last();
- $result = \ftp_mlsd($ftp_stream, $directory);
+ $result = \ftp_mlsd($ftp, $directory);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -295,21 +295,50 @@ function ftp_mlsd($ftp_stream, 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 resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $remote_filename The remote file path.
+ * @param string $local_filename The local file path.
+ * @param int $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.
+ * @throws FtpException
+ *
+ */
+function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int
+{
+ error_clear_last();
+ $result = \ftp_nb_put($ftp, $remote_filename, $local_filename, $mode, $offset);
+ if ($result === false) {
+ throw FtpException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ *
+ *
+ * @param resource $ftp An FTP\Connection instance.
* @param string $directory The directory to be listed. This parameter can also include arguments, eg.
- * ftp_nlist($conn_id, "-la /your/dir");
+ * 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.
* @throws FtpException
*
*/
-function ftp_nlist($ftp_stream, string $directory): array
+function ftp_nlist($ftp, string $directory): array
{
error_clear_last();
- $result = \ftp_nlist($ftp_stream, $directory);
+ $result = \ftp_nlist($ftp, $directory);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -326,15 +355,15 @@ function ftp_nlist($ftp_stream, string $directory): array
* Please note that ftp_pasv can only be called after a
* successful login or otherwise it will fail.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param bool $pasv If TRUE, the passive mode is turned on, else it's turned off.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param bool $enable If TRUE, the passive mode is turned on, else it's turned off.
* @throws FtpException
*
*/
-function ftp_pasv($ftp_stream, bool $pasv): void
+function ftp_pasv($ftp, bool $enable): void
{
error_clear_last();
- $result = \ftp_pasv($ftp_stream, $pasv);
+ $result = \ftp_pasv($ftp, $enable);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -344,19 +373,19 @@ function ftp_pasv($ftp_stream, bool $pasv): void
/**
* ftp_put stores a local file on the FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param string $remote_file The remote file path.
- * @param string $local_file The local file path.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $remote_filename The remote file path.
+ * @param string $local_filename The local file path.
* @param int $mode The transfer mode. Must be either FTP_ASCII or
* FTP_BINARY.
- * @param int $startpos The position in the remote file to start uploading to.
+ * @param int $offset The position in the remote file to start uploading to.
* @throws FtpException
*
*/
-function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0): void
+function ftp_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
error_clear_last();
- $result = \ftp_put($ftp_stream, $remote_file, $local_file, $mode, $startpos);
+ $result = \ftp_put($ftp, $remote_filename, $local_filename, $mode, $offset);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -366,15 +395,15 @@ function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode
/**
*
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @return string Returns the current directory name.
* @throws FtpException
*
*/
-function ftp_pwd($ftp_stream): string
+function ftp_pwd($ftp): string
{
error_clear_last();
- $result = \ftp_pwd($ftp_stream);
+ $result = \ftp_pwd($ftp);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -383,19 +412,41 @@ function ftp_pwd($ftp_stream): string
/**
+ * Sends an arbitrary command to the FTP server.
+ *
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $command The command to execute.
+ * @return array Returns the server's response as an array of strings.
+ * No parsing is performed on the response string, nor does
+ * ftp_raw determine if the command succeeded.
+ * @throws FtpException
+ *
+ */
+function ftp_raw($ftp, string $command): array
+{
+ error_clear_last();
+ $result = \ftp_raw($ftp, $command);
+ if ($result === null) {
+ throw FtpException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* ftp_rename renames a file or a directory on the FTP
* server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
- * @param string $oldname The old file/directory name.
- * @param string $newname The new name.
+ * @param resource $ftp An FTP\Connection instance.
+ * @param string $from The old file/directory name.
+ * @param string $to The new name.
* @throws FtpException
*
*/
-function ftp_rename($ftp_stream, string $oldname, string $newname): void
+function ftp_rename($ftp, string $from, string $to): void
{
error_clear_last();
- $result = \ftp_rename($ftp_stream, $oldname, $newname);
+ $result = \ftp_rename($ftp, $from, $to);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -405,16 +456,16 @@ function ftp_rename($ftp_stream, string $oldname, string $newname): void
/**
* Removes the specified directory on the FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $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.
* @throws FtpException
*
*/
-function ftp_rmdir($ftp_stream, string $directory): void
+function ftp_rmdir($ftp, string $directory): void
{
error_clear_last();
- $result = \ftp_rmdir($ftp_stream, $directory);
+ $result = \ftp_rmdir($ftp, $directory);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -429,16 +480,16 @@ function ftp_rmdir($ftp_stream, string $directory): void
* to server. They are useful for handling such things as file permissions and
* group membership.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $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.
* @throws FtpException
*
*/
-function ftp_site($ftp_stream, string $command): void
+function ftp_site($ftp, string $command): void
{
error_clear_last();
- $result = \ftp_site($ftp_stream, $command);
+ $result = \ftp_site($ftp, $command);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -447,14 +498,14 @@ function ftp_site($ftp_stream, string $command): void
/**
* ftp_ssl_connect opens an explicit SSL-FTP connection to the
- * specified host. That implies that
+ * 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 $host The FTP server address. This parameter shouldn't have any trailing
+ * @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.
@@ -462,14 +513,14 @@ function ftp_site($ftp_stream, string $command): void
* 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 resource Returns a SSL-FTP stream on success.
+ * @return resource Returns an FTP\Connection instance on success.
* @throws FtpException
*
*/
-function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90)
+function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90)
{
error_clear_last();
- $result = \ftp_ssl_connect($host, $port, $timeout);
+ $result = \ftp_ssl_connect($hostname, $port, $timeout);
if ($result === false) {
throw FtpException::createFromPhpError();
}
@@ -480,15 +531,15 @@ function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90)
/**
* Returns the system type identifier of the remote FTP server.
*
- * @param resource $ftp_stream The link identifier of the FTP connection.
+ * @param resource $ftp An FTP\Connection instance.
* @return string Returns the remote system type.
* @throws FtpException
*
*/
-function ftp_systype($ftp_stream): string
+function ftp_systype($ftp): string
{
error_clear_last();
- $result = \ftp_systype($ftp_stream);
+ $result = \ftp_systype($ftp);
if ($result === false) {
throw FtpException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/funchand.php b/vendor/thecodingmachine/safe/generated/funchand.php
index 64654526e..4b2a7b8ff 100644
--- a/vendor/thecodingmachine/safe/generated/funchand.php
+++ b/vendor/thecodingmachine/safe/generated/funchand.php
@@ -5,12 +5,14 @@ namespace Safe;
use Safe\Exceptions\FunchandException;
/**
- * Creates an anonymous function from the parameters passed, and
- * returns a unique name for it.
+ * Creates a function dynamically from the parameters passed, and returns a unique name for it.
*
- * @param string $args The function arguments.
+ * @param string $args The function arguments, as a single comma-separated string.
* @param string $code The function code.
* @return string Returns a unique function name as a string.
+ * Note that the name contains a non-printable character ("\0"),
+ * so care should be taken when printing the name or incorporating it in any other
+ * string.
* @throws FunchandException
*
*/
@@ -28,18 +30,18 @@ function create_function(string $args, string $code): string
/**
*
*
- * @param callable(): void $function The function to register.
- * @param mixed $params
+ * @param callable(): void $callback The function to register.
+ * @param mixed $args
* @throws FunchandException
*
*/
-function register_tick_function(callable $function, ...$params): void
+function register_tick_function(callable $callback, ...$args): void
{
error_clear_last();
- if ($params !== []) {
- $result = \register_tick_function($function, ...$params);
+ if ($args !== []) {
+ $result = \register_tick_function($callback, ...$args);
} else {
- $result = \register_tick_function($function);
+ $result = \register_tick_function($callback);
}
if ($result === false) {
throw FunchandException::createFromPhpError();
diff --git a/vendor/thecodingmachine/safe/generated/functionsList.php b/vendor/thecodingmachine/safe/generated/functionsList.php
index a43e7efa6..3c537d1f6 100644
--- a/vendor/thecodingmachine/safe/generated/functionsList.php
+++ b/vendor/thecodingmachine/safe/generated/functionsList.php
@@ -3,8 +3,8 @@
return [
'apache_getenv',
'apache_get_version',
+ 'apache_lookup_uri',
'apache_request_headers',
- 'apache_reset_timeout',
'apache_response_headers',
'apache_setenv',
'apcu_cache_info',
@@ -14,14 +14,12 @@ return [
'apcu_inc',
'apcu_sma_info',
'apc_fetch',
- 'array_combine',
- 'array_flip',
'array_replace',
'array_replace_recursive',
'array_walk_recursive',
- 'arsort',
- 'asort',
+ 'assert_options',
'base64_decode',
+ 'bindtextdomain',
'bzclose',
'bzflush',
'bzread',
@@ -37,32 +35,75 @@ return [
'class_uses',
'cli_set_process_title',
'closelog',
+ 'com_create_guid',
'com_event_sink',
'com_load_typelib',
'com_print_typeinfo',
'convert_uudecode',
- 'convert_uuencode',
'copy',
'create_function',
+ 'cubrid_bind',
+ 'cubrid_column_names',
+ 'cubrid_column_types',
+ 'cubrid_col_size',
+ 'cubrid_commit',
+ 'cubrid_connect',
+ 'cubrid_connect_with_url',
+ 'cubrid_current_oid',
+ 'cubrid_disconnect',
+ 'cubrid_drop',
'cubrid_free_result',
'cubrid_get_charset',
+ 'cubrid_get_class_name',
'cubrid_get_client_info',
'cubrid_get_db_parameter',
+ 'cubrid_get_query_timeout',
'cubrid_get_server_info',
'cubrid_insert_id',
+ 'cubrid_lob2_bind',
+ 'cubrid_lob2_close',
+ 'cubrid_lob2_export',
+ 'cubrid_lob2_import',
'cubrid_lob2_new',
+ 'cubrid_lob2_read',
+ 'cubrid_lob2_seek',
+ 'cubrid_lob2_seek64',
'cubrid_lob2_size',
'cubrid_lob2_size64',
'cubrid_lob2_tell',
'cubrid_lob2_tell64',
+ 'cubrid_lob2_write',
+ 'cubrid_lob_close',
+ 'cubrid_lob_export',
+ 'cubrid_lob_get',
+ 'cubrid_lob_send',
+ 'cubrid_lob_size',
+ 'cubrid_lock_read',
+ 'cubrid_lock_write',
+ 'cubrid_move_cursor',
+ 'cubrid_next_result',
+ 'cubrid_pconnect',
+ 'cubrid_pconnect_with_url',
+ 'cubrid_prepare',
+ 'cubrid_put',
+ 'cubrid_rollback',
+ 'cubrid_schema',
+ 'cubrid_seq_drop',
+ 'cubrid_seq_insert',
+ 'cubrid_seq_put',
+ 'cubrid_set_add',
+ 'cubrid_set_autocommit',
'cubrid_set_db_parameter',
+ 'cubrid_set_drop',
+ 'cubrid_set_query_timeout',
+ 'curl_copy_handle',
'curl_escape',
'curl_exec',
'curl_getinfo',
'curl_init',
- 'curl_multi_errno',
'curl_multi_info_read',
'curl_multi_init',
+ 'curl_multi_setopt',
'curl_setopt',
'curl_share_errno',
'curl_share_setopt',
@@ -102,6 +143,7 @@ return [
'eio_event_loop',
'eio_fallocate',
'eio_fchmod',
+ 'eio_fchown',
'eio_fdatasync',
'eio_fstat',
'eio_fstatvfs',
@@ -131,16 +173,20 @@ return [
'eio_utime',
'eio_write',
'error_log',
+ 'exec',
'fastcgi_finish_request',
'fbird_blob_cancel',
'fclose',
+ 'fdatasync',
'fflush',
+ 'fgetcsv',
'file',
'fileatime',
'filectime',
'fileinode',
'filemtime',
'fileowner',
+ 'fileperms',
'filesize',
'file_get_contents',
'file_put_contents',
@@ -153,6 +199,8 @@ return [
'fputcsv',
'fread',
'fsockopen',
+ 'fstat',
+ 'fsync',
'ftp_alloc',
'ftp_append',
'ftp_cdup',
@@ -167,10 +215,12 @@ return [
'ftp_login',
'ftp_mkdir',
'ftp_mlsd',
+ 'ftp_nb_put',
'ftp_nlist',
'ftp_pasv',
'ftp_put',
'ftp_pwd',
+ 'ftp_raw',
'ftp_rename',
'ftp_rmdir',
'ftp_site',
@@ -190,19 +240,22 @@ return [
'getopt',
'getprotobyname',
'getprotobynumber',
+ 'getrusage',
+ 'getservbyport',
'get_headers',
+ 'get_include_path',
+ 'get_meta_tags',
'glob',
- 'gmdate',
- 'gmp_binomial',
- 'gmp_export',
- 'gmp_import',
+ 'gmmktime',
'gmp_random_seed',
+ 'gmstrftime',
'gnupg_adddecryptkey',
'gnupg_addencryptkey',
'gnupg_addsignkey',
'gnupg_cleardecryptkeys',
'gnupg_clearencryptkeys',
'gnupg_clearsignkeys',
+ 'gnupg_deletekey',
'gnupg_setarmor',
'gnupg_setsignmode',
'gzclose',
@@ -210,18 +263,23 @@ return [
'gzdecode',
'gzdeflate',
'gzencode',
+ 'gzfile',
'gzgets',
'gzgetss',
'gzinflate',
+ 'gzopen',
'gzpassthru',
+ 'gzread',
'gzrewind',
'gzuncompress',
+ 'gzwrite',
'hash_hkdf',
'hash_update_file',
'header_register_callback',
'hex2bin',
'highlight_file',
'highlight_string',
+ 'hrtime',
'ibase_add_user',
'ibase_backup',
'ibase_blob_cancel',
@@ -248,6 +306,7 @@ return [
'iconv',
'iconv_get_encoding',
'iconv_set_encoding',
+ 'idate',
'image2wbmp',
'imageaffine',
'imageaffinematrixconcat',
@@ -255,12 +314,14 @@ return [
'imagealphablending',
'imageantialias',
'imagearc',
+ 'imageavif',
'imagebmp',
'imagechar',
'imagecharup',
'imagecolorat',
'imagecolordeallocate',
'imagecolormatch',
+ 'imagecolorset',
'imageconvolution',
'imagecopy',
'imagecopymerge',
@@ -268,6 +329,7 @@ return [
'imagecopyresampled',
'imagecopyresized',
'imagecreate',
+ 'imagecreatefromavif',
'imagecreatefrombmp',
'imagecreatefromgd',
'imagecreatefromgd2',
@@ -275,6 +337,8 @@ return [
'imagecreatefromgif',
'imagecreatefromjpeg',
'imagecreatefrompng',
+ 'imagecreatefromstring',
+ 'imagecreatefromtga',
'imagecreatefromwbmp',
'imagecreatefromwebp',
'imagecreatefromxbm',
@@ -288,11 +352,12 @@ return [
'imagefill',
'imagefilledarc',
'imagefilledellipse',
- 'imagefilledpolygon',
'imagefilledrectangle',
'imagefilltoborder',
'imagefilter',
'imageflip',
+ 'imageftbbox',
+ 'imagefttext',
'imagegammacorrect',
'imagegd',
'imagegd2',
@@ -303,10 +368,9 @@ return [
'imagelayereffect',
'imageline',
'imageloadfont',
- 'imageopenpolygon',
'imagepng',
- 'imagepolygon',
'imagerectangle',
+ 'imageresolution',
'imagerotate',
'imagesavealpha',
'imagescale',
@@ -327,29 +391,49 @@ return [
'imagewbmp',
'imagewebp',
'imagexbm',
+ 'image_type_to_extension',
+ 'imap_8bit',
'imap_append',
+ 'imap_base64',
+ 'imap_binary',
+ 'imap_body',
+ 'imap_bodystruct',
'imap_check',
'imap_clearflag_full',
'imap_close',
'imap_createmailbox',
'imap_deletemailbox',
+ 'imap_fetchbody',
+ 'imap_fetchheader',
+ 'imap_fetchmime',
'imap_fetchstructure',
+ 'imap_fetch_overview',
'imap_gc',
+ 'imap_getacl',
+ 'imap_getmailboxes',
+ 'imap_getsubscribed',
'imap_headerinfo',
+ 'imap_headers',
+ 'imap_listscan',
+ 'imap_lsub',
'imap_mail',
'imap_mailboxmsginfo',
'imap_mail_compose',
'imap_mail_copy',
'imap_mail_move',
+ 'imap_mime_header_decode',
'imap_mutf7_to_utf8',
'imap_num_msg',
'imap_open',
+ 'imap_qprint',
'imap_renamemailbox',
+ 'imap_rfc822_write_address',
'imap_savebody',
'imap_setacl',
'imap_setflag_full',
'imap_set_quota',
'imap_sort',
+ 'imap_status',
'imap_subscribe',
'imap_thread',
'imap_timeout',
@@ -361,42 +445,25 @@ return [
'inflate_get_read_len',
'inflate_get_status',
'inflate_init',
- 'ingres_autocommit',
- 'ingres_close',
- 'ingres_commit',
- 'ingres_connect',
- 'ingres_execute',
- 'ingres_field_name',
- 'ingres_field_type',
- 'ingres_free_result',
- 'ingres_pconnect',
- 'ingres_result_seek',
- 'ingres_rollback',
- 'ingres_set_environment',
'ini_get',
'ini_set',
'inotify_init',
'inotify_rm_watch',
'iptcembed',
'iptcparse',
- 'jdtounix',
'jpeg2wbmp',
'json_decode',
'json_encode',
- 'json_last_error_msg',
- 'krsort',
- 'ksort',
'lchgrp',
'lchown',
+ 'ldap_8859_to_t61',
'ldap_add',
- 'ldap_add_ext',
'ldap_bind',
- 'ldap_bind_ext',
'ldap_control_paged_result',
'ldap_control_paged_result_response',
'ldap_count_entries',
'ldap_delete',
- 'ldap_delete_ext',
+ 'ldap_dn2ufn',
'ldap_exop',
'ldap_exop_passwd',
'ldap_exop_whoami',
@@ -410,27 +477,22 @@ return [
'ldap_get_option',
'ldap_get_values',
'ldap_get_values_len',
- 'ldap_list',
'ldap_modify_batch',
'ldap_mod_add',
- 'ldap_mod_add_ext',
'ldap_mod_del',
- 'ldap_mod_del_ext',
'ldap_mod_replace',
- 'ldap_mod_replace_ext',
'ldap_next_attribute',
'ldap_parse_exop',
'ldap_parse_result',
- 'ldap_read',
'ldap_rename',
- 'ldap_rename_ext',
'ldap_sasl_bind',
- 'ldap_search',
'ldap_set_option',
'ldap_unbind',
'libxml_get_last_error',
'libxml_set_external_entity_loader',
'link',
+ 'long2ip',
+ 'lstat',
'lzf_compress',
'lzf_decompress',
'mailparse_msg_extract_part_file',
@@ -439,6 +501,7 @@ return [
'mailparse_msg_parse_file',
'mailparse_stream_encode',
'mb_chr',
+ 'mb_convert_encoding',
'mb_detect_order',
'mb_encoding_aliases',
'mb_eregi_replace',
@@ -448,6 +511,7 @@ return [
'mb_ereg_search_init',
'mb_ereg_search_regs',
'mb_ereg_search_setpos',
+ 'mb_get_info',
'mb_http_output',
'mb_internal_encoding',
'mb_ord',
@@ -455,42 +519,17 @@ return [
'mb_regex_encoding',
'mb_send_mail',
'mb_split',
- 'mb_str_split',
'md5_file',
- 'metaphone',
'mime_content_type',
'mkdir',
'mktime',
+ 'msg_get_queue',
'msg_queue_exists',
'msg_receive',
'msg_remove_queue',
'msg_send',
'msg_set_queue',
- 'msql_affected_rows',
- 'msql_close',
- 'msql_connect',
- 'msql_create_db',
- 'msql_data_seek',
- 'msql_db_query',
- 'msql_drop_db',
- 'msql_field_len',
- 'msql_field_name',
- 'msql_field_seek',
- 'msql_field_table',
- 'msql_field_type',
- 'msql_free_result',
- 'msql_pconnect',
- 'msql_query',
- 'msql_select_db',
- 'mysqli_get_cache_stats',
- 'mysqli_get_client_stats',
- 'mysqlnd_ms_dump_servers',
- 'mysqlnd_ms_fabric_select_global',
- 'mysqlnd_ms_fabric_select_shard',
- 'mysqlnd_ms_get_last_used_connection',
- 'mysqlnd_qc_clear_cache',
- 'mysqlnd_qc_set_is_select',
- 'mysqlnd_qc_set_storage_handler',
+ 'msg_stat_queue',
'mysql_close',
'mysql_connect',
'mysql_create_db',
@@ -522,19 +561,19 @@ return [
'mysql_tablename',
'mysql_thread_id',
'mysql_unbuffered_query',
- 'natcasesort',
- 'natsort',
+ 'net_get_interfaces',
+ 'ob_clean',
'ob_end_clean',
'ob_end_flush',
+ 'ob_flush',
+ 'ob_start',
'oci_bind_array_by_name',
'oci_bind_by_name',
'oci_cancel',
- 'oci_close',
'oci_commit',
'oci_connect',
'oci_define_by_name',
'oci_execute',
- 'oci_fetch_all',
'oci_field_name',
'oci_field_precision',
'oci_field_scale',
@@ -547,10 +586,10 @@ return [
'oci_new_connect',
'oci_new_cursor',
'oci_new_descriptor',
- 'oci_num_fields',
'oci_num_rows',
'oci_parse',
'oci_pconnect',
+ 'oci_register_taf_callback',
'oci_result',
'oci_rollback',
'oci_server_version',
@@ -562,6 +601,7 @@ return [
'oci_set_edition',
'oci_set_module_name',
'oci_set_prefetch',
+ 'oci_set_prefetch_lob',
'oci_statement_type',
'oci_unregister_taf_callback',
'odbc_autocommit',
@@ -569,6 +609,8 @@ return [
'odbc_columnprivileges',
'odbc_columns',
'odbc_commit',
+ 'odbc_connect',
+ 'odbc_cursor',
'odbc_data_source',
'odbc_exec',
'odbc_execute',
@@ -581,8 +623,11 @@ return [
'odbc_foreignkeys',
'odbc_gettypeinfo',
'odbc_longreadlen',
+ 'odbc_pconnect',
'odbc_prepare',
'odbc_primarykeys',
+ 'odbc_procedurecolumns',
+ 'odbc_procedures',
'odbc_result',
'odbc_result_all',
'odbc_rollback',
@@ -596,8 +641,14 @@ return [
'opendir',
'openlog',
'openssl_cipher_iv_length',
+ 'openssl_cms_decrypt',
+ 'openssl_cms_encrypt',
+ 'openssl_cms_read',
+ 'openssl_cms_sign',
+ 'openssl_cms_verify',
'openssl_csr_export',
'openssl_csr_export_to_file',
+ 'openssl_csr_get_public_key',
'openssl_csr_get_subject',
'openssl_csr_new',
'openssl_csr_sign',
@@ -605,6 +656,7 @@ return [
'openssl_dh_compute_key',
'openssl_digest',
'openssl_encrypt',
+ 'openssl_get_curve_names',
'openssl_open',
'openssl_pbkdf2',
'openssl_pkcs7_decrypt',
@@ -614,6 +666,7 @@ return [
'openssl_pkcs12_export',
'openssl_pkcs12_export_to_file',
'openssl_pkcs12_read',
+ 'openssl_pkey_derive',
'openssl_pkey_export',
'openssl_pkey_export_to_file',
'openssl_pkey_get_private',
@@ -626,6 +679,11 @@ return [
'openssl_random_pseudo_bytes',
'openssl_seal',
'openssl_sign',
+ 'openssl_spki_export',
+ 'openssl_spki_export_challenge',
+ 'openssl_spki_new',
+ 'openssl_spki_verify',
+ 'openssl_verify',
'openssl_x509_export',
'openssl_x509_export_to_file',
'openssl_x509_fingerprint',
@@ -636,123 +694,43 @@ return [
'parse_ini_file',
'parse_ini_string',
'parse_url',
- 'password_hash',
- 'pcntl_exec',
+ 'passthru',
'pcntl_getpriority',
'pcntl_setpriority',
+ 'pcntl_signal',
'pcntl_signal_dispatch',
'pcntl_sigprocmask',
- 'pcntl_strerror',
- 'PDF_activate_item',
- 'PDF_add_locallink',
- 'PDF_add_nameddest',
- 'PDF_add_note',
- 'PDF_add_pdflink',
- 'PDF_add_thumbnail',
- 'PDF_add_weblink',
- 'PDF_attach_file',
- 'PDF_begin_layer',
- 'PDF_begin_page',
- 'PDF_begin_page_ext',
- 'PDF_circle',
- 'PDF_clip',
- 'PDF_close',
- 'PDF_closepath',
- 'PDF_closepath_fill_stroke',
- 'PDF_closepath_stroke',
- 'PDF_close_pdi',
- 'PDF_close_pdi_page',
- 'PDF_concat',
- 'PDF_continue_text',
- 'PDF_curveto',
- 'PDF_delete',
- 'PDF_end_layer',
- 'PDF_end_page',
- 'PDF_end_page_ext',
- 'PDF_end_pattern',
- 'PDF_end_template',
- 'PDF_fill',
- 'PDF_fill_stroke',
- 'PDF_fit_image',
- 'PDF_fit_pdi_page',
- 'PDF_fit_textline',
- 'PDF_initgraphics',
- 'PDF_lineto',
- 'PDF_makespotcolor',
- 'PDF_moveto',
- 'PDF_open_file',
- 'PDF_place_image',
- 'PDF_place_pdi_page',
- 'PDF_rect',
- 'PDF_restore',
- 'PDF_rotate',
- 'PDF_save',
- 'PDF_scale',
- 'PDF_setcolor',
- 'PDF_setdash',
- 'PDF_setdashpattern',
- 'PDF_setflat',
- 'PDF_setfont',
- 'PDF_setgray',
- 'PDF_setgray_fill',
- 'PDF_setgray_stroke',
- 'PDF_setlinejoin',
- 'PDF_setlinewidth',
- 'PDF_setmatrix',
- 'PDF_setmiterlimit',
- 'PDF_setrgbcolor',
- 'PDF_setrgbcolor_fill',
- 'PDF_setrgbcolor_stroke',
- 'PDF_set_border_color',
- 'PDF_set_border_dash',
- 'PDF_set_border_style',
- 'PDF_set_info',
- 'PDF_set_layer_dependency',
- 'PDF_set_parameter',
- 'PDF_set_text_pos',
- 'PDF_set_value',
- 'PDF_show',
- 'PDF_show_xy',
- 'PDF_skew',
- 'PDF_stroke',
+ 'pcntl_sigtimedwait',
+ 'pcntl_sigwaitinfo',
+ 'pfsockopen',
'pg_cancel_query',
- 'pg_client_encoding',
- 'pg_close',
'pg_connect',
'pg_connection_reset',
'pg_convert',
'pg_copy_from',
'pg_copy_to',
- 'pg_dbname',
'pg_delete',
'pg_end_copy',
'pg_execute',
- 'pg_field_name',
'pg_field_table',
- 'pg_field_type',
'pg_flush',
'pg_free_result',
'pg_host',
'pg_insert',
- 'pg_last_error',
- 'pg_last_notice',
'pg_last_oid',
'pg_lo_close',
'pg_lo_export',
'pg_lo_import',
'pg_lo_open',
'pg_lo_read',
- 'pg_lo_read_all',
'pg_lo_seek',
'pg_lo_truncate',
'pg_lo_unlink',
'pg_lo_write',
'pg_meta_data',
- 'pg_options',
'pg_parameter_status',
'pg_pconnect',
'pg_ping',
- 'pg_port',
'pg_prepare',
'pg_put_line',
'pg_query',
@@ -760,21 +738,21 @@ return [
'pg_result_error_field',
'pg_result_seek',
'pg_select',
- 'pg_send_execute',
- 'pg_send_prepare',
- 'pg_send_query',
- 'pg_send_query_params',
'pg_socket',
'pg_trace',
- 'pg_tty',
'pg_update',
- 'pg_version',
'phpcredits',
'phpinfo',
+ 'php_sapi_name',
'png2wbmp',
'posix_access',
+ 'posix_getgrgid',
'posix_getgrnam',
- 'posix_getpgid',
+ 'posix_getgroups',
+ 'posix_getlogin',
+ 'posix_getpwuid',
+ 'posix_getrlimit',
+ 'posix_getsid',
'posix_initgroups',
'posix_kill',
'posix_mkfifo',
@@ -785,11 +763,13 @@ return [
'posix_setpgid',
'posix_setrlimit',
'posix_setuid',
+ 'posix_times',
+ 'posix_uname',
+ 'preg_grep',
'preg_match',
'preg_match_all',
'preg_replace',
'preg_split',
- 'proc_get_status',
'proc_nice',
'pspell_add_to_personal',
'pspell_add_to_session',
@@ -805,6 +785,7 @@ return [
'pspell_config_save_repl',
'pspell_new',
'pspell_new_config',
+ 'pspell_new_personal',
'pspell_save_wordlist',
'pspell_store_replacement',
'ps_add_launchlink',
@@ -886,14 +867,21 @@ return [
'register_tick_function',
'rename',
'rewind',
- 'rewinddir',
'rmdir',
'rpmaddtag',
'rrd_create',
- 'rsort',
+ 'rrd_first',
+ 'rrd_graph',
+ 'rrd_info',
+ 'rrd_lastupdate',
+ 'rrd_restore',
+ 'rrd_tune',
+ 'rrd_update',
+ 'rrd_xport',
'sapi_windows_cp_conv',
'sapi_windows_cp_set',
'sapi_windows_generate_ctrl_event',
+ 'sapi_windows_set_ctrl_handler',
'sapi_windows_vt100_support',
'scandir',
'sem_acquire',
@@ -901,19 +889,27 @@ return [
'sem_release',
'sem_remove',
'session_abort',
+ 'session_create_id',
'session_decode',
'session_destroy',
+ 'session_encode',
+ 'session_id',
+ 'session_module_name',
+ 'session_name',
'session_regenerate_id',
'session_reset',
+ 'session_save_path',
'session_unset',
'session_write_close',
'settype',
'set_include_path',
'set_time_limit',
'sha1_file',
+ 'shell_exec',
'shmop_delete',
'shmop_read',
- 'shmop_write',
+ 'shm_attach',
+ 'shm_detach',
'shm_put_var',
'shm_remove',
'shm_remove_var',
@@ -925,6 +921,7 @@ return [
'socket_accept',
'socket_addrinfo_bind',
'socket_addrinfo_connect',
+ 'socket_addrinfo_lookup',
'socket_bind',
'socket_connect',
'socket_create',
@@ -948,14 +945,23 @@ return [
'socket_wsaprotocol_info_export',
'socket_wsaprotocol_info_import',
'socket_wsaprotocol_info_release',
- 'sodium_crypto_pwhash',
- 'sodium_crypto_pwhash_str',
+ 'sodium_crypto_aead_aes256gcm_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_encrypt',
+ 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt',
+ 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt',
+ 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt',
+ 'sodium_crypto_auth_verify',
+ 'sodium_crypto_box_open',
+ 'sodium_crypto_box_seal_open',
+ 'sodium_crypto_generichash_update',
+ 'sodium_crypto_secretbox_open',
+ 'sodium_crypto_sign_open',
+ 'sodium_crypto_sign_verify_detached',
'solr_get_version',
- 'sort',
- 'soundex',
'spl_autoload_register',
'spl_autoload_unregister',
- 'sprintf',
'sqlsrv_begin_transaction',
'sqlsrv_cancel',
'sqlsrv_client_info',
@@ -981,11 +987,14 @@ return [
'ssh2_connect',
'ssh2_disconnect',
'ssh2_exec',
+ 'ssh2_forward_accept',
+ 'ssh2_forward_listen',
'ssh2_publickey_add',
'ssh2_publickey_init',
'ssh2_publickey_remove',
'ssh2_scp_recv',
'ssh2_scp_send',
+ 'ssh2_send_eof',
'ssh2_sftp',
'ssh2_sftp_chmod',
'ssh2_sftp_mkdir',
@@ -993,6 +1002,7 @@ return [
'ssh2_sftp_rmdir',
'ssh2_sftp_symlink',
'ssh2_sftp_unlink',
+ 'ssh2_shell',
'stream_context_set_params',
'stream_copy_to_stream',
'stream_filter_append',
@@ -1000,22 +1010,28 @@ return [
'stream_filter_register',
'stream_filter_remove',
'stream_get_contents',
+ 'stream_get_line',
'stream_isatty',
'stream_resolve_include_path',
'stream_set_blocking',
'stream_set_timeout',
'stream_socket_accept',
'stream_socket_client',
+ 'stream_socket_get_name',
'stream_socket_pair',
+ 'stream_socket_recvfrom',
+ 'stream_socket_sendto',
'stream_socket_server',
'stream_socket_shutdown',
'stream_supports_lock',
'stream_wrapper_register',
'stream_wrapper_restore',
'stream_wrapper_unregister',
+ 'strftime',
'strptime',
'strtotime',
- 'substr',
+ 'swoole_async_dns_lookup',
+ 'swoole_async_readfile',
'swoole_async_write',
'swoole_async_writefile',
'swoole_event_defer',
@@ -1030,15 +1046,14 @@ return [
'time_sleep_until',
'tmpfile',
'touch',
- 'uasort',
- 'uksort',
+ 'unixtojd',
'unlink',
'unpack',
'uopz_extend',
'uopz_implement',
- 'usort',
+ 'variant_date_to_timestamp',
+ 'variant_round',
'virtual',
- 'vsprintf',
'xdiff_file_bdiff',
'xdiff_file_bpatch',
'xdiff_file_diff',
@@ -1049,9 +1064,17 @@ return [
'xdiff_string_patch',
'xdiff_string_patch_binary',
'xmlrpc_set_type',
- 'xml_parser_create',
- 'xml_parser_create_ns',
+ 'xml_parser_free',
+ 'xml_set_character_data_handler',
+ 'xml_set_default_handler',
+ 'xml_set_element_handler',
+ 'xml_set_end_namespace_decl_handler',
+ 'xml_set_external_entity_ref_handler',
+ 'xml_set_notation_decl_handler',
'xml_set_object',
+ 'xml_set_processing_instruction_handler',
+ 'xml_set_start_namespace_decl_handler',
+ 'xml_set_unparsed_entity_decl_handler',
'yaml_parse',
'yaml_parse_file',
'yaml_parse_url',
@@ -1064,6 +1087,10 @@ return [
'yaz_search',
'yaz_wait',
'zip_entry_close',
+ 'zip_entry_compressedsize',
+ 'zip_entry_compressionmethod',
+ 'zip_entry_filesize',
+ 'zip_entry_name',
'zip_entry_open',
'zip_entry_read',
'zlib_decode',
diff --git a/vendor/thecodingmachine/safe/generated/gettext.php b/vendor/thecodingmachine/safe/generated/gettext.php
new file mode 100644
index 000000000..f7816e381
--- /dev/null
+++ b/vendor/thecodingmachine/safe/generated/gettext.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Safe;
+
+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.
+ * @throws GettextException
+ *
+ */
+function bindtextdomain(string $domain, string $directory): string
+{
+ error_clear_last();
+ $result = \bindtextdomain($domain, $directory);
+ if ($result === false) {
+ throw GettextException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/generated/gmp.php b/vendor/thecodingmachine/safe/generated/gmp.php
index dae15975d..b2b88f6e4 100644
--- a/vendor/thecodingmachine/safe/generated/gmp.php
+++ b/vendor/thecodingmachine/safe/generated/gmp.php
@@ -5,75 +5,13 @@ namespace Safe;
use Safe\Exceptions\GmpException;
/**
- * Calculates the binomial coefficient C(n, k).
- *
- * @param \GMP|string|int $n Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
- * @param int $k
- * @return \GMP Returns the binomial coefficient C(n, k).
- * @throws GmpException
- *
- */
-function gmp_binomial($n, int $k): \GMP
-{
- error_clear_last();
- $result = \gmp_binomial($n, $k);
- if ($result === false) {
- throw GmpException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Export a GMP number to a binary string
- *
- * @param \GMP|string|int $gmpnumber The GMP number being exported
- * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter.
- * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
- * @return string Returns a string.
- * @throws GmpException
- *
- */
-function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string
-{
- error_clear_last();
- $result = \gmp_export($gmpnumber, $word_size, $options);
- if ($result === false) {
- throw GmpException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Import a GMP number from a binary string
- *
- * @param string $data The binary string being imported
- * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter.
- * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
- * @return \GMP Returns a GMP number.
- * @throws GmpException
- *
- */
-function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): \GMP
-{
- error_clear_last();
- $result = \gmp_import($data, $word_size, $options);
- if ($result === false) {
- throw GmpException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
*
*
* @param \GMP|string|int $seed The seed to be set for the gmp_random,
* gmp_random_bits, and
* gmp_random_range functions.
*
- * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
+ * A GMP object, an integer or a numeric string.
* @throws GmpException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/gnupg.php b/vendor/thecodingmachine/safe/generated/gnupg.php
index b5d85ca3a..0ecb886b7 100644
--- a/vendor/thecodingmachine/safe/generated/gnupg.php
+++ b/vendor/thecodingmachine/safe/generated/gnupg.php
@@ -122,6 +122,26 @@ 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.
+ * @throws GnupgException
+ *
+ */
+function gnupg_deletekey($identifier, string $key, bool $allow_secret): void
+{
+ error_clear_last();
+ $result = \gnupg_deletekey($identifier, $key, $allow_secret);
+ if ($result === false) {
+ throw GnupgException::createFromPhpError();
+ }
+}
+
+
+/**
* Toggle the armored output.
*
* @param resource $identifier The gnupg identifier, from a call to
diff --git a/vendor/thecodingmachine/safe/generated/hash.php b/vendor/thecodingmachine/safe/generated/hash.php
index 2c327c0e3..5acbc2670 100644
--- a/vendor/thecodingmachine/safe/generated/hash.php
+++ b/vendor/thecodingmachine/safe/generated/hash.php
@@ -16,7 +16,7 @@ use Safe\Exceptions\HashException;
*
*
* Non-cryptographic hash functions are not allowed.
- * @param string $ikm Input keying material (raw binary). Cannot be empty.
+ * @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.
*
@@ -31,10 +31,10 @@ use Safe\Exceptions\HashException;
* @throws HashException
*
*/
-function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string
+function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string
{
error_clear_last();
- $result = \hash_hkdf($algo, $ikm, $length, $info, $salt);
+ $result = \hash_hkdf($algo, $key, $length, $info, $salt);
if ($result === false) {
throw HashException::createFromPhpError();
}
@@ -45,16 +45,20 @@ function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = ''
/**
*
*
- * @param \HashContext $hcontext Hashing context returned by hash_init.
+ * @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 $scontext Stream context as returned by stream_context_create.
+ * @param \HashContext|null $stream_context Stream context as returned by stream_context_create.
* @throws HashException
*
*/
-function hash_update_file(\HashContext $hcontext, string $filename, ?\HashContext $scontext = null): void
+function hash_update_file(\HashContext $context, string $filename, ?\HashContext $stream_context = null): void
{
error_clear_last();
- $result = \hash_update_file($hcontext, $filename, $scontext);
+ if ($stream_context !== null) {
+ $result = \hash_update_file($context, $filename, $stream_context);
+ } else {
+ $result = \hash_update_file($context, $filename);
+ }
if ($result === false) {
throw HashException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/ibase.php b/vendor/thecodingmachine/safe/generated/ibase.php
index 49697400d..7a6199129 100644
--- a/vendor/thecodingmachine/safe/generated/ibase.php
+++ b/vendor/thecodingmachine/safe/generated/ibase.php
@@ -122,7 +122,11 @@ function ibase_blob_cancel($blob_handle): void
function ibase_blob_create($link_identifier = null)
{
error_clear_last();
- $result = \ibase_blob_create($link_identifier);
+ if ($link_identifier !== null) {
+ $result = \ibase_blob_create($link_identifier);
+ } else {
+ $result = \ibase_blob_create();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -166,7 +170,11 @@ function ibase_blob_get($blob_handle, int $len): string
function ibase_close($connection_id = null): void
{
error_clear_last();
- $result = \ibase_close($connection_id);
+ if ($connection_id !== null) {
+ $result = \ibase_close($connection_id);
+ } else {
+ $result = \ibase_close();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -189,7 +197,11 @@ function ibase_close($connection_id = null): void
function ibase_commit_ret($link_or_trans_identifier = null): void
{
error_clear_last();
- $result = \ibase_commit_ret($link_or_trans_identifier);
+ if ($link_or_trans_identifier !== null) {
+ $result = \ibase_commit_ret($link_or_trans_identifier);
+ } else {
+ $result = \ibase_commit_ret();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -210,7 +222,11 @@ function ibase_commit_ret($link_or_trans_identifier = null): void
function ibase_commit($link_or_trans_identifier = null): void
{
error_clear_last();
- $result = \ibase_commit($link_or_trans_identifier);
+ if ($link_or_trans_identifier !== null) {
+ $result = \ibase_commit($link_or_trans_identifier);
+ } else {
+ $result = \ibase_commit();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -309,7 +325,11 @@ function ibase_delete_user($service_handle, string $user_name): void
function ibase_drop_db($connection = null): void
{
error_clear_last();
- $result = \ibase_drop_db($connection);
+ if ($connection !== null) {
+ $result = \ibase_drop_db($connection);
+ } else {
+ $result = \ibase_drop_db();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -566,7 +586,11 @@ function ibase_restore($service_handle, string $source_file, string $dest_db, in
function ibase_rollback_ret($link_or_trans_identifier = null): void
{
error_clear_last();
- $result = \ibase_rollback_ret($link_or_trans_identifier);
+ if ($link_or_trans_identifier !== null) {
+ $result = \ibase_rollback_ret($link_or_trans_identifier);
+ } else {
+ $result = \ibase_rollback_ret();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
@@ -587,7 +611,11 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void
function ibase_rollback($link_or_trans_identifier = null): void
{
error_clear_last();
- $result = \ibase_rollback($link_or_trans_identifier);
+ if ($link_or_trans_identifier !== null) {
+ $result = \ibase_rollback($link_or_trans_identifier);
+ } else {
+ $result = \ibase_rollback();
+ }
if ($result === false) {
throw IbaseException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/iconv.php b/vendor/thecodingmachine/safe/generated/iconv.php
index 44cf96ab8..7b28b4965 100644
--- a/vendor/thecodingmachine/safe/generated/iconv.php
+++ b/vendor/thecodingmachine/safe/generated/iconv.php
@@ -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();
}
diff --git a/vendor/thecodingmachine/safe/generated/image.php b/vendor/thecodingmachine/safe/generated/image.php
index f1dc2183c..639cf16c9 100644
--- a/vendor/thecodingmachine/safe/generated/image.php
+++ b/vendor/thecodingmachine/safe/generated/image.php
@@ -12,12 +12,12 @@ use Safe\Exceptions\ImageException;
* correspondent HTTP content type.
*
* getimagesize can also return some more information
- * in imageinfo parameter.
+ * 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 $imageinfo This optional parameter allows you to extract some extended
+ * @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
@@ -26,7 +26,7 @@ use Safe\Exceptions\ImageException;
* You can use the iptcparse function to parse the
* binary APP13 marker into something readable.
*
- * The imageinfo only supports
+ * The image_info only supports
* JFIF files.
* @return array Returns an array with up to 7 elements. Not all image types will include
* the channels and bits elements.
@@ -66,10 +66,31 @@ use Safe\Exceptions\ImageException;
* @throws ImageException
*
*/
-function getimagesize(string $filename, array &$imageinfo = null): array
+function getimagesize(string $filename, ?array &$image_info = null): array
{
error_clear_last();
- $result = \getimagesize($filename, $imageinfo);
+ $result = \getimagesize($filename, $image_info);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ImageException
+ *
+ */
+function image_type_to_extension(int $image_type, bool $include_dot = true): string
+{
+ error_clear_last();
+ $result = \image_type_to_extension($image_type, $include_dot);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -110,11 +131,11 @@ function image2wbmp($image, ?string $filename = null, int $foreground = null): v
/**
*
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 $clip Array with keys "x", "y", "width" and "height".
- * @return resource Return affined image resource on success.
+ * @param array $clip Array with keys "x", "y", "width" and "height"; or NULL.
+ * @return resource Return affined image object on success.
* @throws ImageException
*
*/
@@ -138,19 +159,19 @@ function imageaffine($image, array $affine, array $clip = null)
* what is useful if multiple transformations should be applied to the same
* image in one go.
*
- * @param array $m1 An affine transformation matrix (an array with keys
+ * @param array $matrix1 An affine transformation matrix (an array with keys
* 0 to 5 and float values).
- * @param array $m2 An affine transformation matrix (an array with keys
+ * @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).
* @throws ImageException
*
*/
-function imageaffinematrixconcat(array $m1, array $m2): array
+function imageaffinematrixconcat(array $matrix1, array $matrix2): array
{
error_clear_last();
- $result = \imageaffinematrixconcat($m1, $m2);
+ $result = \imageaffinematrixconcat($matrix1, $matrix2);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -175,14 +196,10 @@ function imageaffinematrixconcat(array $m1, array $m2): array
* @throws ImageException
*
*/
-function imageaffinematrixget(int $type, $options = null): array
+function imageaffinematrixget(int $type, $options): array
{
error_clear_last();
- if ($options !== null) {
- $result = \imageaffinematrixget($type, $options);
- } else {
- $result = \imageaffinematrixget($type);
- }
+ $result = \imageaffinematrixget($type, $options);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -202,17 +219,17 @@ function imageaffinematrixget(int $type, $options = null): array
* information, replacing the destination pixel. Blending mode is not available
* when drawing on palette images.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param bool $blendmode Whether to enable the blending mode or not. On true color images
+ * @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
* @throws ImageException
*
*/
-function imagealphablending($image, bool $blendmode): void
+function imagealphablending($image, bool $enable): void
{
error_clear_last();
- $result = \imagealphablending($image, $blendmode);
+ $result = \imagealphablending($image, $enable);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -231,16 +248,16 @@ function imagealphablending($image, bool $blendmode): void
* other colors. The lack of alpha component support does not allow an alpha
* based antialiasing method.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param bool $enabled Whether to enable antialiasing or not.
+ * @param bool $enable Whether to enable antialiasing or not.
* @throws ImageException
*
*/
-function imageantialias($image, bool $enabled): void
+function imageantialias($image, bool $enable): void
{
error_clear_last();
- $result = \imageantialias($image, $enabled);
+ $result = \imageantialias($image, $enable);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -251,24 +268,57 @@ function imageantialias($image, bool $enabled): void
* imagearc draws an arc of circle centered at the given
* coordinates.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $cx x-coordinate of the center.
- * @param int $cy y-coordinate of the center.
+ * @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 The arc start angle, in degrees.
- * @param int $end The arc end angle, in degrees.
+ * @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.
* @throws ImageException
*
*/
-function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color): void
+function imagearc($image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): void
{
error_clear_last();
- $result = \imagearc($image, $cx, $cy, $width, $height, $start, $end, $color);
+ $result = \imagearc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 $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.
+ * @throws ImageException
+ *
+ */
+function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed = -1): void
+{
+ error_clear_last();
+ if ($speed !== -1) {
+ $result = \imageavif($image, $file, $quality, $speed);
+ } elseif ($quality !== -1) {
+ $result = \imageavif($image, $file, $quality);
+ } elseif ($file !== null) {
+ $result = \imageavif($image, $file);
+ } else {
+ $result = \imageavif($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -278,9 +328,9 @@ function imagearc($image, int $cx, int $cy, int $width, int $height, int $start,
/**
* Outputs or saves a BMP version of the given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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.
@@ -288,10 +338,16 @@ function imagearc($image, int $cx, int $cy, int $width, int $height, int $start,
* @throws ImageException
*
*/
-function imagebmp($image, $to = null, bool $compressed = true): void
+function imagebmp($image, $file = null, bool $compressed = true): void
{
error_clear_last();
- $result = \imagebmp($image, $to, $compressed);
+ if ($compressed !== true) {
+ $result = \imagebmp($image, $file, $compressed);
+ } elseif ($file !== null) {
+ $result = \imagebmp($image, $file);
+ } else {
+ $result = \imagebmp($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -300,27 +356,27 @@ function imagebmp($image, $to = null, bool $compressed = true): void
/**
* imagechar draws the first character of
- * c in the image identified by
+ * char in the image identified by
* image with its upper-left at
* x,y (top left is 0,
* 0) with the color color.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 any of your
- * own font identifiers registered with imageloadfont.
+ * 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 $c The character to draw.
+ * @param string $char The character to draw.
* @param int $color A color identifier created with imagecolorallocate.
* @throws ImageException
*
*/
-function imagechar($image, int $font, int $x, int $y, string $c, int $color): void
+function imagechar($image, int $font, int $x, int $y, string $char, int $color): void
{
error_clear_last();
- $result = \imagechar($image, $font, $x, $y, $c, $color);
+ $result = \imagechar($image, $font, $x, $y, $char, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -328,25 +384,25 @@ function imagechar($image, int $font, int $x, int $y, string $c, int $color): vo
/**
- * Draws the character c vertically at the specified
+ * Draws the character char vertically at the specified
* coordinate on the given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 any of your
- * own font identifiers registered with imageloadfont.
+ * 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 $c The character to draw.
+ * @param string $char The character to draw.
* @param int $color A color identifier created with imagecolorallocate.
* @throws ImageException
*
*/
-function imagecharup($image, int $font, int $x, int $y, string $c, int $color): void
+function imagecharup($image, int $font, int $x, int $y, string $char, int $color): void
{
error_clear_last();
- $result = \imagecharup($image, $font, $x, $y, $c, $color);
+ $result = \imagecharup($image, $font, $x, $y, $char, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -362,7 +418,7 @@ function imagecharup($image, int $font, int $x, int $y, string $c, int $color):
* integer. Use bitshifting and masking to access the distinct red, green and blue
* component values:
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -386,7 +442,7 @@ function imagecolorat($image, int $x, int $y): int
* imagecolorallocate or
* imagecolorallocatealpha.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @param int $color The color identifier.
* @throws ImageException
@@ -405,8 +461,8 @@ function imagecolordeallocate($image, int $color): void
/**
* Makes the colors of the palette version of an image more closely match the true color version.
*
- * @param resource $image1 A truecolor image resource.
- * @param resource $image2 A palette image resource pointing to an image that has the same
+ * @param resource $image1 A truecolor image object.
+ * @param resource $image2 A palette image object pointing to an image that has the same
* size as image1.
* @throws ImageException
*
@@ -422,21 +478,47 @@ function imagecolormatch($image1, $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 resource $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.
+ * @throws ImageException
+ *
+ */
+function imagecolorset($image, int $color, int $red, int $green, int $blue, int $alpha = 0): void
+{
+ error_clear_last();
+ $result = \imagecolorset($image, $color, $red, $green, $blue, $alpha);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+}
+
+
+/**
* Applies a convolution matrix on the image, using the given coefficient and
* offset.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 $div The divisor of the result of the convolution, used for normalization.
+ * @param float $divisor The divisor of the result of the convolution, used for normalization.
* @param float $offset Color offset.
* @throws ImageException
*
*/
-function imageconvolution($image, array $matrix, float $div, float $offset): void
+function imageconvolution($image, array $matrix, float $divisor, float $offset): void
{
error_clear_last();
- $result = \imageconvolution($image, $matrix, $div, $offset);
+ $result = \imageconvolution($image, $matrix, $divisor, $offset);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -444,29 +526,29 @@ function imageconvolution($image, array $matrix, float $div, float $offset): voi
/**
- * Copy a part of src_im onto
- * dst_im starting at the x,y coordinates
+ * Copy a part of src_image onto
+ * dst_image starting at the x,y coordinates
* src_x, src_y with
- * a width of src_w and a height of
- * src_h. The portion defined will be copied
+ * 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 resource $dst_im Destination image resource.
- * @param resource $src_im Source image resource.
+ * @param resource $dst_image Destination image resource.
+ * @param resource $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_w Source width.
- * @param int $src_h Source height.
+ * @param int $src_width Source width.
+ * @param int $src_height Source height.
* @throws ImageException
*
*/
-function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): void
+function imagecopy($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): void
{
error_clear_last();
- $result = \imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
+ $result = \imagecopy($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -474,22 +556,22 @@ function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $sr
/**
- * Copy a part of src_im onto
- * dst_im starting at the x,y coordinates
+ * Copy a part of src_image onto
+ * dst_image starting at the x,y coordinates
* src_x, src_y with
- * a width of src_w and a height of
- * src_h. The portion defined will be copied
+ * 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 resource $dst_im Destination image resource.
- * @param resource $src_im Source image resource.
+ * @param resource $dst_image Destination image resource.
+ * @param resource $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_w Source width.
- * @param int $src_h Source height.
+ * @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
@@ -499,10 +581,10 @@ function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $sr
* @throws ImageException
*
*/
-function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void
+function imagecopymerge($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void
{
error_clear_last();
- $result = \imagecopymerge($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct);
+ $result = \imagecopymerge($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -510,11 +592,11 @@ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, in
/**
- * imagecopymergegray copy a part of src_im onto
- * dst_im starting at the x,y coordinates
+ * 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_w and a height of
- * src_h. The portion defined will be copied
+ * 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.
*
@@ -522,15 +604,15 @@ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, in
* that when merging it preserves the hue of the source by converting
* the destination pixels to gray scale before the copy operation.
*
- * @param resource $dst_im Destination image resource.
- * @param resource $src_im Source image resource.
+ * @param resource $dst_image Destination image resource.
+ * @param resource $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_w Source width.
- * @param int $src_h Source height.
- * @param int $pct The src_im will be changed to grayscale according
+ * @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
@@ -539,10 +621,10 @@ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, in
* @throws ImageException
*
*/
-function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void
+function imagecopymergegray($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void
{
error_clear_last();
- $result = \imagecopymergegray($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct);
+ $result = \imagecopymergegray($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -557,10 +639,10 @@ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x
*
* In other words, imagecopyresampled will take a
* rectangular area from src_image of width
- * src_w and height src_h at
+ * 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_w and height dst_h
+ * of width dst_width and height dst_height
* at position (dst_x,dst_y).
*
* If the source and destination coordinates and width and heights
@@ -577,17 +659,17 @@ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x
* @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_w Destination width.
- * @param int $dst_h Destination height.
- * @param int $src_w Source width.
- * @param int $src_h Source height.
+ * @param int $dst_width Destination width.
+ * @param int $dst_height Destination height.
+ * @param int $src_width Source width.
+ * @param int $src_height Source height.
* @throws ImageException
*
*/
-function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void
+function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void
{
error_clear_last();
- $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
+ $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -602,10 +684,10 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int
*
* In other words, imagecopyresized will take a
* rectangular area from src_image of width
- * src_w and height src_h at
+ * 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_w and height dst_h
+ * of width dst_width and height dst_height
* at position (dst_x,dst_y).
*
* If the source and destination coordinates and width and heights
@@ -622,17 +704,17 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int
* @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_w Destination width.
- * @param int $dst_h Destination height.
- * @param int $src_w Source width.
- * @param int $src_h Source height.
+ * @param int $dst_width Destination width.
+ * @param int $dst_height Destination height.
+ * @param int $src_width Source width.
+ * @param int $src_height Source height.
* @throws ImageException
*
*/
-function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void
+function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void
{
error_clear_last();
- $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
+ $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -653,7 +735,7 @@ function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $s
*
* @param int $width The image width.
* @param int $height The image height.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -669,11 +751,31 @@ function imagecreate(int $width, int $height)
/**
+ * imagecreatefromavif returns an image object
+ * representing the image obtained from the given filename.
+ *
+ * @param string $filename Path to the AVIF raster image.
+ * @return Returns an image object on success, FALSE on errors.
+ * @throws ImageException
+ *
+ */
+function imagecreatefromavif(string $filename)
+{
+ error_clear_last();
+ $result = \imagecreatefromavif($filename);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* imagecreatefrombmp returns an image identifier
* representing the image obtained from the given filename.
*
* @param string $filename Path to the BMP image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -692,7 +794,7 @@ function imagecreatefrombmp(string $filename)
* Create a new image from GD file or URL.
*
* @param string $filename Path to the GD file.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -711,7 +813,7 @@ function imagecreatefromgd(string $filename)
* Create a new image from GD2 file or URL.
*
* @param string $filename Path to the GD2 image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -730,18 +832,18 @@ function imagecreatefromgd2(string $filename)
* Create a new image from a given part of GD2 file or URL.
*
* @param string $filename Path to the GD2 image.
- * @param int $srcX x-coordinate of source point.
- * @param int $srcY y-coordinate of source point.
+ * @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 resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
-function imagecreatefromgd2part(string $filename, int $srcX, int $srcY, int $width, int $height)
+function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height)
{
error_clear_last();
- $result = \imagecreatefromgd2part($filename, $srcX, $srcY, $width, $height);
+ $result = \imagecreatefromgd2part($filename, $x, $y, $width, $height);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -754,7 +856,7 @@ function imagecreatefromgd2part(string $filename, int $srcX, int $srcY, int $wid
* representing the image obtained from the given filename.
*
* @param string $filename Path to the GIF image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -774,7 +876,7 @@ function imagecreatefromgif(string $filename)
* representing the image obtained from the given filename.
*
* @param string $filename Path to the JPEG image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -794,7 +896,7 @@ function imagecreatefromjpeg(string $filename)
* representing the image obtained from the given filename.
*
* @param string $filename Path to the PNG image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -810,11 +912,55 @@ function imagecreatefrompng(string $filename)
/**
+ * 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 resource 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.
+ * @throws ImageException
+ *
+ */
+function imagecreatefromstring(string $data)
+{
+ error_clear_last();
+ $result = \imagecreatefromstring($data);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * imagecreatefromtga returns an image object
+ * representing the image obtained from the given filename.
+ *
+ * @param string $filename Path to the Truevision TGA image.
+ * @return Returns an image object on success, FALSE on errors.
+ * @throws ImageException
+ *
+ */
+function imagecreatefromtga(string $filename)
+{
+ error_clear_last();
+ $result = \imagecreatefromtga($filename);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* imagecreatefromwbmp returns an image identifier
* representing the image obtained from the given filename.
*
* @param string $filename Path to the WBMP image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -832,9 +978,10 @@ function imagecreatefromwbmp(string $filename)
/**
* 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 resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -854,7 +1001,7 @@ function imagecreatefromwebp(string $filename)
* representing the image obtained from the given filename.
*
* @param string $filename Path to the XBM image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -874,7 +1021,7 @@ function imagecreatefromxbm(string $filename)
* representing the image obtained from the given filename.
*
* @param string $filename Path to the XPM image.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -890,12 +1037,12 @@ function imagecreatefromxpm(string $filename)
/**
- * imagecreatetruecolor returns an image identifier
+ * imagecreatetruecolor returns an image object
* representing a black image of the specified size.
*
* @param int $width Image width.
* @param int $height Image height.
- * @return resource Returns an image resource identifier on success, FALSE on errors.
+ * @return resource Returns an image object on success, FALSE on errors.
* @throws ImageException
*
*/
@@ -914,19 +1061,19 @@ function imagecreatetruecolor(int $width, int $height)
* Crops an image to the given rectangular area and returns the resulting image.
* The given image is not modified.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param array $rect The cropping rectangle as array with keys
+ * @param array $rectangle The cropping rectangle as array with keys
* x, y, width and
* height.
- * @return resource Return cropped image resource on success.
+ * @return resource Return cropped image object on success.
* @throws ImageException
*
*/
-function imagecrop($image, array $rect)
+function imagecrop($image, array $rectangle)
{
error_clear_last();
- $result = \imagecrop($image, $rect);
+ $result = \imagecrop($image, $rectangle);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -938,17 +1085,17 @@ function imagecrop($image, array $rect)
* Automatically crops an image according to the given
* mode.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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
* @param int $color
- * @return resource Returns a cropped image resource on success.
+ * @return resource Returns a cropped image object on success.
* If the complete image was cropped, imagecrop returns FALSE.
* @throws ImageException
*
*/
-function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = .5, int $color = -1)
+function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1)
{
error_clear_last();
$result = \imagecropauto($image, $mode, $threshold, $color);
@@ -964,7 +1111,7 @@ function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold =
* imagesetstyle and imageline
* instead.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -985,10 +1132,10 @@ function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color)
/**
- * imagedestroy frees any memory associated
+ * Prior to PHP 8.0.0, imagedestroy freed any memory associated
* with image image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @throws ImageException
*
@@ -1006,20 +1153,20 @@ function imagedestroy($image): void
/**
* Draws an ellipse centered at the specified coordinates.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $cx x-coordinate of the center.
- * @param int $cy y-coordinate of the center.
+ * @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.
* @throws ImageException
*
*/
-function imageellipse($image, int $cx, int $cy, int $width, int $height, int $color): void
+function imageellipse($image, int $center_x, int $center_y, int $width, int $height, int $color): void
{
error_clear_last();
- $result = \imageellipse($image, $cx, $cy, $width, $height, $color);
+ $result = \imageellipse($image, $center_x, $center_y, $width, $height, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1031,7 +1178,7 @@ function imageellipse($image, int $cx, int $cy, int $width, int $height, int $co
* with the given color in the
* image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -1053,14 +1200,14 @@ function imagefill($image, int $x, int $y, int $color): void
* Draws a partial arc centered at the specified coordinate in the
* given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $cx x-coordinate of the center.
- * @param int $cy y-coordinate of the center.
+ * @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 The arc start angle, in degrees.
- * @param int $end The arc end angle, in degrees.
+ * @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.
@@ -1083,10 +1230,10 @@ function imagefill($image, int $x, int $y, int $color): void
* @throws ImageException
*
*/
-function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style): void
+function imagefilledarc($image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): void
{
error_clear_last();
- $result = \imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style);
+ $result = \imagefilledarc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color, $style);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1097,43 +1244,20 @@ function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $
* Draws an ellipse centered at the specified coordinate on the given
* image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $cx x-coordinate of the center.
- * @param int $cy y-coordinate of the center.
+ * @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.
* @throws ImageException
*
*/
-function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, int $color): void
+function imagefilledellipse($image, int $center_x, int $center_y, int $width, int $height, int $color): void
{
error_clear_last();
- $result = \imagefilledellipse($image, $cx, $cy, $width, $height, $color);
- if ($result === false) {
- throw ImageException::createFromPhpError();
- }
-}
-
-
-/**
- * imagefilledpolygon creates a filled polygon
- * in the given image.
- *
- * @param resource $image An image resource, returned by one of the image creation functions,
- * such as imagecreatetruecolor.
- * @param array $points An array containing the x and y
- * coordinates of the polygons vertices consecutively.
- * @param int $num_points Total number of points (vertices), which must be at least 3.
- * @param int $color A color identifier created with imagecolorallocate.
- * @throws ImageException
- *
- */
-function imagefilledpolygon($image, array $points, int $num_points, int $color): void
-{
- error_clear_last();
- $result = \imagefilledpolygon($image, $points, $num_points, $color);
+ $result = \imagefilledellipse($image, $center_x, $center_y, $width, $height, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1145,7 +1269,7 @@ function imagefilledpolygon($image, array $points, int $num_points, int $color):
* image starting at point 1 and ending at point 2.
* 0, 0 is the top left corner of the image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -1167,24 +1291,24 @@ function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $c
/**
* imagefilltoborder performs a flood fill
- * whose border color is defined by border.
+ * 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 resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 The border color. A color identifier created with imagecolorallocate.
+ * @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.
* @throws ImageException
*
*/
-function imagefilltoborder($image, int $x, int $y, int $border, int $color): void
+function imagefilltoborder($image, int $x, int $y, int $border_color, int $color): void
{
error_clear_last();
- $result = \imagefilltoborder($image, $x, $y, $border, $color);
+ $result = \imagefilltoborder($image, $x, $y, $border_color, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1193,11 +1317,11 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
/**
* imagefilter applies the given filter
- * filtertype on the image.
+ * filter on the image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $filtertype filtertype can be one of the following:
+ * @param int $filter filter can be one of the following:
*
*
*
@@ -1217,14 +1341,14 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
* IMG_FILTER_BRIGHTNESS: Changes the brightness
- * of the image. Use arg1 to set the level of
+ * 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 arg1 to set the level of
+ * the image. Use args to set the level of
* contrast.
*
*
@@ -1232,7 +1356,7 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
* IMG_FILTER_COLORIZE: Like
* IMG_FILTER_GRAYSCALE, except you can specify the
- * color. Use arg1, arg2 and
+ * color. Use args, arg2 and
* arg3 in the form of
* red, green,
* blue and arg4 for the
@@ -1270,27 +1394,27 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
* IMG_FILTER_SMOOTH: Makes the image smoother.
- * Use arg1 to set the level of smoothness.
+ * Use args to set the level of smoothness.
*
*
*
*
* IMG_FILTER_PIXELATE: Applies pixelation effect
- * to the image, use arg1 to set the block size
+ * 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 arg1 and
+ * to the image, use args and
* arg2 to define the effect strength and
* additionally arg3 to only apply the
* on select pixel colors.
*
*
*
- * @param int $arg1
+ * @param int $args
*
*
* IMG_FILTER_BRIGHTNESS: Brightness level.
@@ -1324,117 +1448,272 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi
*
*
*
- * @param int $arg2
+ * @throws ImageException
+ *
+ */
+function imagefilter($image, int $filter, int ...$args): void
+{
+ error_clear_last();
+ if ($args !== []) {
+ $result = \imagefilter($image, $filter, ...$args);
+ } else {
+ $result = \imagefilter($image, $filter);
+ }
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Flips the image image using the given
+ * mode.
+ *
+ * @param resource $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:
+ *
+ *
*
*
- * IMG_FILTER_COLORIZE: Value of green component.
*
+ * Constant
+ * Meaning
*
*
*
- * IMG_FILTER_PIXELATE: Whether to use advanced pixelation
- * effect or not (defaults to FALSE).
*
+ * IMG_FLIP_HORIZONTAL
*
+ * Flips the image horizontally.
*
*
- * IMG_FILTER_SCATTER: Effect addition level.
*
+ * IMG_FLIP_VERTICAL
*
+ * Flips the image vertically.
*
- * @param int $arg3
*
*
- * IMG_FILTER_COLORIZE: Value of blue component.
+ * IMG_FLIP_BOTH
*
+ * Flips the image both horizontally and vertically.
*
*
*
- * IMG_FILTER_SCATTER: Optional array indexed color values
- * to apply effect at.
*
*
+ * @throws ImageException
*
- * @param int $arg4
+ */
+function imageflip($image, int $mode): void
+{
+ error_clear_last();
+ $result = \imageflip($image, $mode);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 array $options
+ * Possible array indexes for options
*
- * IMG_FILTER_COLORIZE: Alpha channel, A value
- * between 0 and 127. 0 indicates completely opaque while 127 indicates
- * completely transparent.
*
*
+ * 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.
* @throws ImageException
*
*/
-function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null, int $arg3 = null, int $arg4 = null): void
+function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array
{
error_clear_last();
- if ($arg4 !== null) {
- $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3, $arg4);
- } elseif ($arg3 !== null) {
- $result = \imagefilter($image, $filtertype, $arg1, $arg2, $arg3);
- } elseif ($arg2 !== null) {
- $result = \imagefilter($image, $filtertype, $arg1, $arg2);
- } elseif ($arg1 !== null) {
- $result = \imagefilter($image, $filtertype, $arg1);
- } else {
- $result = \imagefilter($image, $filtertype);
- }
+ $result = \imageftbbox($size, $angle, $font_filename, $string, $options);
if ($result === false) {
throw ImageException::createFromPhpError();
}
+ return $result;
}
/**
- * Flips the image image using the given
- * mode.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ *
+ * @param resource $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:
+ * @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 array $options
+ * Possible array indexes for options
*
- * Constant
+ *
+ *
+ * Key
+ * Type
* Meaning
*
*
*
*
- * IMG_FLIP_HORIZONTAL
+ * linespacing
+ * float
+ * Defines drawing linespacing
*
- * Flips the image horizontally.
*
*
*
- * IMG_FLIP_VERTICAL
+ * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise:
*
- * Flips the image vertically.
*
*
*
- * IMG_FLIP_BOTH
+ * 0
+ * lower left x-coordinate
*
- * Flips the image both horizontally and vertically.
*
+ * 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.
* @throws ImageException
*
*/
-function imageflip($image, int $mode): void
+function imagefttext($image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array
{
error_clear_last();
- $result = \imageflip($image, $mode);
+ $result = \imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options);
if ($result === false) {
throw ImageException::createFromPhpError();
}
+ return $result;
}
@@ -1442,17 +1721,17 @@ function imageflip($image, int $mode): void
* Applies gamma correction to the given gd image
* given an input and an output gamma.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param float $inputgamma The input gamma.
- * @param float $outputgamma The output gamma.
+ * @param float $input_gamma The input gamma.
+ * @param float $output_gamma The output gamma.
* @throws ImageException
*
*/
-function imagegammacorrect($image, float $inputgamma, float $outputgamma): void
+function imagegammacorrect($image, float $input_gamma, float $output_gamma): void
{
error_clear_last();
- $result = \imagegammacorrect($image, $inputgamma, $outputgamma);
+ $result = \imagegammacorrect($image, $input_gamma, $output_gamma);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1460,18 +1739,22 @@ function imagegammacorrect($image, float $inputgamma, float $outputgamma): void
/**
- * Outputs a GD image to the given to.
+ * Outputs a GD image to the given file.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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.
* @throws ImageException
*
*/
-function imagegd($image, $to = null): void
+function imagegd($image, $file = null): void
{
error_clear_last();
- $result = \imagegd($image, $to);
+ if ($file !== null) {
+ $result = \imagegd($image, $file);
+ } else {
+ $result = \imagegd($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1479,22 +1762,30 @@ function imagegd($image, $to = null): void
/**
- * Outputs a GD2 image to the given to.
+ * Outputs a GD2 image to the given file.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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 $type Either IMG_GD2_RAW or
+ * @param int $mode Either IMG_GD2_RAW or
* IMG_GD2_COMPRESSED. Default is
* IMG_GD2_RAW.
* @throws ImageException
*
*/
-function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2_RAW): void
+function imagegd2($image, $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): void
{
error_clear_last();
- $result = \imagegd2($image, $to, $chunk_size, $type);
+ if ($mode !== IMG_GD2_RAW) {
+ $result = \imagegd2($image, $file, $chunk_size, $mode);
+ } elseif ($chunk_size !== 128) {
+ $result = \imagegd2($image, $file, $chunk_size);
+ } elseif ($file !== null) {
+ $result = \imagegd2($image, $file);
+ } else {
+ $result = \imagegd2($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1503,7 +1794,7 @@ function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2
/**
* imagegif creates the GIF
- * file in to from the image image. The
+ * file in file from the image image. The
* image argument is the return from the
* imagecreate or imagecreatefrom*
* function.
@@ -1513,16 +1804,20 @@ function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2
* imagecolortransparent, in which case the
* image format will be GIF89a.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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.
* @throws ImageException
*
*/
-function imagegif($image, $to = null): void
+function imagegif($image, $file = null): void
{
error_clear_last();
- $result = \imagegif($image, $to);
+ if ($file !== null) {
+ $result = \imagegif($image, $file);
+ } else {
+ $result = \imagegif($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1532,7 +1827,7 @@ function imagegif($image, $to = null): void
/**
* Grabs a screenshot of the whole screen.
*
- * @return resource Returns an image resource identifier on success, FALSE on failure.
+ * @return resource Returns an image object on success, FALSE on failure.
* @throws ImageException
*
*/
@@ -1550,16 +1845,16 @@ function imagegrabscreen()
/**
* Grabs a window or its client area using a windows handle (HWND property in COM instance)
*
- * @param int $window_handle The HWND window ID.
- * @param int $client_area Include the client area of the application window.
- * @return resource Returns an image resource identifier on success, FALSE on failure.
+ * @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, FALSE on failure.
* @throws ImageException
*
*/
-function imagegrabwindow(int $window_handle, int $client_area = 0)
+function imagegrabwindow(int $handle, bool $client_area = false): \GdImage
{
error_clear_last();
- $result = \imagegrabwindow($window_handle, $client_area);
+ $result = \imagegrabwindow($handle, $client_area);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1571,19 +1866,25 @@ function imagegrabwindow(int $window_handle, int $client_area = 0)
* imagejpeg creates a JPEG file from
* the given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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).
* @throws ImageException
*
*/
-function imagejpeg($image, $to = null, int $quality = -1): void
+function imagejpeg($image, $file = null, int $quality = -1): void
{
error_clear_last();
- $result = \imagejpeg($image, $to, $quality);
+ if ($quality !== -1) {
+ $result = \imagejpeg($image, $file, $quality);
+ } elseif ($file !== null) {
+ $result = \imagejpeg($image, $file);
+ } else {
+ $result = \imagejpeg($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1593,7 +1894,7 @@ function imagejpeg($image, $to = null, int $quality = -1): void
/**
* Set the alpha blending flag to use layering effects.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @param int $effect One of the following constants:
*
@@ -1658,7 +1959,7 @@ function imagelayereffect($image, int $effect): void
/**
* Draws a line between the two given points.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -1682,7 +1983,7 @@ function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void
* imageloadfont loads a user-defined bitmap and returns
* its identifier.
*
- * @param string $file The font file format is currently binary and architecture
+ * @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.
*
@@ -1730,15 +2031,14 @@ function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void
*
*
*
- * @return int The font identifier which is always bigger than 5 to avoid conflicts with
- * built-in fontss.
+ * @return int Returns an GdFont instance.
* @throws ImageException
*
*/
-function imageloadfont(string $file): int
+function imageloadfont(string $filename): int
{
error_clear_last();
- $result = \imageloadfont($file);
+ $result = \imageloadfont($filename);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1747,57 +2047,12 @@ function imageloadfont(string $file): int
/**
- * imageopenpolygon draws an open polygon on the given
- * image. Contrary to imagepolygon,
- * no line is drawn between the last and the first point.
- *
- * @param resource $image An image resource, returned by one of the image creation functions,
- * such as imagecreatetruecolor.
- * @param array $points An array containing the polygon's vertices, e.g.:
- *
- *
- *
- *
- * points[0]
- * = x0
- *
- *
- * points[1]
- * = y0
- *
- *
- * points[2]
- * = x1
- *
- *
- * points[3]
- * = y1
- *
- *
- *
- *
- * @param int $num_points Total number of points (vertices), which must be at least 3.
- * @param int $color A color identifier created with imagecolorallocate.
- * @throws ImageException
- *
- */
-function imageopenpolygon($image, array $points, int $num_points, int $color): void
-{
- error_clear_last();
- $result = \imageopenpolygon($image, $points, $num_points, $color);
- if ($result === false) {
- throw ImageException::createFromPhpError();
- }
-}
-
-
-/**
* Outputs or saves a PNG image from the given
* image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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.
@@ -1813,10 +2068,18 @@ function imageopenpolygon($image, array $points, int $num_points, int $color): v
* @throws ImageException
*
*/
-function imagepng($image, $to = null, int $quality = -1, int $filters = -1): void
+function imagepng($image, $file = null, int $quality = -1, int $filters = -1): void
{
error_clear_last();
- $result = \imagepng($image, $to, $quality, $filters);
+ if ($filters !== -1) {
+ $result = \imagepng($image, $file, $quality, $filters);
+ } elseif ($quality !== -1) {
+ $result = \imagepng($image, $file, $quality);
+ } elseif ($file !== null) {
+ $result = \imagepng($image, $file);
+ } else {
+ $result = \imagepng($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1824,43 +2087,24 @@ function imagepng($image, $to = null, int $quality = -1, int $filters = -1): voi
/**
- * imagepolygon creates a polygon in the given
- * image.
+ * imagerectangle creates a rectangle starting at
+ * the specified coordinates.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param array $points An array containing the polygon's vertices, e.g.:
- *
- *
- *
- *
- * points[0]
- * = x0
- *
- *
- * points[1]
- * = y0
- *
- *
- * points[2]
- * = x1
- *
- *
- * points[3]
- * = y1
- *
- *
- *
- *
- * @param int $num_points Total number of points (vertices), which must be at least 3.
+ * @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.
* @throws ImageException
*
*/
-function imagepolygon($image, array $points, int $num_points, int $color): void
+function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void
{
error_clear_last();
- $result = \imagepolygon($image, $points, $num_points, $color);
+ $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1868,27 +2112,44 @@ function imagepolygon($image, array $points, int $num_points, int $color): void
/**
- * imagerectangle creates a rectangle starting at
- * the specified coordinates.
+ * 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.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * 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 resource $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 int $resolution_x The horizontal resolution in DPI.
+ * @param int $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.
* @throws ImageException
*
*/
-function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void
+function imageresolution($image, int $resolution_x = null, int $resolution_y = null)
{
error_clear_last();
- $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color);
+ if ($resolution_y !== null) {
+ $result = \imageresolution($image, $resolution_x, $resolution_y);
+ } elseif ($resolution_x !== null) {
+ $result = \imageresolution($image, $resolution_x);
+ } else {
+ $result = \imageresolution($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
+ return $result;
}
@@ -1899,20 +2160,20 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color):
* The center of rotation is the center of the image, and the rotated
* image may have different dimensions than the original image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 $bgd_color Specifies the color of the uncovered zone after the rotation
- * @param int $dummy This parameter is unused.
- * @return resource Returns an image resource for the rotated image.
+ * @param int $background_color Specifies the color of the uncovered zone after the rotation
+ * @param bool $ignore_transparent This parameter is unused.
+ * @return resource Returns an image object for the rotated image.
* @throws ImageException
*
*/
-function imagerotate($image, float $angle, int $bgd_color, int $dummy = 0)
+function imagerotate($image, float $angle, int $background_color, bool $ignore_transparent = false)
{
error_clear_last();
- $result = \imagerotate($image, $angle, $bgd_color, $dummy);
+ $result = \imagerotate($image, $angle, $background_color, $ignore_transparent);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1928,16 +2189,16 @@ function imagerotate($image, float $angle, int $bgd_color, int $dummy = 0)
* Alphablending has to be disabled (imagealphablending($im, false))
* to retain the alpha-channel in the first place.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param bool $saveflag Whether to save the alpha channel or not. Defaults to FALSE.
+ * @param bool $enable Whether to save the alpha channel or not. Defaults to FALSE.
* @throws ImageException
*
*/
-function imagesavealpha($image, bool $saveflag): void
+function imagesavealpha($image, bool $enable): void
{
error_clear_last();
- $result = \imagesavealpha($image, $saveflag);
+ $result = \imagesavealpha($image, $enable);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1948,10 +2209,10 @@ function imagesavealpha($image, bool $saveflag): void
* imagescale scales an image using the given
* interpolation algorithm.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param int $new_width The width to scale the image to.
- * @param int $new_height The height to scale the image to. If omitted or negative, the aspect
+ * @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,
@@ -1963,14 +2224,14 @@ function imagesavealpha($image, bool $saveflag): void
* IMG_WEIGHTED4 is not yet supported.
*
*
- * @return resource Return the scaled image resource on success.
+ * @return resource Return the scaled image object on success.
* @throws ImageException
*
*/
-function imagescale($image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED)
+function imagescale($image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED)
{
error_clear_last();
- $result = \imagescale($image, $new_width, $new_height, $mode);
+ $result = \imagescale($image, $width, $height, $mode);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1985,9 +2246,9 @@ function imagescale($image, int $new_width, int $new_height = -1, int $mode = IM
* colors IMG_COLOR_BRUSHED or
* IMG_COLOR_STYLEDBRUSHED.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param resource $brush An image resource.
+ * @param resource $brush An image object.
* @throws ImageException
*
*/
@@ -2005,7 +2266,7 @@ function imagesetbrush($image, $brush): void
* imagesetclip sets the current clipping rectangle, i.e.
* the area beyond which no pixels will be drawn.
*
- * @param resource $im An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -2014,10 +2275,10 @@ function imagesetbrush($image, $brush): void
* @throws ImageException
*
*/
-function imagesetclip($im, int $x1, int $y1, int $x2, int $y2): void
+function imagesetclip($image, int $x1, int $y1, int $x2, int $y2): void
{
error_clear_last();
- $result = \imagesetclip($im, $x1, $y1, $x2, $y2);
+ $result = \imagesetclip($image, $x1, $y1, $x2, $y2);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2028,7 +2289,7 @@ function imagesetclip($im, 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 resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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:
*
@@ -2155,7 +2416,7 @@ function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void
* imagesetpixel draws a pixel at the specified
* coordinate.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -2180,7 +2441,7 @@ function imagesetpixel($image, int $x, int $y, int $color): void
* color IMG_COLOR_STYLED or lines of images with color
* IMG_COLOR_STYLEDBRUSHED.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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
@@ -2204,7 +2465,7 @@ function imagesetstyle($image, array $style): void
* drawn when drawing rectangles, polygons, arcs etc. to
* thickness pixels.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @param int $thickness Thickness, in pixels.
* @throws ImageException
@@ -2231,9 +2492,9 @@ function imagesetthickness($image, int $thickness): void
* image with imagecolortransparent, a tile allows certain parts
* of the underlying area to shine through can be created.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param resource $tile The image resource to be used as a tile.
+ * @param resource $tile The image object to be used as a tile.
* @throws ImageException
*
*/
@@ -2250,11 +2511,11 @@ function imagesettile($image, $tile): void
/**
* Draws a string at the given coordinates.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 any of your
- * own font identifiers registered with imageloadfont.
+ * 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.
@@ -2276,11 +2537,11 @@ function imagestring($image, int $font, int $x, int $y, string $string, int $col
* Draws a string vertically at the given
* coordinates.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 any of your
- * own font identifiers registered with imageloadfont.
+ * 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.
@@ -2299,9 +2560,9 @@ function imagestringup($image, int $font, int $x, int $y, string $string, int $c
/**
- * Returns the width of the given image resource.
+ * Returns the width of the given image object.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @return int Return the width of the images.
* @throws ImageException
@@ -2319,9 +2580,9 @@ function imagesx($image): int
/**
- * Returns the height of the given image resource.
+ * Returns the height of the given image object.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
* @return int Return the height of the images.
* @throws ImageException
@@ -2348,19 +2609,19 @@ function imagesy($image): int
* usually best to simply produce a truecolor output image instead, which
* guarantees the highest output quality.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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 $ncolors Sets the maximum number of colors that should be retained in the palette.
+ * @param int $num_colors Sets the maximum number of colors that should be retained in the palette.
* @throws ImageException
*
*/
-function imagetruecolortopalette($image, bool $dither, int $ncolors): void
+function imagetruecolortopalette($image, bool $dither, int $num_colors): void
{
error_clear_last();
- $result = \imagetruecolortopalette($image, $dither, $ncolors);
+ $result = \imagetruecolortopalette($image, $dither, $num_colors);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2372,8 +2633,8 @@ function imagetruecolortopalette($image, bool $dither, int $ncolors): void
* for a TrueType text.
*
* @param float $size The font size in points.
- * @param float $angle Angle in degrees in which text will be measured.
- * @param string $fontfile The path to the TrueType font you wish to use.
+ * @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
@@ -2396,7 +2657,8 @@ function imagetruecolortopalette($image, bool $dither, int $ncolors): void
*
* Note that open_basedir does
* not apply to fontfile.
- * @param string $text The string to be measured.
+ * @param string $string The string to be measured.
+ * @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.
@@ -2451,10 +2713,10 @@ function imagetruecolortopalette($image, bool $dither, int $ncolors): void
* @throws ImageException
*
*/
-function imagettfbbox(float $size, float $angle, string $fontfile, string $text): array
+function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array
{
error_clear_last();
- $result = \imagettfbbox($size, $angle, $fontfile, $text);
+ $result = \imagettfbbox($size, $angle, $font_filename, $string, $options);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2466,7 +2728,7 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text)
* Writes the given text into the image using TrueType
* fonts.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $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.
@@ -2483,7 +2745,7 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text)
* 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 $fontfile The path to the TrueType font you wish to use.
+ * @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
@@ -2519,6 +2781,7 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text)
*
* 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
* @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
@@ -2527,10 +2790,10 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text)
* @throws ImageException
*
*/
-function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text): array
+function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array
{
error_clear_last();
- $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text);
+ $result = \imagettftext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2542,22 +2805,24 @@ function imagettftext($image, float $size, float $angle, int $x, int $y, int $co
* imagewbmp outputs or save a WBMP
* version of the given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
- * @param int $foreground You can set the foreground color with this parameter by setting an
+ * @param string|resource|null $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 $foreground_color You can set the foreground color with this parameter by setting an
* identifier obtained from imagecolorallocate.
* The default foreground color is black.
* @throws ImageException
*
*/
-function imagewbmp($image, $to = null, int $foreground = null): void
+function imagewbmp($image, $file = null, int $foreground_color = null): void
{
error_clear_last();
- if ($foreground !== null) {
- $result = \imagewbmp($image, $to, $foreground);
+ if ($foreground_color !== null) {
+ $result = \imagewbmp($image, $file, $foreground_color);
+ } elseif ($file !== null) {
+ $result = \imagewbmp($image, $file);
} else {
- $result = \imagewbmp($image, $to);
+ $result = \imagewbmp($image);
}
if ($result === false) {
throw ImageException::createFromPhpError();
@@ -2568,18 +2833,24 @@ function imagewbmp($image, $to = null, int $foreground = null): void
/**
* Outputs or saves a WebP version of the given image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly.
+ * @param string|resource|null $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).
* @throws ImageException
*
*/
-function imagewebp($image, $to = null, int $quality = 80): void
+function imagewebp($image, $file = null, int $quality = -1): void
{
error_clear_last();
- $result = \imagewebp($image, $to, $quality);
+ if ($quality !== -1) {
+ $result = \imagewebp($image, $file, $quality);
+ } elseif ($file !== null) {
+ $result = \imagewebp($image, $file);
+ } else {
+ $result = \imagewebp($image);
+ }
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2590,27 +2861,27 @@ function imagewebp($image, $to = null, int $quality = 80): void
* Outputs or save an XBM version of the given
* image.
*
- * @param resource $image An image resource, returned by one of the image creation functions,
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
* such as imagecreatetruecolor.
- * @param string|null $filename The path to save the file to, given as string. If NULL, the raw image stream will be output directly.
+ * @param string|resource|null $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 $foreground You can set the foreground color with this parameter by setting an
+ * @param int $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.
* @throws ImageException
*
*/
-function imagexbm($image, ?string $filename, int $foreground = null): void
+function imagexbm($image, $filename, int $foreground_color = null): void
{
error_clear_last();
- if ($foreground !== null) {
- $result = \imagexbm($image, $filename, $foreground);
+ if ($foreground_color !== null) {
+ $result = \imagexbm($image, $filename, $foreground_color);
} else {
$result = \imagexbm($image, $filename);
}
@@ -2623,18 +2894,18 @@ function imagexbm($image, ?string $filename, int $foreground = null): void
/**
* Embeds binary IPTC data into a JPEG image.
*
- * @param string $iptcdata The data to be written.
- * @param string $jpeg_file_name Path to the 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 string|bool If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success.
* @throws ImageException
*
*/
-function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0)
+function iptcembed(string $iptc_data, string $filename, int $spool = 0)
{
error_clear_last();
- $result = \iptcembed($iptcdata, $jpeg_file_name, $spool);
+ $result = \iptcembed($iptc_data, $filename, $spool);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -2645,16 +2916,16 @@ function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0)
/**
* Parses an IPTC block into its single tags.
*
- * @param string $iptcblock A binary IPTC block.
+ * @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.
* @throws ImageException
*
*/
-function iptcparse(string $iptcblock): array
+function iptcparse(string $iptc_block): array
{
error_clear_last();
- $result = \iptcparse($iptcblock);
+ $result = \iptcparse($iptc_block);
if ($result === false) {
throw ImageException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/imap.php b/vendor/thecodingmachine/safe/generated/imap.php
index acd8672c6..917a8e201 100644
--- a/vendor/thecodingmachine/safe/generated/imap.php
+++ b/vendor/thecodingmachine/safe/generated/imap.php
@@ -5,11 +5,30 @@ namespace Safe;
use Safe\Exceptions\ImapException;
/**
- * Appends a string message to the specified mailbox.
+ * Convert an 8bit string to a quoted-printable string (according to
+ * RFC2045, section 6.7).
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param string $mailbox The mailbox name, see imap_open for more
+ * @param string $string The 8bit string to convert
+ * @return string Returns a quoted-printable string.
+ * @throws ImapException
+ *
+ */
+function imap_8bit(string $string): string
+{
+ error_clear_last();
+ $result = \imap_8bit($string);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Appends a string message to the specified folder.
+ *
+ * @param resource $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
*
@@ -17,26 +36,141 @@ use Safe\Exceptions\ImapException;
* your end-of-line terminator instead of "\n" or the operation will
* fail
* @param string $options If provided, the options will also be written
- * to the mailbox
+ * to the folder
* @param 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.
* @throws ImapException
*
*/
-function imap_append($imap_stream, string $mailbox, string $message, string $options = null, string $internal_date = null): void
+function imap_append($imap, string $folder, string $message, string $options = null, string $internal_date = null): void
+{
+ error_clear_last();
+ if ($internal_date !== null) {
+ $result = \imap_append($imap, $folder, $message, $options, $internal_date);
+ } elseif ($options !== null) {
+ $result = \imap_append($imap, $folder, $message, $options);
+ } else {
+ $result = \imap_append($imap, $folder, $message);
+ }
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Decodes the given BASE-64 encoded string.
+ *
+ * @param string $string The encoded text
+ * @return string Returns the decoded message as a string.
+ * @throws ImapException
+ *
+ */
+function imap_base64(string $string): string
+{
+ error_clear_last();
+ $result = \imap_base64($string);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ImapException
+ *
+ */
+function imap_binary(string $string): string
{
error_clear_last();
- $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date);
+ $result = \imap_binary($string);
if ($result === false) {
throw ImapException::createFromPhpError();
}
+ return $result;
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_body($imap, int $message_num, int $flags = 0): string
+{
+ error_clear_last();
+ $result = \imap_body($imap, $message_num, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Read the structure of a specified body section of a specific message.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_bodystruct($imap, int $message_num, string $section): \stdClass
+{
+ error_clear_last();
+ $result = \imap_bodystruct($imap, $message_num, $section);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
}
/**
* Checks information about the current mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @return \stdClass Returns the information in an object with following properties:
*
*
@@ -71,10 +205,10 @@ function imap_append($imap_stream, string $mailbox, string $message, string $opt
* @throws ImapException
*
*/
-function imap_check($imap_stream): \stdClass
+function imap_check($imap): \stdClass
{
error_clear_last();
- $result = \imap_check($imap_stream);
+ $result = \imap_check($imap);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -87,8 +221,7 @@ function imap_check($imap_stream): \stdClass
* flag to the flags set for the
* messages in the specified sequence.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $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
@@ -107,10 +240,10 @@ function imap_check($imap_stream): \stdClass
* @throws ImapException
*
*/
-function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $options = 0): void
+function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): void
{
error_clear_last();
- $result = \imap_clearflag_full($imap_stream, $sequence, $flag, $options);
+ $result = \imap_clearflag_full($imap, $sequence, $flag, $options);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -120,19 +253,18 @@ function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $
/**
* Closes the imap stream.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $flag If set to CL_EXPUNGE, the function will silently
+ * @param resource $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
* @throws ImapException
*
*/
-function imap_close($imap_stream, int $flag = 0): void
+function imap_close($imap, int $flags = 0): void
{
error_clear_last();
- $result = \imap_close($imap_stream, $flag);
+ $result = \imap_close($imap, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -142,18 +274,17 @@ function imap_close($imap_stream, int $flag = 0): void
/**
* Creates a new mailbox specified by mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $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
* @throws ImapException
*
*/
-function imap_createmailbox($imap_stream, string $mailbox): void
+function imap_createmailbox($imap, string $mailbox): void
{
error_clear_last();
- $result = \imap_createmailbox($imap_stream, $mailbox);
+ $result = \imap_createmailbox($imap, $mailbox);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -163,17 +294,16 @@ function imap_createmailbox($imap_stream, string $mailbox): void
/**
* Deletes the specified mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param string $mailbox The mailbox name, see imap_open for more
* information
* @throws ImapException
*
*/
-function imap_deletemailbox($imap_stream, string $mailbox): void
+function imap_deletemailbox($imap, string $mailbox): void
{
error_clear_last();
- $result = \imap_deletemailbox($imap_stream, $mailbox);
+ $result = \imap_deletemailbox($imap, $mailbox);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -181,14 +311,262 @@ function imap_deletemailbox($imap_stream, string $mailbox): void
/**
+ * This function fetches mail headers for the given
+ * sequence and returns an overview of their
+ * contents.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_fetch_overview($imap, string $sequence, int $flags = 0): array
+{
+ error_clear_last();
+ $result = \imap_fetch_overview($imap, $sequence, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Fetch of a particular section of the body of the specified messages.
+ * Body parts are not decoded by this function.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string
+{
+ error_clear_last();
+ $result = \imap_fetchbody($imap, $message_num, $section, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified
+ * message.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_fetchheader($imap, int $message_num, int $flags = 0): string
+{
+ error_clear_last();
+ $result = \imap_fetchheader($imap, $message_num, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Fetch the MIME headers of a particular section of the body of the specified messages.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string
+{
+ error_clear_last();
+ $result = \imap_fetchmime($imap, $message_num, $section, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Fetches all the structured information for a given message.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $msg_number The message number
- * @param int $options This optional parameter only has a single option,
+ * @param resource $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
- * msg_number argument as a
+ * message_num argument as a
* UID.
* @return \stdClass Returns an object with properties listed in the table below.
*
@@ -317,10 +695,10 @@ function imap_deletemailbox($imap_stream, string $mailbox): void
* @throws ImapException
*
*/
-function imap_fetchstructure($imap_stream, int $msg_number, int $options = 0): \stdClass
+function imap_fetchstructure($imap, int $message_num, int $flags = 0): \stdClass
{
error_clear_last();
- $result = \imap_fetchstructure($imap_stream, $msg_number, $options);
+ $result = \imap_fetchstructure($imap, $message_num, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -331,9 +709,8 @@ function imap_fetchstructure($imap_stream, int $msg_number, int $options = 0): \
/**
* Purges the cache of entries of a specific type.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $caches Specifies the cache to purge. It may one or a combination
+ * @param resource $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),
@@ -341,27 +718,218 @@ function imap_fetchstructure($imap_stream, int $msg_number, int $options = 0): \
* @throws ImapException
*
*/
-function imap_gc($imap_stream, int $caches): void
+function imap_gc($imap, int $flags): void
+{
+ error_clear_last();
+ $result = \imap_gc($imap, $flags);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Gets the ACL for a given mailbox.
+ *
+ * @param resource $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" =&gt; "acl" pairs.
+ * @throws ImapException
+ *
+ */
+function imap_getacl($imap, string $mailbox): array
+{
+ error_clear_last();
+ $result = \imap_getacl($imap, $mailbox);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Gets information on the mailboxes.
+ *
+ * @param resource $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
+ *
+ */
+function imap_getmailboxes($imap, string $reference, string $pattern): array
{
error_clear_last();
- $result = \imap_gc($imap_stream, $caches);
+ $result = \imap_getmailboxes($imap, $reference, $pattern);
if ($result === false) {
throw ImapException::createFromPhpError();
}
+ return $result;
+}
+
+
+/**
+ * Gets information about the subscribed mailboxes.
+ *
+ * Identical to imap_getmailboxes, except that it only
+ * returns mailboxes that the user is subscribed to.
+ *
+ * @param resource $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.
+ * @throws ImapException
+ *
+ */
+function imap_getsubscribed($imap, string $reference, string $pattern): array
+{
+ error_clear_last();
+ $result = \imap_getsubscribed($imap, $reference, $pattern);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
}
/**
* Gets information about the given message number by reading its headers.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $msg_number The message number
- * @param int $fromlength Number of characters for the fetchfrom property.
+ * @param resource $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 $subjectlength Number of characters for the fetchsubject property
+ * @param int $subject_length Number of characters for the fetchsubject property
* Must be greater than or equal to zero.
- * @param string $defaulthost
* @return \stdClass Returns FALSE on error or, if successful, the information in an object with following properties:
*
*
@@ -553,24 +1121,122 @@ function imap_gc($imap_stream, int $caches): void
*
*
*
- * fetchfrom - from line formatted to fit fromlength
+ * fetchfrom - from line formatted to fit from_length
* characters
*
*
*
*
* fetchsubject - subject line formatted to fit
- * subjectlength characters
+ * subject_length characters
+ *
+ *
+ *
+ * @throws ImapException
+ *
+ */
+function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass
+{
+ error_clear_last();
+ $result = \imap_headerinfo($imap, $message_num, $from_length, $subject_length);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Returns headers for all messages in a mailbox.
*
+ * @param resource $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.
+ * @throws ImapException
*
+ */
+function imap_headers($imap): array
+{
+ error_clear_last();
+ $result = \imap_headers($imap);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws ImapException
*
+ */
+function imap_listscan($imap, string $reference, string $pattern, string $content): array
+{
+ error_clear_last();
+ $result = \imap_listscan($imap, $reference, $pattern, $content);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Gets an array of all the mailboxes that you have subscribed.
+ *
+ * @param resource $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.
* @throws ImapException
*
*/
-function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int $subjectlength = 0, string $defaulthost = null): \stdClass
+function imap_lsub($imap, string $reference, string $pattern): array
{
error_clear_last();
- $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost);
+ $result = \imap_lsub($imap, $reference, $pattern);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -580,14 +1246,14 @@ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int
/**
* Create a MIME message based on the given envelope
- * and body sections.
+ * 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 $body An indexed array of bodies. The first body is the main body of the message;
+ * @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.
*
@@ -685,10 +1351,10 @@ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int
* @throws ImapException
*
*/
-function imap_mail_compose(array $envelope, array $body): string
+function imap_mail_compose(array $envelope, array $bodies): string
{
error_clear_last();
- $result = \imap_mail_compose($envelope, $body);
+ $result = \imap_mail_compose($envelope, $bodies);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -697,16 +1363,15 @@ function imap_mail_compose(array $envelope, array $body): string
/**
- * Copies mail messages specified by msglist
+ * Copies mail messages specified by message_nums
* to specified mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param string $msglist msglist is a range not just message
+ * @param resource $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 $options options is a bitmask of one or more of
+ * @param int $flags flags is a bitmask of one or more of
*
*
*
@@ -716,17 +1381,18 @@ function imap_mail_compose(array $envelope, array $body): string
*
*
* CP_MOVE - Delete the messages from
- * the current mailbox after copying
+ * the current mailbox after copying. If this flag is set, the function
+ * behaves identically to imap_mail_move.
*
*
*
* @throws ImapException
*
*/
-function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $options = 0): void
+function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): void
{
error_clear_last();
- $result = \imap_mail_copy($imap_stream, $msglist, $mailbox, $options);
+ $result = \imap_mail_copy($imap, $message_nums, $mailbox, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -734,16 +1400,18 @@ function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $opt
/**
- * Moves mail messages specified by msglist to the
+ * 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 resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param string $msglist msglist is a range not just message numbers
+ * @param resource $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 $options options is a bitmask and may contain the single option:
+ * @param int $flags flags is a bitmask and may contain the single option:
*
*
*
@@ -754,10 +1422,10 @@ function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $opt
* @throws ImapException
*
*/
-function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $options = 0): void
+function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): void
{
error_clear_last();
- $result = \imap_mail_move($imap_stream, $msglist, $mailbox, $options);
+ $result = \imap_mail_move($imap, $message_nums, $mailbox, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -779,15 +1447,25 @@ function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $opt
* @param string $cc
* @param string $bcc The receivers specified in bcc will get the
* mail, but are excluded from the headers.
- * @param string $rpath Use this parameter to specify return path upon mail delivery failure.
+ * @param 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.
* @throws ImapException
*
*/
-function imap_mail(string $to, string $subject, string $message, string $additional_headers = null, string $cc = null, string $bcc = null, string $rpath = null): void
+function imap_mail(string $to, string $subject, string $message, string $additional_headers = null, string $cc = null, string $bcc = null, string $return_path = null): void
{
error_clear_last();
- $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $rpath);
+ if ($return_path !== null) {
+ $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $return_path);
+ } elseif ($bcc !== null) {
+ $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc);
+ } elseif ($cc !== null) {
+ $result = \imap_mail($to, $subject, $message, $additional_headers, $cc);
+ } elseif ($additional_headers !== null) {
+ $result = \imap_mail($to, $subject, $message, $additional_headers);
+ } else {
+ $result = \imap_mail($to, $subject, $message);
+ }
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -800,8 +1478,7 @@ function imap_mail(string $to, string $subject, string $message, string $additio
* all messages in the mailbox, which will take some additional time to
* execute.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @return \stdClass Returns the information in an object with following properties:
*
* Mailbox properties
@@ -847,10 +1524,37 @@ function imap_mail(string $to, string $subject, string $message, string $additio
* @throws ImapException
*
*/
-function imap_mailboxmsginfo($imap_stream): \stdClass
+function imap_mailboxmsginfo($imap): \stdClass
{
error_clear_last();
- $result = \imap_mailboxmsginfo($imap_stream);
+ $result = \imap_mailboxmsginfo($imap);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ImapException
+ *
+ */
+function imap_mime_header_decode(string $string): array
+{
+ error_clear_last();
+ $result = \imap_mime_header_decode($string);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -861,15 +1565,15 @@ function imap_mailboxmsginfo($imap_stream): \stdClass
/**
* Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8.
*
- * @param string $in A string encoded in modified UTF-7.
- * @return string Returns in converted to UTF-8.
+ * @param string $string A string encoded in modified UTF-7.
+ * @return string Returns string converted to UTF-8.
* @throws ImapException
*
*/
-function imap_mutf7_to_utf8(string $in): string
+function imap_mutf7_to_utf8(string $string): string
{
error_clear_last();
- $result = \imap_mutf7_to_utf8($in);
+ $result = \imap_mutf7_to_utf8($string);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -880,16 +1584,15 @@ function imap_mutf7_to_utf8(string $in): string
/**
* Gets the number of messages in the current mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @return int Return the number of messages in the current mailbox, as an integer.
* @throws ImapException
*
*/
-function imap_num_msg($imap_stream): int
+function imap_num_msg($imap): int
{
error_clear_last();
- $result = \imap_num_msg($imap_stream);
+ $result = \imap_num_msg($imap);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1031,9 +1734,9 @@ function imap_num_msg($imap_stream): int
*
*
*
- * @param string $username The user name
- * @param string $password The password associated with the username
- * @param int $options The options are a bit mask with one or more of
+ * @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:
*
*
@@ -1087,8 +1790,8 @@ function imap_num_msg($imap_stream): int
*
*
*
- * @param int $n_retries Number of maximum connect attempts
- * @param array|null $params Connection parameters, the following (string) keys maybe used
+ * @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:
*
*
@@ -1097,14 +1800,33 @@ function imap_num_msg($imap_stream): int
*
*
*
- * @return resource Returns an IMAP stream on success.
+ * @return resource Returns an IMAP\Connection instance on success.
+ * @throws ImapException
+ *
+ */
+function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = [])
+{
+ error_clear_last();
+ $result = \imap_open($mailbox, $user, $password, $flags, $retries, $options);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
* @throws ImapException
*
*/
-function imap_open(string $mailbox, string $username, string $password, int $options = 0, int $n_retries = 0, ?array $params = null)
+function imap_qprint(string $string): string
{
error_clear_last();
- $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params);
+ $result = \imap_qprint($string);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1117,40 +1839,60 @@ function imap_open(string $mailbox, string $username, string $password, int $opt
* imap_open for the format of
* mbox names).
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param string $old_mbox The old mailbox name, see imap_open for more
+ * @param resource $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 string $new_mbox The new mailbox name, see imap_open for more
+ * @throws ImapException
+ *
+ */
+function imap_renamemailbox($imap, string $from, string $to): void
+{
+ error_clear_last();
+ $result = \imap_renamemailbox($imap, $from, $to);
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Returns a properly formatted email address as defined in RFC2822 given the needed information.
+ *
+ * @param string|null $mailbox The mailbox name, see imap_open for more
* information
+ * @param string|null $hostname The email host part
+ * @param string|null $personal The name of the account owner
+ * @return string Returns a string properly formatted email address as defined in RFC2822.
* @throws ImapException
*
*/
-function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): void
+function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string $personal): string
{
error_clear_last();
- $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox);
+ $result = \imap_rfc822_write_address($mailbox, $hostname, $personal);
if ($result === false) {
throw ImapException::createFromPhpError();
}
+ return $result;
}
/**
* Saves a part or the whole body of the specified message.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param string|resource $file The path to the saved file as a string, or a valid file descriptor
* returned by fopen.
- * @param int $msg_number The message number
- * @param string $part_number The part number. It is a string of integers delimited by period which
+ * @param int $message_num The message number
+ * @param string $section The part number. It is a string of integers delimited by period which
* index into a body part list as per the IMAP4 specification
- * @param int $options A bitmask with one or more of the following:
+ * @param int $flags A bitmask with one or more of the following:
*
*
*
- * FT_UID - The msg_number is a UID
+ * FT_UID - The message_num is a UID
*
*
*
@@ -1169,10 +1911,10 @@ function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): v
* @throws ImapException
*
*/
-function imap_savebody($imap_stream, $file, int $msg_number, string $part_number = "", int $options = 0): void
+function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0): void
{
error_clear_last();
- $result = \imap_savebody($imap_stream, $file, $msg_number, $part_number, $options);
+ $result = \imap_savebody($imap, $file, $message_num, $section, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1182,18 +1924,17 @@ function imap_savebody($imap_stream, $file, int $msg_number, string $part_number
/**
* Sets an upper limit quota on a per mailbox basis.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $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 $quota_limit The maximum size (in KB) for the quota_root
+ * @param int $mailbox_size The maximum size (in KB) for the quota_root
* @throws ImapException
*
*/
-function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): void
+function imap_set_quota($imap, string $quota_root, int $mailbox_size): void
{
error_clear_last();
- $result = \imap_set_quota($imap_stream, $quota_root, $quota_limit);
+ $result = \imap_set_quota($imap, $quota_root, $mailbox_size);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1203,20 +1944,19 @@ function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): voi
/**
* Sets the ACL for a giving mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param string $mailbox The mailbox name, see imap_open for more
* information
- * @param string $id The user to give the rights to.
+ * @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.
* @throws ImapException
*
*/
-function imap_setacl($imap_stream, string $mailbox, string $id, string $rights): void
+function imap_setacl($imap, string $mailbox, string $user_id, string $rights): void
{
error_clear_last();
- $result = \imap_setacl($imap_stream, $mailbox, $id, $rights);
+ $result = \imap_setacl($imap, $mailbox, $user_id, $rights);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1228,8 +1968,7 @@ function imap_setacl($imap_stream, string $mailbox, string $id, string $rights):
* flags set for the messages in the specified
* sequence.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $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
@@ -1249,10 +1988,10 @@ function imap_setacl($imap_stream, string $mailbox, string $id, string $rights):
* @throws ImapException
*
*/
-function imap_setflag_full($imap_stream, string $sequence, string $flag, int $options = NIL): void
+function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0): void
{
error_clear_last();
- $result = \imap_setflag_full($imap_stream, $sequence, $flag, $options);
+ $result = \imap_setflag_full($imap, $sequence, $flag, $options);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1262,8 +2001,7 @@ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $op
/**
* Gets and sorts message numbers by the given parameters.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param int $criteria Criteria can be one (and only one) of the following:
*
*
@@ -1302,8 +2040,8 @@ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $op
*
*
*
- * @param int $reverse Set this to 1 for reverse sorting
- * @param int $options The options are a bitmask of one or more of the
+ * @param int $reverse Whether to sort in reverse order.
+ * @param int $flags The flags are a bitmask of one or more of the
* following:
*
*
@@ -1325,10 +2063,82 @@ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $op
* @throws ImapException
*
*/
-function imap_sort($imap_stream, int $criteria, int $reverse, int $options = 0, string $search_criteria = null, string $charset = null): array
+function imap_sort($imap, int $criteria, int $reverse, int $flags = 0, string $search_criteria = null, string $charset = null): array
{
error_clear_last();
- $result = \imap_sort($imap_stream, $criteria, $reverse, $options, $search_criteria, $charset);
+ if ($charset !== null) {
+ $result = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria, $charset);
+ } elseif ($search_criteria !== null) {
+ $result = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria);
+ } else {
+ $result = \imap_sort($imap, $criteria, $reverse, $flags);
+ }
+ if ($result === false) {
+ throw ImapException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Gets status information about the given mailbox.
+ *
+ * @param resource $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-&gt;messages to the
+ * number of messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_RECENT - set $status-&gt;recent to the number
+ * of recent messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UNSEEN - set $status-&gt;unseen to the number
+ * of unseen (new) messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UIDNEXT - set $status-&gt;uidnext to the next
+ * uid to be used in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UIDVALIDITY - set $status-&gt;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.
+ * @throws ImapException
+ *
+ */
+function imap_status($imap, string $mailbox, int $flags): \stdClass
+{
+ error_clear_last();
+ $result = \imap_status($imap, $mailbox, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1339,17 +2149,16 @@ function imap_sort($imap_stream, int $criteria, int $reverse, int $options = 0,
/**
* Subscribe to a new mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param string $mailbox The mailbox name, see imap_open for more
* information
* @throws ImapException
*
*/
-function imap_subscribe($imap_stream, string $mailbox): void
+function imap_subscribe($imap, string $mailbox): void
{
error_clear_last();
- $result = \imap_subscribe($imap_stream, $mailbox);
+ $result = \imap_subscribe($imap, $mailbox);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1359,9 +2168,8 @@ function imap_subscribe($imap_stream, string $mailbox): void
/**
* Gets a tree of a threaded message.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $options
+ * @param resource $imap An IMAP\Connection instance.
+ * @param int $flags
* @return array imap_thread returns an associative array containing
* a tree of messages threaded by REFERENCES.
*
@@ -1381,10 +2189,10 @@ function imap_subscribe($imap_stream, string $mailbox): void
* @throws ImapException
*
*/
-function imap_thread($imap_stream, int $options = SE_FREE): array
+function imap_thread($imap, int $flags = SE_FREE): array
{
error_clear_last();
- $result = \imap_thread($imap_stream, $options);
+ $result = \imap_thread($imap, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1425,17 +2233,18 @@ 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 resource $imap_stream An IMAP stream returned by
- * imap_open.
- * @param int $msg_number The message number
+ * @param resource $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 int $flags
* @throws ImapException
*
*/
-function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void
+function imap_undelete($imap, string $message_nums, int $flags = 0): void
{
error_clear_last();
- $result = \imap_undelete($imap_stream, $msg_number, $flags);
+ $result = \imap_undelete($imap, $message_nums, $flags);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1445,17 +2254,16 @@ function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void
/**
* Unsubscribe from the specified mailbox.
*
- * @param resource $imap_stream An IMAP stream returned by
- * imap_open.
+ * @param resource $imap An IMAP\Connection instance.
* @param string $mailbox The mailbox name, see imap_open for more
* information
* @throws ImapException
*
*/
-function imap_unsubscribe($imap_stream, string $mailbox): void
+function imap_unsubscribe($imap, string $mailbox): void
{
error_clear_last();
- $result = \imap_unsubscribe($imap_stream, $mailbox);
+ $result = \imap_unsubscribe($imap, $mailbox);
if ($result === false) {
throw ImapException::createFromPhpError();
}
@@ -1465,15 +2273,15 @@ function imap_unsubscribe($imap_stream, string $mailbox): void
/**
* Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3).
*
- * @param string $in A UTF-8 encoded string.
- * @return string Returns in converted to modified UTF-7.
+ * @param string $string A UTF-8 encoded string.
+ * @return string Returns string converted to modified UTF-7.
* @throws ImapException
*
*/
-function imap_utf8_to_mutf7(string $in): string
+function imap_utf8_to_mutf7(string $string): string
{
error_clear_last();
- $result = \imap_utf8_to_mutf7($in);
+ $result = \imap_utf8_to_mutf7($string);
if ($result === false) {
throw ImapException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/info.php b/vendor/thecodingmachine/safe/generated/info.php
index 1a76b406e..aefa0819d 100644
--- a/vendor/thecodingmachine/safe/generated/info.php
+++ b/vendor/thecodingmachine/safe/generated/info.php
@@ -5,6 +5,123 @@ namespace Safe;
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.
+ * @throws InfoException
+ *
+ */
+function assert_options(int $what, $value = null)
+{
+ error_clear_last();
+ if ($value !== null) {
+ $result = \assert_options($what, $value);
+ } else {
+ $result = \assert_options($what);
+ }
+ if ($result === false) {
+ throw InfoException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Sets the process title visible in tools such as top and
* ps. This function is available only in
* CLI mode.
@@ -25,14 +142,14 @@ function cli_set_process_title(string $title): void
/**
* Loads the PHP extension given by the parameter
- * library.
+ * 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 $library This parameter is only the filename of the
+ * @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
@@ -77,10 +194,10 @@ function cli_set_process_title(string $title): void
* @throws InfoException
*
*/
-function dl(string $library): void
+function dl(string $extension_filename): void
{
error_clear_last();
- $result = \dl($library);
+ $result = \dl($extension_filename);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -88,6 +205,24 @@ function dl(string $library): void
/**
+ *
+ *
+ * @return string Returns the path, as a string.
+ * @throws InfoException
+ *
+ */
+function get_include_path(): string
+{
+ error_clear_last();
+ $result = \get_include_path();
+ if ($result === false) {
+ throw InfoException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Gets the time of the last modification of the main script of execution.
*
* If you're interested in getting the last modification time
@@ -185,23 +320,40 @@ function getmyuid(): int
/**
* Parses options passed to the script.
*
- * @param string $options
- * @param array $longopts
- * @param int|null $optind
- * @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 \__benevolent This function will return an array of option / argument pairs.
* @throws InfoException
*
*/
-function getopt(string $options, array $longopts = null, ?int &$optind = null): array
+function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array
{
error_clear_last();
- if ($optind !== null) {
- $result = \getopt($options, $longopts, $optind);
- } elseif ($longopts !== null) {
- $result = \getopt($options, $longopts);
- } else {
- $result = \getopt($options);
+ $result = \getopt($short_options, $long_options, $rest_index);
+ if ($result === false) {
+ throw InfoException::createFromPhpError();
}
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws InfoException
+ *
+ */
+function getrusage(int $mode = 0): array
+{
+ error_clear_last();
+ $result = \getrusage($mode);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -212,17 +364,17 @@ function getopt(string $options, array $longopts = null, ?int &$optind = null):
/**
* Returns the value of the configuration option on success.
*
- * @param string $varname The configuration option name.
+ * @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.
* @throws InfoException
*
*/
-function ini_get(string $varname): string
+function ini_get(string $option): string
{
error_clear_last();
- $result = \ini_get($varname);
+ $result = \ini_get($option);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -235,18 +387,45 @@ function ini_get(string $varname): string
* will keep this new value during the script's execution, and will be restored
* at the script's ending.
*
- * @param string $varname Not all the available options can be changed using
+ * @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 string|int|float|bool $newvalue The new value for the option.
+ * @param string $value The new value for the option.
* @return string Returns the old value on success, FALSE on failure.
* @throws InfoException
*
*/
-function ini_set(string $varname, $newvalue): string
+function ini_set(string $option, string $value): string
+{
+ error_clear_last();
+ $result = \ini_set($option, $value);
+ if ($result === false) {
+ throw InfoException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ *
+ *
+ * @return 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.
+ * @throws InfoException
+ *
+ */
+function php_sapi_name(): string
{
error_clear_last();
- $result = \ini_set($varname, $newvalue);
+ $result = \php_sapi_name();
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -259,8 +438,8 @@ function ini_set(string $varname, $newvalue): string
* modules, etc. It generates the appropriate HTML codes to insert
* the information in a page.
*
- * @param int $flag To generate a custom credits page, you may want to use the
- * flag parameter.
+ * @param int $flags To generate a custom credits page, you may want to use the
+ * flags parameter.
*
*
* Pre-defined phpcredits flags
@@ -323,10 +502,10 @@ function ini_set(string $varname, $newvalue): string
* @throws InfoException
*
*/
-function phpcredits(int $flag = CREDITS_ALL): void
+function phpcredits(int $flags = CREDITS_ALL): void
{
error_clear_last();
- $result = \phpcredits($flag);
+ $result = \phpcredits($flags);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -348,9 +527,9 @@ function phpcredits(int $flag = CREDITS_ALL): void
* phpinfo is also a valuable debugging tool as it
* contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
*
- * @param int $what The output may be customized by passing one or more of the
+ * @param int $flags The output may be customized by passing one or more of the
* following constants bitwise values summed
- * together in the optional what parameter.
+ * together in the optional flags parameter.
* One can also combine the respective constants or bitwise values
* together with the bitwise or operator.
*
@@ -433,10 +612,10 @@ function phpcredits(int $flag = CREDITS_ALL): void
* @throws InfoException
*
*/
-function phpinfo(int $what = INFO_ALL): void
+function phpinfo(int $flags = INFO_ALL): void
{
error_clear_last();
- $result = \phpinfo($what);
+ $result = \phpinfo($flags);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -444,19 +623,19 @@ function phpinfo(int $what = INFO_ALL): void
/**
- * Adds setting to the server environment. The
+ * 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 $setting The setting, like "FOO=BAR"
+ * @param string $assignment The setting, like "FOO=BAR"
* @throws InfoException
*
*/
-function putenv(string $setting): void
+function putenv(string $assignment): void
{
error_clear_last();
- $result = \putenv($setting);
+ $result = \putenv($assignment);
if ($result === false) {
throw InfoException::createFromPhpError();
}
@@ -467,16 +646,16 @@ function putenv(string $setting): void
* Sets the include_path
* configuration option for the duration of the script.
*
- * @param string $new_include_path The new value for the include_path
+ * @param string $include_path The new value for the include_path
* @return string Returns the old include_path on
* success.
* @throws InfoException
*
*/
-function set_include_path(string $new_include_path): string
+function set_include_path(string $include_path): string
{
error_clear_last();
- $result = \set_include_path($new_include_path);
+ $result = \set_include_path($include_path);
if ($result === false) {
throw InfoException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/ingres-ii.php b/vendor/thecodingmachine/safe/generated/ingres-ii.php
deleted file mode 100644
index 9ea8b5f35..000000000
--- a/vendor/thecodingmachine/safe/generated/ingres-ii.php
+++ /dev/null
@@ -1,720 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\IngresiiException;
-
-/**
- * ingres_autocommit is called before opening a
- * transaction (before the first call to
- * ingres_query or just after a call to
- * ingres_rollback or
- * ingres_commit) to switch the
- * autocommit mode of the server on or off (when the script begins
- * the autocommit mode is off).
- *
- * When autocommit mode is on, every query is automatically
- * committed by the server, as if ingres_commit
- * was called after every call to ingres_query.
- * To see if autocommit is enabled use,
- * ingres_autocommit_state.
- *
- * By default Ingres will rollback any uncommitted transactions at the end of
- * a request. Use this function or ingres_commit to
- * ensure your data is committed to the database.
- *
- * @param resource $link The connection link identifier
- * @throws IngresiiException
- *
- */
-function ingres_autocommit($link): void
-{
- error_clear_last();
- $result = \ingres_autocommit($link);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_close closes the connection to
- * the Ingres server that is associated with the specified link.
- *
- * ingres_close is usually unnecessary, as it
- * will not close persistent connections and all non-persistent connections
- * are automatically closed at the end of the script.
- *
- * @param resource $link The connection link identifier
- * @throws IngresiiException
- *
- */
-function ingres_close($link): void
-{
- error_clear_last();
- $result = \ingres_close($link);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_commit commits the currently open
- * transaction, making all changes made to the database permanent.
- *
- * This closes the transaction. A new transaction can be opened by sending a
- * query with ingres_query.
- *
- * You can also have the server commit automatically after every
- * query by calling ingres_autocommit before
- * opening the transaction.
- *
- * By default Ingres will roll back any uncommitted transactions at the end of
- * a request. Use this function or ingres_autocommit to
- * ensure your that data is committed to the database.
- *
- * @param resource $link The connection link identifier
- * @throws IngresiiException
- *
- */
-function ingres_commit($link): void
-{
- error_clear_last();
- $result = \ingres_commit($link);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_connect opens a connection with the
- * given Ingres database.
- *
- * The connection is closed when the script ends or when
- * ingres_close is called on this link.
- *
- * @param string $database The database name. Must follow the syntax:
- *
- * [vnode::]dbname[/svr_class]
- * @param string $username The Ingres user name
- * @param string $password The password associated with username
- * @param array $options ingres_connect options
- *
- *
- *
- *
- * Option name
- * Option type
- * Description
- * Example
- *
- *
- *
- *
- * date_century_boundary
- * integer
- * The threshold by which a 2-digit year is determined to be in
- * the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY.
- * 50
- *
- *
- * group
- * string
- * Specifies the group ID of the user, equivalent to the "-G"
- * flag
- * payroll
- *
- *
- * role
- * string
- * The role ID of the application. If a role password is
- * required, the parameter value should be specified as "role/password"
- *
- *
- * effective_user
- * string
- * The ingres user account being impersonated, equivalent to the "-u" flag
- * another_user
- *
- *
- * dbms_password
- * string
- * The internal database password for the user connecting to Ingres
- * s3cr3t
- *
- *
- * table_structure
- * string
- *
- * The default structure for new tables.
- * Valid values for table_structure are:
- *
- * INGRES_STRUCTURE_BTREE
- * INGRES_STRUCTURE_HASH
- * INGRES_STRUCTURE_HEAP
- * INGRES_STRUCTURE_ISAM
- * INGRES_STRUCTURE_CBTREE
- * INGRES_STRUCTURE_CISAM
- * INGRES_STRUCTURE_CHASH
- * INGRES_STRUCTURE_CHEAP
- *
- *
- *
- * INGRES_STRUCTURE_BTREE
- *
- *
- * index_structure
- * string
- *
- * The default structure for new secondary indexes. Valid values
- * for index_structure are:
- *
- * INGRES_STRUCTURE_CBTREE
- * INGRES_STRUCTURE_CISAM
- * INGRES_STRUCTURE_CHASH
- * INGRES_STRUCTURE_BTREE
- * INGRES_STRUCTURE_HASH
- * INGRES_STRUCTURE_ISAM
- *
- *
- *
- * INGRES_STRUCTURE_HASH
- *
- *
- * login_local
- * boolean
- * Determines how the connection user ID and password are
- * used when a VNODE is included in the target database string.
- * If set to TRUE, the user ID and password are used to locally access
- * the VNODE, and the VNODE login information is used to establish the DBMS
- * connection. If set to FALSE, the process user ID is used to access
- * the VNODE, and the connection user ID and password are used in place
- * of the VNODE login information to establish the DBMS connection.
- * This parameter is ignored if no VNODE is included in the target
- * database string. The default is FALSE.
- * TRUE
- *
- *
- * timezone
- * string
- * Controls the timezone of the session. If not set it will
- * default to the value defined by II_TIMEZONE_NAME. If
- * II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight
- * Savings) is used.
- *
- *
- * date_format
- * integer
- * Sets the allowable input and output format for Ingres dates.
- * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is
- * not set the default date format is US, e.g. mm/dd/yy. Valid values
- * for date_format are:
- *
- * INGRES_DATE_DMY
- * INGRES_DATE_FINISH
- * INGRES_DATE_GERMAN
- * INGRES_DATE_ISO
- * INGRES_DATE_ISO4
- * INGRES_DATE_MDY
- * INGRES_DATE_MULTINATIONAL
- * INGRES_DATE_MULTINATIONAL4
- * INGRES_DATE_YMD
- * INGRES_DATE_US
- *
- *
- *
- * INGRES_DATE_MULTINATIONAL4
- *
- *
- * decimal_separator
- * string
- * The character identifier for decimal data
- * ","
- *
- *
- * money_lort
- * integer
- * Leading or trailing currency sign. Valid values for money_lort
- * are:
- *
- * INGRES_MONEY_LEADING
- * INGRES_MONEY_TRAILING
- *
- *
- *
- * INGRES_MONEY_TRAILING
- *
- *
- * money_sign
- * string
- * The currency symbol to be used with the MONEY datatype
- * €
- *
- *
- * money_precision
- * integer
- * The precision of the MONEY datatype
- * 3
- *
- *
- * float4_precision
- * integer
- * Precision of the FLOAT4 datatype
- * 10
- *
- *
- * float8_precision
- * integer
- * Precision of the FLOAT8 data
- * 10
- *
- *
- * blob_segment_length
- * integer
- * The amount of data in bytes to fetch at a time when retrieving
- * BLOB or CLOB data, defaults to 4096 bytes when not explicitly set
- * 8192
- *
- *
- *
- *
- *
- * The default structure for new tables.
- * Valid values for table_structure are:
- *
- * INGRES_STRUCTURE_BTREE
- * INGRES_STRUCTURE_HASH
- * INGRES_STRUCTURE_HEAP
- * INGRES_STRUCTURE_ISAM
- * INGRES_STRUCTURE_CBTREE
- * INGRES_STRUCTURE_CISAM
- * INGRES_STRUCTURE_CHASH
- * INGRES_STRUCTURE_CHEAP
- *
- *
- * The default structure for new secondary indexes. Valid values
- * for index_structure are:
- *
- * INGRES_STRUCTURE_CBTREE
- * INGRES_STRUCTURE_CISAM
- * INGRES_STRUCTURE_CHASH
- * INGRES_STRUCTURE_BTREE
- * INGRES_STRUCTURE_HASH
- * INGRES_STRUCTURE_ISAM
- *
- *
- * Sets the allowable input and output format for Ingres dates.
- * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is
- * not set the default date format is US, e.g. mm/dd/yy. Valid values
- * for date_format are:
- *
- * INGRES_DATE_DMY
- * INGRES_DATE_FINISH
- * INGRES_DATE_GERMAN
- * INGRES_DATE_ISO
- * INGRES_DATE_ISO4
- * INGRES_DATE_MDY
- * INGRES_DATE_MULTINATIONAL
- * INGRES_DATE_MULTINATIONAL4
- * INGRES_DATE_YMD
- * INGRES_DATE_US
- *
- *
- * Leading or trailing currency sign. Valid values for money_lort
- * are:
- *
- * INGRES_MONEY_LEADING
- * INGRES_MONEY_TRAILING
- *
- * @return resource Returns a Ingres link resource on success
- * @throws IngresiiException
- *
- */
-function ingres_connect(string $database = null, string $username = null, string $password = null, array $options = null)
-{
- error_clear_last();
- if ($options !== null) {
- $result = \ingres_connect($database, $username, $password, $options);
- } elseif ($password !== null) {
- $result = \ingres_connect($database, $username, $password);
- } elseif ($username !== null) {
- $result = \ingres_connect($database, $username);
- } elseif ($database !== null) {
- $result = \ingres_connect($database);
- } else {
- $result = \ingres_connect();
- }
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Execute a query prepared using ingres_prepare.
- *
- * @param resource $result The result query identifier
- * @param array $params An array of parameter values to be used with the query
- * @param string $types A string containing a sequence of types for the parameter values
- * passed. See the types parameter in
- * ingres_query for the list of type codes.
- * @throws IngresiiException
- *
- */
-function ingres_execute($result, array $params = null, string $types = null): void
-{
- error_clear_last();
- if ($types !== null) {
- $result = \ingres_execute($result, $params, $types);
- } elseif ($params !== null) {
- $result = \ingres_execute($result, $params);
- } else {
- $result = \ingres_execute($result);
- }
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_field_name returns the name of a field
- * in a query result.
- *
- * @param resource $result The query result identifier
- * @param int $index index is the field whose name will be
- * retrieved.
- *
- * The possible values of index depend upon
- * the value
- * of ingres.array_index_start.
- * If ingres.array_index_start
- * is 1 (the default)
- * then index must be
- * between 1 and the value returned
- * by ingres_num_fields. If ingres.array_index_start
- * is 0 then index must
- * be between 0
- * and ingres_num_fields -
- * 1.
- * @return string Returns the name of a field
- * in a query result
- * @throws IngresiiException
- *
- */
-function ingres_field_name($result, int $index): string
-{
- error_clear_last();
- $result = \ingres_field_name($result, $index);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Get the type of a field in a query result.
- *
- * @param resource $result The query result identifier
- * @param int $index index is the field whose type will be
- * retrieved.
- *
- * The possible values of index depend upon
- * the value
- * of ingres.array_index_start.
- * If ingres.array_index_start
- * is 1 (the default)
- * then index must be
- * between 1 and the value returned
- * by ingres_num_fields. If ingres.array_index_start
- * is 0 then index must
- * be between 0
- * and ingres_num_fields -
- * 1.
- * @return string ingres_field_type returns the type of a
- * field in a query result. Examples of
- * types returned are IIAPI_BYTE_TYPE,
- * IIAPI_CHA_TYPE, IIAPI_DTE_TYPE,
- * IIAPI_FLT_TYPE, IIAPI_INT_TYPE,
- * IIAPI_VCH_TYPE. Some of these types can map to more
- * than one SQL type depending on the length of the field (see
- * ingres_field_length). For example
- * IIAPI_FLT_TYPE can be a float4 or a float8. For detailed
- * information, see the Ingres OpenAPI User Guide, Appendix
- * "Data Types" in the Ingres documentation.
- * @throws IngresiiException
- *
- */
-function ingres_field_type($result, int $index): string
-{
- error_clear_last();
- $result = \ingres_field_type($result, $index);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- *
- *
- * @param resource $result The query result identifier
- * @throws IngresiiException
- *
- */
-function ingres_free_result($result): void
-{
- error_clear_last();
- $result = \ingres_free_result($result);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * Open a persistent connection to an Ingres database.
- *
- * There are only two differences between this function and
- * ingres_connect: First, when connecting, the
- * function will initially try to find a (persistent) link that is
- * 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 Ingres server will not
- * be closed when the execution of the script ends. Instead, the
- * link will remain open for future use
- * (ingres_close will not close links
- * established by ingres_pconnect). This type
- * of link is therefore called "persistent".
- *
- * @param string $database The database name. Must follow the syntax:
- *
- * [vnode::]dbname[/svr_class]
- * @param string $username The Ingres user name
- * @param string $password The password associated with username
- * @param array $options See ingres_connect for the list of options that
- * can be passed
- * @return resource Returns an Ingres link resource on success
- * @throws IngresiiException
- *
- */
-function ingres_pconnect(string $database = null, string $username = null, string $password = null, array $options = null)
-{
- error_clear_last();
- if ($options !== null) {
- $result = \ingres_pconnect($database, $username, $password, $options);
- } elseif ($password !== null) {
- $result = \ingres_pconnect($database, $username, $password);
- } elseif ($username !== null) {
- $result = \ingres_pconnect($database, $username);
- } elseif ($database !== null) {
- $result = \ingres_pconnect($database);
- } else {
- $result = \ingres_pconnect();
- }
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * This function is used to position the cursor associated with the result
- * resource before issuing a fetch. If ingres.array_index_start
- * is set to 0 then the first row is 0 else it is 1.
- * ingres_result_seek can be used only with queries that
- * make use of scrollable
- * cursors. It cannot be used with
- * ingres_unbuffered_query.
- *
- * @param resource $result The result identifier for a query
- * @param int $position The row to position the cursor on. If ingres.array_index_start
- * is set to 0, then the first row is 0, else it is 1
- * @throws IngresiiException
- *
- */
-function ingres_result_seek($result, int $position): void
-{
- error_clear_last();
- $result = \ingres_result_seek($result, $position);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_rollback rolls back the currently
- * open transaction, actually cancelling all changes made to the
- * database during the transaction.
- *
- * This closes the transaction. A new transaction can be opened by sending a
- * query with ingres_query.
- *
- * @param resource $link The connection link identifier
- * @throws IngresiiException
- *
- */
-function ingres_rollback($link): void
-{
- error_clear_last();
- $result = \ingres_rollback($link);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
-
-
-/**
- * ingres_set_environment is called to set environmental
- * options that affect the output of certain values from Ingres, such as the
- * timezone, date format, decimal character separator, and float precision.
- *
- * @param resource $link The connection link identifier
- * @param array $options An enumerated array of option name/value pairs. The following table
- * lists the option name and the expected type
- *
- *
- *
- *
- *
- * Option name
- * Option type
- * Description
- * Example
- *
- *
- *
- *
- * date_century_boundary
- * integer
- * The threshold by which a 2-digit year is determined to be in
- * the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY
- * 50
- *
- *
- * timezone
- * string
- * Controls the timezone of the session. If not set, it will
- * default the value defined by II_TIMEZONE_NAME. If
- * II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight
- * Savings) is used.
- * UNITED-KINGDOM
- *
- *
- * date_format
- * integer
- * Sets the allowable input and output format for Ingres dates.
- * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is
- * not set, the default date format is US, for example mm/dd/yy. Valid values
- * for date_format are:
- *
- * INGRES_DATE_DMY
- * INGRES_DATE_FINISH
- * INGRES_DATE_GERMAN
- * INGRES_DATE_ISO
- * INGRES_DATE_ISO4
- * INGRES_DATE_MDY
- * INGRES_DATE_MULTINATIONAL
- * INGRES_DATE_MULTINATIONAL4
- * INGRES_DATE_YMD
- * INGRES_DATE_US
- *
- *
- *
- * INGRES_DATE_ISO4
- *
- *
- * decimal_separator
- * string
- * The character identifier for decimal data
- * ","
- *
- *
- * money_lort
- * integer
- * Leading or trailing currency sign. Valid values for money_lort
- * are:
- *
- * INGRES_MONEY_LEADING
- * INGRES_MONEY_TRAILING
- *
- *
- *
- * INGRES_MONEY_LEADING
- *
- *
- * money_sign
- * string
- * The currency symbol to be used with the MONEY datatype
- * €
- *
- *
- * money_precision
- * integer
- * The precision of the MONEY datatype
- * 2
- *
- *
- * float4_precision
- * integer
- * Precision of the FLOAT4 datatype
- * 10
- *
- *
- * float8_precision
- * integer
- * Precision of the FLOAT8 data
- * 10
- *
- *
- * blob_segment_length
- * integer
- * The amount of data in bytes to fetch at a time when retrieving
- * BLOB or CLOB data. Defaults to 4096 bytes when not set explicitly
- * 8192
- *
- *
- *
- *
- *
- * Sets the allowable input and output format for Ingres dates.
- * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is
- * not set, the default date format is US, for example mm/dd/yy. Valid values
- * for date_format are:
- *
- * INGRES_DATE_DMY
- * INGRES_DATE_FINISH
- * INGRES_DATE_GERMAN
- * INGRES_DATE_ISO
- * INGRES_DATE_ISO4
- * INGRES_DATE_MDY
- * INGRES_DATE_MULTINATIONAL
- * INGRES_DATE_MULTINATIONAL4
- * INGRES_DATE_YMD
- * INGRES_DATE_US
- *
- *
- * Leading or trailing currency sign. Valid values for money_lort
- * are:
- *
- * INGRES_MONEY_LEADING
- * INGRES_MONEY_TRAILING
- *
- * @throws IngresiiException
- *
- */
-function ingres_set_environment($link, array $options): void
-{
- error_clear_last();
- $result = \ingres_set_environment($link, $options);
- if ($result === false) {
- throw IngresiiException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/json.php b/vendor/thecodingmachine/safe/generated/json.php
index dad455ccd..76fc6c17e 100644
--- a/vendor/thecodingmachine/safe/generated/json.php
+++ b/vendor/thecodingmachine/safe/generated/json.php
@@ -8,7 +8,7 @@ use Safe\Exceptions\JsonException;
* Returns a string containing the JSON representation of the supplied
* value.
*
- * The encoding is affected by the supplied options
+ * The encoding is affected by the supplied flags
* and additionally the encoding of float values depends on the value of
* serialize_precision.
*
@@ -19,7 +19,7 @@ use Safe\Exceptions\JsonException;
*
* PHP implements a superset of JSON as specified in the original
* RFC 7159.
- * @param int $options Bitmask consisting of
+ * @param int $flags Bitmask consisting of
* JSON_FORCE_OBJECT,
* JSON_HEX_QUOT,
* JSON_HEX_TAG,
@@ -42,30 +42,10 @@ use Safe\Exceptions\JsonException;
* @throws JsonException
*
*/
-function json_encode($value, int $options = 0, int $depth = 512): string
+function json_encode($value, int $flags = 0, int $depth = 512): string
{
error_clear_last();
- $result = \json_encode($value, $options, $depth);
- if ($result === false) {
- throw JsonException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the error string of the last json_encode or json_decode
- * call, which did not specify JSON_THROW_ON_ERROR.
- *
- * @return string Returns the error message on success, "No error" if no
- * error has occurred.
- * @throws JsonException
- *
- */
-function json_last_error_msg(): string
-{
- error_clear_last();
- $result = \json_last_error_msg();
+ $result = \json_encode($value, $flags, $depth);
if ($result === false) {
throw JsonException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/ldap.php b/vendor/thecodingmachine/safe/generated/ldap.php
index 871f29580..97b42e5a5 100644
--- a/vendor/thecodingmachine/safe/generated/ldap.php
+++ b/vendor/thecodingmachine/safe/generated/ldap.php
@@ -5,20 +5,22 @@ namespace Safe;
use Safe\Exceptions\LdapException;
/**
- * Does the same thing as ldap_add but returns the LDAP result resource to be parsed with ldap_parse_result.
+ * Translate ISO-8859 characters to t61
+ * characters.
*
- * @param resource $link_identifier
- * @param string $dn
- * @param array $entry
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
+ * 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.
* @throws LdapException
*
*/
-function ldap_add_ext($link_identifier, string $dn, array $entry, array $serverctrls = null)
+function ldap_8859_to_t61(string $value): string
{
error_clear_last();
- $result = \ldap_add_ext($link_identifier, $dn, $entry, $serverctrls);
+ $result = \ldap_8859_to_t61($value);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -29,7 +31,7 @@ function ldap_add_ext($link_identifier, string $dn, array $entry, array $serverc
/**
* Add entries in the LDAP directory.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $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.
@@ -41,55 +43,43 @@ function ldap_add_ext($link_identifier, string $dn, array $entry, array $serverc
* ]]>
*
*
- * @param array $serverctrls Array of LDAP Controls to send with the request.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void
+function ldap_add($ldap, string $dn, array $entry, array $controls = null): void
{
error_clear_last();
- $result = \ldap_add($link_identifier, $dn, $entry, $serverctrls);
- if ($result === false) {
- throw LdapException::createFromPhpError();
+ if ($controls !== null) {
+ $result = \ldap_add($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_add($ldap, $dn, $entry);
}
-}
-
-
-/**
- * Does the same thing as ldap_bind but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string|null $bind_rdn
- * @param string|null $bind_password
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
- * @throws LdapException
- *
- */
-function ldap_bind_ext($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_bind_ext($link_identifier, $bind_rdn, $bind_password, $serverctrls);
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
/**
* Binds to the LDAP directory with specified RDN and password.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param string|null $bind_rdn
- * @param string|null $bind_password
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param string|null $dn
+ * @param string|null $password
* @throws LdapException
*
*/
-function ldap_bind($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null): void
+function ldap_bind($ldap, ?string $dn = null, ?string $password = null): void
{
error_clear_last();
- $result = \ldap_bind($link_identifier, $bind_rdn, $bind_password);
+ if ($password !== null) {
+ $result = \ldap_bind($ldap, $dn, $password);
+ } elseif ($dn !== null) {
+ $result = \ldap_bind($ldap, $dn);
+ } else {
+ $result = \ldap_bind($ldap);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -99,7 +89,7 @@ function ldap_bind($link_identifier, ?string $bind_rdn = null, ?string $bind_pas
/**
* Retrieve the pagination information send by the server.
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
+ * @param resource $link An LDAP resource, returned by ldap_connect.
* @param resource $result
* @param string|null $cookie An opaque structure sent by the server.
* @param int|null $estimated The estimated number of entries to retrieve.
@@ -119,7 +109,7 @@ 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 link identifier, returned by ldap_connect.
+ * @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
@@ -143,16 +133,16 @@ 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 resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_identifier The internal LDAP result.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $result An LDAP\Result instance, returned by ldap_list or ldap_search.
* @return int Returns number of entries in the result.
* @throws LdapException
*
*/
-function ldap_count_entries($link_identifier, $result_identifier): int
+function ldap_count_entries($ldap, $result): int
{
error_clear_last();
- $result = \ldap_count_entries($link_identifier, $result_identifier);
+ $result = \ldap_count_entries($ldap, $result);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -161,64 +151,67 @@ function ldap_count_entries($link_identifier, $result_identifier): int
/**
- * Does the same thing as ldap_delete but returns the LDAP result resource to be parsed with ldap_parse_result.
+ * Deletes a particular entry in LDAP directory.
*
- * @param resource $link_identifier
- * @param string $dn
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param string $dn The distinguished name of an LDAP entity.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_delete_ext($link_identifier, string $dn, array $serverctrls = null)
+function ldap_delete($ldap, string $dn, array $controls = null): void
{
error_clear_last();
- $result = \ldap_delete_ext($link_identifier, $dn, $serverctrls);
+ if ($controls !== null) {
+ $result = \ldap_delete($ldap, $dn, $controls);
+ } else {
+ $result = \ldap_delete($ldap, $dn);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
/**
- * Deletes a particular entry in LDAP directory.
+ * Turns the specified dn, into a more user-friendly
+ * form, stripping off type names.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
* @param string $dn The distinguished name of an LDAP entity.
- * @param array $serverctrls Array of LDAP Controls to send with the request.
+ * @return string Returns the user friendly name.
* @throws LdapException
*
*/
-function ldap_delete($link_identifier, string $dn, array $serverctrls = null): void
+function ldap_dn2ufn(string $dn): string
{
error_clear_last();
- $result = \ldap_delete($link_identifier, $dn, $serverctrls);
+ $result = \ldap_dn2ufn($dn);
if ($result === false) {
throw LdapException::createFromPhpError();
}
+ return $result;
}
/**
* Performs a PASSWD extended operation.
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
* @param string $user dn of the user to change the password of.
- * @param string $oldpw The old password of this user. May be ommited depending of server configuration.
- * @param string $newpw The new password for this user. May be omitted or empty to have a generated password.
- * @param array $serverctrls If provided, a password policy request control is send with the request and this is
+ * @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 $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 mixed Returns the generated password if newpw is empty or omitted.
+ * @return string|bool Returns the generated password if new_password is empty or omitted.
* Otherwise returns TRUE on success.
* @throws LdapException
*
*/
-function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", array &$serverctrls = null)
+function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", array &$controls = null)
{
error_clear_last();
- $result = \ldap_exop_passwd($link, $user, $oldpw, $newpw, $serverctrls);
+ $result = \ldap_exop_passwd($ldap, $user, $old_password, $new_password, $controls);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -229,15 +222,15 @@ function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $
/**
* Performs a WHOAMI extended operation and returns the data.
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
- * @return string The data returned by the server.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @return string|bool The data returned by the server.
* @throws LdapException
*
*/
-function ldap_exop_whoami($link): string
+function ldap_exop_whoami($ldap)
{
error_clear_last();
- $result = \ldap_exop_whoami($link);
+ $result = \ldap_exop_whoami($ldap);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -250,7 +243,7 @@ function ldap_exop_whoami($link): string
* reqoid the OID of the operation and
* reqdata the data.
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
+ * @param resource $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 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.
@@ -258,15 +251,25 @@ function ldap_exop_whoami($link): string
* If not provided you may use ldap_parse_exop on the result object
* later to get this data.
* @param string|null $retoid Will be filled with the response OID if provided, usually equal to the request OID.
- * @return mixed When used with retdata, returns TRUE on success.
+ * @return resource|bool When used with retdata, returns TRUE on success.
* When used without retdata, returns a result identifier.
* @throws LdapException
*
*/
-function ldap_exop($link, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null)
+function ldap_exop($ldap, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null)
{
error_clear_last();
- $result = \ldap_exop($link, $reqoid, $reqdata, $serverctrls, $retdata, $retoid);
+ if ($retoid !== null) {
+ $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata, $retoid);
+ } elseif ($retdata !== null) {
+ $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata);
+ } elseif ($serverctrls !== null) {
+ $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls);
+ } elseif ($reqdata !== null) {
+ $result = \ldap_exop($ldap, $reqoid, $reqdata);
+ } else {
+ $result = \ldap_exop($ldap, $reqoid);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -309,17 +312,17 @@ function ldap_explode_dn(string $dn, int $with_attrib): array
* Similar to reading entries, attributes are also read one by one from a
* particular entry.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @return string Returns the first attribute in the entry on success and FALSE on
* error.
* @throws LdapException
*
*/
-function ldap_first_attribute($link_identifier, $result_entry_identifier): string
+function ldap_first_attribute($ldap, $entry): string
{
error_clear_last();
- $result = \ldap_first_attribute($link_identifier, $result_entry_identifier);
+ $result = \ldap_first_attribute($ldap, $entry);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -336,17 +339,16 @@ function ldap_first_attribute($link_identifier, $result_entry_identifier): strin
* ldap_first_entry and
* ldap_next_entry functions.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_identifier
- * @return resource Returns the result entry identifier for the first entry on success and
- * FALSE on error.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $result An LDAP\Result instance, returned by ldap_list or ldap_search.
+ * @return resource Returns an LDAP\ResultEntry instance.
* @throws LdapException
*
*/
-function ldap_first_entry($link_identifier, $result_identifier)
+function ldap_first_entry($ldap, $result)
{
error_clear_last();
- $result = \ldap_first_entry($link_identifier, $result_identifier);
+ $result = \ldap_first_entry($ldap, $result);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -363,14 +365,14 @@ function ldap_first_entry($link_identifier, $result_identifier)
* return large result sets, ldap_free_result could be
* called to keep the runtime memory usage by the script low.
*
- * @param resource $result_identifier
+ * @param resource $result An LDAP\Result instance, returned by ldap_list or ldap_search.
* @throws LdapException
*
*/
-function ldap_free_result($result_identifier): void
+function ldap_free_result($result): void
{
error_clear_last();
- $result = \ldap_free_result($result_identifier);
+ $result = \ldap_free_result($result);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -392,17 +394,17 @@ function ldap_free_result($result_identifier): void
*
*
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @return array Returns a complete entry information in a multi-dimensional array
* on success and FALSE on error.
* @throws LdapException
*
*/
-function ldap_get_attributes($link_identifier, $result_entry_identifier): array
+function ldap_get_attributes($ldap, $entry): array
{
error_clear_last();
- $result = \ldap_get_attributes($link_identifier, $result_entry_identifier);
+ $result = \ldap_get_attributes($ldap, $entry);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -413,16 +415,16 @@ function ldap_get_attributes($link_identifier, $result_entry_identifier): array
/**
* Finds out the DN of an entry in the result.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @return string Returns the DN of the result entry and FALSE on error.
* @throws LdapException
*
*/
-function ldap_get_dn($link_identifier, $result_entry_identifier): string
+function ldap_get_dn($ldap, $entry): string
{
error_clear_last();
- $result = \ldap_get_dn($link_identifier, $result_entry_identifier);
+ $result = \ldap_get_dn($ldap, $entry);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -434,10 +436,10 @@ function ldap_get_dn($link_identifier, $result_entry_identifier): string
* Reads multiple entries from the given result, and then reading the
* attributes and multiple values.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $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 and FALSE on error.
+ * success.
*
* The structure of the array is as follows.
* The attribute index is converted to lowercase. (Attributes are
@@ -451,10 +453,10 @@ function ldap_get_dn($link_identifier, $result_entry_identifier): string
* @throws LdapException
*
*/
-function ldap_get_entries($link_identifier, $result_identifier): array
+function ldap_get_entries($ldap, $result): array
{
error_clear_last();
- $result = \ldap_get_entries($link_identifier, $result_identifier);
+ $result = \ldap_get_entries($ldap, $result);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -463,9 +465,9 @@ function ldap_get_entries($link_identifier, $result_identifier): array
/**
- * Sets retval to the value of the specified option.
+ * Sets value to the value of the specified option.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
* @param int $option The parameter option can be one of:
*
*
@@ -479,47 +481,47 @@ function ldap_get_entries($link_identifier, $result_identifier): array
*
*
* LDAP_OPT_DEREF
- * integer
+ * int
*
*
*
* LDAP_OPT_SIZELIMIT
- * integer
+ * int
*
*
*
* LDAP_OPT_TIMELIMIT
- * integer
+ * int
*
*
*
* LDAP_OPT_NETWORK_TIMEOUT
- * integer
+ * int
*
*
*
* LDAP_OPT_PROTOCOL_VERSION
- * integer
+ * int
*
*
*
* LDAP_OPT_ERROR_NUMBER
- * integer
+ * int
*
*
*
* LDAP_OPT_DIAGNOSTIC_MESSAGE
- * integer
+ * int
*
*
*
* LDAP_OPT_REFERRALS
- * bool
+ * int
*
*
*
* LDAP_OPT_RESTART
- * bool
+ * int
*
*
*
@@ -584,22 +586,22 @@ function ldap_get_entries($link_identifier, $result_identifier): array
*
*
* LDAP_OPT_X_TLS_CRLCHECK
- * integer
+ * int
* 7.1
*
*
* LDAP_OPT_X_TLS_CRL_NONE
- * integer
+ * int
* 7.1
*
*
* LDAP_OPT_X_TLS_CRL_PEER
- * integer
+ * int
* 7.1
*
*
* LDAP_OPT_X_TLS_CRL_ALL
- * integer
+ * int
* 7.1
*
*
@@ -613,7 +615,7 @@ function ldap_get_entries($link_identifier, $result_identifier): array
* 7.1
*
*
- * LDAP_OPT_X_TLS_KEYILE
+ * LDAP_OPT_X_TLS_KEYFILE
* string
* 7.1
*
@@ -624,7 +626,7 @@ function ldap_get_entries($link_identifier, $result_identifier): array
*
*
* LDAP_OPT_X_TLS_PROTOCOL_MIN
- * integer
+ * int
* 7.1
*
*
@@ -634,20 +636,20 @@ function ldap_get_entries($link_identifier, $result_identifier): array
*
*
* LDAP_OPT_X_TLS_REQUIRE_CERT
- * integer
+ * int
*
*
*
*
*
- * @param mixed $retval This will be set to the option value.
+ * @param mixed $value This will be set to the option value.
* @throws LdapException
*
*/
-function ldap_get_option($link_identifier, int $option, &$retval): void
+function ldap_get_option($ldap, int $option, &$value = null): void
{
error_clear_last();
- $result = \ldap_get_option($link_identifier, $option, $retval);
+ $result = \ldap_get_option($ldap, $option, $value);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -660,8 +662,8 @@ function ldap_get_option($link_identifier, int $option, &$retval): void
* This function is used exactly like ldap_get_values
* except that it handles binary data and not string data.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @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
@@ -670,10 +672,10 @@ function ldap_get_option($link_identifier, int $option, &$retval): void
* @throws LdapException
*
*/
-function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array
+function ldap_get_values_len($ldap, $entry, string $attribute): array
{
error_clear_last();
- $result = \ldap_get_values_len($link_identifier, $result_entry_identifier, $attribute);
+ $result = \ldap_get_values_len($ldap, $entry, $attribute);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -684,7 +686,7 @@ function ldap_get_values_len($link_identifier, $result_entry_identifier, string
/**
* Reads all the values of the attribute in the entry in the result.
*
- * This call needs a result_entry_identifier,
+ * 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.
*
@@ -693,8 +695,8 @@ function ldap_get_values_len($link_identifier, $result_entry_identifier, string
* the ldap_get_attributes call to work out
* what attributes exist for a given entry.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @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
@@ -714,130 +716,10 @@ function ldap_get_values_len($link_identifier, $result_entry_identifier, string
* @throws LdapException
*
*/
-function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array
+function ldap_get_values($ldap, $entry, string $attribute): array
{
error_clear_last();
- $result = \ldap_get_values($link_identifier, $result_entry_identifier, $attribute);
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Performs the search for a specified filter on the
- * directory with the scope LDAP_SCOPE_ONELEVEL.
- *
- * LDAP_SCOPE_ONELEVEL means that the search should only
- * return information that is at the level immediately below the
- * base_dn given in the call.
- * (Equivalent to typing "ls" and getting a list of files and folders in the
- * current working directory.)
- *
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param string $base_dn The base DN for the directory.
- * @param string $filter
- * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn").
- * Note that the "dn" is always returned irrespective of which attributes
- * types are requested.
- *
- * Using this parameter is much more efficient than the default action
- * (which is to return all attributes and their associated values).
- * The use of this parameter should therefore be considered good
- * practice.
- * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0
- * both attributes types and attribute values are fetched which is the
- * default behaviour.
- * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0
- * means no limit.
- *
- * This parameter can NOT override server-side preset sizelimit. You can
- * set it lower though.
- *
- * Some directory server hosts will be configured to return no more than
- * a preset number of entries. If this occurs, the server will indicate
- * that it has only returned a partial results set. This also occurs if
- * you use this parameter to limit the count of fetched entries.
- * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting
- * this to 0 means no limit.
- *
- * This parameter can NOT override server-side preset timelimit. You can
- * set it lower though.
- * @param int $deref Specifies how aliases should be handled during the search. It can be
- * one of the following:
- *
- *
- *
- * LDAP_DEREF_NEVER - (default) aliases are never
- * dereferenced.
- *
- *
- *
- *
- * LDAP_DEREF_SEARCHING - aliases should be
- * dereferenced during the search but not when locating the base object
- * of the search.
- *
- *
- *
- *
- * LDAP_DEREF_FINDING - aliases should be
- * dereferenced when locating the base object but not during the search.
- *
- *
- *
- *
- * LDAP_DEREF_ALWAYS - aliases should be dereferenced
- * always.
- *
- *
- *
- * @param array $serverctrls Array of LDAP Controls to send with the request.
- * @return resource Returns a search result identifier.
- * @throws LdapException
- *
- */
-function ldap_list($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null)
-{
- error_clear_last();
- if ($serverctrls !== null) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls);
- } elseif ($deref !== LDAP_DEREF_NEVER) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
- } elseif ($timelimit !== -1) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit);
- } elseif ($sizelimit !== -1) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit);
- } elseif ($attrsonly !== 0) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly);
- } elseif ($attributes !== null) {
- $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes);
- } else {
- $result = \ldap_list($link_identifier, $base_dn, $filter);
- }
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Does the same thing as ldap_mod_add but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string $dn
- * @param array $entry
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
- * @throws LdapException
- *
- */
-function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_mod_add_ext($link_identifier, $dn, $entry, $serverctrls);
+ $result = \ldap_get_values($ldap, $entry, $attribute);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -849,42 +731,24 @@ function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $ser
* Adds one or more attribute values to the specified dn.
* To add a whole new object see ldap_add function.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $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 $serverctrls Array of LDAP Controls to send with the request.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void
+function ldap_mod_add($ldap, string $dn, array $entry, array $controls = null): void
{
error_clear_last();
- $result = \ldap_mod_add($link_identifier, $dn, $entry, $serverctrls);
- if ($result === false) {
- throw LdapException::createFromPhpError();
+ if ($controls !== null) {
+ $result = \ldap_mod_add($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_mod_add($ldap, $dn, $entry);
}
-}
-
-
-/**
- * Does the same thing as ldap_mod_del but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string $dn
- * @param array $entry
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
- * @throws LdapException
- *
- */
-function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_mod_del_ext($link_identifier, $dn, $entry, $serverctrls);
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
@@ -893,42 +757,24 @@ function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $ser
* Object deletions are done by the
* ldap_delete function.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
* @param string $dn The distinguished name of an LDAP entity.
* @param array $entry
- * @param array $serverctrls Array of LDAP Controls to send with the request.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverctrls = null): void
+function ldap_mod_del($ldap, string $dn, array $entry, array $controls = null): void
{
error_clear_last();
- $result = \ldap_mod_del($link_identifier, $dn, $entry, $serverctrls);
- if ($result === false) {
- throw LdapException::createFromPhpError();
+ if ($controls !== null) {
+ $result = \ldap_mod_del($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_mod_del($ldap, $dn, $entry);
}
-}
-
-
-/**
- * Does the same thing as ldap_mod_replace but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string $dn
- * @param array $entry
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
- * @throws LdapException
- *
- */
-function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_mod_replace_ext($link_identifier, $dn, $entry, $serverctrls);
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
@@ -936,17 +782,21 @@ function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array
* Replaces one or more attributes from the specified dn.
* It may also add or remove attributes.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $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 $serverctrls Array of LDAP Controls to send with the request.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_mod_replace($link_identifier, string $dn, array $entry, array $serverctrls = null): void
+function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = null): void
{
error_clear_last();
- $result = \ldap_mod_replace($link_identifier, $dn, $entry, $serverctrls);
+ if ($controls !== null) {
+ $result = \ldap_mod_replace($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_mod_replace($ldap, $dn, $entry);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -957,9 +807,9 @@ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $ser
* Modifies an existing entry in the LDAP directory. Allows detailed
* specification of the modifications to perform.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP resource, returned by ldap_connect.
* @param string $dn The distinguished name of an LDAP entity.
- * @param array $entry An array that specifies the modifications to make. Each entry in this
+ * @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,
@@ -1032,16 +882,20 @@ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $ser
* value for values must be an array of strings, and
* any value for modtype must be one of the
* LDAP_MODIFY_BATCH_* constants listed above.
- * @param array $serverctrls Each value specified through values is added (as
+ * @param array $controls Each value specified through values is added (as
* an additional value) to the attribute named by
* attrib.
* @throws LdapException
*
*/
-function ldap_modify_batch($link_identifier, string $dn, array $entry, array $serverctrls = null): void
+function ldap_modify_batch($ldap, string $dn, array $modifications_info, array $controls = null): void
{
error_clear_last();
- $result = \ldap_modify_batch($link_identifier, $dn, $entry, $serverctrls);
+ if ($controls !== null) {
+ $result = \ldap_modify_batch($ldap, $dn, $modifications_info, $controls);
+ } else {
+ $result = \ldap_modify_batch($ldap, $dn, $modifications_info);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -1051,20 +905,20 @@ function ldap_modify_batch($link_identifier, string $dn, array $entry, array $se
/**
* Retrieves the attributes in an entry. The first call to
* ldap_next_attribute is made with the
- * result_entry_identifier returned from
+ * entry returned from
* ldap_first_attribute.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param resource $result_entry_identifier
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $entry An LDAP\ResultEntry instance.
* @return string Returns the next attribute in an entry on success and FALSE on
* error.
* @throws LdapException
*
*/
-function ldap_next_attribute($link_identifier, $result_entry_identifier): string
+function ldap_next_attribute($ldap, $entry): string
{
error_clear_last();
- $result = \ldap_next_attribute($link_identifier, $result_entry_identifier);
+ $result = \ldap_next_attribute($ldap, $entry);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -1075,17 +929,17 @@ function ldap_next_attribute($link_identifier, $result_entry_identifier): string
/**
* Parse LDAP extended operation data from result object result
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
- * @param resource $result An LDAP result resource, returned by ldap_exop.
- * @param string|null $retdata Will be filled by the response data.
- * @param string|null $retoid Will be filled by the response OID.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $result An LDAP\Result instance, returned by ldap_list or ldap_search.
+ * @param string|null $response_data Will be filled by the response data.
+ * @param string|null $response_oid Will be filled by the response OID.
* @throws LdapException
*
*/
-function ldap_parse_exop($link, $result, ?string &$retdata = null, ?string &$retoid = null): void
+function ldap_parse_exop($ldap, $result, ?string &$response_data = null, ?string &$response_oid = null): void
{
error_clear_last();
- $result = \ldap_parse_exop($link, $result, $retdata, $retoid);
+ $result = \ldap_parse_exop($ldap, $result, $response_data, $response_oid);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -1095,170 +949,52 @@ function ldap_parse_exop($link, $result, ?string &$retdata = null, ?string &$ret
/**
* Parses an LDAP search result.
*
- * @param resource $link An LDAP link identifier, returned by ldap_connect.
- * @param resource $result An LDAP result resource, returned by ldap_list or
- * ldap_search.
- * @param int|null $errcode A reference to a variable that will be set to the LDAP error code in
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
+ * @param resource $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 string|null $matcheddn A reference to a variable that will be set to a matched DN if one was
+ * @param string|null $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 string|null $errmsg A reference to a variable that will be set to the LDAP error message in
+ * @param string|null $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 $serverctrls An array of LDAP Controls which have been sent with the response.
- * @throws LdapException
- *
- */
-function ldap_parse_result($link, $result, ?int &$errcode, ?string &$matcheddn = null, ?string &$errmsg = null, ?array &$referrals = null, ?array &$serverctrls = null): void
-{
- error_clear_last();
- $result = \ldap_parse_result($link, $result, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls);
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
-}
-
-
-/**
- * Performs the search for a specified filter on the
- * directory with the scope LDAP_SCOPE_BASE. So it is
- * equivalent to reading an entry from the directory.
- *
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param string $base_dn The base DN for the directory.
- * @param string $filter An empty filter is not allowed. If you want to retrieve absolutely all
- * information for this entry, use a filter of
- * objectClass=*. If you know which entry types are
- * used on the directory server, you might use an appropriate filter such
- * as objectClass=inetOrgPerson.
- * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn").
- * Note that the "dn" is always returned irrespective of which attributes
- * types are requested.
- *
- * Using this parameter is much more efficient than the default action
- * (which is to return all attributes and their associated values).
- * The use of this parameter should therefore be considered good
- * practice.
- * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0
- * both attributes types and attribute values are fetched which is the
- * default behaviour.
- * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0
- * means no limit.
- *
- * This parameter can NOT override server-side preset sizelimit. You can
- * set it lower though.
- *
- * Some directory server hosts will be configured to return no more than
- * a preset number of entries. If this occurs, the server will indicate
- * that it has only returned a partial results set. This also occurs if
- * you use this parameter to limit the count of fetched entries.
- * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting
- * this to 0 means no limit.
- *
- * This parameter can NOT override server-side preset timelimit. You can
- * set it lower though.
- * @param int $deref Specifies how aliases should be handled during the search. It can be
- * one of the following:
- *
- *
- *
- * LDAP_DEREF_NEVER - (default) aliases are never
- * dereferenced.
- *
- *
- *
- *
- * LDAP_DEREF_SEARCHING - aliases should be
- * dereferenced during the search but not when locating the base object
- * of the search.
- *
- *
- *
- *
- * LDAP_DEREF_FINDING - aliases should be
- * dereferenced when locating the base object but not during the search.
- *
- *
- *
- *
- * LDAP_DEREF_ALWAYS - aliases should be dereferenced
- * always.
- *
- *
- *
- * @param array $serverctrls Array of LDAP Controls to send with the request.
- * @return resource Returns a search result identifier.
- * @throws LdapException
- *
- */
-function ldap_read($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null)
-{
- error_clear_last();
- if ($serverctrls !== null) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls);
- } elseif ($deref !== LDAP_DEREF_NEVER) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
- } elseif ($timelimit !== -1) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit);
- } elseif ($sizelimit !== -1) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit);
- } elseif ($attrsonly !== 0) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly);
- } elseif ($attributes !== null) {
- $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes);
- } else {
- $result = \ldap_read($link_identifier, $base_dn, $filter);
- }
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Does the same thing as ldap_rename but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string $dn
- * @param string $newrdn
- * @param string $newparent
- * @param bool $deleteoldrdn
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
+ * @param array|null $controls An array of LDAP Controls which have been sent with the response.
* @throws LdapException
*
*/
-function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null)
+function ldap_parse_result($ldap, $result, ?int &$error_code, ?string &$matched_dn = null, ?string &$error_message = null, ?array &$referrals = null, ?array &$controls = null): void
{
error_clear_last();
- $result = \ldap_rename_ext($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls);
+ $result = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls);
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
/**
* The entry specified by dn is renamed/moved.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
* @param string $dn The distinguished name of an LDAP entity.
- * @param string $newrdn The new RDN.
- * @param string $newparent The new parent/superior entry.
- * @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s)
+ * @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 $serverctrls Array of LDAP Controls to send with the request.
+ * @param array $controls Array of LDAP Controls to send with the request.
* @throws LdapException
*
*/
-function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null): void
+function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = null): void
{
error_clear_last();
- $result = \ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls);
+ if ($controls !== null) {
+ $result = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn, $controls);
+ } else {
+ $result = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -1268,142 +1004,47 @@ function ldap_rename($link_identifier, string $dn, string $newrdn, string $newpa
/**
*
*
- * @param resource $link
- * @param string $binddn
+ * @param resource $ldap
+ * @param string $dn
* @param string $password
- * @param string $sasl_mech
- * @param string $sasl_realm
- * @param string $sasl_authc_id
- * @param string $sasl_authz_id
+ * @param string $mech
+ * @param string $realm
+ * @param string $authc_id
+ * @param string $authz_id
* @param string $props
* @throws LdapException
*
*/
-function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): void
-{
- error_clear_last();
- $result = \ldap_sasl_bind($link, $binddn, $password, $sasl_mech, $sasl_realm, $sasl_authc_id, $sasl_authz_id, $props);
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
-}
-
-
-/**
- * Performs the search for a specified filter on the directory with the scope
- * of LDAP_SCOPE_SUBTREE. This is equivalent to searching
- * the entire directory.
- *
- * From 4.0.5 on it's also possible to do parallel searches. To do this
- * you use an array of link identifiers, rather than a single identifier,
- * as the first argument. If you don't want the same base DN and the
- * same filter for all the searches, you can also use an array of base DNs
- * and/or an array of filters. Those arrays must be of the same size as
- * the link identifier array since the first entries of the arrays are
- * used for one search, the second entries are used for another, and so
- * on. When doing parallel searches an array of search result
- * identifiers is returned, except in case of error, then the entry
- * corresponding to the search will be FALSE. This is very much like
- * the value normally returned, except that a result identifier is always
- * returned when a search was made. There are some rare cases where the
- * normal search returns FALSE while the parallel search returns an
- * identifier.
- *
- * @param resource|array $link_identifier An LDAP link identifier, returned by ldap_connect.
- * @param string $base_dn The base DN for the directory.
- * @param string $filter The search filter can be simple or advanced, using boolean operators in
- * the format described in the LDAP documentation (see the Netscape Directory SDK or
- * RFC4515 for full
- * information on filters).
- * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn").
- * Note that the "dn" is always returned irrespective of which attributes
- * types are requested.
- *
- * Using this parameter is much more efficient than the default action
- * (which is to return all attributes and their associated values).
- * The use of this parameter should therefore be considered good
- * practice.
- * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0
- * both attributes types and attribute values are fetched which is the
- * default behaviour.
- * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0
- * means no limit.
- *
- * This parameter can NOT override server-side preset sizelimit. You can
- * set it lower though.
- *
- * Some directory server hosts will be configured to return no more than
- * a preset number of entries. If this occurs, the server will indicate
- * that it has only returned a partial results set. This also occurs if
- * you use this parameter to limit the count of fetched entries.
- * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting
- * this to 0 means no limit.
- *
- * This parameter can NOT override server-side preset timelimit. You can
- * set it lower though.
- * @param int $deref Specifies how aliases should be handled during the search. It can be
- * one of the following:
- *
- *
- *
- * LDAP_DEREF_NEVER - (default) aliases are never
- * dereferenced.
- *
- *
- *
- *
- * LDAP_DEREF_SEARCHING - aliases should be
- * dereferenced during the search but not when locating the base object
- * of the search.
- *
- *
- *
- *
- * LDAP_DEREF_FINDING - aliases should be
- * dereferenced when locating the base object but not during the search.
- *
- *
- *
- *
- * LDAP_DEREF_ALWAYS - aliases should be dereferenced
- * always.
- *
- *
- *
- * @param array $serverctrls Array of LDAP Controls to send with the request.
- * @return resource Returns a search result identifier.
- * @throws LdapException
- *
- */
-function ldap_search($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null)
+function ldap_sasl_bind($ldap, string $dn = null, string $password = null, string $mech = null, string $realm = null, string $authc_id = null, string $authz_id = null, string $props = null): void
{
error_clear_last();
- if ($serverctrls !== null) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls);
- } elseif ($deref !== LDAP_DEREF_NEVER) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
- } elseif ($timelimit !== -1) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit);
- } elseif ($sizelimit !== -1) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit);
- } elseif ($attrsonly !== 0) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly);
- } elseif ($attributes !== null) {
- $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes);
+ if ($props !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id, $props);
+ } elseif ($authz_id !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id);
+ } elseif ($authc_id !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id);
+ } elseif ($realm !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm);
+ } elseif ($mech !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password, $mech);
+ } elseif ($password !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn, $password);
+ } elseif ($dn !== null) {
+ $result = \ldap_sasl_bind($ldap, $dn);
} else {
- $result = \ldap_search($link_identifier, $base_dn, $filter);
+ $result = \ldap_sasl_bind($ldap);
}
if ($result === false) {
throw LdapException::createFromPhpError();
}
- return $result;
}
/**
- * Sets the value of the specified option to be newval.
+ * Sets the value of the specified option to be value.
*
- * @param resource|null $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource|null $ldap An LDAP\Connection instance, returned by ldap_connect.
* @param int $option The parameter option can be one of:
*
*
@@ -1417,32 +1058,32 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a
*
*
* LDAP_OPT_DEREF
- * integer
+ * int
*
*
*
* LDAP_OPT_SIZELIMIT
- * integer
+ * int
*
*
*
* LDAP_OPT_TIMELIMIT
- * integer
+ * int
*
*
*
* LDAP_OPT_NETWORK_TIMEOUT
- * integer
- * PHP 5.3.0
+ * int
+ *
*
*
* LDAP_OPT_PROTOCOL_VERSION
- * integer
+ * int
*
*
*
* LDAP_OPT_ERROR_NUMBER
- * integer
+ * int
*
*
*
@@ -1522,7 +1163,7 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a
*
*
* LDAP_OPT_X_TLS_CRLCHECK
- * integer
+ * int
* PHP 7.1.0
*
*
@@ -1542,7 +1183,7 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a
*
*
* LDAP_OPT_X_TLS_PROTOCOL_MIN
- * integer
+ * int
* PHP 7.1.0
*
*
@@ -1552,7 +1193,7 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a
*
*
* LDAP_OPT_X_TLS_REQUIRE_CERT
- * integer
+ * int
* PHP 7.0.5
*
*
@@ -1572,14 +1213,14 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a
* 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 $newval The new value for the specified option.
+ * @param mixed $value The new value for the specified option.
* @throws LdapException
*
*/
-function ldap_set_option($link_identifier, int $option, $newval): void
+function ldap_set_option($ldap, int $option, $value): void
{
error_clear_last();
- $result = \ldap_set_option($link_identifier, $option, $newval);
+ $result = \ldap_set_option($ldap, $option, $value);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -1589,14 +1230,14 @@ function ldap_set_option($link_identifier, int $option, $newval): void
/**
* Unbinds from the LDAP directory.
*
- * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect.
+ * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
* @throws LdapException
*
*/
-function ldap_unbind($link_identifier): void
+function ldap_unbind($ldap): void
{
error_clear_last();
- $result = \ldap_unbind($link_identifier);
+ $result = \ldap_unbind($ldap);
if ($result === false) {
throw LdapException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/libxml.php b/vendor/thecodingmachine/safe/generated/libxml.php
index cef784c42..74925c123 100644
--- a/vendor/thecodingmachine/safe/generated/libxml.php
+++ b/vendor/thecodingmachine/safe/generated/libxml.php
@@ -25,11 +25,46 @@ function libxml_get_last_error(): \LibXMLError
/**
* 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 that takes three arguments. Two strings, a public id
- * and system id, and a context (an array with four keys) as the third argument.
- * This callback should return a resource, a string from which a resource can be
- * opened, or NULL.
+ * @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.
* @throws LibxmlException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/mbstring.php b/vendor/thecodingmachine/safe/generated/mbstring.php
index fa0829438..49622015f 100644
--- a/vendor/thecodingmachine/safe/generated/mbstring.php
+++ b/vendor/thecodingmachine/safe/generated/mbstring.php
@@ -5,21 +5,66 @@ namespace Safe;
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 $cp
- * @param string $encoding
- * @return string Returns a specific character.
+ * @param int $codepoint A Unicode codepoint value, e.g. 128024 for U+1F418 ELEPHANT
+ * @param 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.
* @throws MbstringException
*
*/
-function mb_chr(int $cp, string $encoding = null): string
+function mb_chr(int $codepoint, string $encoding = null): string
{
error_clear_last();
if ($encoding !== null) {
- $result = \mb_chr($cp, $encoding);
+ $result = \mb_chr($codepoint, $encoding);
+ } else {
+ $result = \mb_chr($codepoint);
+ }
+ if ($result === false) {
+ throw MbstringException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 string|array $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 string|array The encoded string or array on success.
+ * @throws MbstringException
+ *
+ */
+function mb_convert_encoding($string, string $to_encoding, $from_encoding = null)
+{
+ error_clear_last();
+ if ($from_encoding !== null) {
+ $result = \mb_convert_encoding($string, $to_encoding, $from_encoding);
} else {
- $result = \mb_chr($cp);
+ $result = \mb_convert_encoding($string, $to_encoding);
}
if ($result === false) {
throw MbstringException::createFromPhpError();
@@ -30,12 +75,12 @@ function mb_chr(int $cp, string $encoding = null): string
/**
* Sets the automatic character
- * encoding detection order to encoding_list.
+ * encoding detection order to encoding.
*
- * @param mixed $encoding_list encoding_list is an array or
+ * @param mixed $encoding encoding is an array or
* comma separated list of character encoding. See supported encodings.
*
- * If encoding_list is omitted, it returns
+ * If encoding is omitted or NULL, it returns
* the current character encoding detection order as array.
*
* This setting affects mb_detect_encoding and
@@ -57,11 +102,11 @@ function mb_chr(int $cp, string $encoding = null): string
* @throws MbstringException
*
*/
-function mb_detect_order($encoding_list = null)
+function mb_detect_order($encoding = null)
{
error_clear_last();
- if ($encoding_list !== null) {
- $result = \mb_detect_order($encoding_list);
+ if ($encoding !== null) {
+ $result = \mb_detect_order($encoding);
} else {
$result = \mb_detect_order();
}
@@ -118,15 +163,21 @@ function mb_encoding_aliases(string $encoding): array
* clutter the function namespace with a callback function's name
* not used anywhere else.
* @param string $string The string being checked.
- * @param string $option The search option. See mb_regex_set_options for explanation.
- * @return string The resultant string on success.
+ * @param string $options The search option. See mb_regex_set_options for explanation.
+ * @return string|null The resultant string on success.
+ * If string is not valid for the current encoding, NULL
+ * is returned.
* @throws MbstringException
*
*/
-function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = "msr"): string
+function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $options = null): ?string
{
error_clear_last();
- $result = \mb_ereg_replace_callback($pattern, $callback, $string, $option);
+ if ($options !== null) {
+ $result = \mb_ereg_replace_callback($pattern, $callback, $string, $options);
+ } else {
+ $result = \mb_ereg_replace_callback($pattern, $callback, $string);
+ }
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -142,15 +193,21 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s
* Multibyte characters may be used in pattern.
* @param string $replacement The replacement text.
* @param string $string The string being checked.
- * @param string $option
- * @return string The resultant string on success.
+ * @param string $options
+ * @return string|null The resultant string on success.
+ * If string is not valid for the current encoding, NULL
+ * is returned.
* @throws MbstringException
*
*/
-function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = "msr"): string
+function mb_ereg_replace(string $pattern, string $replacement, string $string, string $options = null): ?string
{
error_clear_last();
- $result = \mb_ereg_replace($pattern, $replacement, $string, $option);
+ if ($options !== null) {
+ $result = \mb_ereg_replace($pattern, $replacement, $string, $options);
+ } else {
+ $result = \mb_ereg_replace($pattern, $replacement, $string);
+ }
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -186,15 +243,15 @@ function mb_ereg_search_getregs(): array
*
* @param string $string The search string.
* @param string $pattern The search pattern.
- * @param string $option The search option. See mb_regex_set_options for explanation.
+ * @param string $options The search option. See mb_regex_set_options for explanation.
* @throws MbstringException
*
*/
-function mb_ereg_search_init(string $string, string $pattern = null, string $option = "msr"): void
+function mb_ereg_search_init(string $string, string $pattern = null, string $options = null): void
{
error_clear_last();
- if ($option !== "msr") {
- $result = \mb_ereg_search_init($string, $pattern, $option);
+ if ($options !== null) {
+ $result = \mb_ereg_search_init($string, $pattern, $options);
} elseif ($pattern !== null) {
$result = \mb_ereg_search_init($string, $pattern);
} else {
@@ -210,16 +267,16 @@ function mb_ereg_search_init(string $string, string $pattern = null, string $opt
* Returns the matched part of a multibyte regular expression.
*
* @param string $pattern The search pattern.
- * @param string $option The search option. See mb_regex_set_options for explanation.
+ * @param string $options The search option. See mb_regex_set_options for explanation.
* @return array
* @throws MbstringException
*
*/
-function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): array
+function mb_ereg_search_regs(string $pattern = null, string $options = null): array
{
error_clear_last();
- if ($option !== "ms") {
- $result = \mb_ereg_search_regs($pattern, $option);
+ if ($options !== null) {
+ $result = \mb_ereg_search_regs($pattern, $options);
} elseif ($pattern !== null) {
$result = \mb_ereg_search_regs($pattern);
} else {
@@ -235,14 +292,14 @@ function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): arr
/**
*
*
- * @param int $position The position to set. If it is negative, it counts from the end of the string.
+ * @param int $offset The position to set. If it is negative, it counts from the end of the string.
* @throws MbstringException
*
*/
-function mb_ereg_search_setpos(int $position): void
+function mb_ereg_search_setpos(int $offset): void
{
error_clear_last();
- $result = \mb_ereg_search_setpos($position);
+ $result = \mb_ereg_search_setpos($offset);
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -253,17 +310,61 @@ function mb_ereg_search_setpos(int $position): void
*
*
* @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored.
- * @param string $replace The replacement text.
+ * @param string $replacement The replacement text.
* @param string $string The searched string.
- * @param string $option
+ * @param string $options
* @return string The resultant string.
+ * If string is not valid for the current encoding, NULL
+ * is returned.
+ * @throws MbstringException
+ *
+ */
+function mb_eregi_replace(string $pattern, string $replacement, string $string, string $options = null): string
+{
+ error_clear_last();
+ if ($options !== null) {
+ $result = \mb_eregi_replace($pattern, $replacement, $string, $options);
+ } else {
+ $result = \mb_eregi_replace($pattern, $replacement, $string);
+ }
+ if ($result === false) {
+ throw MbstringException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ *
+ *
+ * @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.
* @throws MbstringException
*
*/
-function mb_eregi_replace(string $pattern, string $replace, string $string, string $option = "msri"): string
+function mb_get_info(string $type = "all")
{
error_clear_last();
- $result = \mb_eregi_replace($pattern, $replace, $string, $option);
+ $result = \mb_get_info($type);
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -336,21 +437,25 @@ function mb_internal_encoding(string $encoding = null)
/**
+ * Returns the Unicode code point value of the given character.
*
+ * This function complements mb_chr.
*
- * @param string $str
- * @param string $encoding
- * @return int Returns a code point of character.
+ * @param string $string A string
+ * @param 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.
* @throws MbstringException
*
*/
-function mb_ord(string $str, string $encoding = null): int
+function mb_ord(string $string, string $encoding = null): int
{
error_clear_last();
if ($encoding !== null) {
- $result = \mb_ord($str, $encoding);
+ $result = \mb_ord($string, $encoding);
} else {
- $result = \mb_ord($str);
+ $result = \mb_ord($string);
}
if ($result === false) {
throw MbstringException::createFromPhpError();
@@ -367,15 +472,15 @@ function mb_ord(string $str, string $encoding = null): int
* encoding and set values to the result array or
* global variables.
*
- * @param string $encoded_string The URL encoded data.
+ * @param string $string The URL encoded data.
* @param array|null $result An array containing decoded and character encoded converted values.
* @throws MbstringException
*
*/
-function mb_parse_str(string $encoded_string, ?array &$result): void
+function mb_parse_str(string $string, ?array &$result): void
{
error_clear_last();
- $result = \mb_parse_str($encoded_string, $result);
+ $result = \mb_parse_str($string, $result);
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -386,7 +491,7 @@ function mb_parse_str(string $encoded_string, ?array &$result): void
* Set/Get character encoding for a multibyte regex.
*
* @param string $encoding The encoding
- * parameter is the character encoding. If it is omitted, the internal character
+ * parameter is the character encoding. If it is omitted or NULL, the internal character
* encoding value will be used.
* @return string|bool
* @throws MbstringException
@@ -444,7 +549,7 @@ function mb_regex_encoding(string $encoding = null)
* 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 string $additional_parameter additional_parameter is a MTA command line
+ * @param string $additional_params additional_params is a MTA command line
* parameter. It is useful when setting the correct Return-Path
* header when using sendmail.
*
@@ -464,10 +569,14 @@ function mb_regex_encoding(string $encoding = null)
* @throws MbstringException
*
*/
-function mb_send_mail(string $to, string $subject, string $message, $additional_headers = null, string $additional_parameter = null): void
+function mb_send_mail(string $to, string $subject, string $message, $additional_headers = [], string $additional_params = null): void
{
error_clear_last();
- $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_parameter);
+ if ($additional_params !== null) {
+ $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_params);
+ } else {
+ $result = \mb_send_mail($to, $subject, $message, $additional_headers);
+ }
if ($result === false) {
throw MbstringException::createFromPhpError();
}
@@ -493,34 +602,3 @@ function mb_split(string $pattern, string $string, int $limit = -1): array
}
return $result;
}
-
-
-/**
- * This function will return an array of strings, it is a version of str_split with support for encodings of variable character size as well as fixed-size encodings of 1,2 or 4 byte characters.
- * If the split_length parameter is specified, the string is broken down into chunks of the specified length in characters (not bytes).
- * The encoding parameter can be optionally specified and it is good practice to do so.
- *
- * @param string $string The string to split into characters or chunks.
- * @param int $split_length If specified, each element of the returned array will be composed of multiple characters instead of a single character.
- * @param string $encoding The encoding
- * parameter is the character encoding. If it is omitted, the internal character
- * encoding value will be used.
- *
- * A string specifying one of the supported encodings.
- * @return array mb_str_split returns an array of strings.
- * @throws MbstringException
- *
- */
-function mb_str_split(string $string, int $split_length = 1, string $encoding = null): array
-{
- error_clear_last();
- if ($encoding !== null) {
- $result = \mb_str_split($string, $split_length, $encoding);
- } else {
- $result = \mb_str_split($string, $split_length);
- }
- if ($result === false) {
- throw MbstringException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/generated/misc.php b/vendor/thecodingmachine/safe/generated/misc.php
index ff636fd49..31ca61584 100644
--- a/vendor/thecodingmachine/safe/generated/misc.php
+++ b/vendor/thecodingmachine/safe/generated/misc.php
@@ -7,14 +7,14 @@ use Safe\Exceptions\MiscException;
/**
* Defines a named constant at runtime.
*
- * @param string $name The name of the constant.
+ * @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 (integer,
- * float, string, boolean, or
+ * 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
@@ -28,10 +28,10 @@ use Safe\Exceptions\MiscException;
* @throws MiscException
*
*/
-function define(string $name, $value, bool $case_insensitive = false): void
+function define(string $constant_name, $value, bool $case_insensitive = false): void
{
error_clear_last();
- $result = \define($name, $value, $case_insensitive);
+ $result = \define($constant_name, $value, $case_insensitive);
if ($result === false) {
throw MiscException::createFromPhpError();
}
@@ -72,7 +72,7 @@ function highlight_file(string $filename, bool $return = false)
/**
*
*
- * @param string $str The PHP code to be highlighted. This should include the opening tag.
+ * @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 string|bool If return is set to TRUE, returns the highlighted
@@ -81,10 +81,34 @@ function highlight_file(string $filename, bool $return = false)
* @throws MiscException
*
*/
-function highlight_string(string $str, bool $return = false)
+function highlight_string(string $string, bool $return = false)
{
error_clear_last();
- $result = \highlight_string($str, $return);
+ $result = \highlight_string($string, $return);
+ if ($result === false) {
+ throw MiscException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ *
+ *
+ * @param bool $as_number Whether the high resolution time should be returned as array
+ * or number.
+ * @return array{0:int,1:int}|int|float 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.
+ * @throws MiscException
+ *
+ */
+function hrtime(bool $as_number = false)
+{
+ error_clear_last();
+ $result = \hrtime($as_number);
if ($result === false) {
throw MiscException::createFromPhpError();
}
@@ -232,7 +256,7 @@ function highlight_string(string $str, bool $return = false)
*
*
* Z
- * NUL-padded string (new in PHP 5.5)
+ * NUL-padded string
*
*
* @
@@ -241,16 +265,16 @@ function highlight_string(string $str, bool $return = false)
*
*
*
- * @param mixed $params
+ * @param mixed $values
* @return string Returns a binary string containing data.
* @throws MiscException
*
*/
-function pack(string $format, ...$params): string
+function pack(string $format, ...$values): string
{
error_clear_last();
- if ($params !== []) {
- $result = \pack($format, ...$params);
+ if ($values !== []) {
+ $result = \pack($format, ...$values);
} else {
$result = \pack($format);
}
@@ -288,14 +312,14 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str
/**
* Set the codepage of the current process.
*
- * @param int $cp A codepage identifier.
+ * @param int $codepage A codepage identifier.
* @throws MiscException
*
*/
-function sapi_windows_cp_set(int $cp): void
+function sapi_windows_cp_set(int $codepage): void
{
error_clear_last();
- $result = \sapi_windows_cp_set($cp);
+ $result = \sapi_windows_cp_set($codepage);
if ($result === false) {
throw MiscException::createFromPhpError();
}
@@ -324,9 +348,50 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void
/**
- * If enable is omitted, the function returns TRUE if the stream stream has VT100 control codes enabled, FALSE otherwise.
+ * 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 $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
+ * @throws MiscException
+ *
+ */
+function sapi_windows_set_ctrl_handler($handler, bool $add = true): void
+{
+ error_clear_last();
+ $result = \sapi_windows_set_ctrl_handler($handler, $add);
+ if ($result === false) {
+ throw MiscException::createFromPhpError();
+ }
+}
+
+
+/**
+ * If enable is NULL, the function returns TRUE if the stream stream has VT100 control codes enabled, FALSE otherwise.
*
- * If enable is specified, the function will try to enable or disable the VT100 features of the stream stream.
+ * 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.
@@ -335,7 +400,7 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void
* 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 $enable If specified, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE).
+ * @param bool $enable If bool, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE).
* @throws MiscException
*
*/
@@ -385,7 +450,7 @@ function sleep(int $seconds): int
*
* @param int $seconds Must be a non-negative integer.
* @param int $nanoseconds Must be a non-negative integer less than 1 billion.
- * @return array{0:int,1:int}|bool Returns TRUE on success.
+ * @return array{0:0|positive-int,1: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:
@@ -445,18 +510,33 @@ function time_sleep_until(float $timestamp): void
* 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 $data The packed data.
+ * @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.
* @throws MiscException
*
*/
-function unpack(string $format, string $data, int $offset = 0): array
+function unpack(string $format, string $string, int $offset = 0): array
{
error_clear_last();
- $result = \unpack($format, $data, $offset);
+ $result = \unpack($format, $string, $offset);
if ($result === false) {
throw MiscException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/msql.php b/vendor/thecodingmachine/safe/generated/msql.php
deleted file mode 100644
index 331c1b6cd..000000000
--- a/vendor/thecodingmachine/safe/generated/msql.php
+++ /dev/null
@@ -1,443 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\MsqlException;
-
-/**
- * Returns number of affected rows by the last SELECT, UPDATE or DELETE
- * query associated with result.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @return int Returns the number of affected rows on success.
- * @throws MsqlException
- *
- */
-function msql_affected_rows($result): int
-{
- error_clear_last();
- $result = \msql_affected_rows($result);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_close closes the non-persistent connection to
- * the mSQL server that's associated with the specified link identifier.
- *
- * Using msql_close isn't usually necessary, as
- * non-persistent open links are automatically closed at the end of the
- * script's execution. See also freeing resources.
- *
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @throws MsqlException
- *
- */
-function msql_close($link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_close($link_identifier);
- } else {
- $result = \msql_close();
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * msql_connect establishes a connection to a mSQL
- * server.
- *
- * If a second call is made to msql_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
- * msql_close.
- *
- * @param string $hostname The hostname can also include a port number. e.g.
- * hostname,port.
- *
- * If not specified, the connection is established by the means of a Unix
- * domain socket, being then more efficient then a localhost TCP socket
- * connection.
- *
- * While this function will accept a colon (:) as a
- * host/port separator, a comma (,) is the preferred
- * method.
- * @return resource Returns a positive mSQL link identifier on success.
- * @throws MsqlException
- *
- */
-function msql_connect(string $hostname = null)
-{
- error_clear_last();
- if ($hostname !== null) {
- $result = \msql_connect($hostname);
- } else {
- $result = \msql_connect();
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_create_db attempts to create a new database on
- * the mSQL server.
- *
- * @param string $database_name The name of the mSQL database.
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @throws MsqlException
- *
- */
-function msql_create_db(string $database_name, $link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_create_db($database_name, $link_identifier);
- } else {
- $result = \msql_create_db($database_name);
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * msql_data_seek moves the internal row
- * pointer of the mSQL result associated with the specified query
- * identifier to point to the specified row number. The next call
- * to msql_fetch_row would return that
- * row.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @param int $row_number The seeked row number.
- * @throws MsqlException
- *
- */
-function msql_data_seek($result, int $row_number): void
-{
- error_clear_last();
- $result = \msql_data_seek($result, $row_number);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * msql_db_query selects a database and executes a query
- * on it.
- *
- * @param string $database The name of the mSQL database.
- * @param string $query The SQL query.
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @return resource Returns a positive mSQL query identifier to the query result.
- * @throws MsqlException
- *
- */
-function msql_db_query(string $database, string $query, $link_identifier = null)
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_db_query($database, $query, $link_identifier);
- } else {
- $result = \msql_db_query($database, $query);
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_drop_db attempts to drop (remove) a database
- * from the mSQL server.
- *
- * @param string $database_name The name of the database.
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @throws MsqlException
- *
- */
-function msql_drop_db(string $database_name, $link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_drop_db($database_name, $link_identifier);
- } else {
- $result = \msql_drop_db($database_name);
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * msql_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
- * msql_query.
- * @param int $field_offset The numerical field offset. The
- * field_offset starts at 1.
- * @return int Returns the length of the specified field.
- * @throws MsqlException
- *
- */
-function msql_field_len($result, int $field_offset): int
-{
- error_clear_last();
- $result = \msql_field_len($result, $field_offset);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_field_name gets the name of the specified field
- * index.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @param int $field_offset The numerical field offset. The
- * field_offset starts at 1.
- * @return string The name of the field.
- * @throws MsqlException
- *
- */
-function msql_field_name($result, int $field_offset): string
-{
- error_clear_last();
- $result = \msql_field_name($result, $field_offset);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Seeks to the specified field offset. If the next call to
- * msql_fetch_field won't include a field offset, this
- * field would be returned.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @param int $field_offset The numerical field offset. The
- * field_offset starts at 1.
- * @throws MsqlException
- *
- */
-function msql_field_seek($result, int $field_offset): void
-{
- error_clear_last();
- $result = \msql_field_seek($result, $field_offset);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Returns the name of the table that the specified field is in.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @param int $field_offset The numerical field offset. The
- * field_offset starts at 1.
- * @return int The name of the table on success.
- * @throws MsqlException
- *
- */
-function msql_field_table($result, int $field_offset): int
-{
- error_clear_last();
- $result = \msql_field_table($result, $field_offset);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_field_type gets the type of the specified field
- * index.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @param int $field_offset The numerical field offset. The
- * field_offset starts at 1.
- * @return string The type of the field. One of int,
- * char, real, ident,
- * null or unknown. This functions will
- * return FALSE on failure.
- * @throws MsqlException
- *
- */
-function msql_field_type($result, int $field_offset): string
-{
- error_clear_last();
- $result = \msql_field_type($result, $field_offset);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_free_result frees the memory associated
- * with query_identifier. When PHP completes a
- * request, this memory is freed automatically, so you only need to
- * call this function when you want to make sure you don't use too
- * much memory while the script is running.
- *
- * @param resource $result The result resource that
- * is being evaluated. This result comes from a call to
- * msql_query.
- * @throws MsqlException
- *
- */
-function msql_free_result($result): void
-{
- error_clear_last();
- $result = \msql_free_result($result);
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * msql_pconnect acts very much like
- * msql_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.
- * 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 (msql_close will not close links
- * established by this function).
- *
- * @param string $hostname The hostname can also include a port number. e.g.
- * hostname,port.
- *
- * If not specified, the connection is established by the means of a Unix
- * domain socket, being more efficient than a localhost TCP socket
- * connection.
- * @return resource Returns a positive mSQL link identifier on success.
- * @throws MsqlException
- *
- */
-function msql_pconnect(string $hostname = null)
-{
- error_clear_last();
- if ($hostname !== null) {
- $result = \msql_pconnect($hostname);
- } else {
- $result = \msql_pconnect();
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_query sends a query to the currently active
- * database on the server that's associated with the specified link
- * identifier.
- *
- * @param string $query The SQL query.
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @return resource Returns a positive mSQL query identifier on success.
- * @throws MsqlException
- *
- */
-function msql_query(string $query, $link_identifier = null)
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_query($query, $link_identifier);
- } else {
- $result = \msql_query($query);
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * msql_select_db sets the current active database on
- * the server that's associated with the specified
- * link_identifier.
- *
- * Subsequent calls to msql_query will be made on the
- * active database.
- *
- * @param string $database_name The database name.
- * @param resource|null $link_identifier The mSQL connection.
- * If not specified, the last link opened by msql_connect
- * is assumed. If no such link is found, the function will try to establish a
- * link as if msql_connect was called, and use it.
- * @throws MsqlException
- *
- */
-function msql_select_db(string $database_name, $link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \msql_select_db($database_name, $link_identifier);
- } else {
- $result = \msql_select_db($database_name);
- }
- if ($result === false) {
- throw MsqlException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/mysqlndMs.php b/vendor/thecodingmachine/safe/generated/mysqlndMs.php
deleted file mode 100644
index 2fd4f32a2..000000000
--- a/vendor/thecodingmachine/safe/generated/mysqlndMs.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\MysqlndMsException;
-
-/**
- * Returns a list of currently configured servers.
- *
- * @param mixed $connection A MySQL connection handle obtained from any of the
- * connect functions of the mysqli,
- * mysql or
- * PDO_MYSQL extensions.
- * @return array FALSE on error. Otherwise, returns an array with two entries
- * masters and slaves each of which contains
- * an array listing all corresponding servers.
- *
- * The function can be used to check and debug the list of servers currently
- * used by the plugin. It is mostly useful when the list of servers changes at
- * runtime, for example, when using MySQL Fabric.
- *
- * masters and slaves server entries
- * @throws MysqlndMsException
- *
- */
-function mysqlnd_ms_dump_servers($connection): array
-{
- error_clear_last();
- $result = \mysqlnd_ms_dump_servers($connection);
- if ($result === false) {
- throw MysqlndMsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * MySQL Fabric related.
- *
- * Switch the connection to the nodes handling global sharding queries
- * for the given table name.
- *
- * @param mixed $connection A MySQL connection handle obtained from any of the
- * connect functions of the mysqli,
- * mysql or
- * PDO_MYSQL extensions.
- * @param mixed $table_name The table name to ask Fabric about.
- * @return array FALSE on error. Otherwise, TRUE
- * @throws MysqlndMsException
- *
- */
-function mysqlnd_ms_fabric_select_global($connection, $table_name): array
-{
- error_clear_last();
- $result = \mysqlnd_ms_fabric_select_global($connection, $table_name);
- if ($result === false) {
- throw MysqlndMsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * MySQL Fabric related.
- *
- * Switch the connection to the shards responsible for the
- * given table name and shard key.
- *
- * @param mixed $connection A MySQL connection handle obtained from any of the
- * connect functions of the mysqli,
- * mysql or
- * PDO_MYSQL extensions.
- * @param mixed $table_name The table name to ask Fabric about.
- * @param mixed $shard_key The shard key to ask Fabric about.
- * @return array FALSE on error. Otherwise, TRUE
- * @throws MysqlndMsException
- *
- */
-function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): array
-{
- error_clear_last();
- $result = \mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key);
- if ($result === false) {
- throw MysqlndMsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns an array which describes the last used connection from the plugins
- * connection pool currently pointed to by the user connection handle. If using the
- * plugin, a user connection handle represents a pool of database connections.
- * It is not possible to tell from the user connection handles properties to which
- * database server from the pool the user connection handle points.
- *
- * The function can be used to debug or monitor PECL mysqlnd_ms.
- *
- * @param mixed $connection A MySQL connection handle obtained from any of the
- * connect functions of the mysqli,
- * mysql or
- * PDO_MYSQL extensions.
- * @return array FALSE on error. Otherwise, an
- * array which describes the connection used to
- * execute the last statement on.
- *
- * Array which describes the connection.
- * @throws MysqlndMsException
- *
- */
-function mysqlnd_ms_get_last_used_connection($connection): array
-{
- error_clear_last();
- $result = \mysqlnd_ms_get_last_used_connection($connection);
- if ($result === false) {
- throw MysqlndMsException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/generated/mysqlndQc.php b/vendor/thecodingmachine/safe/generated/mysqlndQc.php
deleted file mode 100644
index 9a99a379c..000000000
--- a/vendor/thecodingmachine/safe/generated/mysqlndQc.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\MysqlndQcException;
-
-/**
- * Flush all cache contents.
- *
- * Flushing the cache is a storage handler responsibility.
- * All built-in storage handler but the
- * memcache storage
- * handler support flushing the cache. The
- * memcache
- * storage handler cannot flush its cache contents.
- *
- * User-defined storage handler may or may not support the operation.
- *
- * @throws MysqlndQcException
- *
- */
-function mysqlnd_qc_clear_cache(): void
-{
- error_clear_last();
- $result = \mysqlnd_qc_clear_cache();
- if ($result === false) {
- throw MysqlndQcException::createFromPhpError();
- }
-}
-
-
-/**
- * Installs a callback which decides whether a statement is cached.
- *
- * There are several ways of hinting PELC/mysqlnd_qc to cache a query.
- * By default, PECL/mysqlnd_qc attempts to cache a if caching of all statements
- * is enabled or the query string begins with a certain SQL hint.
- * The plugin internally calls a function named is_select()
- * to find out. This internal function can be replaced with a user-defined callback.
- * Then, the user-defined callback is responsible to decide whether the plugin
- * attempts to cache a statement. Because the internal function is replaced
- * with the callback, the callback gains full control. The callback is free
- * to ignore the configuration setting mysqlnd_qc.cache_by_default
- * and SQL hints.
- *
- * The callback is invoked for every statement inspected by the plugin.
- * It is given the statements string as a parameter. The callback returns
- * FALSE if the statement shall not be cached. It returns TRUE to
- * make the plugin attempt to cache the statements result set, if any.
- * A so-created cache entry is given the default TTL set with the
- * PHP configuration directive mysqlnd_qc.ttl.
- * If a different TTL shall be used, the callback returns a numeric
- * value to be used as the TTL.
- *
- * The internal is_select function is part of the internal
- * cache storage handler interface. Thus, a user-defined storage handler
- * offers the same capabilities.
- *
- * @param string $callback
- * @return mixed Returns TRUE on success.
- * @throws MysqlndQcException
- *
- */
-function mysqlnd_qc_set_is_select(string $callback)
-{
- error_clear_last();
- $result = \mysqlnd_qc_set_is_select($callback);
- if ($result === false) {
- throw MysqlndQcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Sets the storage handler used by the query cache. A list of available
- * storage handler can be obtained from
- * mysqlnd_qc_get_available_handlers.
- * Which storage are available depends on the compile time
- * configuration of the query cache plugin. The
- * default storage handler is always available.
- * All other storage handler must be enabled explicitly when building the
- * extension.
- *
- * @param string $handler Handler can be of type string representing the name of a
- * built-in storage handler or an object of type
- * mysqlnd_qc_handler_default.
- * The names of the built-in storage handler are
- * default,
- * APC,
- * MEMCACHE,
- * sqlite.
- * @throws MysqlndQcException
- *
- */
-function mysqlnd_qc_set_storage_handler(string $handler): void
-{
- error_clear_last();
- $result = \mysqlnd_qc_set_storage_handler($handler);
- if ($result === false) {
- throw MysqlndQcException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/network.php b/vendor/thecodingmachine/safe/generated/network.php
index 6d46b6ce3..21186d1fa 100644
--- a/vendor/thecodingmachine/safe/generated/network.php
+++ b/vendor/thecodingmachine/safe/generated/network.php
@@ -53,10 +53,11 @@ function closelog(): void
* always return every record, the slower DNS_ALL
* will collect all records more reliably.
*
- * DNS_CAA is not supported on Windows.
- * @param array|null $authns Passed by reference and, if given, will be populated with Resource
+ * 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 $addtl Passed by reference and, if given, will be populated with any
+ * @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).
@@ -208,7 +209,7 @@ function closelog(): void
*
*
*
- * A6(PHP &gt;= 5.1.0)
+ * A6
*
* masklen: Length (in bits) to inherit from the target
* specified by chain.
@@ -245,10 +246,10 @@ function closelog(): void
* @throws NetworkException
*
*/
-function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authns = null, ?array &$addtl = null, bool $raw = false): array
+function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authoritative_name_servers = null, ?array &$additional_records = null, bool $raw = false): array
{
error_clear_last();
- $result = \dns_get_record($hostname, $type, $authns, $addtl, $raw);
+ $result = \dns_get_record($hostname, $type, $authoritative_name_servers, $additional_records, $raw);
if ($result === false) {
throw NetworkException::createFromPhpError();
}
@@ -280,16 +281,17 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authns =
* @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 $errno If provided, holds the system level error number that occurred in the
+ * @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 errno is
+ * 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 string|null $errstr The error message as a string.
- * @param float $timeout The connection timeout, in seconds.
+ * @param string|null $error_message The error message as a string.
+ * @param float $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
@@ -304,13 +306,13 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authns =
* @throws NetworkException
*
*/
-function fsockopen(string $hostname, int $port = -1, ?int &$errno = null, ?string &$errstr = null, float $timeout = null)
+function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, float $timeout = null)
{
error_clear_last();
if ($timeout !== null) {
- $result = \fsockopen($hostname, $port, $errno, $errstr, $timeout);
+ $result = \fsockopen($hostname, $port, $error_code, $error_message, $timeout);
} else {
- $result = \fsockopen($hostname, $port, $errno, $errstr);
+ $result = \fsockopen($hostname, $port, $error_code, $error_message);
}
if ($result === false) {
throw NetworkException::createFromPhpError();
@@ -341,18 +343,18 @@ function gethostname(): string
/**
* getprotobyname returns the protocol number
- * associated with the protocol name as per
+ * associated with the protocol protocol as per
* /etc/protocols.
*
- * @param string $name The protocol name.
+ * @param string $protocol The protocol name.
* @return int Returns the protocol number.
* @throws NetworkException
*
*/
-function getprotobyname(string $name): int
+function getprotobyname(string $protocol): int
{
error_clear_last();
- $result = \getprotobyname($name);
+ $result = \getprotobyname($protocol);
if ($result === false) {
throw NetworkException::createFromPhpError();
}
@@ -362,18 +364,41 @@ function getprotobyname(string $name): int
/**
* getprotobynumber returns the protocol name
- * associated with protocol number as per
+ * associated with protocol protocol as per
* /etc/protocols.
*
- * @param int $number The protocol number.
+ * @param int $protocol The protocol number.
* @return string Returns the protocol name as a string.
* @throws NetworkException
*
*/
-function getprotobynumber(int $number): string
+function getprotobynumber(int $protocol): string
{
error_clear_last();
- $result = \getprotobynumber($number);
+ $result = \getprotobynumber($protocol);
+ if ($result === false) {
+ throw NetworkException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws NetworkException
+ *
+ */
+function getservbyport(int $port, string $protocol): string
+{
+ error_clear_last();
+ $result = \getservbyport($port, $protocol);
if ($result === false) {
throw NetworkException::createFromPhpError();
}
@@ -406,15 +431,141 @@ function header_register_callback(callable $callback): void
/**
*
*
- * @param string $in_addr A 32bit IPv4, or 128bit IPv6 address.
+ * @param string $ip A 32bit IPv4, or 128bit IPv6 address.
* @return string Returns a string representation of the address.
* @throws NetworkException
*
*/
-function inet_ntop(string $in_addr): string
+function inet_ntop(string $ip): string
+{
+ error_clear_last();
+ $result = \inet_ntop($ip);
+ if ($result === false) {
+ throw NetworkException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws NetworkException
+ *
+ */
+function long2ip(int $ip): string
+{
+ error_clear_last();
+ $result = \long2ip($ip);
+ if ($result === false) {
+ throw NetworkException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ *
+ *
+ *
+ *
+ *
+ * @throws NetworkException
+ *
+ */
+function net_get_interfaces(): array
{
error_clear_last();
- $result = \inet_ntop($in_addr);
+ $result = \net_get_interfaces();
if ($result === false) {
throw NetworkException::createFromPhpError();
}
@@ -428,11 +579,11 @@ function inet_ntop(string $in_addr): string
*
* The use of openlog is optional. It
* will automatically be called by syslog if
- * necessary, in which case ident will default
+ * necessary, in which case prefix will default
* to FALSE.
*
- * @param string $ident The string ident is added to each message.
- * @param int $option The option argument is used to indicate
+ * @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
@@ -554,13 +705,46 @@ function inet_ntop(string $in_addr): string
* @throws NetworkException
*
*/
-function openlog(string $ident, int $option, int $facility): void
+function openlog(string $prefix, int $flags, int $facility): void
+{
+ error_clear_last();
+ $result = \openlog($prefix, $flags, $facility);
+ if ($result === false) {
+ throw NetworkException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 string|null $error_message
+ * @param float $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).
+ * @throws NetworkException
+ *
+ */
+function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, float $timeout = null)
{
error_clear_last();
- $result = \openlog($ident, $option, $facility);
+ if ($timeout !== null) {
+ $result = \pfsockopen($hostname, $port, $error_code, $error_message, $timeout);
+ } else {
+ $result = \pfsockopen($hostname, $port, $error_code, $error_message);
+ }
if ($result === false) {
throw NetworkException::createFromPhpError();
}
+ return $result;
}
@@ -622,10 +806,7 @@ function openlog(string $ident, int $option, int $facility): void
*
*
*
- * @param string $message The message to send, except that the two characters
- * %m will be replaced by the error message string
- * (strerror) corresponding to the present value of
- * errno.
+ * @param string $message The message to send.
* @throws NetworkException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/oci8.php b/vendor/thecodingmachine/safe/generated/oci8.php
index f2bac2781..4a7e38806 100644
--- a/vendor/thecodingmachine/safe/generated/oci8.php
+++ b/vendor/thecodingmachine/safe/generated/oci8.php
@@ -5,15 +5,15 @@ namespace Safe;
use Safe\Exceptions\Oci8Exception;
/**
- * Binds the PHP array var_array to the Oracle
- * placeholder name, which points to an Oracle PL/SQL
+ * 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 $name The Oracle placeholder.
- * @param array $var_array An array.
- * @param int $max_table_length Sets the maximum length both for incoming and result arrays.
+ * @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.
@@ -101,10 +101,10 @@ use Safe\Exceptions\Oci8Exception;
* @throws Oci8Exception
*
*/
-function oci_bind_array_by_name($statement, string $name, array &$var_array, int $max_table_length, int $max_item_length = -1, int $type = SQLT_AFC): void
+function oci_bind_array_by_name($statement, string $param, array &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC): void
{
error_clear_last();
- $result = \oci_bind_array_by_name($statement, $name, $var_array, $max_table_length, $max_item_length, $type);
+ $result = \oci_bind_array_by_name($statement, $param, $var, $max_array_length, $max_item_length, $type);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -112,8 +112,8 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int
/**
- * Binds a PHP variable variable to the Oracle
- * bind variable placeholder bv_name. Binding
+ * 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.
*
@@ -136,12 +136,12 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int
* bind variable will be used for input or output is determined at
* run-time.
*
- * You must specify maxlength when using
+ * 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 maxlength length if the statement is
+ * 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
@@ -168,16 +168,16 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int
* SQL statement, as this can be a security risk if unfiltered user
* text is concatenated.
*
- * @param resource $statement A valid OCI8 statement identifer.
- * @param string $bv_name The colon-prefixed bind variable placeholder used in the
+ * @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 bv_name. Oracle does not use question
+ * in param. Oracle does not use question
* marks for placeholders.
- * @param mixed $variable The PHP variable to be associated with bv_name
- * @param int $maxlength Sets the maximum length for the data. If you set it to -1, this
+ * @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 variable to set the maximum
- * length. In this case the variable must
+ * 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
@@ -307,10 +307,10 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int
* @throws Oci8Exception
*
*/
-function oci_bind_by_name($statement, string $bv_name, &$variable, int $maxlength = -1, int $type = SQLT_CHR): void
+function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1, int $type = 0): void
{
error_clear_last();
- $result = \oci_bind_by_name($statement, $bv_name, $variable, $maxlength, $type);
+ $result = \oci_bind_by_name($statement, $param, $var, $max_length, $type);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -336,31 +336,6 @@ function oci_cancel($statement): void
/**
- * Unsets connection. The underlying database
- * connection is closed if no other resources are using it and if it
- * was created with oci_connect
- * or oci_new_connect.
- *
- * It is recommended to close connections that are no longer needed
- * because this makes database resources available for other users.
- *
- * @param resource $connection An Oracle connection identifier returned by
- * oci_connect, oci_pconnect,
- * or oci_new_connect.
- * @throws Oci8Exception
- *
- */
-function oci_close($connection): void
-{
- error_clear_last();
- $result = \oci_close($connection);
- if ($result === false) {
- throw Oci8Exception::createFromPhpError();
- }
-}
-
-
-/**
* Commits the outstanding transaction for the
* Oracle connection. A commit ends the
* current transaction and makes permanent all changes. It releases
@@ -395,9 +370,11 @@ function oci_commit($connection): void
/**
* Returns a connection identifier needed for most other OCI8 operations.
*
- * See Connection Handling for
- * general information on connection management and connection
- * pooling.
+ * 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.
@@ -419,7 +396,7 @@ function oci_commit($connection): void
* the tnsnames.ora file, or the name of a local
* Oracle instance.
*
- * If not specified, PHP uses
+ * 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
@@ -432,19 +409,19 @@ function oci_commit($connection): void
* [//]host_name[:port][/service_name]. From Oracle
* 11g, the syntax is:
* [//]host_name[:port][/service_name][:server_type][/instance_name].
- * Service names can be found by running the Oracle
- * utility lsnrctl status on the database server
+ * 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 $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 $character_set Determines
+ * 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
@@ -489,13 +466,13 @@ function oci_commit($connection): void
* @throws Oci8Exception
*
*/
-function oci_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null)
+function oci_connect(string $username, string $password, string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
error_clear_last();
- if ($session_mode !== null) {
- $result = \oci_connect($username, $password, $connection_string, $character_set, $session_mode);
- } elseif ($character_set !== null) {
- $result = \oci_connect($username, $password, $connection_string, $character_set);
+ if ($session_mode !== OCI_DEFAULT) {
+ $result = \oci_connect($username, $password, $connection_string, $encoding, $session_mode);
+ } elseif ($encoding !== "") {
+ $result = \oci_connect($username, $password, $connection_string, $encoding);
} elseif ($connection_string !== null) {
$result = \oci_connect($username, $password, $connection_string);
} else {
@@ -518,12 +495,12 @@ function oci_connect(string $username, string $password, string $connection_stri
* identifier created by oci_parse and executed
* by oci_execute, or a REF
* CURSOR statement identifier.
- * @param string $column_name The column name used in the query.
+ * @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 $variable The PHP variable that will contain the returned column value.
+ * @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
@@ -534,10 +511,10 @@ function oci_connect(string $username, string $password, string $connection_stri
* @throws Oci8Exception
*
*/
-function oci_define_by_name($statement, string $column_name, &$variable, int $type = SQLT_CHR): void
+function oci_define_by_name($statement, string $column, &$var, int $type = 0): void
{
error_clear_last();
- $result = \oci_define_by_name($statement, $column_name, $variable, $type);
+ $result = \oci_define_by_name($statement, $column, $var, $type);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -632,121 +609,18 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void
/**
- * Fetches multiple rows from a query into a two-dimensional array.
- * By default, all rows are returned.
- *
- * This function can be called only once for each query executed
- * with 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 array|null $output The variable to contain the returned rows.
- *
- * LOB columns are returned as strings, where Oracle supports
- * conversion.
- *
- * See oci_fetch_array for more information
- * on how data and types are fetched.
- * @param int $skip The number of initial rows to discard when fetching the
- * result. The default value is 0, so the first row onwards is
- * returned.
- * @param int $maxrows The number of rows to return. The default is -1 meaning return
- * all the rows from skip + 1 onwards.
- * @param int $flags Parameter flags indicates the array
- * structure and whether associative arrays should be used.
- *
- * oci_fetch_all Array Structure Modes
- *
- *
- *
- * Constant
- * Description
- *
- *
- *
- *
- * OCI_FETCHSTATEMENT_BY_ROW
- * The outer array will contain one sub-array per query
- * row.
- *
- *
- * OCI_FETCHSTATEMENT_BY_COLUMN
- * The outer array will contain one sub-array per query
- * column. This is the default.
- *
- *
- *
- *
- *
- * Arrays can be indexed either by column heading or numerically.
- * Only one index mode will be returned.
- *
- * oci_fetch_all Array Index Modes
- *
- *
- *
- * Constant
- * Description
- *
- *
- *
- *
- * OCI_NUM
- * Numeric indexes are used for each column's array.
- *
- *
- * OCI_ASSOC
- * Associative indexes are used for each column's
- * array. This is the default.
- *
- *
- *
- *
- *
- * Use the addition operator "+" to choose a combination
- * of array structure and index modes.
- *
- * Oracle's default, non-case sensitive column names will have
- * uppercase array keys. Case-sensitive column names will have
- * array keys using the exact column case.
- * Use var_dump
- * on output to verify the appropriate case
- * to use for each query.
- *
- * Queries that have more than one column with the same name
- * should use column aliases. Otherwise only one of the columns
- * will appear in an associative array.
- * @return int Returns the number of rows in output, which
- * may be 0 or more.
- * @throws Oci8Exception
- *
- */
-function oci_fetch_all($statement, ?array &$output, int $skip = 0, int $maxrows = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN + OCI_ASSOC): int
-{
- error_clear_last();
- $result = \oci_fetch_all($statement, $output, $skip, $maxrows, $flags);
- if ($result === false) {
- throw Oci8Exception::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the name of the field.
+ * Returns the name of the column.
*
* @param resource $statement A valid OCI statement identifier.
- * @param mixed $field Can be the field's index (1-based) or name.
- * @return string Returns the name as a strings.
+ * @param mixed $column Can be the field's index (1-based) or name.
+ * @return string Returns the name as a string
* @throws Oci8Exception
*
*/
-function oci_field_name($statement, $field): string
+function oci_field_name($statement, $column): string
{
error_clear_last();
- $result = \oci_field_name($statement, $field);
+ $result = \oci_field_name($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -755,22 +629,22 @@ function oci_field_name($statement, $field): string
/**
- * Returns precision of the field.
+ * 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 $field Can be the field's index (1-based) or name.
- * @return int Returns the precision as an integers.
+ * @param mixed $column Can be the field's index (1-based) or name.
+ * @return int Returns the precision as an integer
* @throws Oci8Exception
*
*/
-function oci_field_precision($statement, $field): int
+function oci_field_precision($statement, $column): int
{
error_clear_last();
- $result = \oci_field_precision($statement, $field);
+ $result = \oci_field_precision($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -779,22 +653,22 @@ function oci_field_precision($statement, $field): int
/**
- * Returns the scale of the column with field index.
+ * 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 $field Can be the field's index (1-based) or name.
- * @return int Returns the scale as an integers.
+ * @param mixed $column Can be the field's index (1-based) or name.
+ * @return int Returns the scale as an integer
* @throws Oci8Exception
*
*/
-function oci_field_scale($statement, $field): int
+function oci_field_scale($statement, $column): int
{
error_clear_last();
- $result = \oci_field_scale($statement, $field);
+ $result = \oci_field_scale($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -803,18 +677,18 @@ function oci_field_scale($statement, $field): int
/**
- * Returns the size of a field.
+ * Returns the size of a column.
*
* @param resource $statement A valid OCI statement identifier.
- * @param mixed $field Can be the field's index (1-based) or name.
- * @return int Returns the size of a field in bytess.
+ * @param mixed $column Can be the field's index (1-based) or name.
+ * @return int Returns the size of a column in bytes
* @throws Oci8Exception
*
*/
-function oci_field_size($statement, $field): int
+function oci_field_size($statement, $column): int
{
error_clear_last();
- $result = \oci_field_size($statement, $field);
+ $result = \oci_field_size($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -823,20 +697,20 @@ function oci_field_size($statement, $field): int
/**
- * Returns Oracle's raw "SQLT" data type of the field.
+ * 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 $field Can be the field's index (1-based) or name.
- * @return int Returns Oracle's raw data type as a numbers.
+ * @param mixed $column Can be the field's index (1-based) or name.
+ * @return int Returns Oracle's raw data type as a number
* @throws Oci8Exception
*
*/
-function oci_field_type_raw($statement, $field): int
+function oci_field_type_raw($statement, $column): int
{
error_clear_last();
- $result = \oci_field_type_raw($statement, $field);
+ $result = \oci_field_type_raw($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -848,15 +722,15 @@ function oci_field_type_raw($statement, $field): int
* Returns a field's data type name.
*
* @param resource $statement A valid OCI statement identifier.
- * @param mixed $field Can be the field's index (1-based) or name.
- * @return mixed Returns the field data type as a strings.
+ * @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
* @throws Oci8Exception
*
*/
-function oci_field_type($statement, $field)
+function oci_field_type($statement, $column)
{
error_clear_last();
- $result = \oci_field_type($statement, $field);
+ $result = \oci_field_type($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -867,14 +741,14 @@ function oci_field_type($statement, $field)
/**
* Frees a descriptor allocated by oci_new_descriptor.
*
- * @param resource $descriptor
+ * @param \OCILob $lob Descriptor allocated by oci_new_descriptor.
* @throws Oci8Exception
*
*/
-function oci_free_descriptor($descriptor): void
+function oci_free_descriptor(\OCILob $lob): void
{
error_clear_last();
- $result = \oci_free_descriptor($descriptor);
+ $result = \oci_free_descriptor($lob);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -905,17 +779,21 @@ function oci_free_statement($statement): void
*
* @param resource $connection An Oracle connection identifier, returned by
* oci_connect or oci_pconnect.
- * @param string $tdo Should be a valid named type (uppercase).
+ * @param string $type_name Should be a valid named type (uppercase).
* @param string $schema Should point to the scheme, where the named type was created. The name
- * of the current user is the default value.
+ * of the current user is used when NULL is passed.
* @return \OCI-Collection Returns a new OCICollection object.
* @throws Oci8Exception
*
*/
-function oci_new_collection($connection, string $tdo, string $schema = null)
+function oci_new_collection($connection, string $type_name, string $schema = null)
{
error_clear_last();
- $result = \oci_new_collection($connection, $tdo, $schema);
+ if ($schema !== null) {
+ $result = \oci_new_collection($connection, $type_name, $schema);
+ } else {
+ $result = \oci_new_collection($connection, $type_name);
+ }
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -941,7 +819,7 @@ function oci_new_collection($connection, string $tdo, string $schema = null)
* the tnsnames.ora file, or the name of a local
* Oracle instance.
*
- * If not specified, PHP uses
+ * 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
@@ -954,19 +832,19 @@ function oci_new_collection($connection, string $tdo, string $schema = null)
* [//]host_name[:port][/service_name]. From Oracle
* 11g, the syntax is:
* [//]host_name[:port][/service_name][:server_type][/instance_name].
- * Service names can be found by running the Oracle
- * utility lsnrctl status on the database server
+ * 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 $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 $character_set Determines
+ * 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
@@ -1011,13 +889,13 @@ function oci_new_collection($connection, string $tdo, string $schema = null)
* @throws Oci8Exception
*
*/
-function oci_new_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null)
+function oci_new_connect(string $username, string $password, string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
error_clear_last();
- if ($session_mode !== null) {
- $result = \oci_new_connect($username, $password, $connection_string, $character_set, $session_mode);
- } elseif ($character_set !== null) {
- $result = \oci_new_connect($username, $password, $connection_string, $character_set);
+ if ($session_mode !== OCI_DEFAULT) {
+ $result = \oci_new_connect($username, $password, $connection_string, $encoding, $session_mode);
+ } elseif ($encoding !== "") {
+ $result = \oci_new_connect($username, $password, $connection_string, $encoding);
} elseif ($connection_string !== null) {
$result = \oci_new_connect($username, $password, $connection_string);
} else {
@@ -1058,7 +936,7 @@ function oci_new_cursor($connection)
* @param int $type Valid values for type are:
* OCI_DTYPE_FILE, OCI_DTYPE_LOB and
* OCI_DTYPE_ROWID.
- * @return \OCI-Lob Returns a new LOB or FILE descriptor on success, FALSE on error.
+ * @return \OCI-Lob|false Returns a new LOB or FILE descriptor on success.
* @throws Oci8Exception
*
*/
@@ -1066,26 +944,7 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB)
{
error_clear_last();
$result = \oci_new_descriptor($connection, $type);
- if ($result === false) {
- throw Oci8Exception::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Gets the number of columns in the given statement.
- *
- * @param resource $statement A valid OCI statement identifier.
- * @return int Returns the number of columns as an integers.
- * @throws Oci8Exception
- *
- */
-function oci_num_fields($statement): int
-{
- error_clear_last();
- $result = \oci_num_fields($statement);
- if ($result === false) {
+ if ($result === null) {
throw Oci8Exception::createFromPhpError();
}
return $result;
@@ -1096,7 +955,7 @@ function oci_num_fields($statement): int
* Gets the number of rows affected during statement execution.
*
* @param resource $statement A valid OCI statement identifier.
- * @return int Returns the number of rows affected as an integers.
+ * @return int Returns the number of rows affected as an integer
* @throws Oci8Exception
*
*/
@@ -1112,7 +971,7 @@ function oci_num_rows($statement): int
/**
- * Prepares sql_text using
+ * Prepares sql using
* connection and returns the statement identifier,
* which can be used with oci_bind_by_name,
* oci_execute and other functions.
@@ -1123,7 +982,7 @@ function oci_num_rows($statement): int
*
* @param resource $connection An Oracle connection identifier, returned by
* oci_connect, oci_pconnect, or oci_new_connect.
- * @param string $sql_text The SQL or PL/SQL statement.
+ * @param string $sql The SQL or PL/SQL statement.
*
* SQL statements should not end with a
* semi-colon (";"). PL/SQL
@@ -1133,10 +992,10 @@ function oci_num_rows($statement): int
* @throws Oci8Exception
*
*/
-function oci_parse($connection, string $sql_text)
+function oci_parse($connection, string $sql)
{
error_clear_last();
- $result = \oci_parse($connection, $sql_text);
+ $result = \oci_parse($connection, $sql);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1147,11 +1006,12 @@ function oci_parse($connection, string $sql_text)
/**
* 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 FastCGI/CGI process). See the Persistent Database
- * Connections section for more information.
+ * 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.
@@ -1162,7 +1022,7 @@ function oci_parse($connection, string $sql_text)
* the tnsnames.ora file, or the name of a local
* Oracle instance.
*
- * If not specified, PHP uses
+ * 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
@@ -1175,19 +1035,19 @@ function oci_parse($connection, string $sql_text)
* [//]host_name[:port][/service_name]. From Oracle
* 11g, the syntax is:
* [//]host_name[:port][/service_name][:server_type][/instance_name].
- * Service names can be found by running the Oracle
- * utility lsnrctl status on the database server
+ * 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 $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 $character_set Determines
+ * 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
@@ -1232,13 +1092,13 @@ function oci_parse($connection, string $sql_text)
* @throws Oci8Exception
*
*/
-function oci_pconnect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null)
+function oci_pconnect(string $username, string $password, string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
error_clear_last();
- if ($session_mode !== null) {
- $result = \oci_pconnect($username, $password, $connection_string, $character_set, $session_mode);
- } elseif ($character_set !== null) {
- $result = \oci_pconnect($username, $password, $connection_string, $character_set);
+ if ($session_mode !== OCI_DEFAULT) {
+ $result = \oci_pconnect($username, $password, $connection_string, $encoding, $session_mode);
+ } elseif ($encoding !== "") {
+ $result = \oci_pconnect($username, $password, $connection_string, $encoding);
} elseif ($connection_string !== null) {
$result = \oci_pconnect($username, $password, $connection_string);
} else {
@@ -1252,7 +1112,45 @@ function oci_pconnect(string $username, string $password, string $connection_str
/**
- * Returns the data from field in the current row,
+ * 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.
+ * @throws Oci8Exception
+ *
+ */
+function oci_register_taf_callback($connection, callable $callback): void
+{
+ error_clear_last();
+ $result = \oci_register_taf_callback($connection, $callback);
+ if ($result === false) {
+ throw Oci8Exception::createFromPhpError();
+ }
+}
+
+
+/**
+ * Returns the data from column in the current row,
* fetched by oci_fetch.
*
* For details on the data type mapping performed by
@@ -1260,7 +1158,7 @@ function oci_pconnect(string $username, string $password, string $connection_str
* supported by the driver
*
* @param resource $statement
- * @param mixed $field Can be either use the column number (1-based) or the column name.
+ * @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.
@@ -1269,10 +1167,10 @@ function oci_pconnect(string $username, string $password, string $connection_str
* @throws Oci8Exception
*
*/
-function oci_result($statement, $field): string
+function oci_result($statement, $column): string
{
error_clear_last();
- $result = \oci_result($statement, $field);
+ $result = \oci_result($statement, $column);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1349,14 +1247,14 @@ function oci_server_version($connection): string
* @param resource $connection An Oracle connection identifier,
* returned by oci_connect, oci_pconnect,
* or oci_new_connect.
- * @param string $action_name User chosen string up to 32 bytes long.
+ * @param string $action User chosen string up to 32 bytes long.
* @throws Oci8Exception
*
*/
-function oci_set_action($connection, string $action_name): void
+function oci_set_action($connection, string $action): void
{
error_clear_last();
- $result = \oci_set_action($connection, $action_name);
+ $result = \oci_set_action($connection, $action);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1391,14 +1289,14 @@ function oci_set_action($connection, string $action_name): void
* @param resource $connection An Oracle connection identifier,
* returned by oci_connect, oci_pconnect,
* or oci_new_connect.
- * @param int $time_out The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take.
+ * @param int $timeout The maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take.
* @throws Oci8Exception
*
*/
-function oci_set_call_timeout($connection, int $time_out): void
+function oci_set_call_timeout($connection, int $timeout): void
{
error_clear_last();
- $result = \oci_set_call_timeout($connection, $time_out);
+ $result = \oci_set_call_timeout($connection, $timeout);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1426,14 +1324,14 @@ function oci_set_call_timeout($connection, int $time_out): void
* @param resource $connection An Oracle connection identifier,
* returned by oci_connect, oci_pconnect,
* or oci_new_connect.
- * @param string $client_identifier User chosen string up to 64 bytes long.
+ * @param string $client_id User chosen string up to 64 bytes long.
* @throws Oci8Exception
*
*/
-function oci_set_client_identifier($connection, string $client_identifier): void
+function oci_set_client_identifier($connection, string $client_id): void
{
error_clear_last();
- $result = \oci_set_client_identifier($connection, $client_identifier);
+ $result = \oci_set_client_identifier($connection, $client_id);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1485,14 +1383,14 @@ function oci_set_client_info($connection, string $client_info): void
* @param resource $connection An Oracle connection identifier,
* returned by oci_connect, oci_pconnect,
* or oci_new_connect.
- * @param string $dbop User chosen string.
+ * @param string $action User chosen string.
* @throws Oci8Exception
*
*/
-function oci_set_db_operation($connection, string $dbop): void
+function oci_set_db_operation($connection, string $action): void
{
error_clear_last();
- $result = \oci_set_db_operation($connection, $dbop);
+ $result = \oci_set_db_operation($connection, $action);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
@@ -1550,14 +1448,50 @@ function oci_set_edition(string $edition): void
* @param resource $connection An Oracle connection identifier,
* returned by oci_connect, oci_pconnect,
* or oci_new_connect.
- * @param string $module_name User chosen string up to 48 bytes long.
+ * @param string $name User chosen string up to 48 bytes long.
+ * @throws Oci8Exception
+ *
+ */
+function oci_set_module_name($connection, string $name): void
+{
+ error_clear_last();
+ $result = \oci_set_module_name($connection, $name);
+ if ($result === false) {
+ throw Oci8Exception::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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, &gt;= 0
* @throws Oci8Exception
*
*/
-function oci_set_module_name($connection, string $module_name): void
+function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void
{
error_clear_last();
- $result = \oci_set_module_name($connection, $module_name);
+ $result = \oci_set_prefetch_lob($statement, $prefetch_lob_size);
if ($result === false) {
throw Oci8Exception::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/opcache.php b/vendor/thecodingmachine/safe/generated/opcache.php
index 04a58205f..dcac85493 100644
--- a/vendor/thecodingmachine/safe/generated/opcache.php
+++ b/vendor/thecodingmachine/safe/generated/opcache.php
@@ -9,14 +9,14 @@ use Safe\Exceptions\OpcacheException;
* 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 $file The path to the PHP script to be compiled.
+ * @param string $filename The path to the PHP script to be compiled.
* @throws OpcacheException
*
*/
-function opcache_compile_file(string $file): void
+function opcache_compile_file(string $filename): void
{
error_clear_last();
- $result = \opcache_compile_file($file);
+ $result = \opcache_compile_file($filename);
if ($result === false) {
throw OpcacheException::createFromPhpError();
}
@@ -24,17 +24,18 @@ function opcache_compile_file(string $file): void
/**
- * This function returns state information about the cache instance
+ * This function returns state information about the in-memory cache instance. It will not return any
+ * information about the file cache.
*
- * @param bool $get_scripts Include script specific state information
+ * @param bool $include_scripts Include script specific state information
* @return array Returns an array of information, optionally containing script specific state information.
* @throws OpcacheException
*
*/
-function opcache_get_status(bool $get_scripts = true): array
+function opcache_get_status(bool $include_scripts = true): array
{
error_clear_last();
- $result = \opcache_get_status($get_scripts);
+ $result = \opcache_get_status($include_scripts);
if ($result === false) {
throw OpcacheException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/openssl.php b/vendor/thecodingmachine/safe/generated/openssl.php
index 117b53d6a..b201ebc6c 100644
--- a/vendor/thecodingmachine/safe/generated/openssl.php
+++ b/vendor/thecodingmachine/safe/generated/openssl.php
@@ -7,15 +7,15 @@ use Safe\Exceptions\OpensslException;
/**
* Gets the cipher initialization vector (iv) length.
*
- * @param string $method The cipher method, see openssl_get_cipher_methods for a list of potential values.
+ * @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.
* @throws OpensslException
*
*/
-function openssl_cipher_iv_length(string $method): int
+function openssl_cipher_iv_length(string $cipher_algo): int
{
error_clear_last();
- $result = \openssl_cipher_iv_length($method);
+ $result = \openssl_cipher_iv_length($cipher_algo);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -24,13 +24,157 @@ function openssl_cipher_iv_length(string $method): 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 $certificate The name of the file containing a certificate of the recipient.
+ * @param $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.
+ * @throws OpensslException
+ *
+ */
+function openssl_cms_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null, int $encoding = OPENSSL_ENCODING_SMIME): void
+{
+ error_clear_last();
+ if ($encoding !== OPENSSL_ENCODING_SMIME) {
+ $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key, $encoding);
+ } elseif ($private_key !== null) {
+ $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key);
+ } else {
+ $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate);
+ }
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 $certificate Recipients to encrypt to.
+ * @param $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.
+ * @throws OpensslException
+ *
+ */
+function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC): void
+{
+ error_clear_last();
+ $result = \openssl_cms_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $encoding, $cipher_algo);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Performs the exact analog to openssl_pkcs7_read.
+ *
+ * @param string $input_filename
+ * @param array $certificates
+ * @throws OpensslException
+ *
+ */
+function openssl_cms_read(string $input_filename, array &$certificates): void
+{
+ error_clear_last();
+ $result = \openssl_cms_read($input_filename, $certificates);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 $certificate The signing certificate.
+ * See Key/Certificate parameters for a list of valid values.
+ * @param $private_key The key associated with certificate.
+ * See Key/Certificate parameters for a list of valid values.
+ * @param $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 $untrusted_certificates_filename Intermediate certificates to be included in the signature.
+ * @throws OpensslException
+ *
+ */
+function openssl_cms_sign(string $input_filename, string $output_filename, $certificate, $private_key, $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, $untrusted_certificates_filename = null): void
+{
+ error_clear_last();
+ if ($untrusted_certificates_filename !== null) {
+ $result = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding, $untrusted_certificates_filename);
+ } else {
+ $result = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding);
+ }
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 $certificates A file with the signer certificate and optionally intermediate certificates.
+ * @param array $ca_info An array containing self-signed certificate authority certificates.
+ * @param $untrusted_certificates_filename A file containing additional intermediate certificates.
+ * @param $content A file pointing to the content when signatures are detached.
+ * @param $pk7
+ * @param $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.
+ * @throws OpensslException
+ *
+ */
+function openssl_cms_verify(string $input_filename, int $flags = 0, $certificates = null, array $ca_info = [], $untrusted_certificates_filename = null, $content = null, $pk7 = null, $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME): void
+{
+ error_clear_last();
+ if ($encoding !== OPENSSL_ENCODING_SMIME) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile, $encoding);
+ } elseif ($sigfile !== null) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile);
+ } elseif ($pk7 !== null) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7);
+ } elseif ($content !== null) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content);
+ } elseif ($untrusted_certificates_filename !== null) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename);
+ } elseif ($ca_info !== []) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info);
+ } elseif ($certificates !== null) {
+ $result = \openssl_cms_verify($input_filename, $flags, $certificates);
+ } else {
+ $result = \openssl_cms_verify($input_filename, $flags);
+ }
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
* openssl_csr_export_to_file takes the Certificate
* Signing Request represented by csr and saves it
- * in PEM format into the file named by outfilename.
+ * in PEM format into the file named by output_filename.
*
* @param string|resource $csr See CSR parameters for a list of valid values.
- * @param string $outfilename Path to the output file.
- * @param bool $notext
+ * @param string $output_filename Path to the output file.
+ * @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
@@ -38,10 +182,10 @@ function openssl_cipher_iv_length(string $method): int
* @throws OpensslException
*
*/
-function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = true): void
+function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text = true): void
{
error_clear_last();
- $result = \openssl_csr_export_to_file($csr, $outfilename, $notext);
+ $result = \openssl_csr_export_to_file($csr, $output_filename, $no_text);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -51,12 +195,12 @@ function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = tr
/**
* openssl_csr_export takes the Certificate Signing
* Request represented by csr and stores it in
- * PEM format in out, which is passed by
+ * PEM format in output, which is passed by
* reference.
*
* @param string|resource $csr See CSR parameters for a list of valid values.
- * @param string|null $out on success, this string will contain the PEM encoded CSR
- * @param bool $notext
+ * @param string|null $output on success, this string will contain the PEM encoded CSR
+ * @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
@@ -64,13 +208,34 @@ function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = tr
* @throws OpensslException
*
*/
-function openssl_csr_export($csr, ?string &$out, bool $notext = true): void
+function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void
+{
+ error_clear_last();
+ $result = \openssl_csr_export($csr, $output, $no_text);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * openssl_csr_get_public_key extracts the public key
+ * from csr and prepares it for use by other functions.
+ *
+ * @param string|resource $csr See CSR parameters for a list of valid values.
+ * @param bool $short_names This parameter is ignored
+ * @return resource Returns an OpenSSLAsymmetricKey on success.
+ * @throws OpensslException
+ *
+ */
+function openssl_csr_get_public_key($csr, bool $short_names = true)
{
error_clear_last();
- $result = \openssl_csr_export($csr, $out, $notext);
+ $result = \openssl_csr_get_public_key($csr, $short_names);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
+ return $result;
}
@@ -80,7 +245,7 @@ function openssl_csr_export($csr, ?string &$out, bool $notext = true): void
* including fields commonName (CN), organizationName (O), countryName (C) etc.
*
* @param string|resource $csr See CSR parameters for a list of valid values.
- * @param bool $use_shortnames shortnames controls how the data is indexed in the
+ * @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.
@@ -88,10 +253,10 @@ function openssl_csr_export($csr, ?string &$out, bool $notext = true): void
* @throws OpensslException
*
*/
-function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
+function openssl_csr_get_subject($csr, bool $short_names = true): array
{
error_clear_last();
- $result = \openssl_csr_get_subject($csr, $use_shortnames);
+ $result = \openssl_csr_get_subject($csr, $short_names);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -101,21 +266,21 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
/**
* openssl_csr_new generates a new CSR (Certificate Signing Request)
- * based on the information provided by dn.
+ * based on the information provided by distinguished_names.
*
- * @param array $dn The Distinguished Name or subject fields to be used in the certificate.
- * @param resource $privkey privkey should be set to a private key that was
+ * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate.
+ * @param resource $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 $configargs By default, the information in your system openssl.conf
+ * @param array $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
- * configargs. You can also specify an alternative
+ * 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 configargs
+ * The following keys, if present in options
* behave as their equivalents in the openssl.conf, as
* listed in the table below.
*
@@ -123,7 +288,7 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
*
*
*
- * configargs key
+ * options key
* type
* openssl.conf equivalent
* description
@@ -151,14 +316,14 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
*
*
* private_key_bits
- * integer
+ * int
* default_bits
* Specifies how many bits should be used to generate a private
* key
*
*
* private_key_type
- * integer
+ * int
* none
* Specifies the type of private key to create. This can be one
* of OPENSSL_KEYTYPE_DSA,
@@ -170,13 +335,13 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
*
*
* encrypt_key
- * boolean
+ * bool
* encrypt_key
* Should an exported key (with passphrase) be encrypted?
*
*
* encrypt_key_cipher
- * integer
+ * int
* none
*
* One of cipher constants.
@@ -201,23 +366,23 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array
*
*
*
- * @param array $extraattribs extraattribs is used to specify additional
- * configuration options for the CSR. Both dn and
- * extraattribs are associative arrays whose keys are
+ * @param array $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 resource Returns the CSR.
* @throws OpensslException
*
*/
-function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $extraattribs = null)
+function openssl_csr_new(array $distinguished_names, &$private_key, array $options = null, array $extra_attributes = null)
{
error_clear_last();
- if ($extraattribs !== null) {
- $result = \openssl_csr_new($dn, $privkey, $configargs, $extraattribs);
- } elseif ($configargs !== null) {
- $result = \openssl_csr_new($dn, $privkey, $configargs);
+ if ($extra_attributes !== null) {
+ $result = \openssl_csr_new($distinguished_names, $private_key, $options, $extra_attributes);
+ } elseif ($options !== null) {
+ $result = \openssl_csr_new($distinguished_names, $private_key, $options);
} else {
- $result = \openssl_csr_new($dn, $privkey);
+ $result = \openssl_csr_new($distinguished_names, $private_key);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -227,38 +392,37 @@ function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $
/**
- * openssl_csr_sign generates an x509 certificate
- * resource from the given CSR.
+ * openssl_csr_sign generates an x509 certificate from the given CSR.
*
* @param string|resource $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 mixed $cacert The generated certificate will be signed by cacert.
- * If cacert is NULL, the generated certificate
+ * @param string|resource|null $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 string|resource|array $priv_key priv_key is the private key that corresponds to
- * cacert.
+ * @param string|resource|array $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 $configargs You can finetune the CSR signing by configargs.
+ * @param array $options You can finetune the CSR signing by options.
* See openssl_csr_new for more information about
- * configargs.
+ * options.
* @param int $serial An optional the serial number of issued certificate. If not specified
* it will default to 0.
- * @return resource Returns an x509 certificate resource on success, FALSE on failure.
+ * @return resource Returns an OpenSSLCertificate on success, FALSE on failure.
* @throws OpensslException
*
*/
-function openssl_csr_sign($csr, $cacert, $priv_key, int $days, array $configargs = null, int $serial = 0)
+function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, array $options = null, int $serial = 0)
{
error_clear_last();
if ($serial !== 0) {
- $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days, $configargs, $serial);
- } elseif ($configargs !== null) {
- $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days, $configargs);
+ $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options, $serial);
+ } elseif ($options !== null) {
+ $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options);
} else {
- $result = \openssl_csr_sign($csr, $cacert, $priv_key, $days);
+ $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -271,23 +435,29 @@ function openssl_csr_sign($csr, $cacert, $priv_key, int $days, array $configargs
* 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 $method The cipher method. For a list of available cipher methods, use
+ * @param string $cipher_algo The cipher method. For a list of available cipher methods, use
* openssl_get_cipher_methods.
- * @param string $key The key.
+ * @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.
+ * @param string $aad Additional authenticated data.
* @return string The decrypted string on success.
* @throws OpensslException
*
*/
-function openssl_decrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string
+function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", string $tag = null, string $aad = ""): string
{
error_clear_last();
- $result = \openssl_decrypt($data, $method, $key, $options, $iv, $tag, $aad);
+ if ($aad !== "") {
+ $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag, $aad);
+ } elseif ($tag !== null) {
+ $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag);
+ } else {
+ $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv);
+ }
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -300,16 +470,16 @@ function openssl_decrypt(string $data, string $method, string $key, int $options
* often used as an encryption key to secretly communicate with a remote party.
* This is known as the Diffie-Hellman key exchange.
*
- * @param string $pub_key DH Public key of the remote party.
- * @param resource $dh_key A local DH private key, corresponding to the public key to be shared with the remote party.
+ * @param string $public_key DH Public key of the remote party.
+ * @param resource $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.
* @throws OpensslException
*
*/
-function openssl_dh_compute_key(string $pub_key, $dh_key): string
+function openssl_dh_compute_key(string $public_key, $private_key): string
{
error_clear_last();
- $result = \openssl_dh_compute_key($pub_key, $dh_key);
+ $result = \openssl_dh_compute_key($public_key, $private_key);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -322,17 +492,79 @@ function openssl_dh_compute_key(string $pub_key, $dh_key): string
* and returns a raw or binhex encoded string.
*
* @param string $data The data.
- * @param string $method The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods.
- * @param bool $raw_output Setting to TRUE will return as raw output data, otherwise the return
+ * @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.
* @throws OpensslException
*
*/
-function openssl_digest(string $data, string $method, bool $raw_output = false): string
+function openssl_digest(string $data, string $digest_algo, bool $binary = false): string
{
error_clear_last();
- $result = \openssl_digest($data, $method, $raw_output);
+ $result = \openssl_digest($data, $digest_algo, $binary);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 array An array of available curve names.
+ * @throws OpensslException
+ *
+ */
+function openssl_get_curve_names(): array
+{
+ error_clear_last();
+ $result = \openssl_get_curve_names();
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -342,31 +574,37 @@ function openssl_digest(string $data, string $method, bool $raw_output = false):
/**
* openssl_open opens (decrypts)
- * sealed_data using the private key associated with
- * the key identifier priv_key_id and the envelope key
- * env_key, and fills
- * open_data with the decrypted data.
+ * 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 $sealed_data
- * @param string|null $open_data If the call is successful the opened data is returned in this
+ * @param string $data
+ * @param string|null $output If the call is successful the opened data is returned in this
* parameter.
- * @param string $env_key
- * @param string|array|resource $priv_key_id
- * @param string $method The cipher method.
+ * @param string $encrypted_key
+ * @param string|array|resource $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 string $iv The initialization vector.
* @throws OpensslException
*
*/
-function openssl_open(string $sealed_data, ?string &$open_data, string $env_key, $priv_key_id, string $method = "RC4", string $iv = null): void
+function openssl_open(string $data, ?string &$output, string $encrypted_key, $private_key, string $cipher_algo, string $iv = null): void
{
error_clear_last();
if ($iv !== null) {
- $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method, $iv);
+ $result = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo, $iv);
} else {
- $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method);
+ $result = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -383,15 +621,15 @@ function openssl_open(string $sealed_data, ?string &$open_data, string $env_key,
* @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_algorithm Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1.
+ * @param string $digest_algo Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1.
* @return string Returns raw binary string.
* @throws OpensslException
*
*/
-function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algorithm = "sha1"): string
+function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string
{
error_clear_last();
- $result = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algorithm);
+ $result = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algo);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -401,15 +639,15 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it
/**
* openssl_pkcs12_export_to_file stores
- * x509 into a file named by
- * filename in a PKCS#12 file format.
+ * certificate into a file named by
+ * output_filename in a PKCS#12 file format.
*
- * @param string|resource $x509 See Key/Certificate parameters for a list of valid values.
- * @param string $filename Path to the output file.
- * @param string|array|resource $priv_key Private key component of PKCS#12 file.
+ * @param string|resource $certificate See Key/Certificate parameters for a list of valid values.
+ * @param string $output_filename Path to the output file.
+ * @param string|array|resource $private_key Private key component of PKCS#12 file.
* See Public/Private Key parameters for a list of valid values.
- * @param string $pass Encryption password for unlocking the PKCS#12 file.
- * @param array $args Optional array, other keys will be ignored.
+ * @param string $passphrase Encryption password for unlocking the PKCS#12 file.
+ * @param array $options Optional array, other keys will be ignored.
*
*
*
@@ -433,14 +671,10 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it
* @throws OpensslException
*
*/
-function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, string $pass, array $args = null): void
+function openssl_pkcs12_export_to_file($certificate, string $output_filename, $private_key, string $passphrase, array $options = []): void
{
error_clear_last();
- if ($args !== null) {
- $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass, $args);
- } else {
- $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass);
- }
+ $result = \openssl_pkcs12_export_to_file($certificate, $output_filename, $private_key, $passphrase, $options);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -449,15 +683,15 @@ function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, strin
/**
* openssl_pkcs12_export stores
- * x509 into a string named by
- * out in a PKCS#12 file format.
+ * certificate into a string named by
+ * output in a PKCS#12 file format.
*
- * @param string|resource $x509 See Key/Certificate parameters for a list of valid values.
- * @param string|null $out On success, this will hold the PKCS#12.
- * @param string|array|resource $priv_key Private key component of PKCS#12 file.
+ * @param string|resource $certificate See Key/Certificate parameters for a list of valid values.
+ * @param string|null $output On success, this will hold the PKCS#12.
+ * @param string|array|resource $private_key Private key component of PKCS#12 file.
* See Public/Private Key parameters for a list of valid values.
- * @param string $pass Encryption password for unlocking the PKCS#12 file.
- * @param array $args Optional array, other keys will be ignored.
+ * @param string $passphrase Encryption password for unlocking the PKCS#12 file.
+ * @param array $options Optional array, other keys will be ignored.
*
*
*
@@ -481,14 +715,10 @@ function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, strin
* @throws OpensslException
*
*/
-function openssl_pkcs12_export($x509, ?string &$out, $priv_key, string $pass, array $args = null): void
+function openssl_pkcs12_export($certificate, ?string &$output, $private_key, string $passphrase, array $options = []): void
{
error_clear_last();
- if ($args !== null) {
- $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass, $args);
- } else {
- $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass);
- }
+ $result = \openssl_pkcs12_export($certificate, $output, $private_key, $passphrase, $options);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -498,18 +728,18 @@ function openssl_pkcs12_export($x509, ?string &$out, $priv_key, string $pass, ar
/**
* openssl_pkcs12_read parses the PKCS#12 certificate store supplied by
* pkcs12 into a array named
- * certs.
+ * certificates.
*
* @param string $pkcs12 The certificate store contents, not its file name.
- * @param array|null $certs On success, this will hold the Certificate Store Data.
- * @param string $pass Encryption password for unlocking the PKCS#12 file.
+ * @param array|null $certificates On success, this will hold the Certificate Store Data.
+ * @param string $passphrase Encryption password for unlocking the PKCS#12 file.
* @throws OpensslException
*
*/
-function openssl_pkcs12_read(string $pkcs12, ?array &$certs, string $pass): void
+function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $passphrase): void
{
error_clear_last();
- $result = \openssl_pkcs12_read($pkcs12, $certs, $pass);
+ $result = \openssl_pkcs12_read($pkcs12, $certificates, $passphrase);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -518,25 +748,25 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certs, string $pass): void
/**
* Decrypts the S/MIME encrypted message contained in the file specified by
- * infilename using the certificate and its
- * associated private key specified by recipcert and
- * recipkey.
- *
- * @param string $infilename
- * @param string $outfilename The decrypted message is written to the file specified by
- * outfilename.
- * @param string|resource $recipcert
- * @param string|resource|array $recipkey
+ * 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|resource $certificate
+ * @param string|resource|array $private_key
* @throws OpensslException
*
*/
-function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipcert, $recipkey = null): void
+function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null): void
{
error_clear_last();
- if ($recipkey !== null) {
- $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert, $recipkey);
+ if ($private_key !== null) {
+ $result = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate, $private_key);
} else {
- $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert);
+ $result = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -546,13 +776,13 @@ function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipce
/**
* openssl_pkcs7_encrypt takes the contents of the
- * file named infile and encrypts them using an RC2
+ * 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 recipcerts.
+ * specified by certificate.
*
- * @param string $infile
- * @param string $outfile
- * @param string|resource|array $recipcerts Either a lone X.509 certificate, or an array of X.509 certificates.
+ * @param string $input_filename
+ * @param string $output_filename
+ * @param string|resource|array $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.
*
@@ -562,14 +792,14 @@ function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipce
* @param int $flags flags can be used to specify options that affect
* the encoding process - see PKCS7
* constants.
- * @param int $cipherid One of cipher constants.
+ * @param int $cipher_algo One of cipher constants.
* @throws OpensslException
*
*/
-function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, array $headers, int $flags = 0, int $cipherid = OPENSSL_CIPHER_RC2_40): void
+function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC): void
{
error_clear_last();
- $result = \openssl_pkcs7_encrypt($infile, $outfile, $recipcerts, $headers, $flags, $cipherid);
+ $result = \openssl_pkcs7_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $cipher_algo);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -579,15 +809,15 @@ function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, arr
/**
*
*
- * @param string $infilename
- * @param array|null $certs
+ * @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.
* @throws OpensslException
*
*/
-function openssl_pkcs7_read(string $infilename, ?array &$certs): void
+function openssl_pkcs7_read(string $data, ?array &$certificates): void
{
error_clear_last();
- $result = \openssl_pkcs7_read($infilename, $certs);
+ $result = \openssl_pkcs7_read($data, $certificates);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -596,35 +826,35 @@ function openssl_pkcs7_read(string $infilename, ?array &$certs): void
/**
* openssl_pkcs7_sign takes the contents of the file
- * named infilename and signs them using the
+ * named input_filename and signs them using the
* certificate and its matching private key specified by
- * signcert and privkey
+ * certificate and private_key
* parameters.
*
- * @param string $infilename The input file you are intending to digitally sign.
- * @param string $outfilename The file which the digital signature will be written to.
- * @param string|resource $signcert The X.509 certificate used to digitally sign infilename.
+ * @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 string|resource $certificate The X.509 certificate used to digitally sign input_filename.
* See Key/Certificate parameters for a list of valid values.
- * @param string|resource|array $privkey privkey is the private key corresponding to signcert.
+ * @param string|resource|array $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 string $extracerts extracerts specifies the name of a file containing
+ * @param 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.
* @throws OpensslException
*
*/
-function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert, $privkey, array $headers, int $flags = PKCS7_DETACHED, string $extracerts = null): void
+function openssl_pkcs7_sign(string $input_filename, string $output_filename, $certificate, $private_key, array $headers, int $flags = PKCS7_DETACHED, string $untrusted_certificates_filename = null): void
{
error_clear_last();
- if ($extracerts !== null) {
- $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags, $extracerts);
+ if ($untrusted_certificates_filename !== null) {
+ $result = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $untrusted_certificates_filename);
} else {
- $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags);
+ $result = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -633,30 +863,54 @@ function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert,
/**
+ * 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 resource $public_key public_key is the public key for the derivation.
+ * See Public/Private Key parameters for a list of valid values.
+ * @param resource $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.
+ * @throws OpensslException
+ *
+ */
+function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): string
+{
+ error_clear_last();
+ $result = \openssl_pkey_derive($public_key, $private_key, $key_length);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* openssl_pkey_export_to_file saves an ascii-armoured
* (PEM encoded) rendition of key into the file named
- * by outfilename.
+ * by output_filename.
*
* @param resource|string|array $key
- * @param string $outfilename Path to the output file.
- * @param string $passphrase The key can be optionally protected by a
+ * @param string $output_filename Path to the output file.
+ * @param string|null $passphrase The key can be optionally protected by a
* passphrase.
- * @param array $configargs configargs can be used to fine-tune the export
+ * @param array $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 configargs.
+ * information about options.
* @throws OpensslException
*
*/
-function openssl_pkey_export_to_file($key, string $outfilename, string $passphrase = null, array $configargs = null): void
+function openssl_pkey_export_to_file($key, string $output_filename, ?string $passphrase = null, array $options = null): void
{
error_clear_last();
- if ($configargs !== null) {
- $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase, $configargs);
+ if ($options !== null) {
+ $result = \openssl_pkey_export_to_file($key, $output_filename, $passphrase, $options);
} elseif ($passphrase !== null) {
- $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase);
+ $result = \openssl_pkey_export_to_file($key, $output_filename, $passphrase);
} else {
- $result = \openssl_pkey_export_to_file($key, $outfilename);
+ $result = \openssl_pkey_export_to_file($key, $output_filename);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -667,27 +921,27 @@ function openssl_pkey_export_to_file($key, string $outfilename, string $passphra
/**
* openssl_pkey_export exports
* key as a PEM encoded string and stores it into
- * out (which is passed by reference).
+ * output (which is passed by reference).
*
* @param resource $key
- * @param string|null $out
- * @param string $passphrase The key is optionally protected by passphrase.
- * @param array $configargs configargs can be used to fine-tune the export
+ * @param string|null $output
+ * @param string|null $passphrase The key is optionally protected by passphrase.
+ * @param array $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 configargs.
+ * information about options.
* @throws OpensslException
*
*/
-function openssl_pkey_export($key, ?string &$out, string $passphrase = null, array $configargs = null): void
+function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, array $options = null): void
{
error_clear_last();
- if ($configargs !== null) {
- $result = \openssl_pkey_export($key, $out, $passphrase, $configargs);
+ if ($options !== null) {
+ $result = \openssl_pkey_export($key, $output, $passphrase, $options);
} elseif ($passphrase !== null) {
- $result = \openssl_pkey_export($key, $out, $passphrase);
+ $result = \openssl_pkey_export($key, $output, $passphrase);
} else {
- $result = \openssl_pkey_export($key, $out);
+ $result = \openssl_pkey_export($key, $output);
}
if ($result === false) {
throw OpensslException::createFromPhpError();
@@ -697,9 +951,9 @@ function openssl_pkey_export($key, ?string &$out, string $passphrase = null, arr
/**
* openssl_pkey_get_private parses
- * key and prepares it for use by other functions.
+ * private_key and prepares it for use by other functions.
*
- * @param string $key key can be one of the following:
+ * @param 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
@@ -710,14 +964,18 @@ function openssl_pkey_export($key, ?string &$out, string $passphrase = null, arr
*
* @param string $passphrase The optional parameter passphrase must be used
* if the specified key is encrypted (protected by a passphrase).
- * @return resource Returns a positive key resource identifier on success.
+ * @return resource Returns an OpenSSLAsymmetricKey instance on success.
* @throws OpensslException
*
*/
-function openssl_pkey_get_private(string $key, string $passphrase = "")
+function openssl_pkey_get_private(string $private_key, string $passphrase = null)
{
error_clear_last();
- $result = \openssl_pkey_get_private($key, $passphrase);
+ if ($passphrase !== null) {
+ $result = \openssl_pkey_get_private($private_key, $passphrase);
+ } else {
+ $result = \openssl_pkey_get_private($private_key);
+ }
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -727,12 +985,12 @@ function openssl_pkey_get_private(string $key, string $passphrase = "")
/**
* openssl_pkey_get_public extracts the public key from
- * certificate and prepares it for use by other
+ * public_key and prepares it for use by other
* functions.
*
- * @param resource|string $certificate certificate can be one of the following:
+ * @param resource|string $public_key public_key can be one of the following:
*
- * an X.509 certificate resource
+ * 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).
@@ -740,14 +998,14 @@ function openssl_pkey_get_private(string $key, string $passphrase = "")
*
* A PEM formatted public key.
*
- * @return resource Returns a positive key resource identifier on success.
+ * @return resource Returns an OpenSSLAsymmetricKey instance on success.
* @throws OpensslException
*
*/
-function openssl_pkey_get_public($certificate)
+function openssl_pkey_get_public($public_key)
{
error_clear_last();
- $result = \openssl_pkey_get_public($certificate);
+ $result = \openssl_pkey_get_public($public_key);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -756,23 +1014,23 @@ function openssl_pkey_get_public($certificate)
/**
- * openssl_pkey_new generates a new private and public
- * key pair. The public component of the key can be obtained using
- * openssl_pkey_get_public.
+ * 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 $configargs You can finetune the key generation (such as specifying the number of
- * bits) using configargs. See
+ * @param array $options You can finetune the key generation (such as specifying the number of
+ * bits) using options. See
* openssl_csr_new for more information about
- * configargs.
- * @return resource Returns a resource identifier for the pkey on success.
+ * options.
+ * @return resource Returns an OpenSSLAsymmetricKey instance for the pkey on success.
* @throws OpensslException
*
*/
-function openssl_pkey_new(array $configargs = null)
+function openssl_pkey_new(array $options = null)
{
error_clear_last();
- if ($configargs !== null) {
- $result = \openssl_pkey_new($configargs);
+ if ($options !== null) {
+ $result = \openssl_pkey_new($options);
} else {
$result = \openssl_pkey_new();
}
@@ -787,13 +1045,13 @@ function openssl_pkey_new(array $configargs = null)
* openssl_private_decrypt decrypts
* data that was previously encrypted via
* openssl_public_encrypt and stores the result into
- * decrypted.
+ * 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 string|null $decrypted
- * @param string|resource|array $key key must be the private key corresponding that
+ * @param string|null $decrypted_data
+ * @param string|resource|array $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,
@@ -803,10 +1061,10 @@ function openssl_pkey_new(array $configargs = null)
* @throws OpensslException
*
*/
-function openssl_private_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
+function openssl_private_decrypt(string $data, ?string &$decrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
error_clear_last();
- $result = \openssl_private_decrypt($data, $decrypted, $key, $padding);
+ $result = \openssl_private_decrypt($data, $decrypted_data, $private_key, $padding);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -815,26 +1073,26 @@ function openssl_private_decrypt(string $data, ?string &$decrypted, $key, int $p
/**
* openssl_private_encrypt encrypts data
- * with private key and stores the result into
- * crypted. Encrypted data can be decrypted via
+ * 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 string|null $crypted
- * @param string|resource|array $key
+ * @param string|null $encrypted_data
+ * @param string|resource|array $private_key
* @param int $padding padding can be one of
* OPENSSL_PKCS1_PADDING,
* OPENSSL_NO_PADDING.
* @throws OpensslException
*
*/
-function openssl_private_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
+function openssl_private_encrypt(string $data, ?string &$encrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
error_clear_last();
- $result = \openssl_private_encrypt($data, $crypted, $key, $padding);
+ $result = \openssl_private_encrypt($data, $encrypted_data, $private_key, $padding);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -845,14 +1103,14 @@ function openssl_private_encrypt(string $data, ?string &$crypted, $key, int $pad
* openssl_public_decrypt decrypts
* data that was previous encrypted via
* openssl_private_encrypt and stores the result into
- * decrypted.
+ * 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 string|null $decrypted
- * @param string|resource $key key must be the public key corresponding that
+ * @param string|null $decrypted_data
+ * @param string|resource $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,
@@ -860,10 +1118,10 @@ function openssl_private_encrypt(string $data, ?string &$crypted, $key, int $pad
* @throws OpensslException
*
*/
-function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
+function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
error_clear_last();
- $result = \openssl_public_decrypt($data, $decrypted, $key, $padding);
+ $result = \openssl_public_decrypt($data, $decrypted_data, $public_key, $padding);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -872,8 +1130,8 @@ function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $pa
/**
* openssl_public_encrypt encrypts data
- * with public key and stores the result into
- * crypted. Encrypted data can be decrypted via
+ * 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
@@ -881,8 +1139,8 @@ function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $pa
* in database.
*
* @param string $data
- * @param string|null $crypted This will hold the result of the encryption.
- * @param string|resource $key The public key.
+ * @param string|null $encrypted_data This will hold the result of the encryption.
+ * @param string|resource $public_key The public key.
* @param int $padding padding can be one of
* OPENSSL_PKCS1_PADDING,
* OPENSSL_SSLV23_PADDING,
@@ -891,10 +1149,10 @@ function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $pa
* @throws OpensslException
*
*/
-function openssl_public_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
+function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
error_clear_last();
- $result = \openssl_public_encrypt($data, $crypted, $key, $padding);
+ $result = \openssl_public_encrypt($data, $encrypted_data, $public_key, $padding);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -906,22 +1164,22 @@ function openssl_public_encrypt(string $data, ?string &$crypted, $key, int $padd
* 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 crypto_strong
+ * 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 $crypto_strong If passed into the function, this will hold a boolean value that determines
+ * @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.
* @throws OpensslException
*
*/
-function openssl_random_pseudo_bytes(int $length, ?bool &$crypto_strong = null): string
+function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string
{
error_clear_last();
- $result = \openssl_random_pseudo_bytes($length, $crypto_strong);
+ $result = \openssl_random_pseudo_bytes($length, $strong_result);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -931,32 +1189,38 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$crypto_strong = null):
/**
* openssl_seal seals (encrypts)
- * data by using the given method with a randomly generated
+ * 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 pub_key_ids
+ * associated with the identifiers in public_key
* and each encrypted key is returned
- * in env_keys. This means that one can send
+ * 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 string|null $sealed_data The sealed data.
- * @param array $env_keys Array of encrypted keys.
- * @param array $pub_key_ids Array of public key resource identifiers.
- * @param string $method The cipher method.
- * @param string $iv The initialization vector.
+ * @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 string|null $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
- * env_keys.
+ * encrypted_keys.
* @throws OpensslException
*
*/
-function openssl_seal(string $data, ?string &$sealed_data, array &$env_keys, array $pub_key_ids, string $method = "RC4", string &$iv = null): int
+function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_keys, array $public_key, string $cipher_algo, ?string &$iv = null): int
{
error_clear_last();
- $result = \openssl_seal($data, $sealed_data, $env_keys, $pub_key_ids, $method, $iv);
+ $result = \openssl_seal($data, $sealed_data, $encrypted_keys, $public_key, $cipher_algo, $iv);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -968,39 +1232,151 @@ function openssl_seal(string $data, ?string &$sealed_data, array &$env_keys, arr
* openssl_sign computes a signature for the
* specified data by generating a cryptographic
* digital signature using the private key associated with
- * priv_key_id. Note that the data itself is
+ * private_key. Note that the data itself is
* not encrypted.
*
* @param string $data The string of data you wish to sign
* @param string|null $signature If the call was successful the signature is returned in
* signature.
- * @param resource|string $priv_key_id resource - a key, returned by openssl_get_privatekey
+ * @param resource|string $private_key OpenSSLAsymmetricKey - a key, returned by openssl_get_privatekey
*
* string - a PEM formatted key
- * @param int|string $signature_alg int - one of these Signature Algorithms.
+ * @param int|string $algorithm int - one of these Signature Algorithms.
*
* string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384".
* @throws OpensslException
*
*/
-function openssl_sign(string $data, ?string &$signature, $priv_key_id, $signature_alg = OPENSSL_ALGO_SHA1): void
+function openssl_sign(string $data, ?string &$signature, $private_key, $algorithm = OPENSSL_ALGO_SHA1): void
+{
+ error_clear_last();
+ $result = \openssl_sign($data, $signature, $private_key, $algorithm);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Exports challenge from encoded signed public key and challenge
+ *
+ * @param string $spki Expects a valid signed public key and challenge
+ * @return string|null Returns the associated challenge string.
+ * @throws OpensslException
+ *
+ */
+function openssl_spki_export_challenge(string $spki): ?string
+{
+ error_clear_last();
+ $result = \openssl_spki_export_challenge($spki);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Exports PEM formatted public key from encoded signed public key and challenge
+ *
+ * @param string $spki Expects a valid signed public key and challenge
+ * @return string|null Returns the associated PEM formatted public key.
+ * @throws OpensslException
+ *
+ */
+function openssl_spki_export(string $spki): ?string
+{
+ error_clear_last();
+ $result = \openssl_spki_export($spki);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Generates a signed public key and challenge using specified hashing algorithm
+ *
+ * @param resource $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 string|null Returns a signed public key and challenge string.
+ * @throws OpensslException
+ *
+ */
+function openssl_spki_new($private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5): ?string
+{
+ error_clear_last();
+ $result = \openssl_spki_new($private_key, $challenge, $digest_algo);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Validates the supplied signed public key and challenge
+ *
+ * @param string $spki Expects a valid signed public key and challenge
+ * @throws OpensslException
+ *
+ */
+function openssl_spki_verify(string $spki): void
+{
+ error_clear_last();
+ $result = \openssl_spki_verify($spki);
+ if ($result === false) {
+ throw OpensslException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 resource|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 int Returns 1 if the signature is correct, 0 if it is incorrect, and
+ * -1.
+ * @throws OpensslException
+ *
+ */
+function openssl_verify(string $data, string $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1): int
{
error_clear_last();
- $result = \openssl_sign($data, $signature, $priv_key_id, $signature_alg);
+ $result = \openssl_verify($data, $signature, $public_key, $algorithm);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
+ return $result;
}
/**
* openssl_x509_export_to_file stores
- * x509 into a file named by
- * outfilename in a PEM encoded format.
+ * certificate into a file named by
+ * output_filename in a PEM encoded format.
*
- * @param string|resource $x509 See Key/Certificate parameters for a list of valid values.
- * @param string $outfilename Path to the output file.
- * @param bool $notext
+ * @param string|resource $certificate See Key/Certificate parameters for a list of valid values.
+ * @param string $output_filename Path to the output file.
+ * @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
@@ -1008,10 +1384,10 @@ function openssl_sign(string $data, ?string &$signature, $priv_key_id, $signatur
* @throws OpensslException
*
*/
-function openssl_x509_export_to_file($x509, string $outfilename, bool $notext = true): void
+function openssl_x509_export_to_file($certificate, string $output_filename, bool $no_text = true): void
{
error_clear_last();
- $result = \openssl_x509_export_to_file($x509, $outfilename, $notext);
+ $result = \openssl_x509_export_to_file($certificate, $output_filename, $no_text);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -1020,12 +1396,12 @@ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext =
/**
* openssl_x509_export stores
- * x509 into a string named by
+ * certificate into a string named by
* output in a PEM encoded format.
*
- * @param string|resource $x509 See Key/Certificate parameters for a list of valid values.
+ * @param string|resource $certificate See Key/Certificate parameters for a list of valid values.
* @param string|null $output On success, this will hold the PEM.
- * @param bool $notext
+ * @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
@@ -1033,10 +1409,10 @@ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext =
* @throws OpensslException
*
*/
-function openssl_x509_export($x509, ?string &$output, bool $notext = true): void
+function openssl_x509_export($certificate, ?string &$output, bool $no_text = true): void
{
error_clear_last();
- $result = \openssl_x509_export($x509, $output, $notext);
+ $result = \openssl_x509_export($certificate, $output, $no_text);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -1045,21 +1421,21 @@ function openssl_x509_export($x509, ?string &$output, bool $notext = true): void
/**
* openssl_x509_fingerprint returns the digest of
- * x509 as a string.
+ * certificate as a string.
*
- * @param string|resource $x509 See Key/Certificate parameters for a list of valid values.
- * @param string $hash_algorithm The digest method or hash algorithm to use, e.g. "sha256", one of openssl_get_md_methods.
- * @param bool $raw_output 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 raw_output is set to TRUE in which case the raw binary representation of the message digest is returned.
+ * @param string|resource $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.
* @throws OpensslException
*
*/
-function openssl_x509_fingerprint($x509, string $hash_algorithm = "sha1", bool $raw_output = false): string
+function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bool $binary = false): string
{
error_clear_last();
- $result = \openssl_x509_fingerprint($x509, $hash_algorithm, $raw_output);
+ $result = \openssl_x509_fingerprint($certificate, $digest_algo, $binary);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
@@ -1069,18 +1445,18 @@ function openssl_x509_fingerprint($x509, string $hash_algorithm = "sha1", bool $
/**
* openssl_x509_read parses the certificate supplied by
- * x509certdata and returns a resource identifier for
+ * certificate and returns an OpenSSLCertificate object for
* it.
*
- * @param string|resource $x509certdata X509 certificate. See Key/Certificate parameters for a list of valid values.
- * @return resource Returns a resource identifier on success.
+ * @param string|resource $certificate X509 certificate. See Key/Certificate parameters for a list of valid values.
+ * @return resource Returns an OpenSSLCertificate on success.
* @throws OpensslException
*
*/
-function openssl_x509_read($x509certdata)
+function openssl_x509_read($certificate)
{
error_clear_last();
- $result = \openssl_x509_read($x509certdata);
+ $result = \openssl_x509_read($certificate);
if ($result === false) {
throw OpensslException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/outcontrol.php b/vendor/thecodingmachine/safe/generated/outcontrol.php
index fce7c6dd8..e52c4a081 100644
--- a/vendor/thecodingmachine/safe/generated/outcontrol.php
+++ b/vendor/thecodingmachine/safe/generated/outcontrol.php
@@ -5,6 +5,29 @@ namespace Safe;
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
+ *
+ */
+function ob_clean(): void
+{
+ error_clear_last();
+ $result = \ob_clean();
+ if ($result === false) {
+ throw OutcontrolException::createFromPhpError();
+ }
+}
+
+
+/**
* 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
@@ -56,6 +79,134 @@ 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
+ *
+ */
+function ob_flush(): void
+{
+ error_clear_last();
+ $result = \ob_flush();
+ if ($result === false) {
+ throw OutcontrolException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 string|array|callable|null $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
+ * @param int $flags
+ * @throws OutcontrolException
+ *
+ */
+function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): void
+{
+ error_clear_last();
+ if ($flags !== PHP_OUTPUT_HANDLER_STDFLAGS) {
+ $result = \ob_start($callback, $chunk_size, $flags);
+ } elseif ($chunk_size !== 0) {
+ $result = \ob_start($callback, $chunk_size);
+ } elseif ($callback !== null) {
+ $result = \ob_start($callback);
+ } else {
+ $result = \ob_start();
+ }
+ if ($result === false) {
+ throw OutcontrolException::createFromPhpError();
+ }
+}
+
+
+/**
* 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
diff --git a/vendor/thecodingmachine/safe/generated/pcntl.php b/vendor/thecodingmachine/safe/generated/pcntl.php
index 1cb721e22..66cc28d46 100644
--- a/vendor/thecodingmachine/safe/generated/pcntl.php
+++ b/vendor/thecodingmachine/safe/generated/pcntl.php
@@ -5,58 +5,26 @@ namespace Safe;
use Safe\Exceptions\PcntlException;
/**
- * Executes the program with the given arguments.
- *
- * @param string $path path must be the path to a binary executable or a
- * script with a valid path pointing to an executable in the shebang (
- * #!/usr/local/bin/perl for example) as the first line. See your system's
- * man execve(2) page for additional information.
- * @param array $args args is an array of argument strings passed to the
- * program.
- * @param array $envs envs is an array of strings which are passed as
- * environment to the program. The array is in the format of name =&gt; value,
- * the key being the name of the environmental variable and the value being
- * the value of that variable.
- * @throws PcntlException
- *
- */
-function pcntl_exec(string $path, array $args = null, array $envs = null): void
-{
- error_clear_last();
- if ($envs !== null) {
- $result = \pcntl_exec($path, $args, $envs);
- } elseif ($args !== null) {
- $result = \pcntl_exec($path, $args);
- } else {
- $result = \pcntl_exec($path);
- }
- if ($result === false) {
- throw PcntlException::createFromPhpError();
- }
-}
-
-
-/**
* pcntl_getpriority gets the priority of
- * pid. Because priority levels can differ between
+ * 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 $pid If not specified, the pid of the current process is used.
- * @param int $process_identifier One of PRIO_PGRP, PRIO_USER
+ * @param int $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.
* @throws PcntlException
*
*/
-function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCESS): int
+function pcntl_getpriority(int $process_id = null, int $mode = PRIO_PROCESS): int
{
error_clear_last();
- if ($process_identifier !== PRIO_PROCESS) {
- $result = \pcntl_getpriority($pid, $process_identifier);
- } elseif ($pid !== null) {
- $result = \pcntl_getpriority($pid);
+ if ($mode !== PRIO_PROCESS) {
+ $result = \pcntl_getpriority($process_id, $mode);
+ } elseif ($process_id !== null) {
+ $result = \pcntl_getpriority($process_id);
} else {
$result = \pcntl_getpriority();
}
@@ -69,7 +37,7 @@ function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCE
/**
* pcntl_setpriority sets the priority of
- * pid.
+ * process_id.
*
* @param int $priority priority is generally a value in the range
* -20 to 20. The default priority
@@ -77,19 +45,19 @@ function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCE
* 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 $pid If not specified, the pid of the current process is used.
- * @param int $process_identifier One of PRIO_PGRP, PRIO_USER
+ * @param int $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.
* @throws PcntlException
*
*/
-function pcntl_setpriority(int $priority, int $pid = null, int $process_identifier = PRIO_PROCESS): void
+function pcntl_setpriority(int $priority, int $process_id = null, int $mode = PRIO_PROCESS): void
{
error_clear_last();
- if ($process_identifier !== PRIO_PROCESS) {
- $result = \pcntl_setpriority($priority, $pid, $process_identifier);
- } elseif ($pid !== null) {
- $result = \pcntl_setpriority($priority, $pid);
+ if ($mode !== PRIO_PROCESS) {
+ $result = \pcntl_setpriority($priority, $process_id, $mode);
+ } elseif ($process_id !== null) {
+ $result = \pcntl_setpriority($priority, $process_id);
} else {
$result = \pcntl_setpriority($priority);
}
@@ -118,10 +86,65 @@ 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
+ * @throws PcntlException
+ *
+ */
+function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): void
+{
+ error_clear_last();
+ $result = \pcntl_signal($signal, $handler, $restart_syscalls);
+ if ($result === false) {
+ throw PcntlException::createFromPhpError();
+ }
+}
+
+
+/**
* The pcntl_sigprocmask function adds, removes or sets blocked
- * signals, depending on the how parameter.
+ * signals, depending on the mode parameter.
*
- * @param int $how Sets the behavior of pcntl_sigprocmask. Possible
+ * @param int $mode Sets the behavior of pcntl_sigprocmask. Possible
* values:
*
* SIG_BLOCK: Add the signals to the
@@ -131,16 +154,16 @@ function pcntl_signal_dispatch(): void
* SIG_SETMASK: Replace the currently
* blocked signals by the given list of signals.
*
- * @param array $set List of signals.
- * @param array|null $oldset The oldset parameter is set to an array
+ * @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.
* @throws PcntlException
*
*/
-function pcntl_sigprocmask(int $how, array $set, ?array &$oldset = null): void
+function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = null): void
{
error_clear_last();
- $result = \pcntl_sigprocmask($how, $set, $oldset);
+ $result = \pcntl_sigprocmask($mode, $signals, $old_signals);
if ($result === false) {
throw PcntlException::createFromPhpError();
}
@@ -148,17 +171,81 @@ function pcntl_sigprocmask(int $how, array $set, ?array &$oldset = null): void
/**
+ * 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.
+ * @throws PcntlException
+ *
+ */
+function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0, int $nanoseconds = 0): int
+{
+ error_clear_last();
+ $result = \pcntl_sigtimedwait($signals, $info, $seconds, $nanoseconds);
+ if ($result === false) {
+ throw PcntlException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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
*
- * @param int $errno
- * @return string Returns error description on success.
+ * @return int Returns a signal number on success.
* @throws PcntlException
*
*/
-function pcntl_strerror(int $errno): string
+function pcntl_sigwaitinfo(array $signals, ?array &$info = []): int
{
error_clear_last();
- $result = \pcntl_strerror($errno);
+ $result = \pcntl_sigwaitinfo($signals, $info);
if ($result === false) {
throw PcntlException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/pcre.php b/vendor/thecodingmachine/safe/generated/pcre.php
index c40f14cc2..4ebb9839e 100644
--- a/vendor/thecodingmachine/safe/generated/pcre.php
+++ b/vendor/thecodingmachine/safe/generated/pcre.php
@@ -5,6 +5,32 @@ namespace Safe;
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.
+ * @throws PcreException
+ *
+ */
+function preg_grep(string $pattern, array $array, int $flags = 0): array
+{
+ error_clear_last();
+ $result = \preg_grep($pattern, $array, $flags);
+ if ($result === false) {
+ throw PcreException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Searches subject for all matches to the regular
* expression given in pattern and puts them in
* matches in the order specified by
@@ -15,7 +41,7 @@ use Safe\Exceptions\PcreException;
*
* @param string $pattern The pattern to search for, as a string.
* @param string $subject The input string.
- * @param array $matches Array of all matches in multi-dimensional array ordered according to
+ * @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
@@ -343,11 +369,11 @@ use Safe\Exceptions\PcreException;
*
*
* The above example will output:
- * @return int Returns the number of full pattern matches (which might be zero).
+ * @return int|null Returns the number of full pattern matches (which might be zero).
* @throws PcreException
*
*/
-function preg_match_all(string $pattern, string $subject, array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int
+function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int
{
error_clear_last();
$result = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
@@ -364,7 +390,7 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null
*
* @param string $pattern The pattern to search for, as a string.
* @param string $subject The input string.
- * @param array $matches If matches is provided, then it is filled with
+ * @param string[]|null $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
@@ -584,7 +610,7 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null
* @throws PcreException
*
*/
-function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
+function preg_match(string $pattern, string $subject, ?iterable &$matches = null, int $flags = 0, int $offset = 0): int
{
error_clear_last();
$result = \preg_match($pattern, $subject, $matches, $flags, $offset);
diff --git a/vendor/thecodingmachine/safe/generated/pdf.php b/vendor/thecodingmachine/safe/generated/pdf.php
deleted file mode 100644
index d039b27a9..000000000
--- a/vendor/thecodingmachine/safe/generated/pdf.php
+++ /dev/null
@@ -1,1553 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\PdfException;
-
-/**
- * Activates a previously created structure element or other content item.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param int $id
- * @throws PdfException
- *
- */
-function PDF_activate_item($pdfdoc, int $id): void
-{
- error_clear_last();
- $result = \PDF_activate_item($pdfdoc, $id);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Add a link annotation to a target within the current PDF file.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_create_action with type=GoTo
- * and PDF_create_annotation with
- * type=Link instead.
- *
- * @param resource $pdfdoc
- * @param float $lowerleftx
- * @param float $lowerlefty
- * @param float $upperrightx
- * @param float $upperrighty
- * @param int $page
- * @param string $dest
- * @throws PdfException
- *
- */
-function PDF_add_locallink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, int $page, string $dest): void
-{
- error_clear_last();
- $result = \PDF_add_locallink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Creates a named destination on an arbitrary page in the current document.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param string $name
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_add_nameddest($pdfdoc, string $name, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_add_nameddest($pdfdoc, $name, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets an annotation for the current page. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_create_annotation with
- * type=Text instead.
- *
- * @param resource $pdfdoc
- * @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 PdfException
- *
- */
-function PDF_add_note($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void
-{
- error_clear_last();
- $result = \PDF_add_note($pdfdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Add a file link annotation to a PDF target.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_create_action with
- * type=GoToR and
- * PDF_create_annotation with
- * type=Link instead.
- *
- * @param resource $pdfdoc
- * @param float $bottom_left_x
- * @param float $bottom_left_y
- * @param float $up_right_x
- * @param float $up_right_y
- * @param string $filename
- * @param int $page
- * @param string $dest
- * @throws PdfException
- *
- */
-function PDF_add_pdflink($pdfdoc, float $bottom_left_x, float $bottom_left_y, float $up_right_x, float $up_right_y, string $filename, int $page, string $dest): void
-{
- error_clear_last();
- $result = \PDF_add_pdflink($pdfdoc, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds an existing image as thumbnail for the current page.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param int $image
- * @throws PdfException
- *
- */
-function PDF_add_thumbnail($pdfdoc, int $image): void
-{
- error_clear_last();
- $result = \PDF_add_thumbnail($pdfdoc, $image);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds a weblink annotation to a target url on the Web.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_create_action with type=URI
- * and PDF_create_annotation with
- * type=Link instead.
- *
- * @param resource $pdfdoc
- * @param float $lowerleftx
- * @param float $lowerlefty
- * @param float $upperrightx
- * @param float $upperrighty
- * @param string $url
- * @throws PdfException
- *
- */
-function PDF_add_weblink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, string $url): void
-{
- error_clear_last();
- $result = \PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds a file attachment annotation. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_create_annotation with
- * type=FileAttachment instead.
- *
- * @param resource $pdfdoc
- * @param float $llx
- * @param float $lly
- * @param float $urx
- * @param float $ury
- * @param string $filename
- * @param string $description
- * @param string $author
- * @param string $mimetype
- * @param string $icon
- * @throws PdfException
- *
- */
-function PDF_attach_file($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $filename, string $description, string $author, string $mimetype, string $icon): void
-{
- error_clear_last();
- $result = \PDF_attach_file($pdfdoc, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Starts a layer for subsequent output on the page. Returns TRUE on success.
- *
- * This function requires PDF 1.5.
- *
- * @param resource $pdfdoc
- * @param int $layer
- * @throws PdfException
- *
- */
-function PDF_begin_layer($pdfdoc, int $layer): void
-{
- error_clear_last();
- $result = \PDF_begin_layer($pdfdoc, $layer);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds a new page to the document, and specifies various options.
- * The parameters width and height
- * are the dimensions of the new page in points. Returns TRUE on success.
- *
- *
- * Common Page Sizes in Points
- *
- *
- *
- * name
- * size
- *
- *
- *
- *
- * A0
- * 2380 x 3368
- *
- *
- * A1
- * 1684 x 2380
- *
- *
- * A2
- * 1190 x 1684
- *
- *
- * A3
- * 842 x 1190
- *
- *
- * A4
- * 595 x 842
- *
- *
- * A5
- * 421 x 595
- *
- *
- * A6
- * 297 x 421
- *
- *
- * B5
- * 501 x 709
- *
- *
- * letter (8.5" x 11")
- * 612 x 792
- *
- *
- * legal (8.5" x 14")
- * 612 x 1008
- *
- *
- * ledger (17" x 11")
- * 1224 x 792
- *
- *
- * 11" x 17"
- * 792 x 1224
- *
- *
- *
- *
- *
- * @param resource $pdfdoc
- * @param float $width
- * @param float $height
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_begin_page_ext($pdfdoc, float $width, float $height, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_begin_page_ext($pdfdoc, $width, $height, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds a new page to the document. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_begin_page_ext instead.
- *
- * @param resource $pdfdoc
- * @param float $width
- * @param float $height
- * @throws PdfException
- *
- */
-function PDF_begin_page($pdfdoc, float $width, float $height): void
-{
- error_clear_last();
- $result = \PDF_begin_page($pdfdoc, $width, $height);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Adds a circle. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param float $x
- * @param float $y
- * @param float $r
- * @throws PdfException
- *
- */
-function PDF_circle($pdfdoc, float $x, float $y, float $r): void
-{
- error_clear_last();
- $result = \PDF_circle($pdfdoc, $x, $y, $r);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Uses the current path as clipping path, and terminate the path. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_clip($p): void
-{
- error_clear_last();
- $result = \PDF_clip($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the page handle, and frees all page-related resources. Returns TRUE on success.
- *
- * @param resource $p
- * @param int $page
- * @throws PdfException
- *
- */
-function PDF_close_pdi_page($p, int $page): void
-{
- error_clear_last();
- $result = \PDF_close_pdi_page($p, $page);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes all open page handles, and closes the input PDF document. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 7,
- * use PDF_close_pdi_document instead.
- *
- * @param resource $p
- * @param int $doc
- * @throws PdfException
- *
- */
-function PDF_close_pdi($p, int $doc): void
-{
- error_clear_last();
- $result = \PDF_close_pdi($p, $doc);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the generated PDF file, and frees all document-related resources.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_end_document instead.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_close($p): void
-{
- error_clear_last();
- $result = \PDF_close($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the path, fills, and strokes it. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_closepath_fill_stroke($p): void
-{
- error_clear_last();
- $result = \PDF_closepath_fill_stroke($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the path, and strokes it. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_closepath_stroke($p): void
-{
- error_clear_last();
- $result = \PDF_closepath_stroke($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the current path. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_closepath($p): void
-{
- error_clear_last();
- $result = \PDF_closepath($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Concatenates a matrix to the current transformation matrix (CTM). Returns TRUE on success.
- *
- * @param resource $p
- * @param float $a
- * @param float $b
- * @param float $c
- * @param float $d
- * @param float $e
- * @param float $f
- * @throws PdfException
- *
- */
-function PDF_concat($p, float $a, float $b, float $c, float $d, float $e, float $f): void
-{
- error_clear_last();
- $result = \PDF_concat($p, $a, $b, $c, $d, $e, $f);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Prints text at the next line. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $text
- * @throws PdfException
- *
- */
-function PDF_continue_text($p, string $text): void
-{
- error_clear_last();
- $result = \PDF_continue_text($p, $text);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Draws a Bezier curve from the current point, using 3 more control points.
- * Returns TRUE on success.
- *
- * @param resource $p
- * @param float $x1
- * @param float $y1
- * @param float $x2
- * @param float $y2
- * @param float $x3
- * @param float $y3
- * @throws PdfException
- *
- */
-function PDF_curveto($p, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void
-{
- error_clear_last();
- $result = \PDF_curveto($p, $x1, $y1, $x2, $y2, $x3, $y3);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Deletes a PDFlib object, and frees all internal resources. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @throws PdfException
- *
- */
-function PDF_delete($pdfdoc): void
-{
- error_clear_last();
- $result = \PDF_delete($pdfdoc);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Deactivates all active layers. Returns TRUE on success.
- *
- * This function requires PDF 1.5.
- *
- * @param resource $pdfdoc
- * @throws PdfException
- *
- */
-function PDF_end_layer($pdfdoc): void
-{
- error_clear_last();
- $result = \PDF_end_layer($pdfdoc);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Finishes a page, and applies various options. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_end_page_ext($pdfdoc, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_end_page_ext($pdfdoc, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Finishes the page. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_end_page($p): void
-{
- error_clear_last();
- $result = \PDF_end_page($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Finishes the pattern definition. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_end_pattern($p): void
-{
- error_clear_last();
- $result = \PDF_end_pattern($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Finishes a template definition. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_end_template($p): void
-{
- error_clear_last();
- $result = \PDF_end_template($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Fills and strokes the current path with the current fill and stroke color.
- * Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_fill_stroke($p): void
-{
- error_clear_last();
- $result = \PDF_fill_stroke($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Fills the interior of the current path with the current fill color.
- * Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_fill($p): void
-{
- error_clear_last();
- $result = \PDF_fill($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Places an image or template on the page, subject to various options.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param int $image
- * @param float $x
- * @param float $y
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_fit_image($pdfdoc, int $image, float $x, float $y, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_fit_image($pdfdoc, $image, $x, $y, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Places an imported PDF page on the page, subject to various options.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param int $page
- * @param float $x
- * @param float $y
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_fit_pdi_page($pdfdoc, int $page, float $x, float $y, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_fit_pdi_page($pdfdoc, $page, $x, $y, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Places a single line of text on the page, subject to various options. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param string $text
- * @param float $x
- * @param float $y
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_fit_textline($pdfdoc, string $text, float $x, float $y, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_fit_textline($pdfdoc, $text, $x, $y, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Reset all color and graphics state parameters to their defaults.
- * Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_initgraphics($p): void
-{
- error_clear_last();
- $result = \PDF_initgraphics($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Draws a line from the current point to another point. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $x
- * @param float $y
- * @throws PdfException
- *
- */
-function PDF_lineto($p, float $x, float $y): void
-{
- error_clear_last();
- $result = \PDF_lineto($p, $x, $y);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Finds a built-in spot color name, or makes a named spot color from the
- * current fill color. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $spotname
- * @return int
- * @throws PdfException
- *
- */
-function PDF_makespotcolor($p, string $spotname): int
-{
- error_clear_last();
- $result = \PDF_makespotcolor($p, $spotname);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Sets the current point for graphics output. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $x
- * @param float $y
- * @throws PdfException
- *
- */
-function PDF_moveto($p, float $x, float $y): void
-{
- error_clear_last();
- $result = \PDF_moveto($p, $x, $y);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Creates a new PDF file using the supplied file name.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * PDF_begin_document instead.
- *
- * @param resource $p
- * @param string $filename
- * @throws PdfException
- *
- */
-function PDF_open_file($p, string $filename): void
-{
- error_clear_last();
- $result = \PDF_open_file($p, $filename);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Places an image and scales it. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 5, use
- * PDF_fit_image instead.
- *
- * @param resource $pdfdoc
- * @param int $image
- * @param float $x
- * @param float $y
- * @param float $scale
- * @throws PdfException
- *
- */
-function PDF_place_image($pdfdoc, int $image, float $x, float $y, float $scale): void
-{
- error_clear_last();
- $result = \PDF_place_image($pdfdoc, $image, $x, $y, $scale);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Places a PDF page and scales it. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 5, use
- * PDF_fit_pdi_page instead.
- *
- * @param resource $pdfdoc
- * @param int $page
- * @param float $x
- * @param float $y
- * @param float $sx
- * @param float $sy
- * @throws PdfException
- *
- */
-function PDF_place_pdi_page($pdfdoc, int $page, float $x, float $y, float $sx, float $sy): void
-{
- error_clear_last();
- $result = \PDF_place_pdi_page($pdfdoc, $page, $x, $y, $sx, $sy);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Draws a rectangle. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $x
- * @param float $y
- * @param float $width
- * @param float $height
- * @throws PdfException
- *
- */
-function PDF_rect($p, float $x, float $y, float $width, float $height): void
-{
- error_clear_last();
- $result = \PDF_rect($p, $x, $y, $width, $height);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Restores the most recently saved graphics state. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_restore($p): void
-{
- error_clear_last();
- $result = \PDF_restore($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Rotates the coordinate system. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $phi
- * @throws PdfException
- *
- */
-function PDF_rotate($p, float $phi): void
-{
- error_clear_last();
- $result = \PDF_rotate($p, $phi);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Saves the current graphics state. Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_save($p): void
-{
- error_clear_last();
- $result = \PDF_save($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Scales the coordinate system. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $sx
- * @param float $sy
- * @throws PdfException
- *
- */
-function PDF_scale($p, float $sx, float $sy): void
-{
- error_clear_last();
- $result = \PDF_scale($p, $sx, $sy);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the border color for all kinds of annotations. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * the option annotcolor in
- * PDF_create_annotation instead.
- *
- * @param resource $p
- * @param float $red
- * @param float $green
- * @param float $blue
- * @throws PdfException
- *
- */
-function PDF_set_border_color($p, float $red, float $green, float $blue): void
-{
- error_clear_last();
- $result = \PDF_set_border_color($p, $red, $green, $blue);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the border dash style for all kinds of annotations. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * the option dasharray in
- * PDF_create_annotation instead.
- *
- * @param resource $pdfdoc
- * @param float $black
- * @param float $white
- * @throws PdfException
- *
- */
-function PDF_set_border_dash($pdfdoc, float $black, float $white): void
-{
- error_clear_last();
- $result = \PDF_set_border_dash($pdfdoc, $black, $white);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the border style for all kinds of annotations. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 6, use
- * the options borderstyle and
- * linewidth in
- * PDF_create_annotation instead.
- *
- * @param resource $pdfdoc
- * @param string $style
- * @param float $width
- * @throws PdfException
- *
- */
-function PDF_set_border_style($pdfdoc, string $style, float $width): void
-{
- error_clear_last();
- $result = \PDF_set_border_style($pdfdoc, $style, $width);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Fill document information field key with
- * value. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $key
- * @param string $value
- * @throws PdfException
- *
- */
-function PDF_set_info($p, string $key, string $value): void
-{
- error_clear_last();
- $result = \PDF_set_info($p, $key, $value);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Defines hierarchical and group relationships among layers. Returns TRUE on success.
- *
- * This function requires PDF 1.5.
- *
- * @param resource $pdfdoc
- * @param string $type
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_set_layer_dependency($pdfdoc, string $type, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_set_layer_dependency($pdfdoc, $type, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets some PDFlib parameter with string type. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $key
- * @param string $value
- * @throws PdfException
- *
- */
-function PDF_set_parameter($p, string $key, string $value): void
-{
- error_clear_last();
- $result = \PDF_set_parameter($p, $key, $value);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the position for text output on the page. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $x
- * @param float $y
- * @throws PdfException
- *
- */
-function PDF_set_text_pos($p, float $x, float $y): void
-{
- error_clear_last();
- $result = \PDF_set_text_pos($p, $x, $y);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the value of some PDFlib parameter with numerical type. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $key
- * @param float $value
- * @throws PdfException
- *
- */
-function PDF_set_value($p, string $key, float $value): void
-{
- error_clear_last();
- $result = \PDF_set_value($p, $key, $value);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current color space and color. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $fstype
- * @param string $colorspace
- * @param float $c1
- * @param float $c2
- * @param float $c3
- * @param float $c4
- * @throws PdfException
- *
- */
-function PDF_setcolor($p, string $fstype, string $colorspace, float $c1, float $c2, float $c3, float $c4): void
-{
- error_clear_last();
- $result = \PDF_setcolor($p, $fstype, $colorspace, $c1, $c2, $c3, $c4);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current dash pattern to b black
- * and w white units. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param float $b
- * @param float $w
- * @throws PdfException
- *
- */
-function PDF_setdash($pdfdoc, float $b, float $w): void
-{
- error_clear_last();
- $result = \PDF_setdash($pdfdoc, $b, $w);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets a dash pattern defined by an option list. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param string $optlist
- * @throws PdfException
- *
- */
-function PDF_setdashpattern($pdfdoc, string $optlist): void
-{
- error_clear_last();
- $result = \PDF_setdashpattern($pdfdoc, $optlist);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the flatness parameter. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param float $flatness
- * @throws PdfException
- *
- */
-function PDF_setflat($pdfdoc, float $flatness): void
-{
- error_clear_last();
- $result = \PDF_setflat($pdfdoc, $flatness);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current font in the specified fontsize, using a
- * font handle returned by PDF_load_font.
- * Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param int $font
- * @param float $fontsize
- * @throws PdfException
- *
- */
-function PDF_setfont($pdfdoc, int $font, float $fontsize): void
-{
- error_clear_last();
- $result = \PDF_setfont($pdfdoc, $font, $fontsize);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current fill color to a gray value between 0 and 1 inclusive.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $g
- * @throws PdfException
- *
- */
-function PDF_setgray_fill($p, float $g): void
-{
- error_clear_last();
- $result = \PDF_setgray_fill($p, $g);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current stroke color to a gray value between 0 and 1 inclusive.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $g
- * @throws PdfException
- *
- */
-function PDF_setgray_stroke($p, float $g): void
-{
- error_clear_last();
- $result = \PDF_setgray_stroke($p, $g);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current fill and stroke color to a gray value between 0 and 1 inclusive. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $g
- * @throws PdfException
- *
- */
-function PDF_setgray($p, float $g): void
-{
- error_clear_last();
- $result = \PDF_setgray($p, $g);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the linejoin parameter to specify the shape
- * at the corners of paths that are stroked. Returns TRUE on success.
- *
- * @param resource $p
- * @param int $value
- * @throws PdfException
- *
- */
-function PDF_setlinejoin($p, int $value): void
-{
- error_clear_last();
- $result = \PDF_setlinejoin($p, $value);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current line width. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $width
- * @throws PdfException
- *
- */
-function PDF_setlinewidth($p, float $width): void
-{
- error_clear_last();
- $result = \PDF_setlinewidth($p, $width);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Explicitly sets the current transformation matrix. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $a
- * @param float $b
- * @param float $c
- * @param float $d
- * @param float $e
- * @param float $f
- * @throws PdfException
- *
- */
-function PDF_setmatrix($p, float $a, float $b, float $c, float $d, float $e, float $f): void
-{
- error_clear_last();
- $result = \PDF_setmatrix($p, $a, $b, $c, $d, $e, $f);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the miter limit.Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param float $miter
- * @throws PdfException
- *
- */
-function PDF_setmiterlimit($pdfdoc, float $miter): void
-{
- error_clear_last();
- $result = \PDF_setmiterlimit($pdfdoc, $miter);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current fill color to the supplied RGB values. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $red
- * @param float $green
- * @param float $blue
- * @throws PdfException
- *
- */
-function PDF_setrgbcolor_fill($p, float $red, float $green, float $blue): void
-{
- error_clear_last();
- $result = \PDF_setrgbcolor_fill($p, $red, $green, $blue);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current stroke color to the supplied RGB values. Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $red
- * @param float $green
- * @param float $blue
- * @throws PdfException
- *
- */
-function PDF_setrgbcolor_stroke($p, float $red, float $green, float $blue): void
-{
- error_clear_last();
- $result = \PDF_setrgbcolor_stroke($p, $red, $green, $blue);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets the current fill and stroke color to the supplied RGB values.
- * Returns TRUE on success.
- *
- * This function is deprecated since PDFlib version 4, use
- * PDF_setcolor instead.
- *
- * @param resource $p
- * @param float $red
- * @param float $green
- * @param float $blue
- * @throws PdfException
- *
- */
-function PDF_setrgbcolor($p, float $red, float $green, float $blue): void
-{
- error_clear_last();
- $result = \PDF_setrgbcolor($p, $red, $green, $blue);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Prints text in the current font. Returns TRUE on success.
- *
- * @param resource $p
- * @param string $text
- * @param float $x
- * @param float $y
- * @throws PdfException
- *
- */
-function PDF_show_xy($p, string $text, float $x, float $y): void
-{
- error_clear_last();
- $result = \PDF_show_xy($p, $text, $x, $y);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Prints text in the current font and size at
- * the current position. Returns TRUE on success.
- *
- * @param resource $pdfdoc
- * @param string $text
- * @throws PdfException
- *
- */
-function PDF_show($pdfdoc, string $text): void
-{
- error_clear_last();
- $result = \PDF_show($pdfdoc, $text);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Skews the coordinate system in x and y direction by alpha
- * and beta degrees, respectively. Returns TRUE on success.
- *
- * @param resource $p
- * @param float $alpha
- * @param float $beta
- * @throws PdfException
- *
- */
-function PDF_skew($p, float $alpha, float $beta): void
-{
- error_clear_last();
- $result = \PDF_skew($p, $alpha, $beta);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
-
-
-/**
- * Strokes the path with the current color and line width, and clear it.
- * Returns TRUE on success.
- *
- * @param resource $p
- * @throws PdfException
- *
- */
-function PDF_stroke($p): void
-{
- error_clear_last();
- $result = \PDF_stroke($p);
- if ($result === false) {
- throw PdfException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/generated/pgsql.php b/vendor/thecodingmachine/safe/generated/pgsql.php
index 007faacbb..14b5548de 100644
--- a/vendor/thecodingmachine/safe/generated/pgsql.php
+++ b/vendor/thecodingmachine/safe/generated/pgsql.php
@@ -10,7 +10,7 @@ use Safe\Exceptions\PgsqlException;
* or pg_send_execute. You cannot cancel a query executed using
* pg_query.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @throws PgsqlException
*
*/
@@ -25,65 +25,6 @@ function pg_cancel_query($connection): void
/**
- * PostgreSQL supports automatic character set conversion between
- * server and client for certain character sets.
- * pg_client_encoding returns the client
- * encoding as a string. The returned string will be one of the
- * standard PostgreSQL encoding identifiers.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return string The client encoding.
- * @throws PgsqlException
- *
- */
-function pg_client_encoding($connection = null): string
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_client_encoding($connection);
- } else {
- $result = \pg_client_encoding();
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_close closes the non-persistent
- * connection to a PostgreSQL database associated with the given
- * connection resource.
- *
- * If there is open large object resource on the connection, do not
- * close the connection before closing all large object resources.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @throws PgsqlException
- *
- */
-function pg_close($connection = null): void
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_close($connection);
- } else {
- $result = \pg_close();
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
* pg_connect opens a connection to a
* PostgreSQL database specified by the
* connection_string.
@@ -92,7 +33,7 @@ function pg_close($connection = null): void
* the same connection_string as an existing connection, the
* existing connection will be returned unless you pass
* PGSQL_CONNECT_FORCE_NEW as
- * connect_type.
+ * flags.
*
* The old syntax with multiple parameters
* $conn = pg_connect("host", "port", "options", "tty", "dbname")
@@ -118,7 +59,7 @@ function pg_close($connection = null): void
*
* The options parameter can be used to set command line parameters
* to be invoked by the server.
- * @param int $connect_type If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection
+ * @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.
*
@@ -126,18 +67,14 @@ function pg_close($connection = null): void
* connection is established asynchronously. The state of the connection
* can then be checked via pg_connect_poll or
* pg_connection_status.
- * @return resource PostgreSQL connection resource on success, FALSE on failure.
+ * @return resource Returns an PgSql\Connection instance on success.
* @throws PgsqlException
*
*/
-function pg_connect(string $connection_string, int $connect_type = null)
+function pg_connect(string $connection_string, int $flags = 0)
{
error_clear_last();
- if ($connect_type !== null) {
- $result = \pg_connect($connection_string, $connect_type);
- } else {
- $result = \pg_connect($connection_string);
- }
+ $result = \pg_connect($connection_string, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -149,7 +86,7 @@ function pg_connect(string $connection_string, int $connect_type = null)
* pg_connection_reset resets the connection.
* It is useful for error recovery.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @throws PgsqlException
*
*/
@@ -165,29 +102,29 @@ function pg_connection_reset($connection): void
/**
* pg_convert checks and converts the values in
- * assoc_array into suitable values for use in an SQL
+ * 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 assoc_array has elements. The
+ * as many columns as values has elements. The
* fieldnames in table_name must match the indices in
- * assoc_array and the corresponding datatypes must be
+ * values and the corresponding datatypes must be
* compatible. Returns an array with the converted values on success, FALSE
* otherwise.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @param string $table_name Name of the table against which to convert types.
- * @param array $assoc_array Data to be converted.
- * @param int $options Any number of PGSQL_CONV_IGNORE_DEFAULT,
+ * @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.
* @throws PgsqlException
*
*/
-function pg_convert($connection, string $table_name, array $assoc_array, int $options = 0): array
+function pg_convert($connection, string $table_name, array $values, int $flags = 0): array
{
error_clear_last();
- $result = \pg_convert($connection, $table_name, $assoc_array, $options);
+ $result = \pg_convert($connection, $table_name, $values, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -200,29 +137,23 @@ function pg_convert($connection, string $table_name, array $assoc_array, int $op
* rows. It issues a COPY FROM SQL command
* internally to insert records.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $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 $delimiter The token that separates values for each field in each element of
- * rows. Default is TAB.
+ * @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").
+ * rows. Default is \\N ("\\\\N").
* @throws PgsqlException
*
*/
-function pg_copy_from($connection, string $table_name, array $rows, string $delimiter = null, string $null_as = null): void
+function pg_copy_from($connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): void
{
error_clear_last();
- if ($null_as !== null) {
- $result = \pg_copy_from($connection, $table_name, $rows, $delimiter, $null_as);
- } elseif ($delimiter !== null) {
- $result = \pg_copy_from($connection, $table_name, $rows, $delimiter);
- } else {
- $result = \pg_copy_from($connection, $table_name, $rows);
- }
+ $result = \pg_copy_from($connection, $table_name, $rows, $separator, $null_as);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -234,56 +165,20 @@ function pg_copy_from($connection, string $table_name, array $rows, string $deli
* issues COPY TO SQL command internally to
* retrieve records.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @param string $table_name Name of the table from which to copy the data into rows.
- * @param string $delimiter The token that separates values for each field in each element of
- * rows. Default is TAB.
+ * @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").
+ * rows. Default is \\N ("\\\\N").
* @return array An array with one element for each line of COPY data.
- * It returns FALSE on failure.
* @throws PgsqlException
*
*/
-function pg_copy_to($connection, string $table_name, string $delimiter = null, string $null_as = null): array
+function pg_copy_to($connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array
{
error_clear_last();
- if ($null_as !== null) {
- $result = \pg_copy_to($connection, $table_name, $delimiter, $null_as);
- } elseif ($delimiter !== null) {
- $result = \pg_copy_to($connection, $table_name, $delimiter);
- } else {
- $result = \pg_copy_to($connection, $table_name);
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_dbname returns the name of the database
- * that the given PostgreSQL connection
- * resource.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return string A string containing the name of the database the
- * connection is to.
- * @throws PgsqlException
- *
- */
-function pg_dbname($connection = null): string
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_dbname($connection);
- } else {
- $result = \pg_dbname();
- }
+ $result = \pg_copy_to($connection, $table_name, $separator, $null_as);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -293,46 +188,43 @@ function pg_dbname($connection = null): string
/**
* pg_delete deletes records from a table
- * specified by the keys and values
- * in assoc_array. If options
- * is specified, pg_convert is applied
- * to assoc_array with the specified options.
+ * specified by the keys and values in conditions.
*
- * If options is specified,
+ * If flags is specified,
* pg_convert is applied to
- * assoc_array with the specified flags.
+ * conditions with the specified flags.
*
- * By default pg_delete 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.
+ * 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 resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @param string $table_name Name of the table from which to delete rows.
- * @param array $assoc_array An array whose keys are field names in the table table_name,
+ * @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 $options Any number of PGSQL_CONV_FORCE_NULL,
+ * @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
- * options then query string is returned. When PGSQL_DML_NO_CONV
+ * 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 options.
+ * via flags.
* @throws PgsqlException
*
*/
-function pg_delete($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC)
+function pg_delete($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC)
{
error_clear_last();
- $result = \pg_delete($connection, $table_name, $assoc_array, $options);
+ $result = \pg_delete($connection, $table_name, $conditions, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -348,10 +240,11 @@ function pg_delete($connection, string $table_name, array $assoc_array, int $opt
* must be issued, otherwise the PostgreSQL server may get out of
* sync with the frontend and will report an error.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
* @throws PgsqlException
*
*/
@@ -385,10 +278,11 @@ function pg_end_copy($connection = null): void
* The parameters are identical to pg_query_params, except that the name of a
* prepared statement is given instead of a query string.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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,
@@ -399,7 +293,7 @@ function pg_end_copy($connection = null): void
* must match the number of placeholders.
*
* Elements are converted to strings by calling this function.
- * @return resource A query result resource on success.
+ * @return resource An PgSql\Result instance on success.
* @throws PgsqlException
*
*/
@@ -423,73 +317,23 @@ function pg_execute($connection = null, string $stmtname = null, array $params =
/**
- * pg_field_name returns the name of the field
- * occupying the given field_number in the
- * given PostgreSQL result resource. Field
- * numbering starts from 0.
- *
- * @param resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
- * @param int $field_number Field number, starting from 0.
- * @return string The field name.
- * @throws PgsqlException
- *
- */
-function pg_field_name($result, int $field_number): string
-{
- error_clear_last();
- $result = \pg_field_name($result, $field_number);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* pg_field_table returns the name of the table that field
* belongs to, or the table's oid if oid_only is TRUE.
*
- * @param resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
- * @param int $field_number Field number, starting from 0.
+ * @param resource $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. Or, FALSE on failure.
- * @throws PgsqlException
- *
- */
-function pg_field_table($result, int $field_number, bool $oid_only = false)
-{
- error_clear_last();
- $result = \pg_field_table($result, $field_number, $oid_only);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_field_type returns a string containing the
- * base type name of the given field_number in the
- * given PostgreSQL result resource.
- *
- * @param resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
- * @param int $field_number Field number, starting from 0.
- * @return string A string containing the base name of the field's type.
+ * @return mixed On success either the fields table name or oid.
* @throws PgsqlException
*
*/
-function pg_field_type($result, int $field_number): string
+function pg_field_table($result, int $field, bool $oid_only = false)
{
error_clear_last();
- $result = \pg_field_type($result, $field_number);
+ $result = \pg_field_table($result, $field, $oid_only);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -501,7 +345,7 @@ function pg_field_type($result, int $field_number): string
* pg_flush flushes any outbound query data waiting to be
* sent on the connection.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $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.
@@ -521,15 +365,14 @@ function pg_flush($connection)
/**
* pg_free_result frees the memory and data associated with the
- * specified PostgreSQL query result resource.
+ * 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 resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
+ * @param resource $result An PgSql\Result instance, returned by pg_query,
+ * pg_query_params or pg_execute(among others).
* @throws PgsqlException
*
*/
@@ -545,13 +388,14 @@ function pg_free_result($result): void
/**
* pg_host returns the host name of the given
- * PostgreSQL connection resource is
+ * PostgreSQL connection instance is
* connected to.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
* @throws PgsqlException
@@ -565,7 +409,7 @@ function pg_host($connection = null): string
} else {
$result = \pg_host();
}
- if ($result === false) {
+ if ($result === '') {
throw PgsqlException::createFromPhpError();
}
return $result;
@@ -574,124 +418,45 @@ function pg_host($connection = null): string
/**
* pg_insert inserts the values
- * of assoc_array into the table specified
- * by table_name. If options
- * is specified, pg_convert is applied
- * to assoc_array with the specified options.
+ * of values into the table specified
+ * by table_name.
*
- * If options is specified,
+ * If flags is specified,
* pg_convert is applied to
- * assoc_array with the specified flags.
+ * values with the specified flags.
*
- * By default pg_insert 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.
+ * 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 resource $connection PostgreSQL database connection resource.
+ * @param resource $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 assoc_array has elements.
- * @param array $assoc_array An array whose keys are field names in the table table_name,
+ * 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 $options Any number of PGSQL_CONV_OPTS,
+ * @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
- * options then query string is returned. When PGSQL_DML_NO_CONV
+ * 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 the connection resource on success. Returns string if PGSQL_DML_STRING is passed
- * via options.
- * @throws PgsqlException
- *
- */
-function pg_insert($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC)
-{
- error_clear_last();
- $result = \pg_insert($connection, $table_name, $assoc_array, $options);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_last_error returns the last error message
- * for a given connection.
- *
- * Error messages may be overwritten by internal PostgreSQL (libpq)
- * function calls. It may not return an appropriate error message if
- * multiple errors occur inside a PostgreSQL module function.
- *
- * Use pg_result_error, pg_result_error_field,
- * pg_result_status and
- * pg_connection_status for better error handling.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return string A string containing the last error message on the
- * given connection.
+ * @return mixed Returns TRUE on success.. Or returns a string on success if PGSQL_DML_STRING is passed
+ * via flags.
* @throws PgsqlException
*
*/
-function pg_last_error($connection = null): string
+function pg_insert($connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC)
{
error_clear_last();
- if ($connection !== null) {
- $result = \pg_last_error($connection);
- } else {
- $result = \pg_last_error();
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_last_notice returns the last notice
- * message from the PostgreSQL server on the specified
- * connection. The PostgreSQL server sends notice
- * messages in several cases, for instance when creating a SERIAL
- * column in a table.
- *
- * With pg_last_notice, you can avoid issuing useless
- * queries by checking whether or not the notice is related to your transaction.
- *
- * Notice message tracking can be set to optional by setting 1 for
- * pgsql.ignore_notice in php.ini.
- *
- * Notice message logging can be set to optional by setting 0 for
- * pgsql.log_notice in php.ini.
- * Unless pgsql.ignore_notice is set
- * to 0, notice message cannot be logged.
- *
- * @param resource $connection PostgreSQL database connection resource.
- * @param int $option One of PGSQL_NOTICE_LAST (to return last notice),
- * PGSQL_NOTICE_ALL (to return all notices),
- * or PGSQL_NOTICE_CLEAR (to clear notices).
- * @return string A string containing the last notice on the
- * given connection with
- * PGSQL_NOTICE_LAST,
- * an array with PGSQL_NOTICE_ALL,
- * a boolean with PGSQL_NOTICE_CLEAR.
- * @throws PgsqlException
- *
- */
-function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST): string
-{
- error_clear_last();
- $result = \pg_last_notice($connection, $option);
+ $result = \pg_insert($connection, $table_name, $values, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -719,10 +484,9 @@ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST): string
* the value of the most recently used sequence in the session. This avoids
* the need for naming the sequence, table or column altogether.
*
- * @param resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
- * @return string A string containing the OID assigned to the most recently inserted
+ * @param resource $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.
* @throws PgsqlException
@@ -740,21 +504,19 @@ function pg_last_oid($result): string
/**
- * pg_lo_close closes a large
- * object. large_object is a resource for the
- * large object from pg_lo_open.
+ * pg_lo_close closes a large object.
*
* To use the large object interface, it is necessary to
* enclose it within a transaction block.
*
- * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
+ * @param resource $lob An PgSql\Lob instance, returned by pg_lo_open.
* @throws PgsqlException
*
*/
-function pg_lo_close($large_object): void
+function pg_lo_close($lob): void
{
error_clear_last();
- $result = \pg_lo_close($large_object);
+ $result = \pg_lo_close($lob);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -769,10 +531,11 @@ function pg_lo_close($large_object): void
* To use the large object interface, it is necessary to
* enclose it within a transaction block.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
@@ -805,16 +568,17 @@ function pg_lo_export($connection = null, int $oid = null, string $pathname = nu
* To use the large object interface, it is necessary to
* enclose it within a transaction block.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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 mixed $object_id If an object_id is given the function
+ * @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
- * was added in PHP 5.3 and relies on functionality that first
+ * relies on functionality that first
* appeared in PostgreSQL 8.1.
* @return int The OID of the newly created large object.
* @throws PgsqlException
@@ -841,19 +605,20 @@ function pg_lo_import($connection = null, string $pathname = null, $object_id =
/**
* pg_lo_open opens a large object in the database
- * and returns large object resource so that it can be manipulated.
+ * 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 resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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 resource A large object resource.
+ * @return resource An PgSql\Lob instance.
* @throws PgsqlException
*
*/
@@ -869,49 +634,24 @@ function pg_lo_open($connection, int $oid, string $mode)
/**
- * pg_lo_read_all reads a large object and passes
- * it straight through to the browser after sending all pending
- * headers. Mainly intended for sending binary data like images or
- * sound.
- *
- * To use the large object interface, it is necessary to
- * enclose it within a transaction block.
- *
- * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
- * @return int Number of bytes read.
- * @throws PgsqlException
- *
- */
-function pg_lo_read_all($large_object): int
-{
- error_clear_last();
- $result = \pg_lo_read_all($large_object);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* pg_lo_read reads at most
- * len bytes from a large object and
+ * 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 resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
- * @param int $len An optional maximum number of bytes to return.
- * @return string A string containing len bytes from the
+ * @param resource $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.
* @throws PgsqlException
*
*/
-function pg_lo_read($large_object, int $len = 8192): string
+function pg_lo_read($lob, int $length = 8192): string
{
error_clear_last();
- $result = \pg_lo_read($large_object, $len);
+ $result = \pg_lo_read($lob, $length);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -920,13 +660,12 @@ function pg_lo_read($large_object, int $len = 8192): string
/**
- * pg_lo_seek seeks a position within a large object
- * resource.
+ * 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 resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
+ * @param resource $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)
@@ -934,10 +673,10 @@ function pg_lo_read($large_object, int $len = 8192): string
* @throws PgsqlException
*
*/
-function pg_lo_seek($large_object, int $offset, int $whence = PGSQL_SEEK_CUR): void
+function pg_lo_seek($lob, int $offset, int $whence = SEEK_CUR): void
{
error_clear_last();
- $result = \pg_lo_seek($large_object, $offset, $whence);
+ $result = \pg_lo_seek($lob, $offset, $whence);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -945,21 +684,20 @@ function pg_lo_seek($large_object, int $offset, int $whence = PGSQL_SEEK_CUR): v
/**
- * pg_lo_truncate truncates a large object
- * resource.
+ * 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 resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
+ * @param resource $lob An PgSql\Lob instance, returned by pg_lo_open.
* @param int $size The number of bytes to truncate.
* @throws PgsqlException
*
*/
-function pg_lo_truncate($large_object, int $size): void
+function pg_lo_truncate($lob, int $size): void
{
error_clear_last();
- $result = \pg_lo_truncate($large_object, $size);
+ $result = \pg_lo_truncate($lob, $size);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -973,10 +711,11 @@ function pg_lo_truncate($large_object, int $size): void
* To use the large object interface, it is necessary to
* enclose it within a transaction block.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
* @throws PgsqlException
*
@@ -998,24 +737,24 @@ function pg_lo_unlink($connection, int $oid): void
* To use the large object interface, it is necessary to
* enclose it within a transaction block.
*
- * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open.
- * @param string $data The data to be written to the large object. If len is
- * specified and is less than the length of data, only
- * len bytes will be written.
- * @param int $len An optional maximum number of bytes to write. Must be greater than zero
+ * @param resource $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 $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.
* @throws PgsqlException
*
*/
-function pg_lo_write($large_object, string $data, int $len = null): int
+function pg_lo_write($lob, string $data, int $length = null): int
{
error_clear_last();
- if ($len !== null) {
- $result = \pg_lo_write($large_object, $data, $len);
+ if ($length !== null) {
+ $result = \pg_lo_write($lob, $data, $length);
} else {
- $result = \pg_lo_write($large_object, $data);
+ $result = \pg_lo_write($lob, $data);
}
if ($result === false) {
throw PgsqlException::createFromPhpError();
@@ -1028,7 +767,7 @@ function pg_lo_write($large_object, string $data, int $len = null): int
* pg_meta_data returns table definition for
* table_name as an array.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $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.
@@ -1047,35 +786,6 @@ function pg_meta_data($connection, string $table_name, bool $extended = false):
/**
- * pg_options will return a string containing
- * the options specified on the given PostgreSQL
- * connection resource.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return string A string containing the connection
- * options.
- * @throws PgsqlException
- *
- */
-function pg_options($connection = null): string
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_options($connection);
- } else {
- $result = \pg_options();
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* Looks up a current parameter setting of the server.
*
* Certain parameter values are reported by the server automatically at
@@ -1099,10 +809,11 @@ function pg_options($connection = null): string
* anyway. Applications are encouraged to use pg_parameter_status rather than ad
* hoc code to determine these values.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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,
@@ -1132,14 +843,14 @@ function pg_parameter_status($connection = null, string $param_name = null): str
/**
* pg_pconnect opens a connection to a
- * PostgreSQL database. It returns a connection resource that is
+ * 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
- * connect_type.
+ * flags.
*
* To enable persistent connection, the pgsql.allow_persistent
* php.ini directive must be set to "On" (which is the default).
@@ -1167,21 +878,17 @@ function pg_parameter_status($connection = null, string $param_name = null): str
* requiressl (deprecated in favor of sslmode), and
* service. Which of these arguments exist depends
* on your PostgreSQL version.
- * @param int $connect_type If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection
+ * @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 resource PostgreSQL connection resource on success, FALSE on failure.
+ * @return resource Returns an PgSql\Connection instance on success.
* @throws PgsqlException
*
*/
-function pg_pconnect(string $connection_string, int $connect_type = null)
+function pg_pconnect(string $connection_string, int $flags = 0)
{
error_clear_last();
- if ($connect_type !== null) {
- $result = \pg_pconnect($connection_string, $connect_type);
- } else {
- $result = \pg_pconnect($connection_string);
- }
+ $result = \pg_pconnect($connection_string, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -1193,10 +900,11 @@ function pg_pconnect(string $connection_string, int $connect_type = null)
* pg_ping pings a database connection and tries to
* reconnect it if it is broken.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
* @throws PgsqlException
*
*/
@@ -1215,35 +923,6 @@ function pg_ping($connection = null): void
/**
- * pg_port returns the port number that the
- * given PostgreSQL connection resource is
- * connected to.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return int An int containing the port number of the database
- * server the connection is to.
- * @throws PgsqlException
- *
- */
-function pg_port($connection = null): int
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_port($connection);
- } else {
- $result = \pg_port();
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
* 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
@@ -1264,17 +943,18 @@ function pg_port($connection = null): int
* is no PHP function for deleting a prepared statement, the SQL DEALLOCATE
* statement can be used for that purpose.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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 resource A query result resource on success.
+ * @return resource An PgSql\Result instance on success.
* @throws PgsqlException
*
*/
@@ -1310,10 +990,11 @@ function pg_prepare($connection = null, string $stmtname = null, string $query =
* is to use pg_copy_from. This is a far simpler
* interface.
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
* @throws PgsqlException
@@ -1360,10 +1041,11 @@ function pg_put_line($connection = null, string $data = null): void
* most one SQL command in the given string. (There can be semicolons in it,
* but not more than one nonempty command.)
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
@@ -1381,7 +1063,7 @@ function pg_put_line($connection = null, string $data = null): void
* Values intended for bytea fields are not supported as
* parameters. Use pg_escape_bytea instead, or use the
* large object functions.
- * @return resource A query result resource on success.
+ * @return resource An PgSql\Result instance on success.
* @throws PgsqlException
*
*/
@@ -1422,10 +1104,11 @@ function pg_query_params($connection = null, string $query = null, array $params
*
*
*
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
+ * @param resource $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.
@@ -1439,7 +1122,7 @@ function pg_query_params($connection = null, string $query = null, array $params
*
* Any user-supplied data substituted directly into a query string should
* be properly escaped.
- * @return resource A query result resource on success.
+ * @return resource An PgSql\Result instance on success.
* @throws PgsqlException
*
*/
@@ -1462,9 +1145,9 @@ function pg_query($connection = null, string $query = null)
/**
* pg_result_error_field returns one of the detailed error message
- * fields associated with result resource. It is only available
+ * fields associated with result instance. It is only available
* against a PostgreSQL 7.4 or above server. The error field is specified by
- * the fieldcode.
+ * the field_code.
*
* Because pg_query and pg_query_params return FALSE if the query fails,
* you must use pg_send_query and
@@ -1474,9 +1157,9 @@ function pg_query($connection = null, string $query = null)
* use pg_set_error_verbosity and pg_last_error
* and then parse the result.
*
- * @param resource $result A PostgreSQL query result resource from a previously executed
- * statement.
- * @param int $fieldcode Possible fieldcode values are: PGSQL_DIAG_SEVERITY,
+ * @param resource $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,
@@ -1489,10 +1172,10 @@ function pg_query($connection = null, string $query = null)
* @throws PgsqlException
*
*/
-function pg_result_error_field($result, int $fieldcode): ?string
+function pg_result_error_field($result, int $field_code): ?string
{
error_clear_last();
- $result = \pg_result_error_field($result, $fieldcode);
+ $result = \pg_result_error_field($result, $field_code);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -1502,20 +1185,19 @@ function pg_result_error_field($result, int $fieldcode): ?string
/**
* pg_result_seek sets the internal row offset in
- * a result resource.
+ * the result instance.
*
- * @param resource $result PostgreSQL query result resource, returned by pg_query,
- * pg_query_params or pg_execute
- * (among others).
- * @param int $offset Row to move the internal offset to in the result resource.
+ * @param resource $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.
* @throws PgsqlException
*
*/
-function pg_result_seek($result, int $offset): void
+function pg_result_seek($result, int $row): void
{
error_clear_last();
- $result = \pg_result_seek($result, $offset);
+ $result = \pg_result_seek($result, $row);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -1524,14 +1206,14 @@ function pg_result_seek($result, int $offset): void
/**
* pg_select selects records specified by
- * assoc_array which has
+ * conditions which has
* field=&gt;value. For a successful query, it returns an
* array containing all records and fields that match the condition
- * specified by assoc_array.
+ * specified by conditions.
*
- * If options is specified,
+ * If flags is specified,
* pg_convert is applied to
- * assoc_array with the specified flags.
+ * conditions with the specified flags.
*
* By default pg_select passes raw values. Values
* must be escaped or PGSQL_DML_ESCAPE option must be
@@ -1543,28 +1225,28 @@ function pg_result_seek($result, int $offset): void
* JSON, Array, Regex, etc. These parameters should be handled
* according to their contexts. i.e. Escape/validate values.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @param string $table_name Name of the table from which to select rows.
- * @param array $assoc_array An array whose keys are field names in the table table_name,
+ * @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 $options Any number of PGSQL_CONV_FORCE_NULL,
+ * @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
- * options then query string is returned. When PGSQL_DML_NO_CONV
+ * 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 int $result_type
- * @return mixed Returns TRUE on success. Returns string if PGSQL_DML_STRING is passed
- * via options.
+ * @param int $mode
+ * @return mixed Returns string if PGSQL_DML_STRING is passed
+ * via flags, otherwise it returns an array on success.
* @throws PgsqlException
*
*/
-function pg_select($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC, int $result_type = PGSQL_ASSOC)
+function pg_select($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC)
{
error_clear_last();
- $result = \pg_select($connection, $table_name, $assoc_array, $options, $result_type);
+ $result = \pg_select($connection, $table_name, $conditions, $flags, $mode);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
@@ -1573,144 +1255,10 @@ function pg_select($connection, string $table_name, array $assoc_array, int $opt
/**
- * Sends a request to execute a prepared statement with given parameters,
- * without waiting for the result(s).
- *
- * This is similar to pg_send_query_params, but the command to be executed is specified
- * by naming a previously-prepared statement, instead of giving a query string. The
- * function's parameters are handled identically to pg_execute.
- * Like pg_execute, it will not work on pre-7.4 versions of
- * PostgreSQL.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @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.
- * @throws PgsqlException
- *
- */
-function pg_send_execute($connection, string $stmtname, array $params): void
-{
- error_clear_last();
- $result = \pg_send_execute($connection, $stmtname, $params);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Sends a request to create a prepared statement with the given parameters,
- * without waiting for completion.
- *
- * This is an asynchronous version of pg_prepare: it returns TRUE if it was able to
- * dispatch the request, and FALSE if not. After a successful call, call
- * pg_get_result to determine whether the server successfully created the
- * prepared statement. The function's parameters are handled identically to
- * pg_prepare. Like pg_prepare, it will not work
- * on pre-7.4 versions of PostgreSQL.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @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.
- * @throws PgsqlException
- *
- */
-function pg_send_prepare($connection, string $stmtname, string $query): void
-{
- error_clear_last();
- $result = \pg_send_prepare($connection, $stmtname, $query);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Submits a command and separate parameters to the server without
- * waiting for the result(s).
- *
- * This is equivalent to pg_send_query except that query
- * parameters can be specified separately from the
- * query string. The function's parameters are
- * handled identically to pg_query_params. Like
- * pg_query_params, it will not work on pre-7.4 PostgreSQL
- * connections, and it allows only one command in the query string.
- *
- * @param resource $connection PostgreSQL database connection resource.
- * @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.
- * @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.
- * @throws PgsqlException
- *
- */
-function pg_send_query_params($connection, string $query, array $params): void
-{
- error_clear_last();
- $result = \pg_send_query_params($connection, $query, $params);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * pg_send_query sends a query or queries asynchronously to the
- * connection. Unlike
- * pg_query, it can send multiple queries at once to
- * PostgreSQL and get the results one by one using
- * pg_get_result.
- *
- * Script execution is not blocked while the queries are executing. Use
- * pg_connection_busy to check if the connection is
- * busy (i.e. the query is executing). Queries may be cancelled using
- * pg_cancel_query.
- *
- * Although the user can send multiple queries at once, multiple queries
- * cannot be sent over a busy connection. If a query is sent while
- * the connection is busy, it waits until the last query is finished and
- * discards all its results.
- *
- * @param resource $connection PostgreSQL database connection resource.
- * @param string $query The SQL statement or statements to be executed.
- *
- * Data inside the query should be properly escaped.
- * @throws PgsqlException
- *
- */
-function pg_send_query($connection, string $query): void
-{
- error_clear_last();
- $result = \pg_send_query($connection, $query);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
* pg_socket returns a read only resource
* corresponding to the socket underlying the given PostgreSQL connection.
*
- * @param resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @return resource A socket resource on success.
* @throws PgsqlException
*
@@ -1739,138 +1287,72 @@ function pg_socket($connection)
* PostgreSQL server. For more information, refer to the
* PostgreSQL Documentation.
*
- * @param string $pathname The full path and file name of the file in which to write the
+ * @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 resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @throws PgsqlException
- *
- */
-function pg_trace(string $pathname, string $mode = "w", $connection = null): void
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_trace($pathname, $mode, $connection);
- } else {
- $result = \pg_trace($pathname, $mode);
- }
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
-}
-
-
-/**
- * pg_tty returns the TTY name that server
- * side debugging output is sent to on the given PostgreSQL
- * connection resource.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return string A string containing the debug TTY of
- * the connection.
+ * @param resource $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.
* @throws PgsqlException
*
*/
-function pg_tty($connection = null): string
+function pg_trace(string $filename, string $mode = "w", $connection = null): void
{
error_clear_last();
if ($connection !== null) {
- $result = \pg_tty($connection);
+ $result = \pg_trace($filename, $mode, $connection);
} else {
- $result = \pg_tty();
+ $result = \pg_trace($filename, $mode);
}
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
- return $result;
}
/**
* pg_update updates records that matches
- * condition with data. If
- * options is specified,
- * pg_convert is applied to
- * data with specified options.
+ * conditions with values.
*
- * pg_update updates records specified by
- * assoc_array which has
- * field=&gt;value.
- *
- * If options is specified,
+ * If flags is specified,
* pg_convert is applied to
- * assoc_array with the specified flags.
+ * values with the specified flags.
*
- * By default pg_update 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.
+ * 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 resource $connection PostgreSQL database connection resource.
+ * @param resource $connection An PgSql\Connection instance.
* @param string $table_name Name of the table into which to update rows.
- * @param array $data An array whose keys are field names in the table table_name,
+ * @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 $condition An array whose keys are field names in the table table_name,
+ * @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 $options Any number of PGSQL_CONV_FORCE_NULL,
+ * @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
- * options then query string is returned. When PGSQL_DML_NO_CONV
+ * 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 options.
+ * via flags.
* @throws PgsqlException
*
*/
-function pg_update($connection, string $table_name, array $data, array $condition, int $options = PGSQL_DML_EXEC)
+function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC)
{
error_clear_last();
- $result = \pg_update($connection, $table_name, $data, $condition, $options);
- if ($result === false) {
- throw PgsqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * pg_version returns an array with the client, protocol
- * and server version. Protocol and server versions are only available if PHP
- * was compiled with PostgreSQL 7.4 or later.
- *
- * For more detailed server information, use pg_parameter_status.
- *
- * @param resource $connection PostgreSQL database connection resource. When
- * connection is not present, the default connection
- * is used. The default connection is the last connection made by
- * pg_connect or pg_pconnect.
- * @return array Returns an array with client, protocol
- * and server keys and values (if available) or invalid connection.
- * @throws PgsqlException
- *
- */
-function pg_version($connection = null): array
-{
- error_clear_last();
- if ($connection !== null) {
- $result = \pg_version($connection);
- } else {
- $result = \pg_version();
- }
+ $result = \pg_update($connection, $table_name, $values, $conditions, $flags);
if ($result === false) {
throw PgsqlException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/posix.php b/vendor/thecodingmachine/safe/generated/posix.php
index 6ae99d88c..26b77eaa9 100644
--- a/vendor/thecodingmachine/safe/generated/posix.php
+++ b/vendor/thecodingmachine/safe/generated/posix.php
@@ -7,8 +7,8 @@ use Safe\Exceptions\PosixException;
/**
* posix_access checks the user's permission of a file.
*
- * @param string $file The name of the file to be tested.
- * @param int $mode A mask consisting of one or more of POSIX_F_OK,
+ * @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.
*
@@ -20,10 +20,10 @@ use Safe\Exceptions\PosixException;
* @throws PosixException
*
*/
-function posix_access(string $file, int $mode = POSIX_F_OK): void
+function posix_access(string $filename, int $flags = 0): void
{
error_clear_last();
- $result = \posix_access($file, $mode);
+ $result = \posix_access($filename, $flags);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -31,6 +31,70 @@ function posix_access(string $file, int $mode = POSIX_F_OK): void
/**
+ * Gets information about a group provided its id.
+ *
+ * @param int $group_id The group id.
+ * @return array 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.
+ * @throws PosixException
+ *
+ */
+function posix_getgrgid(int $group_id): array
+{
+ error_clear_last();
+ $result = \posix_getgrgid($group_id);
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Gets information about a group provided its name.
*
* @param string $name The name of the group
@@ -95,18 +159,260 @@ function posix_getgrnam(string $name): array
/**
- * Returns the process group identifier of the process
- * pid.
+ * Gets the group set of the current process.
+ *
+ * @return array Returns an array of integers containing the numeric group ids of the group
+ * set of the current process.
+ * @throws PosixException
+ *
+ */
+function posix_getgroups(): array
+{
+ error_clear_last();
+ $result = \posix_getgroups();
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Returns the login name of the user owning the current process.
+ *
+ * @return string Returns the login name of the user, as a string.
+ * @throws PosixException
+ *
+ */
+function posix_getlogin(): string
+{
+ error_clear_last();
+ $result = \posix_getlogin();
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Returns an array of information about the user
+ * referenced by the given user ID.
+ *
+ * @param int $user_id The user identifier.
+ * @return array 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.
*
- * @param int $pid The process id.
- * @return int Returns the identifier, as an integer.
+ *
+ *
+ * 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.
* @throws PosixException
*
*/
-function posix_getpgid(int $pid): int
+function posix_getpwuid(int $user_id): array
{
error_clear_last();
- $result = \posix_getpgid($pid);
+ $result = \posix_getpwuid($user_id);
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws PosixException
+ *
+ */
+function posix_getrlimit(): array
+{
+ error_clear_last();
+ $result = \posix_getrlimit();
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws PosixException
+ *
+ */
+function posix_getsid(int $process_id): int
+{
+ error_clear_last();
+ $result = \posix_getsid($process_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -117,15 +423,15 @@ function posix_getpgid(int $pid): int
/**
* Calculates the group access list for the user specified in name.
*
- * @param string $name The user to calculate the list for.
- * @param int $base_group_id Typically the group number from the password file.
+ * @param string $username The user to calculate the list for.
+ * @param int $group_id Typically the group number from the password file.
* @throws PosixException
*
*/
-function posix_initgroups(string $name, int $base_group_id): void
+function posix_initgroups(string $username, int $group_id): void
{
error_clear_last();
- $result = \posix_initgroups($name, $base_group_id);
+ $result = \posix_initgroups($username, $group_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -133,18 +439,18 @@ function posix_initgroups(string $name, int $base_group_id): void
/**
- * Send the signal sig to the process with
- * the process identifier pid.
+ * Send the signal signal to the process with
+ * the process identifier process_id.
*
- * @param int $pid The process identifier.
- * @param int $sig One of the PCNTL signals constants.
+ * @param int $process_id The process identifier.
+ * @param int $signal One of the PCNTL signals constants.
* @throws PosixException
*
*/
-function posix_kill(int $pid, int $sig): void
+function posix_kill(int $process_id, int $signal): void
{
error_clear_last();
- $result = \posix_kill($pid, $sig);
+ $result = \posix_kill($process_id, $signal);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -156,8 +462,8 @@ function posix_kill(int $pid, int $sig): void
* FIFO file which exists in the file system and acts as
* a bidirectional communication endpoint for processes.
*
- * @param string $pathname Path to the FIFO file.
- * @param int $mode The second parameter mode has to be given in
+ * @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
@@ -165,10 +471,10 @@ function posix_kill(int $pid, int $sig): void
* @throws PosixException
*
*/
-function posix_mkfifo(string $pathname, int $mode): void
+function posix_mkfifo(string $filename, int $permissions): void
{
error_clear_last();
- $result = \posix_mkfifo($pathname, $mode);
+ $result = \posix_mkfifo($filename, $permissions);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -178,8 +484,8 @@ function posix_mkfifo(string $pathname, int $mode): void
/**
* Creates a special or ordinary file.
*
- * @param string $pathname The file to create
- * @param int $mode This parameter is constructed by a bitwise OR between file type (one of
+ * @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
@@ -190,10 +496,10 @@ function posix_mkfifo(string $pathname, int $mode): void
* @throws PosixException
*
*/
-function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0): void
+function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): void
{
error_clear_last();
- $result = \posix_mknod($pathname, $mode, $major, $minor);
+ $result = \posix_mknod($filename, $flags, $major, $minor);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -205,14 +511,14 @@ function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0
* privileged function and needs appropriate privileges (usually
* root) on the system to be able to perform this function.
*
- * @param int $gid The group id.
+ * @param int $group_id The group id.
* @throws PosixException
*
*/
-function posix_setegid(int $gid): void
+function posix_setegid(int $group_id): void
{
error_clear_last();
- $result = \posix_setegid($gid);
+ $result = \posix_setegid($group_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -224,14 +530,14 @@ function posix_setegid(int $gid): void
* function and needs appropriate privileges (usually root) on
* the system to be able to perform this function.
*
- * @param int $uid The user id.
+ * @param int $user_id The user id.
* @throws PosixException
*
*/
-function posix_seteuid(int $uid): void
+function posix_seteuid(int $user_id): void
{
error_clear_last();
- $result = \posix_seteuid($uid);
+ $result = \posix_seteuid($user_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -246,14 +552,14 @@ function posix_seteuid(int $uid): void
* posix_setgid first,
* posix_setuid last.
*
- * @param int $gid The group id.
+ * @param int $group_id The group id.
* @throws PosixException
*
*/
-function posix_setgid(int $gid): void
+function posix_setgid(int $group_id): void
{
error_clear_last();
- $result = \posix_setgid($gid);
+ $result = \posix_setgid($group_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -261,18 +567,18 @@ function posix_setgid(int $gid): void
/**
- * Let the process pid join the process group
- * pgid.
+ * Let the process process_id join the process group
+ * process_group_id.
*
- * @param int $pid The process id.
- * @param int $pgid The process group id.
+ * @param int $process_id The process id.
+ * @param int $process_group_id The process group id.
* @throws PosixException
*
*/
-function posix_setpgid(int $pid, int $pgid): void
+function posix_setpgid(int $process_id, int $process_group_id): void
{
error_clear_last();
- $result = \posix_setpgid($pid, $pgid);
+ $result = \posix_setpgid($process_id, $process_group_id);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -293,17 +599,17 @@ function posix_setpgid(int $pid, int $pgid): void
* @param int $resource The
* resource limit constant
* corresponding to the limit that is being set.
- * @param int $softlimit The soft limit, in whatever unit the resource limit requires, or
+ * @param int $soft_limit The soft limit, in whatever unit the resource limit requires, or
* POSIX_RLIMIT_INFINITY.
- * @param int $hardlimit The hard limit, in whatever unit the resource limit requires, or
+ * @param int $hard_limit The hard limit, in whatever unit the resource limit requires, or
* POSIX_RLIMIT_INFINITY.
* @throws PosixException
*
*/
-function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void
+function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void
{
error_clear_last();
- $result = \posix_setrlimit($resource, $softlimit, $hardlimit);
+ $result = \posix_setrlimit($resource, $soft_limit, $hard_limit);
if ($result === false) {
throw PosixException::createFromPhpError();
}
@@ -315,15 +621,113 @@ function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void
* function that needs appropriate privileges (usually root) on
* the system to be able to perform this function.
*
- * @param int $uid The user id.
+ * @param int $user_id The user id.
+ * @throws PosixException
+ *
+ */
+function posix_setuid(int $user_id): void
+{
+ error_clear_last();
+ $result = \posix_setuid($user_id);
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
* @throws PosixException
*
*/
-function posix_setuid(int $uid): void
+function posix_times(): array
{
error_clear_last();
- $result = \posix_setuid($uid);
+ $result = \posix_times();
if ($result === false) {
throw PosixException::createFromPhpError();
}
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws PosixException
+ *
+ */
+function posix_uname(): array
+{
+ error_clear_last();
+ $result = \posix_uname();
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
}
diff --git a/vendor/thecodingmachine/safe/generated/ps.php b/vendor/thecodingmachine/safe/generated/ps.php
index a66667aa9..a2dca7976 100644
--- a/vendor/thecodingmachine/safe/generated/ps.php
+++ b/vendor/thecodingmachine/safe/generated/ps.php
@@ -558,7 +558,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..
+ * other drawing parameters like the line width, or color.
*
* @param resource $psdoc Resource identifier of the postscript file
* as returned by ps_new.
diff --git a/vendor/thecodingmachine/safe/generated/pspell.php b/vendor/thecodingmachine/safe/generated/pspell.php
index 4cf4c36a6..b1e296d6d 100644
--- a/vendor/thecodingmachine/safe/generated/pspell.php
+++ b/vendor/thecodingmachine/safe/generated/pspell.php
@@ -7,15 +7,15 @@ use Safe\Exceptions\PspellException;
/**
*
*
- * @param int $dictionary_link
+ * @param int $dictionary An PSpell\Dictionary instance.
* @param string $word The added word.
* @throws PspellException
*
*/
-function pspell_add_to_personal(int $dictionary_link, string $word): void
+function pspell_add_to_personal(int $dictionary, string $word): void
{
error_clear_last();
- $result = \pspell_add_to_personal($dictionary_link, $word);
+ $result = \pspell_add_to_personal($dictionary, $word);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -25,15 +25,15 @@ function pspell_add_to_personal(int $dictionary_link, string $word): void
/**
*
*
- * @param int $dictionary_link
+ * @param int $dictionary An PSpell\Dictionary instance.
* @param string $word The added word.
* @throws PspellException
*
*/
-function pspell_add_to_session(int $dictionary_link, string $word): void
+function pspell_add_to_session(int $dictionary, string $word): void
{
error_clear_last();
- $result = \pspell_add_to_session($dictionary_link, $word);
+ $result = \pspell_add_to_session($dictionary, $word);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -43,14 +43,14 @@ function pspell_add_to_session(int $dictionary_link, string $word): void
/**
*
*
- * @param int $dictionary_link
+ * @param int $dictionary An PSpell\Dictionary instance.
* @throws PspellException
*
*/
-function pspell_clear_session(int $dictionary_link): void
+function pspell_clear_session(int $dictionary): void
{
error_clear_last();
- $result = \pspell_clear_session($dictionary_link);
+ $result = \pspell_clear_session($dictionary);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -86,22 +86,14 @@ function pspell_clear_session(int $dictionary_link): void
* 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned
* 32'. This parameter is largely untested, so be careful when
* using.
- * @return int Returns a pspell config identifier.
+ * @return int Returns an PSpell\Config instance on success.
* @throws PspellException
*
*/
-function pspell_config_create(string $language, string $spelling = null, string $jargon = null, string $encoding = null): int
+function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = ""): int
{
error_clear_last();
- if ($encoding !== null) {
- $result = \pspell_config_create($language, $spelling, $jargon, $encoding);
- } elseif ($jargon !== null) {
- $result = \pspell_config_create($language, $spelling, $jargon);
- } elseif ($spelling !== null) {
- $result = \pspell_config_create($language, $spelling);
- } else {
- $result = \pspell_config_create($language);
- }
+ $result = \pspell_config_create($language, $spelling, $jargon, $encoding);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -114,15 +106,15 @@ function pspell_config_create(string $language, string $spelling = null, string
* currently not documented; only its argument list is available.
*
*
- * @param int $conf
+ * @param int $config
* @param string $directory
* @throws PspellException
*
*/
-function pspell_config_data_dir(int $conf, string $directory): void
+function pspell_config_data_dir(int $config, string $directory): void
{
error_clear_last();
- $result = \pspell_config_data_dir($conf, $directory);
+ $result = \pspell_config_data_dir($config, $directory);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -134,15 +126,15 @@ function pspell_config_data_dir(int $conf, string $directory): void
* currently not documented; only its argument list is available.
*
*
- * @param int $conf
+ * @param int $config
* @param string $directory
* @throws PspellException
*
*/
-function pspell_config_dict_dir(int $conf, string $directory): void
+function pspell_config_dict_dir(int $config, string $directory): void
{
error_clear_last();
- $result = \pspell_config_dict_dir($conf, $directory);
+ $result = \pspell_config_dict_dir($config, $directory);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -152,15 +144,15 @@ function pspell_config_dict_dir(int $conf, string $directory): void
/**
*
*
- * @param int $dictionary_link
- * @param int $n Words less than n characters will be skipped.
+ * @param int $config An PSpell\Config instance.
+ * @param int $min_length Words less than min_length characters will be skipped.
* @throws PspellException
*
*/
-function pspell_config_ignore(int $dictionary_link, int $n): void
+function pspell_config_ignore(int $config, int $min_length): void
{
error_clear_last();
- $result = \pspell_config_ignore($dictionary_link, $n);
+ $result = \pspell_config_ignore($config, $min_length);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -170,7 +162,7 @@ function pspell_config_ignore(int $dictionary_link, int $n): void
/**
*
*
- * @param int $dictionary_link
+ * @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:
*
@@ -195,10 +187,10 @@ function pspell_config_ignore(int $dictionary_link, int $n): void
* @throws PspellException
*
*/
-function pspell_config_mode(int $dictionary_link, int $mode): void
+function pspell_config_mode(int $config, int $mode): void
{
error_clear_last();
- $result = \pspell_config_mode($dictionary_link, $mode);
+ $result = \pspell_config_mode($config, $mode);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -214,16 +206,16 @@ function pspell_config_mode(int $dictionary_link, int $mode): void
* pspell_config_personal should be used on a config
* before calling pspell_new_config.
*
- * @param int $dictionary_link
- * @param string $file The personal wordlist. If the file does not exist, it will be created.
+ * @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).
* @throws PspellException
*
*/
-function pspell_config_personal(int $dictionary_link, string $file): void
+function pspell_config_personal(int $config, string $filename): void
{
error_clear_last();
- $result = \pspell_config_personal($dictionary_link, $file);
+ $result = \pspell_config_personal($config, $filename);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -242,15 +234,15 @@ function pspell_config_personal(int $dictionary_link, string $file): void
* pspell_config_repl should be used on a config
* before calling pspell_new_config.
*
- * @param int $dictionary_link
- * @param string $file The file should be writable by whoever PHP runs as (e.g. nobody).
+ * @param int $config An PSpell\Config instance.
+ * @param string $filename The file should be writable by whoever PHP runs as (e.g. nobody).
* @throws PspellException
*
*/
-function pspell_config_repl(int $dictionary_link, string $file): void
+function pspell_config_repl(int $config, string $filename): void
{
error_clear_last();
- $result = \pspell_config_repl($dictionary_link, $file);
+ $result = \pspell_config_repl($config, $filename);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -267,16 +259,16 @@ function pspell_config_repl(int $dictionary_link, string $file): void
* pspell_config_runtogether should be used on a config
* before calling pspell_new_config.
*
- * @param int $dictionary_link
- * @param bool $flag TRUE if run-together words should be treated as legal compounds,
+ * @param int $config An PSpell\Config instance.
+ * @param bool $allow TRUE if run-together words should be treated as legal compounds,
* FALSE otherwise.
* @throws PspellException
*
*/
-function pspell_config_runtogether(int $dictionary_link, bool $flag): void
+function pspell_config_runtogether(int $config, bool $allow): void
{
error_clear_last();
- $result = \pspell_config_runtogether($dictionary_link, $flag);
+ $result = \pspell_config_runtogether($config, $allow);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -295,15 +287,15 @@ function pspell_config_runtogether(int $dictionary_link, bool $flag): void
* pspell_config_save_repl should be used on a config
* before calling pspell_new_config.
*
- * @param int $dictionary_link
- * @param bool $flag TRUE if replacement pairs should be saved, FALSE otherwise.
+ * @param int $config An PSpell\Config instance.
+ * @param bool $save TRUE if replacement pairs should be saved, FALSE otherwise.
* @throws PspellException
*
*/
-function pspell_config_save_repl(int $dictionary_link, bool $flag): void
+function pspell_config_save_repl(int $config, bool $save): void
{
error_clear_last();
- $result = \pspell_config_save_repl($dictionary_link, $flag);
+ $result = \pspell_config_save_repl($config, $save);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -315,7 +307,7 @@ function pspell_config_save_repl(int $dictionary_link, bool $flag): void
*
* @param int $config The config parameter is the one returned by
* pspell_config_create when the config was created.
- * @return int Returns a dictionary link identifier on success.
+ * @return int Returns an PSpell\Dictionary instance on success
* @throws PspellException
*
*/
@@ -331,8 +323,78 @@ 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.
+ * @throws PspellException
+ *
+ */
+function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
+{
+ error_clear_last();
+ $result = \pspell_new_personal($filename, $language, $spelling, $jargon, $encoding, $mode);
+ if ($result === false) {
+ throw PspellException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* pspell_new opens up a new dictionary and
- * returns the dictionary link identifier for use in other pspell
+ * returns an PSpell\Dictionary instance for use in other pspell
* functions.
*
* For more information and examples, check out inline manual pspell
@@ -388,24 +450,14 @@ function pspell_new_config(int $config): int
* PSPELL_NORMAL and
* PSPELL_BAD_SPELLERS are mutually exclusive, so you
* should select only one of them.
- * @return int Returns the dictionary link identifier on success.
+ * @return int Returns an PSpell\Dictionary instance on success.
* @throws PspellException
*
*/
-function pspell_new(string $language, string $spelling = null, string $jargon = null, string $encoding = null, int $mode = 0): int
+function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
{
error_clear_last();
- if ($mode !== 0) {
- $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode);
- } elseif ($encoding !== null) {
- $result = \pspell_new($language, $spelling, $jargon, $encoding);
- } elseif ($jargon !== null) {
- $result = \pspell_new($language, $spelling, $jargon);
- } elseif ($spelling !== null) {
- $result = \pspell_new($language, $spelling);
- } else {
- $result = \pspell_new($language);
- }
+ $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -416,15 +468,14 @@ function pspell_new(string $language, string $spelling = null, string $jargon =
/**
*
*
- * @param int $dictionary_link A dictionary link identifier opened with
- * pspell_new_personal.
+ * @param int $dictionary An PSpell\Dictionary instance.
* @throws PspellException
*
*/
-function pspell_save_wordlist(int $dictionary_link): void
+function pspell_save_wordlist(int $dictionary): void
{
error_clear_last();
- $result = \pspell_save_wordlist($dictionary_link);
+ $result = \pspell_save_wordlist($dictionary);
if ($result === false) {
throw PspellException::createFromPhpError();
}
@@ -434,17 +485,16 @@ function pspell_save_wordlist(int $dictionary_link): void
/**
*
*
- * @param int $dictionary_link A dictionary link identifier, opened with
- * pspell_new_personal
+ * @param int $dictionary An PSpell\Dictionary instance.
* @param string $misspelled The misspelled word.
* @param string $correct The fixed spelling for the misspelled word.
* @throws PspellException
*
*/
-function pspell_store_replacement(int $dictionary_link, string $misspelled, string $correct): void
+function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): void
{
error_clear_last();
- $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct);
+ $result = \pspell_store_replacement($dictionary, $misspelled, $correct);
if ($result === false) {
throw PspellException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/readline.php b/vendor/thecodingmachine/safe/generated/readline.php
index a1c52c755..ddbf5a354 100644
--- a/vendor/thecodingmachine/safe/generated/readline.php
+++ b/vendor/thecodingmachine/safe/generated/readline.php
@@ -7,14 +7,14 @@ use Safe\Exceptions\ReadlineException;
/**
* This function adds a line to the command line history.
*
- * @param string $line The line to be added in the history.
+ * @param string $prompt The line to be added in the history.
* @throws ReadlineException
*
*/
-function readline_add_history(string $line): void
+function readline_add_history(string $prompt): void
{
error_clear_last();
- $result = \readline_add_history($line);
+ $result = \readline_add_history($prompt);
if ($result === false) {
throw ReadlineException::createFromPhpError();
}
@@ -32,38 +32,6 @@ function readline_add_history(string $line): void
* stream_select as it allows interleaving of IO and
* user input, unlike readline.
*
- *
- * Readline Callback Interface Example
- *
- * 10) {
- * $prompting = false;
- * readline_callback_handler_remove();
- * } else {
- * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback');
- * }
- * }
- *
- * $c = 1;
- * $prompting = true;
- *
- * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback');
- *
- * while ($prompting) {
- * $w = NULL;
- * $e = NULL;
- * $n = stream_select($r = array(STDIN), $w, $e, null);
- * if ($n && in_array(STDIN, $r)) {
- * // read a character, will call the callback when a newline is entered
- * readline_callback_read_char();
- * }
- * }
- *
- * echo "Prompting disabled. All done.\n";
- * ?>
- * ]]>
- *
- *
- *
* @param string $prompt The prompt message.
* @param callable $callback The callback function takes one parameter; the
* user input returned.
@@ -100,15 +68,15 @@ 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 $function You must supply the name of an existing function which accepts a
+ * @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.
* @throws ReadlineException
*
*/
-function readline_completion_function(callable $function): void
+function readline_completion_function(callable $callback): void
{
error_clear_last();
- $result = \readline_completion_function($function);
+ $result = \readline_completion_function($callback);
if ($result === false) {
throw ReadlineException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/rrd.php b/vendor/thecodingmachine/safe/generated/rrd.php
index 9bb3b5c52..2da227d0e 100644
--- a/vendor/thecodingmachine/safe/generated/rrd.php
+++ b/vendor/thecodingmachine/safe/generated/rrd.php
@@ -21,3 +21,170 @@ function rrd_create(string $filename, array $options): void
throw RrdException::createFromPhpError();
}
}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_first(string $file, int $raaindex = 0): int
+{
+ error_clear_last();
+ $result = \rrd_first($file, $raaindex);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_graph(string $filename, array $options): array
+{
+ error_clear_last();
+ $result = \rrd_graph($filename, $options);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Returns information about particular RRD database file.
+ *
+ * @param string $filename RRD database file name.
+ * @return array Array with information about requested RRD file.
+ * @throws RrdException
+ *
+ */
+function rrd_info(string $filename): array
+{
+ error_clear_last();
+ $result = \rrd_info($filename);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_lastupdate(string $filename): array
+{
+ error_clear_last();
+ $result = \rrd_lastupdate($filename);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_restore(string $xml_file, string $rrd_file, array $options = null): void
+{
+ error_clear_last();
+ if ($options !== null) {
+ $result = \rrd_restore($xml_file, $rrd_file, $options);
+ } else {
+ $result = \rrd_restore($xml_file, $rrd_file);
+ }
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_tune(string $filename, array $options): void
+{
+ error_clear_last();
+ $result = \rrd_tune($filename, $options);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_update(string $filename, array $options): void
+{
+ error_clear_last();
+ $result = \rrd_update($filename, $options);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws RrdException
+ *
+ */
+function rrd_xport(array $options): array
+{
+ error_clear_last();
+ $result = \rrd_xport($options);
+ if ($result === false) {
+ throw RrdException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/generated/sem.php b/vendor/thecodingmachine/safe/generated/sem.php
index 739e8b389..020212151 100644
--- a/vendor/thecodingmachine/safe/generated/sem.php
+++ b/vendor/thecodingmachine/safe/generated/sem.php
@@ -5,6 +5,34 @@ namespace Safe;
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 resource Returns SysvMessageQueue instance that can be used to access the System V message queue.
+ * @throws SemException
+ *
+ */
+function msg_get_queue(int $key, int $permissions = 0666)
+{
+ error_clear_last();
+ $result = \msg_get_queue($key, $permissions);
+ if ($result === false) {
+ throw SemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Checks whether the message queue key exists.
*
* @param int $key Queue key.
@@ -24,23 +52,23 @@ function msg_queue_exists(int $key): void
/**
* msg_receive will receive the first message from the
* specified queue of the type specified by
- * desiredmsgtype.
+ * desired_message_type.
*
- * @param resource $queue Message queue resource handle
- * @param int $desiredmsgtype If desiredmsgtype is 0, the message from the front
- * of the queue is returned. If desiredmsgtype is
+ * @param resource $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 desiredmsgtype is less than 0, the first
+ * 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 desiredmsgtype will be read.
+ * 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 $msgtype The type of the message that was received will be stored in this
+ * @param int|null $received_message_type The type of the message that was received will be stored in this
* parameter.
- * @param int $maxsize The maximum size of message to be accepted is specified by the
- * maxsize; if the message in the queue is larger
+ * @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,
@@ -64,7 +92,7 @@ function msg_queue_exists(int $key): void
*
* MSG_IPC_NOWAIT
* If there are no messages of the
- * desiredmsgtype, return immediately and do not
+ * desired_message_type, return immediately and do not
* wait. The function will fail and return an integer value
* corresponding to MSG_ENOMSG.
*
@@ -72,30 +100,30 @@ function msg_queue_exists(int $key): void
*
* MSG_EXCEPT
* Using this flag in combination with a
- * desiredmsgtype greater than 0 will cause the
+ * desired_message_type greater than 0 will cause the
* function to receive the first message that is not equal to
- * desiredmsgtype.
+ * desired_message_type.
*
*
* MSG_NOERROR
*
- * If the message is longer than maxsize,
+ * If the message is longer than max_message_size,
* setting this flag will truncate the message to
- * maxsize and will not signal an error.
+ * max_message_size and will not signal an error.
*
*
*
*
*
- * @param int|null $errorcode If the function fails, the optional errorcode
+ * @param int|null $error_code If the function fails, the optional error_code
* will be set to the value of the system errno variable.
* @throws SemException
*
*/
-function msg_receive($queue, int $desiredmsgtype, ?int &$msgtype, int $maxsize, &$message, bool $unserialize = true, int $flags = 0, ?int &$errorcode = null): void
+function msg_receive($queue, int $desired_message_type, ?int &$received_message_type, int $max_message_size, &$message, bool $unserialize = true, int $flags = 0, ?int &$error_code = null): void
{
error_clear_last();
- $result = \msg_receive($queue, $desiredmsgtype, $msgtype, $maxsize, $message, $unserialize, $flags, $errorcode);
+ $result = \msg_receive($queue, $desired_message_type, $received_message_type, $max_message_size, $message, $unserialize, $flags, $error_code);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -108,7 +136,7 @@ function msg_receive($queue, int $desiredmsgtype, ?int &$msgtype, int $maxsize,
* processes have finished working with the message queue and you need to
* release the system resources held by it.
*
- * @param resource $queue Message queue resource handle
+ * @param resource $queue The message queue.
* @throws SemException
*
*/
@@ -124,15 +152,15 @@ function msg_remove_queue($queue): void
/**
* msg_send sends a message of type
- * msgtype (which MUST be greater than 0) to
+ * message_type (which MUST be greater than 0) to
* the message queue specified by queue.
*
- * @param resource $queue Message queue resource handle
- * @param int $msgtype The type of the message (MUST be greater than 0)
+ * @param resource $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, integer, float
+ * 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
@@ -148,17 +176,17 @@ function msg_remove_queue($queue): void
* 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
- * errorcode to MSG_EAGAIN,
+ * error_code to MSG_EAGAIN,
* indicating that you should try to send your message again a little
* later on.
- * @param int|null $errorcode If the function fails, the optional errorcode will be set to the value of the system errno variable.
+ * @param int|null $error_code If the function fails, the optional errorcode will be set to the value of the system errno variable.
* @throws SemException
*
*/
-function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, ?int &$errorcode = null): void
+function msg_send($queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, ?int &$error_code = null): void
{
error_clear_last();
- $result = \msg_send($queue, $msgtype, $message, $serialize, $blocking, $errorcode);
+ $result = \msg_send($queue, $message_type, $message, $serialize, $blocking, $error_code);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -176,7 +204,7 @@ function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $
* root privileges are required to raise the msg_qbytes values above the
* system defined limit.
*
- * @param resource $queue Message queue resource handle
+ * @param resource $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.
* @throws SemException
@@ -193,6 +221,100 @@ function msg_set_queue($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 resource $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.
+ * @throws SemException
+ *
+ */
+function msg_stat_queue($queue): array
+{
+ error_clear_last();
+ $result = \msg_stat_queue($queue);
+ if ($result === false) {
+ throw SemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* 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
@@ -202,19 +324,19 @@ function msg_set_queue($queue, array $data): void
* explicitly released will be released automatically and a warning will be
* generated.
*
- * @param resource $sem_identifier sem_identifier is a semaphore resource,
+ * @param resource $semaphore semaphore is a semaphore
* obtained from sem_get.
- * @param bool $nowait Specifies if the process shouldn't wait for the semaphore to be acquired.
+ * @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.
* @throws SemException
*
*/
-function sem_acquire($sem_identifier, bool $nowait = false): void
+function sem_acquire($semaphore, bool $non_blocking = false): void
{
error_clear_last();
- $result = \sem_acquire($sem_identifier, $nowait);
+ $result = \sem_acquire($semaphore, $non_blocking);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -235,19 +357,19 @@ function sem_acquire($sem_identifier, bool $nowait = false): void
* @param int $key
* @param int $max_acquire The number of processes that can acquire the semaphore simultaneously
* is set to max_acquire.
- * @param int $perm The semaphore permissions. Actually this value is
+ * @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 int $auto_release Specifies if the semaphore should be automatically released on request
+ * @param bool $auto_release Specifies if the semaphore should be automatically released on request
* shutdown.
* @return resource Returns a positive semaphore identifier on success.
* @throws SemException
*
*/
-function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1)
+function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $auto_release = true)
{
error_clear_last();
- $result = \sem_get($key, $max_acquire, $perm, $auto_release);
+ $result = \sem_get($key, $max_acquire, $permissions, $auto_release);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -263,15 +385,15 @@ function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_rel
* After releasing the semaphore, sem_acquire
* may be called to re-acquire it.
*
- * @param resource $sem_identifier A Semaphore resource handle as returned by
+ * @param resource $semaphore A Semaphore as returned by
* sem_get.
* @throws SemException
*
*/
-function sem_release($sem_identifier): void
+function sem_release($semaphore): void
{
error_clear_last();
- $result = \sem_release($sem_identifier);
+ $result = \sem_release($semaphore);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -283,15 +405,74 @@ function sem_release($sem_identifier): void
*
* After removing the semaphore, it is no longer accessible.
*
- * @param resource $sem_identifier A semaphore resource identifier as returned
+ * @param resource $semaphore A semaphore as returned
* by sem_get.
* @throws SemException
*
*/
-function sem_remove($sem_identifier): void
+function sem_remove($semaphore): void
+{
+ error_clear_last();
+ $result = \sem_remove($semaphore);
+ if ($result === false) {
+ throw SemException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 $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 resource Returns a SysvSharedMemory instance on success.
+ * @throws SemException
+ *
+ */
+function shm_attach(int $key, int $size = null, int $permissions = 0666)
+{
+ error_clear_last();
+ if ($permissions !== 0666) {
+ $result = \shm_attach($key, $size, $permissions);
+ } elseif ($size !== null) {
+ $result = \shm_attach($key, $size);
+ } else {
+ $result = \shm_attach($key);
+ }
+ if ($result === false) {
+ throw SemException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 resource $shm A shared memory segment obtained from shm_attach.
+ * @throws SemException
+ *
+ */
+function shm_detach($shm): void
{
error_clear_last();
- $result = \sem_remove($sem_identifier);
+ $result = \shm_detach($shm);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -300,28 +481,27 @@ function sem_remove($sem_identifier): void
/**
* shm_put_var inserts or updates the
- * variable with the given
- * variable_key.
+ * value with the given
+ * key.
*
* Warnings (E_WARNING level) will be issued if
- * shm_identifier is not a valid SysV shared memory
+ * shm is not a valid SysV shared memory
* index or if there was not enough shared memory remaining to complete your
* request.
*
- * @param resource $shm_identifier A shared memory resource handle as returned by
- * shm_attach
- * @param int $variable_key The variable key.
- * @param mixed $variable The variable. All variable types
+ * @param resource $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.
* @throws SemException
*
*/
-function shm_put_var($shm_identifier, int $variable_key, $variable): void
+function shm_put_var($shm, int $key, $value): void
{
error_clear_last();
- $result = \shm_put_var($shm_identifier, $variable_key, $variable);
+ $result = \shm_put_var($shm, $key, $value);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -329,19 +509,18 @@ function shm_put_var($shm_identifier, int $variable_key, $variable): void
/**
- * Removes a variable with a given variable_key
+ * Removes a variable with a given key
* and frees the occupied memory.
*
- * @param resource $shm_identifier The shared memory identifier as returned by
- * shm_attach
- * @param int $variable_key The variable key.
+ * @param resource $shm A shared memory segment obtained from shm_attach.
+ * @param int $key The variable key.
* @throws SemException
*
*/
-function shm_remove_var($shm_identifier, int $variable_key): void
+function shm_remove_var($shm, int $key): void
{
error_clear_last();
- $result = \shm_remove_var($shm_identifier, $variable_key);
+ $result = \shm_remove_var($shm, $key);
if ($result === false) {
throw SemException::createFromPhpError();
}
@@ -350,17 +529,16 @@ function shm_remove_var($shm_identifier, int $variable_key): void
/**
* shm_remove removes the shared memory
- * shm_identifier. All data will be destroyed.
+ * shm. All data will be destroyed.
*
- * @param resource $shm_identifier The shared memory identifier as returned by
- * shm_attach
+ * @param resource $shm A shared memory segment obtained from shm_attach.
* @throws SemException
*
*/
-function shm_remove($shm_identifier): void
+function shm_remove($shm): void
{
error_clear_last();
- $result = \shm_remove($shm_identifier);
+ $result = \shm_remove($shm);
if ($result === false) {
throw SemException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/session.php b/vendor/thecodingmachine/safe/generated/session.php
index 7b8c9478d..212cf850e 100644
--- a/vendor/thecodingmachine/safe/generated/session.php
+++ b/vendor/thecodingmachine/safe/generated/session.php
@@ -22,6 +22,42 @@ function session_abort(): void
/**
+ * 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.
+ * @throws SessionException
+ *
+ */
+function session_create_id(string $prefix = ""): string
+{
+ error_clear_last();
+ $result = \session_create_id($prefix);
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* session_decode decodes the serialized session data provided in
* $data, and populates the $_SESSION superglobal
* with the result.
@@ -70,6 +106,151 @@ 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.
+ * @throws SessionException
+ *
+ */
+function session_encode(): string
+{
+ error_clear_last();
+ $result = \session_encode();
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 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.
+ * @throws SessionException
+ *
+ */
+function session_id(string $id = null): string
+{
+ error_clear_last();
+ if ($id !== null) {
+ $result = \session_id($id);
+ } else {
+ $result = \session_id();
+ }
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * session_module_name gets the name of the current
+ * session module, which is also known as
+ * session.save_handler.
+ *
+ * @param 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.
+ * @throws SessionException
+ *
+ */
+function session_module_name(string $module = null): string
+{
+ error_clear_last();
+ if ($module !== null) {
+ $result = \session_module_name($module);
+ } else {
+ $result = \session_module_name();
+ }
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 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 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.
+ * @throws SessionException
+ *
+ */
+function session_name(string $name = null): string
+{
+ error_clear_last();
+ if ($name !== null) {
+ $result = \session_name($name);
+ } else {
+ $result = \session_name();
+ }
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* session_regenerate_id will replace the current
* session id with a new one, and keep the current session information.
*
@@ -113,6 +294,44 @@ function session_reset(): void
/**
+ * session_save_path returns the path of the current
+ * directory used to save session data.
+ *
+ * @param 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.
+ * @throws SessionException
+ *
+ */
+function session_save_path(string $path = null): string
+{
+ error_clear_last();
+ if ($path !== null) {
+ $result = \session_save_path($path);
+ } else {
+ $result = \session_save_path();
+ }
+ if ($result === false) {
+ throw SessionException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* The session_unset function frees all session variables
* currently registered.
*
diff --git a/vendor/thecodingmachine/safe/generated/shmop.php b/vendor/thecodingmachine/safe/generated/shmop.php
index 04ba57cb5..aa5d8f49c 100644
--- a/vendor/thecodingmachine/safe/generated/shmop.php
+++ b/vendor/thecodingmachine/safe/generated/shmop.php
@@ -7,15 +7,15 @@ use Safe\Exceptions\ShmopException;
/**
* shmop_delete is used to delete a shared memory block.
*
- * @param resource $shmid The shared memory block resource created by
+ * @param resource $shmop The shared memory block resource created by
* shmop_open
* @throws ShmopException
*
*/
-function shmop_delete($shmid): void
+function shmop_delete($shmop): void
{
error_clear_last();
- $result = \shmop_delete($shmid);
+ $result = \shmop_delete($shmop);
if ($result === false) {
throw ShmopException::createFromPhpError();
}
@@ -25,42 +25,19 @@ function shmop_delete($shmid): void
/**
* shmop_read will read a string from shared memory block.
*
- * @param resource $shmid The shared memory block identifier created by
+ * @param resource $shmop The shared memory block identifier created by
* shmop_open
- * @param int $start Offset from which to start reading
- * @param int $count The number of bytes to read.
+ * @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.
* @throws ShmopException
*
*/
-function shmop_read($shmid, int $start, int $count): string
+function shmop_read($shmop, int $offset, int $size): string
{
error_clear_last();
- $result = \shmop_read($shmid, $start, $count);
- if ($result === false) {
- throw ShmopException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * shmop_write will write a string into shared memory block.
- *
- * @param resource $shmid The shared memory block identifier created by
- * shmop_open
- * @param string $data A string to write into shared memory block
- * @param int $offset Specifies where to start writing data inside the shared memory
- * segment.
- * @return int The size of the written data.
- * @throws ShmopException
- *
- */
-function shmop_write($shmid, string $data, int $offset): int
-{
- error_clear_last();
- $result = \shmop_write($shmid, $data, $offset);
+ $result = \shmop_read($shmop, $offset, $size);
if ($result === false) {
throw ShmopException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/simplexml.php b/vendor/thecodingmachine/safe/generated/simplexml.php
deleted file mode 100644
index 118de4432..000000000
--- a/vendor/thecodingmachine/safe/generated/simplexml.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\SimplexmlException;
-
-/**
- * This function takes a node of a DOM
- * document and makes it into a SimpleXML node. This new object can
- * then be used as a native SimpleXML element.
- *
- * @param \DOMNode $node A DOM Element node
- * @param string $class_name You may use this optional parameter so that
- * simplexml_import_dom will return an object of
- * the specified class. That class should extend the
- * SimpleXMLElement class.
- * @return \SimpleXMLElement Returns a SimpleXMLElement.
- * @throws SimplexmlException
- *
- */
-function simplexml_import_dom(\DOMNode $node, string $class_name = "SimpleXMLElement"): \SimpleXMLElement
-{
- error_clear_last();
- $result = \simplexml_import_dom($node, $class_name);
- if ($result === false) {
- throw SimplexmlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Convert the well-formed XML document in the given file to an object.
- *
- * @param string $filename Path to the XML file
- *
- * Libxml 2 unescapes the URI, so if you want to pass e.g.
- * b&amp;c as the URI parameter a,
- * you have to call
- * simplexml_load_file(rawurlencode('http://example.com/?a=' .
- * urlencode('b&amp;c'))). Since PHP 5.1.0 you don't need to do
- * this because PHP will do it for you.
- * @param string $class_name You may use this optional parameter so that
- * simplexml_load_file will return an object of
- * the specified class. That class should extend the
- * SimpleXMLElement class.
- * @param int $options Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
- * options parameter to specify additional Libxml parameters.
- * @param string $ns Namespace prefix or URI.
- * @param bool $is_prefix TRUE if ns is a prefix, FALSE if it's a URI;
- * defaults to FALSE.
- * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with
- * properties containing the data held within the XML document.
- * @throws SimplexmlException
- *
- */
-function simplexml_load_file(string $filename, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement
-{
- error_clear_last();
- $result = \simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix);
- if ($result === false) {
- throw SimplexmlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Takes a well-formed XML string and returns it as an object.
- *
- * @param string $data A well-formed XML string
- * @param string $class_name You may use this optional parameter so that
- * simplexml_load_string will return an object of
- * the specified class. That class should extend the
- * SimpleXMLElement class.
- * @param int $options Since PHP 5.1.0 and Libxml 2.6.0, you may also use the
- * options parameter to specify additional Libxml parameters.
- * @param string $ns Namespace prefix or URI.
- * @param bool $is_prefix TRUE if ns is a prefix, FALSE if it's a URI;
- * defaults to FALSE.
- * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with
- * properties containing the data held within the xml document.
- * @throws SimplexmlException
- *
- */
-function simplexml_load_string(string $data, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement
-{
- error_clear_last();
- $result = \simplexml_load_string($data, $class_name, $options, $ns, $is_prefix);
- if ($result === false) {
- throw SimplexmlException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/generated/sockets.php b/vendor/thecodingmachine/safe/generated/sockets.php
index d6cc892b4..bfcd9bac4 100644
--- a/vendor/thecodingmachine/safe/generated/sockets.php
+++ b/vendor/thecodingmachine/safe/generated/sockets.php
@@ -10,23 +10,23 @@ use Safe\Exceptions\SocketsException;
* 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 resource 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
+ * 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 resource returned by
+ * 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 resource $socket A valid socket resource created with socket_create.
- * @return resource Returns a new socket resource on success. The actual
+ * @param resource $socket A Socket instance created with socket_create.
+ * @return resource 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
@@ -46,19 +46,19 @@ function socket_accept($socket)
/**
- * Create a Socket resource, and bind it to the provided AddrInfo resource. The return
+ * Create a Socket instance, and bind it to the provided AddressInfo. The return
* value of this function may be used with socket_listen.
*
- * @param resource $addr Resource created from socket_addrinfo_lookup.
- * @return resource Returns a Socket resource on success.
+ * @param resource $address AddressInfo instance created from socket_addrinfo_lookup.
+ * @return resource|null Returns a Socket instance on success.
* @throws SocketsException
*
*/
-function socket_addrinfo_bind($addr)
+function socket_addrinfo_bind($address)
{
error_clear_last();
- $result = \socket_addrinfo_bind($addr);
- if ($result === null) {
+ $result = \socket_addrinfo_bind($address);
+ if ($result === false) {
throw SocketsException::createFromPhpError();
}
return $result;
@@ -66,19 +66,50 @@ function socket_addrinfo_bind($addr)
/**
- * Create a Socket resource, and connect it to the provided AddrInfo resource. The return
+ * 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 resource $addr Resource created from socket_addrinfo_lookup
- * @return resource Returns a Socket resource on success.
+ * @param resource $address AddressInfo instance created from socket_addrinfo_lookup
+ * @return resource|null Returns a Socket instance on success.
+ * @throws SocketsException
+ *
+ */
+function socket_addrinfo_connect($address)
+{
+ error_clear_last();
+ $result = \socket_addrinfo_connect($address);
+ if ($result === false) {
+ throw SocketsException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 resource[] Returns an array of AddressInfo instances that can be used with the other socket_addrinfo functions.
+ * On failure, FALSE is returned.
* @throws SocketsException
*
*/
-function socket_addrinfo_connect($addr)
+function socket_addrinfo_lookup(string $host, $service = null, array $hints = []): iterable
{
error_clear_last();
- $result = \socket_addrinfo_connect($addr);
- if ($result === null) {
+ if ($hints !== []) {
+ $result = \socket_addrinfo_lookup($host, $service, $hints);
+ } elseif ($service !== null) {
+ $result = \socket_addrinfo_lookup($host, $service);
+ } else {
+ $result = \socket_addrinfo_lookup($host);
+ }
+ if ($result === false) {
throw SocketsException::createFromPhpError();
}
return $result;
@@ -91,7 +122,7 @@ function socket_addrinfo_connect($addr)
* a connection is be established using socket_connect
* or socket_listen.
*
- * @param resource $socket A valid socket resource created with socket_create.
+ * @param resource $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).
@@ -116,11 +147,12 @@ function socket_bind($socket, string $address, int $port = 0): void
/**
- * Initiate a connection to address using the socket resource
- * socket, which must be a valid socket
- * resource created with socket_create.
+ * Initiate a connection to address using the Socket instance
+ * socket, which must be Socket
+ * instance created with socket_create.
*
- * @param resource $socket
+ * @param resource $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
@@ -135,10 +167,14 @@ function socket_bind($socket, string $address, int $port = 0): void
* @throws SocketsException
*
*/
-function socket_connect($socket, string $address, int $port = 0): void
+function socket_connect($socket, string $address, int $port = null): void
{
error_clear_last();
- $result = \socket_connect($socket, $address, $port);
+ if ($port !== null) {
+ $result = \socket_connect($socket, $address, $port);
+ } else {
+ $result = \socket_connect($socket, $address);
+ }
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -146,7 +182,7 @@ function socket_connect($socket, string $address, int $port = 0): void
/**
- * socket_create_listen creates a new socket resource of
+ * 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.
*
@@ -159,7 +195,7 @@ function socket_connect($socket, string $address, int $port = 0): void
* SOMAXCONN may be passed as
* backlog parameter, see
* socket_listen for more information.
- * @return resource socket_create_listen returns a new socket resource
+ * @return resource 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
@@ -180,7 +216,7 @@ function socket_create_listen(int $port, int $backlog = 128)
/**
* socket_create_pair creates two connected and
- * indistinguishable sockets, and stores them in fd.
+ * 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
@@ -199,14 +235,14 @@ function socket_create_listen(int $port, int $backlog = 128)
*
* See socket_create for the full list of supported
* protocols.
- * @param resource[]|null $fd Reference to an array in which the two socket resources will be inserted.
+ * @param resource[]|null $pair Reference to an array in which the two Socket instances will be inserted.
* @throws SocketsException
*
*/
-function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$fd): void
+function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$pair): void
{
error_clear_last();
- $result = \socket_create_pair($domain, $type, $protocol, $fd);
+ $result = \socket_create_pair($domain, $type, $protocol, $pair);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -214,7 +250,7 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$f
/**
- * Creates and returns a socket resource, also referred to as an endpoint
+ * 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.
*
@@ -229,7 +265,7 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$f
* the desired protocol is TCP, or UDP the corresponding constants
* SOL_TCP, and SOL_UDP
* can also be used.
- * @return resource socket_create returns a socket resource on success. The actual error code can be retrieved by calling
+ * @return resource 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.
@@ -268,10 +304,10 @@ function socket_export_stream($socket)
/**
* The socket_get_option function retrieves the value for
- * the option specified by the optname parameter for the
+ * the option specified by the option parameter for the
* specified socket.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $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
@@ -280,7 +316,7 @@ function socket_export_stream($socket)
* TCP, can be used by
* specifying the protocol number of that level. Protocol numbers can be
* found by using the getprotobyname function.
- * @param int $optname Reports whether the socket lingers on
+ * @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,
@@ -298,14 +334,14 @@ function socket_export_stream($socket)
* 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 options.
+ * @return mixed Returns the value of the given option.
* @throws SocketsException
*
*/
-function socket_get_option($socket, int $level, int $optname)
+function socket_get_option($socket, int $level, int $option)
{
error_clear_last();
- $result = \socket_get_option($socket, $level, $optname);
+ $result = \socket_get_option($socket, $level, $option);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -317,9 +353,9 @@ function socket_get_option($socket, int $level, int $optname)
* 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 resource $socket A valid socket resource created with socket_create
+ * @param resource $socket A Socket instance created with socket_create
* or socket_accept.
- * @param string $address If the given socket is of type AF_INET or
+ * @param string|null $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
@@ -336,7 +372,7 @@ function socket_get_option($socket, int $level, int $optname)
* @throws SocketsException
*
*/
-function socket_getpeername($socket, string &$address, ?int &$port = null): void
+function socket_getpeername($socket, ?string &$address, ?int &$port = null): void
{
error_clear_last();
$result = \socket_getpeername($socket, $address, $port);
@@ -349,9 +385,9 @@ function socket_getpeername($socket, string &$address, ?int &$port = null): void
/**
*
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $socket A Socket instance created with socket_create
* or socket_accept.
- * @param string|null $addr If the given socket is of type AF_INET
+ * @param string|null $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
@@ -366,10 +402,10 @@ function socket_getpeername($socket, string &$address, ?int &$port = null): void
* @throws SocketsException
*
*/
-function socket_getsockname($socket, ?string &$addr, ?int &$port = null): void
+function socket_getsockname($socket, ?string &$address, ?int &$port = null): void
{
error_clear_last();
- $result = \socket_getsockname($socket, $addr, $port);
+ $result = \socket_getsockname($socket, $address, $port);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -380,7 +416,7 @@ function socket_getsockname($socket, ?string &$addr, ?int &$port = null): void
* Imports a stream that encapsulates a socket into a socket extension resource.
*
* @param resource $stream The stream resource to import.
- * @return resource|false Returns FALSE.
+ * @return resource Returns FALSE on failure.
* @throws SocketsException
*
*/
@@ -388,7 +424,7 @@ function socket_import_stream($stream)
{
error_clear_last();
$result = \socket_import_stream($stream);
- if ($result === null) {
+ if ($result === false) {
throw SocketsException::createFromPhpError();
}
return $result;
@@ -405,7 +441,7 @@ function socket_import_stream($stream)
* type SOCK_STREAM or
* SOCK_SEQPACKET.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $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
@@ -434,19 +470,19 @@ function socket_listen($socket, int $backlog = 0): void
/**
- * The function socket_read reads from the socket
- * resource socket created by the
+ * The function socket_read reads from the Socket instance
+ * socket created by the
* socket_create or
* socket_accept functions.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $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 type
+ * or \0 to end reading (depending on the mode
* parameter, see below).
- * @param int $type Optional type parameter is a named constant:
+ * @param int $mode Optional mode parameter is a named constant:
*
*
*
@@ -469,10 +505,10 @@ function socket_listen($socket, int $backlog = 0): void
* @throws SocketsException
*
*/
-function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string
+function socket_read($socket, int $length, int $mode = PHP_BINARY_READ): string
{
error_clear_last();
- $result = \socket_read($socket, $length, $type);
+ $result = \socket_read($socket, $length, $mode);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -482,14 +518,14 @@ function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string
/**
* The function socket_send sends
- * len bytes to the socket
- * socket from buf.
+ * length bytes to the socket
+ * socket from data.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $socket A Socket instance created with socket_create
* or socket_accept.
- * @param string $buf A buffer containing the data that will be sent to the remote host.
- * @param int $len The number of bytes that will be sent to the remote host from
- * buf.
+ * @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.
@@ -530,10 +566,10 @@ function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string
* @throws SocketsException
*
*/
-function socket_send($socket, string $buf, int $len, int $flags): int
+function socket_send($socket, string $data, int $length, int $flags): int
{
error_clear_last();
- $result = \socket_send($socket, $buf, $len, $flags);
+ $result = \socket_send($socket, $data, $length, $flags);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -564,13 +600,13 @@ function socket_sendmsg($socket, array $message, int $flags = 0): int
/**
* The function socket_sendto sends
- * len bytes from buf
+ * length bytes from data
* through the socket socket to the
- * port at the address addr.
+ * port at the address address.
*
- * @param resource $socket A valid socket resource created using socket_create.
- * @param string $buf The sent data will be taken from buffer buf.
- * @param int $len len bytes from buf will be
+ * @param resource $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 (|)
@@ -608,7 +644,7 @@ function socket_sendmsg($socket, array $message, int $flags = 0): int
*
*
*
- * @param string $addr IP address of the remote host.
+ * @param string $address IP address of the remote host.
* @param int $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
@@ -616,10 +652,14 @@ function socket_sendmsg($socket, array $message, int $flags = 0): int
* @throws SocketsException
*
*/
-function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, int $port = 0): int
+function socket_sendto($socket, string $data, int $length, int $flags, string $address, int $port = null): int
{
error_clear_last();
- $result = \socket_sendto($socket, $buf, $len, $flags, $addr, $port);
+ if ($port !== null) {
+ $result = \socket_sendto($socket, $data, $length, $flags, $address, $port);
+ } else {
+ $result = \socket_sendto($socket, $data, $length, $flags, $address);
+ }
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -636,7 +676,7 @@ function socket_sendto($socket, string $buf, int $len, int $flags, string $addr,
* a blocking socket, the script will pause its execution until it receives
* a signal or it can perform the operation.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $socket A Socket instance created with socket_create
* or socket_accept.
* @throws SocketsException
*
@@ -661,7 +701,7 @@ function socket_set_block($socket): void
* signal or it can perform the operation. Rather, if the operation would result
* in a block, the called function will fail.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $socket A Socket instance created with socket_create
* or socket_accept.
* @throws SocketsException
*
@@ -678,12 +718,12 @@ function socket_set_nonblock($socket): void
/**
* The socket_set_option function sets the option
- * specified by the optname parameter, at the
+ * specified by the option parameter, at the
* specified protocol level, to the value pointed to
- * by the optval parameter for the
+ * by the value parameter for the
* socket.
*
- * @param resource $socket A valid socket resource created with socket_create
+ * @param resource $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
@@ -692,16 +732,16 @@ function socket_set_nonblock($socket): void
* TCP, can be used by specifying the protocol number of that level.
* Protocol numbers can be found by using the
* getprotobyname function.
- * @param int $optname The available socket options are the same as those for the
+ * @param int $option The available socket options are the same as those for the
* socket_get_option function.
- * @param int|string|array $optval The option value.
+ * @param int|string|array $value The option value.
* @throws SocketsException
*
*/
-function socket_set_option($socket, int $level, int $optname, $optval): void
+function socket_set_option($socket, int $level, int $option, $value): void
{
error_clear_last();
- $result = \socket_set_option($socket, $level, $optname, $optval);
+ $result = \socket_set_option($socket, $level, $option, $value);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -713,10 +753,10 @@ function socket_set_option($socket, int $level, int $optname, $optval): void
* incoming, outgoing or all data (the default) from being sent through the
* socket
*
- * @param resource $socket A valid socket resource created with socket_create.
- * @param int $how The value of how can be one of the following:
+ * @param resource $socket A Socket instance created with socket_create.
+ * @param int $mode The value of mode can be one of the following:
*
- * possible values for how
+ * possible values for mode
*
*
*
@@ -743,10 +783,10 @@ function socket_set_option($socket, int $level, int $optname, $optval): void
* @throws SocketsException
*
*/
-function socket_shutdown($socket, int $how = 2): void
+function socket_shutdown($socket, int $mode = 2): void
{
error_clear_last();
- $result = \socket_shutdown($socket, $how);
+ $result = \socket_shutdown($socket, $mode);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -756,18 +796,18 @@ function socket_shutdown($socket, int $how = 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 target_pid.
+ * exported ID is only valid for the given process_id.
*
- * @param resource $socket A valid socket resource.
- * @param int $target_pid The ID of the process which will import the socket.
+ * @param resource $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
* @throws SocketsException
*
*/
-function socket_wsaprotocol_info_export($socket, int $target_pid): string
+function socket_wsaprotocol_info_export($socket, int $process_id): string
{
error_clear_last();
- $result = \socket_wsaprotocol_info_export($socket, $target_pid);
+ $result = \socket_wsaprotocol_info_export($socket, $process_id);
if ($result === false) {
throw SocketsException::createFromPhpError();
}
@@ -780,7 +820,7 @@ function socket_wsaprotocol_info_export($socket, int $target_pid): string
*
* @param string $info_id The ID which has been returned by a former call to
* socket_wsaprotocol_info_export.
- * @return resource Returns the socket resource
+ * @return resource Returns a Socket instance on success
* @throws SocketsException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/sodium.php b/vendor/thecodingmachine/safe/generated/sodium.php
index 6cb378adb..d13da0da9 100644
--- a/vendor/thecodingmachine/safe/generated/sodium.php
+++ b/vendor/thecodingmachine/safe/generated/sodium.php
@@ -5,24 +5,240 @@ namespace Safe;
use Safe\Exceptions\SodiumException;
/**
- * Uses a CPU- and memory-hard hash algorithm along with a randomly-generated salt, and memory and CPU limits to generate an ASCII-encoded hash suitable for password storage.
+ * Verify then decrypt with AES-256-GCM.
+ * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE.
*
- * @param string $password string; The password to generate a hash for.
- * @param int $opslimit Represents a maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. There are constants available to set the operations limit to appropriate values depending on intended use, in order of strength: SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE and SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE.
- * @param int $memlimit The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE, and SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE. Typically these should be paired with the matching opslimit values.
- * @return string Returns the hashed password.
+ * @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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_auth_verify(string $mac, string $message, string $key): void
+{
+ error_clear_last();
+ $result = \sodium_crypto_auth_verify($mac, $message, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_box_open($ciphertext, $nonce, $key_pair);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Decrypt a message that was encrypted with sodium_crypto_box_seal
*
- * In order to produce the same password hash from the same password, the same values for opslimit and memlimit must be used. These are embedded within the generated hash, so
- * everything that's needed to verify the hash is included. This allows
- * the sodium_crypto_pwhash_str_verify function to verify the hash without
- * needing separate storage for the other parameters.
+ * @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.
* @throws SodiumException
*
*/
-function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string
+function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string
{
error_clear_last();
- $result = \sodium_crypto_pwhash_str($password, $opslimit, $memlimit);
+ $result = \sodium_crypto_box_seal_open($ciphertext, $key_pair);
if ($result === false) {
throw SodiumException::createFromPhpError();
}
@@ -31,28 +247,80 @@ function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit
/**
- * This function provides low-level access to libsodium's crypto_pwhash key derivation function. Unless you have specific reason to use this function, you should use sodium_crypto_pwhash_str or password_hash functions instead.
+ * Appends a message to the internal hash state.
*
- * @param int $length integer; The length of the password hash to generate, in bytes.
- * @param string $password string; The password to generate a hash for.
- * @param string $salt string A salt to add to the password before hashing. The salt should be unpredictable, ideally generated from a good random mumber source such as random_bytes, and have a length of at least SODIUM_CRYPTO_PWHASH_SALTBYTES bytes.
- * @param int $opslimit Represents a maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. There are some constants available to set the operations limit to appropriate values depending on intended use, in order of strength: SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE and SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE.
- * @param int $memlimit The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE, and SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE. Typically these should be paired with the matching opslimit values.
- * @param int $alg integer A number indicating the hash algorithm to use. By default SODIUM_CRYPTO_PWHASH_ALG_DEFAULT (the currently recommended algorithm, which can change from one version of libsodium to another), or explicitly using SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13, representing the Argon2id algorithm version 1.3.
- * @return string Returns the derived key. The return value is a binary string of the hash, not an ASCII-encoded representation, and does not contain additional information about the parameters used to create the hash, so you will need to keep that information if you are ever going to verify the password in future. Use sodium_crypto_pwhash_str to avoid needing to do all that.
+ * @param string $state The return value of sodium_crypto_generichash_init.
+ * @param string $message Data to append to the hashing state.
* @throws SodiumException
*
*/
-function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $alg = null): string
+function sodium_crypto_generichash_update(string &$state, string $message): void
{
error_clear_last();
- if ($alg !== null) {
- $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit, $alg);
- } else {
- $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit);
+ $result = \sodium_crypto_generichash_update($state, $message);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
}
+}
+
+
+/**
+ * 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.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_secretbox_open($ciphertext, $nonce, $key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Verify the signature attached to a message and return the message
+ *
+ * @param string $signed_message A message signed with sodium_crypto_sign
+ * @param string $public_key An Ed25519 public key
+ * @return string Returns the original signed message on success.
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_sign_open(string $signed_message, string $public_key): string
+{
+ error_clear_last();
+ $result = \sodium_crypto_sign_open($signed_message, $public_key);
if ($result === false) {
throw SodiumException::createFromPhpError();
}
return $result;
}
+
+
+/**
+ * Verify signature for the message
+ *
+ * @param string $signature The cryptographic signature obtained from sodium_crypto_sign_detached
+ * @param string $message The message being verified
+ * @param string $public_key Ed25519 public key
+ * @throws SodiumException
+ *
+ */
+function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): void
+{
+ error_clear_last();
+ $result = \sodium_crypto_sign_verify_detached($signature, $message, $public_key);
+ if ($result === false) {
+ throw SodiumException::createFromPhpError();
+ }
+}
diff --git a/vendor/thecodingmachine/safe/generated/spl.php b/vendor/thecodingmachine/safe/generated/spl.php
index 679e68991..08c679dc2 100644
--- a/vendor/thecodingmachine/safe/generated/spl.php
+++ b/vendor/thecodingmachine/safe/generated/spl.php
@@ -6,19 +6,18 @@ use Safe\Exceptions\SplException;
/**
* This function returns an array with the names of the interfaces that the
- * given class and its parents implement.
+ * given object_or_class and its parents implement.
*
- * @param mixed $class An object (class instance) or a string (class or interface name).
- * @param bool $autoload Whether to allow this function to load the class automatically through
- * the __autoload magic method.
- * @return array An array on success.
+ * @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.
* @throws SplException
*
*/
-function class_implements($class, bool $autoload = true): array
+function class_implements($object_or_class, bool $autoload = true): array
{
error_clear_last();
- $result = \class_implements($class, $autoload);
+ $result = \class_implements($object_or_class, $autoload);
if ($result === false) {
throw SplException::createFromPhpError();
}
@@ -28,19 +27,18 @@ function class_implements($class, bool $autoload = true): array
/**
* This function returns an array with the name of the parent classes of
- * the given class.
+ * the given object_or_class.
*
- * @param mixed $class An object (class instance) or a string (class name).
- * @param bool $autoload Whether to allow this function to load the class automatically through
- * the __autoload magic method.
- * @return array An array on success.
+ * @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.
* @throws SplException
*
*/
-function class_parents($class, bool $autoload = true): array
+function class_parents($object_or_class, bool $autoload = true): array
{
error_clear_last();
- $result = \class_parents($class, $autoload);
+ $result = \class_parents($object_or_class, $autoload);
if ($result === false) {
throw SplException::createFromPhpError();
}
@@ -50,20 +48,19 @@ function class_parents($class, bool $autoload = true): array
/**
* This function returns an array with the names of the traits that the
- * given class uses. This does however not include
+ * given object_or_class uses. This does however not include
* any traits used by a parent class.
*
- * @param mixed $class An object (class instance) or a string (class name).
- * @param bool $autoload Whether to allow this function to load the class automatically through
- * the __autoload magic method.
- * @return array An array on success.
+ * @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.
* @throws SplException
*
*/
-function class_uses($class, bool $autoload = true): array
+function class_uses($object_or_class, bool $autoload = true): array
{
error_clear_last();
- $result = \class_uses($class, $autoload);
+ $result = \class_uses($object_or_class, $autoload);
if ($result === false) {
throw SplException::createFromPhpError();
}
@@ -87,27 +84,27 @@ function class_uses($class, bool $autoload = true): array
* runs through each of them in the order they are defined. By contrast,
* __autoload may only be defined once.
*
- * @param callable(string):void $autoload_function The autoload function being registered.
- * If no parameter is provided, then the default implementation of
+ * @param callable(string):void $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 autoload_function
+ * 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.
* @throws SplException
*
*/
-function spl_autoload_register(callable $autoload_function = null, bool $throw = true, bool $prepend = false): void
+function spl_autoload_register(callable $callback = null, bool $throw = true, bool $prepend = false): void
{
error_clear_last();
if ($prepend !== false) {
- $result = \spl_autoload_register($autoload_function, $throw, $prepend);
+ $result = \spl_autoload_register($callback, $throw, $prepend);
} elseif ($throw !== true) {
- $result = \spl_autoload_register($autoload_function, $throw);
- } elseif ($autoload_function !== null) {
- $result = \spl_autoload_register($autoload_function);
+ $result = \spl_autoload_register($callback, $throw);
+ } elseif ($callback !== null) {
+ $result = \spl_autoload_register($callback);
} else {
$result = \spl_autoload_register();
}
@@ -125,14 +122,14 @@ function spl_autoload_register(callable $autoload_function = null, bool $throw =
* When this function results in the queue being deactivated, any
* __autoload function that previously existed will not be reactivated.
*
- * @param mixed $autoload_function The autoload function being unregistered.
+ * @param mixed $callback The autoload function being unregistered.
* @throws SplException
*
*/
-function spl_autoload_unregister($autoload_function): void
+function spl_autoload_unregister($callback): void
{
error_clear_last();
- $result = \spl_autoload_unregister($autoload_function);
+ $result = \spl_autoload_unregister($callback);
if ($result === false) {
throw SplException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/ssh2.php b/vendor/thecodingmachine/safe/generated/ssh2.php
index 96af9df32..fff3ceb6f 100644
--- a/vendor/thecodingmachine/safe/generated/ssh2.php
+++ b/vendor/thecodingmachine/safe/generated/ssh2.php
@@ -381,6 +381,53 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n
/**
+ * Accepts a connection created by a listener.
+ *
+ * @param resource $listener An SSH2 Listener resource, obtained from a call to ssh2_forward_listen.
+ * @return Returns a stream resource.
+ * @throws Ssh2Exception
+ *
+ */
+function ssh2_forward_accept($listener)
+{
+ error_clear_last();
+ $result = \ssh2_forward_accept($listener);
+ if ($result === false) {
+ throw Ssh2Exception::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 string $host
+ * @param int $max_connections
+ * @return Returns an SSH2 Listener.
+ * @throws Ssh2Exception
+ *
+ */
+function ssh2_forward_listen($session, int $port, string $host = null, int $max_connections = 16)
+{
+ error_clear_last();
+ if ($max_connections !== 16) {
+ $result = \ssh2_forward_listen($session, $port, $host, $max_connections);
+ } elseif ($host !== null) {
+ $result = \ssh2_forward_listen($session, $port, $host);
+ } else {
+ $result = \ssh2_forward_listen($session, $port);
+ }
+ if ($result === false) {
+ throw Ssh2Exception::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
*
*
* @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init.
@@ -497,6 +544,27 @@ 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.
+ * @throws Ssh2Exception
+ *
+ */
+function ssh2_send_eof($channel): void
+{
+ error_clear_last();
+ $result = \ssh2_send_eof($channel);
+ if ($result === false) {
+ throw Ssh2Exception::createFromPhpError();
+ }
+}
+
+
+/**
* Attempts to change the mode of the specified file to that given in
* mode.
*
@@ -526,6 +594,7 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void
* @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.
* @throws Ssh2Exception
@@ -639,3 +708,42 @@ function ssh2_sftp($session)
}
return $result;
}
+
+
+/**
+ * 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 $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.
+ * @throws Ssh2Exception
+ *
+ */
+function ssh2_shell($session, string $term_type = "vanilla", array $env = null, int $width = 80, int $height = 25, int $width_height_type = SSH2_TERM_UNIT_CHARS)
+{
+ error_clear_last();
+ if ($width_height_type !== SSH2_TERM_UNIT_CHARS) {
+ $result = \ssh2_shell($session, $term_type, $env, $width, $height, $width_height_type);
+ } elseif ($height !== 25) {
+ $result = \ssh2_shell($session, $term_type, $env, $width, $height);
+ } elseif ($width !== 80) {
+ $result = \ssh2_shell($session, $term_type, $env, $width);
+ } elseif ($env !== null) {
+ $result = \ssh2_shell($session, $term_type, $env);
+ } else {
+ $result = \ssh2_shell($session, $term_type);
+ }
+ if ($result === false) {
+ throw Ssh2Exception::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/generated/stream.php b/vendor/thecodingmachine/safe/generated/stream.php
index 573d0295a..3d086e149 100644
--- a/vendor/thecodingmachine/safe/generated/stream.php
+++ b/vendor/thecodingmachine/safe/generated/stream.php
@@ -7,18 +7,16 @@ use Safe\Exceptions\StreamException;
/**
* Sets parameters on the specified context.
*
- * @param resource $stream_or_context The stream or context to apply the parameters too.
- * @param array $params An array of parameters to set.
- *
- * params should be an associative array of the structure:
+ * @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";.
* @throws StreamException
*
*/
-function stream_context_set_params($stream_or_context, array $params): void
+function stream_context_set_params($context, array $params): void
{
error_clear_last();
- $result = \stream_context_set_params($stream_or_context, $params);
+ $result = \stream_context_set_params($context, $params);
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -26,25 +24,31 @@ function stream_context_set_params($stream_or_context, array $params): void
/**
- * Makes a copy of up to maxlength bytes
+ * Makes a copy of up to length bytes
* of data from the current position (or from the
* offset position, if specified) in
- * source to dest. If
- * maxlength is not specified, all remaining content in
- * source will be copied.
+ * from to to. If
+ * length is NULL, all remaining content in
+ * from will be copied.
*
- * @param resource $source The source stream
- * @param resource $dest The destination stream
- * @param int $maxlength Maximum bytes to copy
+ * @param resource $from The source stream
+ * @param resource $to The destination stream
+ * @param int $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.
* @throws StreamException
*
*/
-function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset = 0): int
+function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0): int
{
error_clear_last();
- $result = \stream_copy_to_stream($source, $dest, $maxlength, $offset);
+ if ($offset !== 0) {
+ $result = \stream_copy_to_stream($from, $to, $length, $offset);
+ } elseif ($length !== null) {
+ $result = \stream_copy_to_stream($from, $to, $length);
+ } else {
+ $result = \stream_copy_to_stream($from, $to);
+ }
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -69,7 +73,7 @@ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset
* 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
+ * @param array $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
@@ -83,7 +87,7 @@ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset
* @throws StreamException
*
*/
-function stream_filter_append($stream, string $filtername, int $read_write = null, $params = null)
+function stream_filter_append($stream, string $filtername, int $read_write = null, array $params = null)
{
error_clear_last();
if ($params !== null) {
@@ -119,7 +123,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul
* 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
+ * @param array $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.
@@ -132,7 +136,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul
* @throws StreamException
*
*/
-function stream_filter_prepend($stream, string $filtername, int $read_write = null, $params = null)
+function stream_filter_prepend($stream, string $filtername, int $read_write = null, array $params = null)
{
error_clear_last();
if ($params !== null) {
@@ -155,8 +159,8 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu
* filesystem functions (such as fopen,
* fread etc.).
*
- * @param string $filtername The filter name to be registered.
- * @param string $classname To implement a filter, you need to define a class as an extension of
+ * @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
@@ -167,10 +171,10 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu
* @throws StreamException
*
*/
-function stream_filter_register(string $filtername, string $classname): void
+function stream_filter_register(string $filter_name, string $class): void
{
error_clear_last();
- $result = \stream_filter_register($filtername, $classname);
+ $result = \stream_filter_register($filter_name, $class);
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -202,11 +206,11 @@ 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
+ * length 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
+ * @param resource $stream A stream resource (e.g. returned from fopen)
+ * @param int $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.
@@ -214,10 +218,50 @@ function stream_filter_remove($stream_filter): void
* @throws StreamException
*
*/
-function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): string
+function stream_get_contents($stream, int $length = null, int $offset = -1): string
+{
+ error_clear_last();
+ if ($offset !== -1) {
+ $result = \stream_get_contents($stream, $length, $offset);
+ } elseif ($length !== null) {
+ $result = \stream_get_contents($stream, $length);
+ } else {
+ $result = \stream_get_contents($stream);
+ }
+ if ($result === false) {
+ throw StreamException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws StreamException
+ *
+ */
+function stream_get_line($stream, int $length, string $ending = ""): string
{
error_clear_last();
- $result = \stream_get_contents($handle, $maxlength, $offset);
+ $result = \stream_get_line($stream, $length, $ending);
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -269,7 +313,7 @@ function stream_resolve_include_path(string $filename): string
* (currently, regular files and socket streams).
*
* @param resource $stream The stream.
- * @param bool $mode If mode is FALSE, the given 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
@@ -280,10 +324,10 @@ function stream_resolve_include_path(string $filename): string
* @throws StreamException
*
*/
-function stream_set_blocking($stream, bool $mode): void
+function stream_set_blocking($stream, bool $enable): void
{
error_clear_last();
- $result = \stream_set_blocking($stream, $mode);
+ $result = \stream_set_blocking($stream, $enable);
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -319,10 +363,11 @@ 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 resource $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 string|null $peername Will be set to the name (address) of the client which connected, if
+ * seconds. By default, default_socket_timeout
+ * is used.
+ * @param string|null $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
@@ -331,15 +376,15 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void
* @throws StreamException
*
*/
-function stream_socket_accept($server_socket, float $timeout = null, ?string &$peername = null)
+function stream_socket_accept($socket, float $timeout = null, ?string &$peer_name = null)
{
error_clear_last();
- if ($peername !== null) {
- $result = \stream_socket_accept($server_socket, $timeout, $peername);
+ if ($peer_name !== null) {
+ $result = \stream_socket_accept($socket, $timeout, $peer_name);
} elseif ($timeout !== null) {
- $result = \stream_socket_accept($server_socket, $timeout);
+ $result = \stream_socket_accept($socket, $timeout);
} else {
- $result = \stream_socket_accept($server_socket);
+ $result = \stream_socket_accept($socket);
}
if ($result === false) {
throw StreamException::createFromPhpError();
@@ -350,20 +395,21 @@ function stream_socket_accept($server_socket, float $timeout = null, ?string &$p
/**
* Initiates a stream or datagram connection to the destination specified
- * by remote_socket. The type of socket created
+ * 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 remote_socket parameter should consist of
+ * 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 $remote_socket Address to the socket to connect to.
- * @param int $errno Will be set to the system level error number if connection fails.
- * @param string $errstr Will be set to the system level error message if the connection fails.
+ * @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 string|null $error_message 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.
+ * should timeout. By default, default_socket_timeout
+ * is used.
*
*
* This parameter only applies when not making asynchronous
@@ -397,17 +443,17 @@ function stream_socket_accept($server_socket, float $timeout = null, ?string &$p
* @throws StreamException
*
*/
-function stream_socket_client(string $remote_socket, int &$errno = null, string &$errstr = null, float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null)
+function stream_socket_client(string $address, ?int &$error_code = null, ?string &$error_message = null, float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null)
{
error_clear_last();
if ($context !== null) {
- $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags, $context);
+ $result = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags, $context);
} elseif ($flags !== STREAM_CLIENT_CONNECT) {
- $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags);
+ $result = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags);
} elseif ($timeout !== null) {
- $result = \stream_socket_client($remote_socket, $errno, $errstr, $timeout);
+ $result = \stream_socket_client($address, $error_code, $error_message, $timeout);
} else {
- $result = \stream_socket_client($remote_socket, $errno, $errstr);
+ $result = \stream_socket_client($address, $error_code, $error_message);
}
if ($result === false) {
throw StreamException::createFromPhpError();
@@ -417,6 +463,27 @@ function stream_socket_client(string $remote_socket, int &$errno = 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.
+ * @throws StreamException
+ *
+ */
+function stream_socket_get_name($socket, bool $remote): string
+{
+ error_clear_last();
+ $result = \stream_socket_get_name($socket, $remote);
+ if ($result === false) {
+ throw StreamException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* stream_socket_pair creates a pair of connected,
* indistinguishable socket streams. This function is commonly used in IPC
* (Inter-Process Communication).
@@ -451,13 +518,100 @@ function stream_socket_pair(int $domain, int $type, int $protocol): iterable
/**
+ * 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 string|null $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.
+ * @throws StreamException
+ *
+ */
+function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$address = null): string
+{
+ error_clear_last();
+ $result = \stream_socket_recvfrom($socket, $length, $flags, $address);
+ if ($result === false) {
+ throw StreamException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws StreamException
+ *
+ */
+function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ""): int
+{
+ error_clear_last();
+ $result = \stream_socket_sendto($socket, $data, $flags, $address);
+ if ($result === false) {
+ throw StreamException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Creates a stream or datagram socket on the specified
- * local_socket.
+ * address.
*
* 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
+ * @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
@@ -471,17 +625,17 @@ function stream_socket_pair(int $domain, int $type, int $protocol): iterable
* A list of available transports can be retrieved using
* stream_get_transports. See
* for a list of bulitin transports.
- * @param int $errno If the optional errno and errstr
+ * @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 errno is
+ * 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 errno and
- * errstr arguments will always be passed by reference.
- * @param string $errstr See errno description.
+ * Note that the error_code and
+ * error_message arguments will always be passed by reference.
+ * @param string|null $error_message See error_code description.
* @param int $flags A bitmask field which may be set to any combination of socket creation
* flags.
*
@@ -492,13 +646,13 @@ function stream_socket_pair(int $domain, int $type, int $protocol): iterable
* @throws StreamException
*
*/
-function stream_socket_server(string $local_socket, int &$errno = null, string &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null)
+function stream_socket_server(string $address, ?int &$error_code = null, ?string &$error_message = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null)
{
error_clear_last();
if ($context !== null) {
- $result = \stream_socket_server($local_socket, $errno, $errstr, $flags, $context);
+ $result = \stream_socket_server($address, $error_code, $error_message, $flags, $context);
} else {
- $result = \stream_socket_server($local_socket, $errno, $errstr, $flags);
+ $result = \stream_socket_server($address, $error_code, $error_message, $flags);
}
if ($result === false) {
throw StreamException::createFromPhpError();
@@ -512,7 +666,7 @@ function stream_socket_server(string $local_socket, int &$errno = null, string &
*
* @param resource $stream An open stream (opened with stream_socket_client,
* for example)
- * @param int $how One of the following constants: STREAM_SHUT_RD
+ * @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
@@ -520,10 +674,10 @@ function stream_socket_server(string $local_socket, int &$errno = null, string &
* @throws StreamException
*
*/
-function stream_socket_shutdown($stream, int $how): void
+function stream_socket_shutdown($stream, int $mode): void
{
error_clear_last();
- $result = \stream_socket_shutdown($stream, $how);
+ $result = \stream_socket_shutdown($stream, $mode);
if ($result === false) {
throw StreamException::createFromPhpError();
}
@@ -554,17 +708,18 @@ function stream_supports_lock($stream): void
* fread etc.).
*
* @param string $protocol The wrapper name to be registered.
- * @param string $classname The classname which implements the protocol.
+ * 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.
* @throws StreamException
*
*/
-function stream_wrapper_register(string $protocol, string $classname, int $flags = 0): void
+function stream_wrapper_register(string $protocol, string $class, int $flags = 0): void
{
error_clear_last();
- $result = \stream_wrapper_register($protocol, $classname, $flags);
+ $result = \stream_wrapper_register($protocol, $class, $flags);
if ($result === false) {
throw StreamException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/strings.php b/vendor/thecodingmachine/safe/generated/strings.php
index 9bc728415..2aa72339c 100644
--- a/vendor/thecodingmachine/safe/generated/strings.php
+++ b/vendor/thecodingmachine/safe/generated/strings.php
@@ -7,39 +7,15 @@ use Safe\Exceptions\StringsException;
/**
* convert_uudecode decodes a uuencoded string.
*
- * @param string $data The uuencoded data.
+ * @param string $string The uuencoded data.
* @return string Returns the decoded data as a string.
* @throws StringsException
*
*/
-function convert_uudecode(string $data): string
+function convert_uudecode(string $string): string
{
error_clear_last();
- $result = \convert_uudecode($data);
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * convert_uuencode encodes a string using the uuencode
- * algorithm.
- *
- * Uuencode translates all strings (including binary data) into printable
- * characters, making them safe for network transmissions. Uuencoded data is
- * about 35% larger than the original.
- *
- * @param string $data The data to be encoded.
- * @return string Returns the uuencoded data.
- * @throws StringsException
- *
- */
-function convert_uuencode(string $data): string
-{
- error_clear_last();
- $result = \convert_uuencode($data);
+ $result = \convert_uudecode($string);
if ($result === false) {
throw StringsException::createFromPhpError();
}
@@ -50,15 +26,15 @@ function convert_uuencode(string $data): string
/**
* Decodes a hexadecimally encoded binary string.
*
- * @param string $data Hexadecimal representation of data.
+ * @param string $string Hexadecimal representation of data.
* @return string Returns the binary representation of the given data.
* @throws StringsException
*
*/
-function hex2bin(string $data): string
+function hex2bin(string $string): string
{
error_clear_last();
- $result = \hex2bin($data);
+ $result = \hex2bin($string);
if ($result === false) {
throw StringsException::createFromPhpError();
}
@@ -74,48 +50,16 @@ function hex2bin(string $data): string
* The hash is a 32-character hexadecimal number.
*
* @param string $filename The filename
- * @param bool $raw_output When TRUE, returns the digest in raw binary format with a length of
+ * @param bool $binary When TRUE, returns the digest in raw binary format with a length of
* 16.
* @return string Returns a string on success, FALSE otherwise.
* @throws StringsException
*
*/
-function md5_file(string $filename, bool $raw_output = false): string
-{
- error_clear_last();
- $result = \md5_file($filename, $raw_output);
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Calculates the metaphone key of str.
- *
- * Similar to soundex metaphone creates the same key for
- * similar sounding words. It's more accurate than
- * soundex as it knows the basic rules of English
- * pronunciation. The metaphone generated keys are of variable length.
- *
- * Metaphone was developed by Lawrence Philips
- * &lt;lphilips at verity dot com&gt;. It is described in ["Practical
- * Algorithms for Programmers", Binstock &amp; Rex, Addison Wesley,
- * 1995].
- *
- * @param string $str The input string.
- * @param int $phonemes This parameter restricts the returned metaphone key to
- * phonemes characters in length.
- * The default value of 0 means no restriction.
- * @return string Returns the metaphone key as a string.
- * @throws StringsException
- *
- */
-function metaphone(string $str, int $phonemes = 0): string
+function md5_file(string $filename, bool $binary = false): string
{
error_clear_last();
- $result = \metaphone($str, $phonemes);
+ $result = \md5_file($filename, $binary);
if ($result === false) {
throw StringsException::createFromPhpError();
}
@@ -127,718 +71,16 @@ function metaphone(string $str, int $phonemes = 0): string
*
*
* @param string $filename The filename of the file to hash.
- * @param bool $raw_output When TRUE, returns the digest in raw binary format with a length of
+ * @param bool $binary When TRUE, returns the digest in raw binary format with a length of
* 20.
* @return string Returns a string on success, FALSE otherwise.
* @throws StringsException
*
*/
-function sha1_file(string $filename, bool $raw_output = false): string
-{
- error_clear_last();
- $result = \sha1_file($filename, $raw_output);
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Calculates the soundex key of str.
- *
- * Soundex keys have the property that words pronounced similarly
- * produce the same soundex key, and can thus be used to simplify
- * searches in databases where you know the pronunciation but not
- * the spelling. This soundex function returns a string 4 characters
- * long, starting with a letter.
- *
- * This particular soundex function is one described by Donald Knuth
- * in "The Art Of Computer Programming, vol. 3: Sorting And
- * Searching", Addison-Wesley (1973), pp. 391-392.
- *
- * @param string $str The input string.
- * @return string Returns the soundex key as a string.
- * @throws StringsException
- *
- */
-function soundex(string $str): string
-{
- error_clear_last();
- $result = \soundex($str);
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns a string produced according to the formatting string
- * format.
- *
- * @param string $format The format string is composed of zero or more directives:
- * ordinary characters (excluding %) that are
- * copied directly to the result and conversion
- * specifications, each of which results in fetching its
- * own parameter.
- *
- * A conversion specification follows this prototype:
- * %[argnum$][flags][width][.precision]specifier.
- *
- * An integer followed by a dollar sign $,
- * to specify which number argument to treat in the conversion.
- *
- *
- * Flags
- *
- *
- *
- * Flag
- * Description
- *
- *
- *
- *
- * -
- *
- * Left-justify within the given field width;
- * Right justification is the default
- *
- *
- *
- * +
- *
- * Prefix positive numbers with a plus sign
- * +; Default only negative
- * are prefixed with a negative sign.
- *
- *
- *
- * (space)
- *
- * Pads the result with spaces.
- * This is the default.
- *
- *
- *
- * 0
- *
- * Only left-pads numbers with zeros.
- * With s specifiers this can
- * also right-pad with zeros.
- *
- *
- *
- * '(char)
- *
- * Pads the result with the character (char).
- *
- *
- *
- *
- *
- *
- * An integer that says how many characters (minimum)
- * this conversion should result in.
- *
- * A period . followed by an integer
- * who's meaning depends on the specifier:
- *
- *
- *
- * For e, E,
- * f and F
- * specifiers: this is the number of digits to be printed
- * after the decimal point (by default, this is 6).
- *
- *
- *
- *
- * For g and G
- * specifiers: this is the maximum number of significant
- * digits to be printed.
- *
- *
- *
- *
- * For s specifier: it acts as a cutoff point,
- * setting a maximum character limit to the string.
- *
- *
- *
- *
- *
- * If the period is specified without an explicit value for precision,
- * 0 is assumed.
- *
- *
- *
- *
- * Specifiers
- *
- *
- *
- * Specifier
- * Description
- *
- *
- *
- *
- * %
- *
- * A literal percent character. No argument is required.
- *
- *
- *
- * b
- *
- * The argument is treated as an integer and presented
- * as a binary number.
- *
- *
- *
- * c
- *
- * The argument is treated as an integer and presented
- * as the character with that ASCII.
- *
- *
- *
- * d
- *
- * The argument is treated as an integer and presented
- * as a (signed) decimal number.
- *
- *
- *
- * e
- *
- * The argument is treated as scientific notation (e.g. 1.2e+2).
- * The precision specifier stands for the number of digits after the
- * decimal point since PHP 5.2.1. In earlier versions, it was taken as
- * number of significant digits (one less).
- *
- *
- *
- * E
- *
- * Like the e specifier but uses
- * uppercase letter (e.g. 1.2E+2).
- *
- *
- *
- * f
- *
- * The argument is treated as a float and presented
- * as a floating-point number (locale aware).
- *
- *
- *
- * F
- *
- * The argument is treated as a float and presented
- * as a floating-point number (non-locale aware).
- * Available as of PHP 5.0.3.
- *
- *
- *
- * g
- *
- *
- * General format.
- *
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- *
- *
- *
- * G
- *
- * Like the g specifier but uses
- * E and f.
- *
- *
- *
- * o
- *
- * The argument is treated as an integer and presented
- * as an octal number.
- *
- *
- *
- * s
- *
- * The argument is treated and presented as a string.
- *
- *
- *
- * u
- *
- * The argument is treated as an integer and presented
- * as an unsigned decimal number.
- *
- *
- *
- * x
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with lowercase letters).
- *
- *
- *
- * X
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with uppercase letters).
- *
- *
- *
- *
- *
- *
- * General format.
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- * The c type specifier ignores padding and width
- *
- * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
- *
- * Variables will be co-erced to a suitable type for the specifier:
- *
- * Type Handling
- *
- *
- *
- * Type
- * Specifiers
- *
- *
- *
- *
- * string
- * s
- *
- *
- * integer
- *
- * d,
- * u,
- * c,
- * o,
- * x,
- * X,
- * b
- *
- *
- *
- * double
- *
- * g,
- * G,
- * e,
- * E,
- * f,
- * F
- *
- *
- *
- *
- *
- * @param mixed $params
- * @return string Returns a string produced according to the formatting string
- * format.
- * @throws StringsException
- *
- */
-function sprintf(string $format, ...$params): string
-{
- error_clear_last();
- if ($params !== []) {
- $result = \sprintf($format, ...$params);
- } else {
- $result = \sprintf($format);
- }
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the portion of string specified by the
- * start and length parameters.
- *
- * @param string $string The input string.
- * @param int $start If start is non-negative, the returned string
- * will start at the start'th position in
- * string, counting from zero. For instance,
- * in the string 'abcdef', the character at
- * position 0 is 'a', the
- * character at position 2 is
- * 'c', and so forth.
- *
- * If start is negative, the returned string
- * will start at the start'th character
- * from the end of string.
- *
- * If string is less than
- * start characters long, FALSE will be returned.
- *
- *
- * Using a negative start
- *
- *
- * ]]>
- *
- *
- * @param int $length If length is given and is positive, the string
- * returned will contain at most length characters
- * beginning from start (depending on the length of
- * string).
- *
- * If length is given and is negative, then that many
- * characters will be omitted from the end of string
- * (after the start position has been calculated when a
- * start is negative). If
- * start denotes the position of this truncation or
- * beyond, FALSE will be returned.
- *
- * If length is given and is 0,
- * FALSE or NULL, an empty string will be returned.
- *
- * If length is omitted, the substring starting from
- * start until the end of the string will be
- * returned.
- * @return string Returns the extracted part of string;, or
- * an empty string.
- * @throws StringsException
- *
- */
-function substr(string $string, int $start, int $length = null): string
-{
- error_clear_last();
- if ($length !== null) {
- $result = \substr($string, $start, $length);
- } else {
- $result = \substr($string, $start);
- }
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Operates as sprintf but accepts an array of
- * arguments, rather than a variable number of arguments.
- *
- * @param string $format The format string is composed of zero or more directives:
- * ordinary characters (excluding %) that are
- * copied directly to the result and conversion
- * specifications, each of which results in fetching its
- * own parameter.
- *
- * A conversion specification follows this prototype:
- * %[argnum$][flags][width][.precision]specifier.
- *
- * An integer followed by a dollar sign $,
- * to specify which number argument to treat in the conversion.
- *
- *
- * Flags
- *
- *
- *
- * Flag
- * Description
- *
- *
- *
- *
- * -
- *
- * Left-justify within the given field width;
- * Right justification is the default
- *
- *
- *
- * +
- *
- * Prefix positive numbers with a plus sign
- * +; Default only negative
- * are prefixed with a negative sign.
- *
- *
- *
- * (space)
- *
- * Pads the result with spaces.
- * This is the default.
- *
- *
- *
- * 0
- *
- * Only left-pads numbers with zeros.
- * With s specifiers this can
- * also right-pad with zeros.
- *
- *
- *
- * '(char)
- *
- * Pads the result with the character (char).
- *
- *
- *
- *
- *
- *
- * An integer that says how many characters (minimum)
- * this conversion should result in.
- *
- * A period . followed by an integer
- * who's meaning depends on the specifier:
- *
- *
- *
- * For e, E,
- * f and F
- * specifiers: this is the number of digits to be printed
- * after the decimal point (by default, this is 6).
- *
- *
- *
- *
- * For g and G
- * specifiers: this is the maximum number of significant
- * digits to be printed.
- *
- *
- *
- *
- * For s specifier: it acts as a cutoff point,
- * setting a maximum character limit to the string.
- *
- *
- *
- *
- *
- * If the period is specified without an explicit value for precision,
- * 0 is assumed.
- *
- *
- *
- *
- * Specifiers
- *
- *
- *
- * Specifier
- * Description
- *
- *
- *
- *
- * %
- *
- * A literal percent character. No argument is required.
- *
- *
- *
- * b
- *
- * The argument is treated as an integer and presented
- * as a binary number.
- *
- *
- *
- * c
- *
- * The argument is treated as an integer and presented
- * as the character with that ASCII.
- *
- *
- *
- * d
- *
- * The argument is treated as an integer and presented
- * as a (signed) decimal number.
- *
- *
- *
- * e
- *
- * The argument is treated as scientific notation (e.g. 1.2e+2).
- * The precision specifier stands for the number of digits after the
- * decimal point since PHP 5.2.1. In earlier versions, it was taken as
- * number of significant digits (one less).
- *
- *
- *
- * E
- *
- * Like the e specifier but uses
- * uppercase letter (e.g. 1.2E+2).
- *
- *
- *
- * f
- *
- * The argument is treated as a float and presented
- * as a floating-point number (locale aware).
- *
- *
- *
- * F
- *
- * The argument is treated as a float and presented
- * as a floating-point number (non-locale aware).
- * Available as of PHP 5.0.3.
- *
- *
- *
- * g
- *
- *
- * General format.
- *
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- *
- *
- *
- * G
- *
- * Like the g specifier but uses
- * E and f.
- *
- *
- *
- * o
- *
- * The argument is treated as an integer and presented
- * as an octal number.
- *
- *
- *
- * s
- *
- * The argument is treated and presented as a string.
- *
- *
- *
- * u
- *
- * The argument is treated as an integer and presented
- * as an unsigned decimal number.
- *
- *
- *
- * x
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with lowercase letters).
- *
- *
- *
- * X
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with uppercase letters).
- *
- *
- *
- *
- *
- *
- * General format.
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- * The c type specifier ignores padding and width
- *
- * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
- *
- * Variables will be co-erced to a suitable type for the specifier:
- *
- * Type Handling
- *
- *
- *
- * Type
- * Specifiers
- *
- *
- *
- *
- * string
- * s
- *
- *
- * integer
- *
- * d,
- * u,
- * c,
- * o,
- * x,
- * X,
- * b
- *
- *
- *
- * double
- *
- * g,
- * G,
- * e,
- * E,
- * f,
- * F
- *
- *
- *
- *
- *
- * @param array $args
- * @return string Return array values as a formatted string according to
- * format.
- * @throws StringsException
- *
- */
-function vsprintf(string $format, array $args): string
+function sha1_file(string $filename, bool $binary = false): string
{
error_clear_last();
- $result = \vsprintf($format, $args);
+ $result = \sha1_file($filename, $binary);
if ($result === false) {
throw StringsException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/swoole.php b/vendor/thecodingmachine/safe/generated/swoole.php
index 334d96bd9..a9c3ff3e6 100644
--- a/vendor/thecodingmachine/safe/generated/swoole.php
+++ b/vendor/thecodingmachine/safe/generated/swoole.php
@@ -7,6 +7,46 @@ use Safe\Exceptions\SwooleException;
/**
*
*
+ * @param string $hostname The host name.
+ * @param callable $callback The host name.
+ *
+ * The IP address.
+ * @throws SwooleException
+ *
+ */
+function swoole_async_dns_lookup(string $hostname, callable $callback): void
+{
+ error_clear_last();
+ $result = \swoole_async_dns_lookup($hostname, $callback);
+ if ($result === false) {
+ throw SwooleException::createFromPhpError();
+ }
+}
+
+
+/**
+ *
+ *
+ * @param string $filename The filename of the file being read.
+ * @param string $callback The name of the file.
+ *
+ * The content read from the file.
+ * @throws SwooleException
+ *
+ */
+function swoole_async_readfile(string $filename, string $callback): void
+{
+ error_clear_last();
+ $result = \swoole_async_readfile($filename, $callback);
+ if ($result === false) {
+ throw SwooleException::createFromPhpError();
+ }
+}
+
+
+/**
+ *
+ *
* @param string $filename The filename being written.
* @param string $content The content writing to the file.
* @param int $offset The offset.
diff --git a/vendor/thecodingmachine/safe/generated/uodbc.php b/vendor/thecodingmachine/safe/generated/uodbc.php
index 89775c825..6ac914bdf 100644
--- a/vendor/thecodingmachine/safe/generated/uodbc.php
+++ b/vendor/thecodingmachine/safe/generated/uodbc.php
@@ -10,24 +10,24 @@ use Safe\Exceptions\UodbcException;
* By default, auto-commit is on for a connection. Disabling
* auto-commit is equivalent with starting a transaction.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
- * @param bool $OnOff If OnOff is TRUE, auto-commit is enabled, if
+ * @param bool $enable If enable is TRUE, auto-commit is enabled, if
* it is FALSE auto-commit is disabled.
- * @return mixed Without the OnOff parameter, this function returns
- * auto-commit status for connection_id. Non-zero is
+ * @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 OnOff is set, this function returns TRUE on
+ * If enable is set, this function returns TRUE on
* success.
* @throws UodbcException
*
*/
-function odbc_autocommit($connection_id, bool $OnOff = false)
+function odbc_autocommit($odbc, bool $enable = false)
{
error_clear_last();
- $result = \odbc_autocommit($connection_id, $OnOff);
+ $result = \odbc_autocommit($odbc, $enable);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -103,9 +103,9 @@ function odbc_autocommit($connection_id, bool $OnOff = false)
* If odbc_result is used, passthru means that the data are
* sent directly to the client (i.e. printed).
*
- * @param int $result_id The result identifier.
+ * @param int $statement The result identifier.
*
- * If result_id is 0, the
+ * If statement is 0, the
* settings apply as default for new results.
* @param int $mode Possible values for mode are:
*
@@ -134,10 +134,10 @@ function odbc_autocommit($connection_id, bool $OnOff = false)
* @throws UodbcException
*
*/
-function odbc_binmode(int $result_id, int $mode): void
+function odbc_binmode(int $statement, int $mode): void
{
error_clear_last();
- $result = \odbc_binmode($result_id, $mode);
+ $result = \odbc_binmode($statement, $mode);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -147,18 +147,18 @@ function odbc_binmode(int $result_id, int $mode): void
/**
* Lists columns and associated privileges for the given table.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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_name The table name.
+ * @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_name The column name.
+ * @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.
@@ -181,10 +181,10 @@ function odbc_binmode(int $result_id, int $mode): void
* @throws UodbcException
*
*/
-function odbc_columnprivileges($connection_id, string $catalog, string $schema, string $table_name, string $column_name)
+function odbc_columnprivileges($odbc, string $catalog, string $schema, string $table, string $column)
{
error_clear_last();
- $result = \odbc_columnprivileges($connection_id, $catalog, $schema, $table_name, $column_name);
+ $result = \odbc_columnprivileges($odbc, $catalog, $schema, $table, $column);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -195,18 +195,18 @@ function odbc_columnprivileges($connection_id, string $catalog, string $schema,
/**
* Lists all columns in the requested range.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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_name The table name.
+ * @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_name The column name.
+ * @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.
@@ -237,19 +237,19 @@ function odbc_columnprivileges($connection_id, string $catalog, string $schema,
* @throws UodbcException
*
*/
-function odbc_columns($connection_id, string $catalog = null, string $schema = null, string $table_name = null, string $column_name = null)
+function odbc_columns($odbc, string $catalog = null, string $schema = null, string $table = null, string $column = null)
{
error_clear_last();
- if ($column_name !== null) {
- $result = \odbc_columns($connection_id, $catalog, $schema, $table_name, $column_name);
- } elseif ($table_name !== null) {
- $result = \odbc_columns($connection_id, $catalog, $schema, $table_name);
+ if ($column !== null) {
+ $result = \odbc_columns($odbc, $catalog, $schema, $table, $column);
+ } elseif ($table !== null) {
+ $result = \odbc_columns($odbc, $catalog, $schema, $table);
} elseif ($schema !== null) {
- $result = \odbc_columns($connection_id, $catalog, $schema);
+ $result = \odbc_columns($odbc, $catalog, $schema);
} elseif ($catalog !== null) {
- $result = \odbc_columns($connection_id, $catalog);
+ $result = \odbc_columns($odbc, $catalog);
} else {
- $result = \odbc_columns($connection_id);
+ $result = \odbc_columns($odbc);
}
if ($result === false) {
throw UodbcException::createFromPhpError();
@@ -261,15 +261,15 @@ function odbc_columns($connection_id, string $catalog = null, string $schema = n
/**
* Commits all pending transactions on the connection.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
* @throws UodbcException
*
*/
-function odbc_commit($connection_id): void
+function odbc_commit($odbc): void
{
error_clear_last();
- $result = \odbc_commit($connection_id);
+ $result = \odbc_commit($odbc);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -277,10 +277,72 @@ function odbc_commit($connection_id): void
/**
+ *
+ *
+ * @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.
+ * @throws UodbcException
+ *
+ */
+function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
+{
+ error_clear_last();
+ $result = \odbc_connect($dsn, $user, $password, $cursor_option);
+ if ($result === false) {
+ throw UodbcException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Gets the cursorname for the given result_id.
+ *
+ * @param resource $statement The result identifier.
+ * @return string Returns the cursor name, as a string.
+ * @throws UodbcException
+ *
+ */
+function odbc_cursor($statement): string
+{
+ error_clear_last();
+ $result = \odbc_cursor($statement);
+ if ($result === false) {
+ throw UodbcException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* This function will return the list of available DSN (after calling it
* several times).
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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.
@@ -291,10 +353,10 @@ function odbc_commit($connection_id): void
* @throws UodbcException
*
*/
-function odbc_data_source($connection_id, int $fetch_type): array
+function odbc_data_source($odbc, int $fetch_type): array
{
error_clear_last();
- $result = \odbc_data_source($connection_id, $fetch_type);
+ $result = \odbc_data_source($odbc, $fetch_type);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -305,23 +367,18 @@ function odbc_data_source($connection_id, int $fetch_type): array
/**
* Sends an SQL statement to the database server.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
- * @param string $query_string The SQL statement.
- * @param int $flags This parameter is currently not used.
+ * @param string $query The SQL statement.
* @return resource Returns an ODBC result identifier if the SQL command was executed
* successfully.
* @throws UodbcException
*
*/
-function odbc_exec($connection_id, string $query_string, int $flags = null)
+function odbc_exec($odbc, string $query)
{
error_clear_last();
- if ($flags !== null) {
- $result = \odbc_exec($connection_id, $query_string, $flags);
- } else {
- $result = \odbc_exec($connection_id, $query_string);
- }
+ $result = \odbc_exec($odbc, $query);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -332,27 +389,23 @@ function odbc_exec($connection_id, string $query_string, int $flags = null)
/**
* Executes a statement prepared with odbc_prepare.
*
- * @param resource $result_id The result id resource, from odbc_prepare.
- * @param array $parameters_array Parameters in parameter_array will be
+ * @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 parameter_array which
+ * 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.
* @throws UodbcException
*
*/
-function odbc_execute($result_id, array $parameters_array = null): void
+function odbc_execute($statement, array $params = []): void
{
error_clear_last();
- if ($parameters_array !== null) {
- $result = \odbc_execute($result_id, $parameters_array);
- } else {
- $result = \odbc_execute($result_id);
- }
+ $result = \odbc_execute($statement, $params);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -362,25 +415,21 @@ function odbc_execute($result_id, array $parameters_array = null): void
/**
* Fetch one result row into array.
*
- * @param resource $result_id The result resource.
- * @param array|null $result_array The result 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 $rownumber The row number.
+ * @param int $row The row number.
* @return int Returns the number of columns in the result;
* FALSE on error.
* @throws UodbcException
*
*/
-function odbc_fetch_into($result_id, ?array &$result_array, int $rownumber = null): int
+function odbc_fetch_into($statement, ?array &$array, int $row = 0): int
{
error_clear_last();
- if ($rownumber !== null) {
- $result = \odbc_fetch_into($result_id, $result_array, $rownumber);
- } else {
- $result = \odbc_fetch_into($result_id, $result_array);
- }
+ $result = \odbc_fetch_into($statement, $array, $row);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -392,16 +441,16 @@ function odbc_fetch_into($result_id, ?array &$result_array, int $rownumber = nul
* Gets the length of the field referenced by number in the given result
* identifier.
*
- * @param resource $result_id The result identifier.
- * @param int $field_number The field number. Field numbering starts at 1.
+ * @param resource $statement The result identifier.
+ * @param int $field The field number. Field numbering starts at 1.
* @return int Returns the field length.
* @throws UodbcException
*
*/
-function odbc_field_len($result_id, int $field_number): int
+function odbc_field_len($statement, int $field): int
{
error_clear_last();
- $result = \odbc_field_len($result_id, $field_number);
+ $result = \odbc_field_len($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -413,16 +462,16 @@ function odbc_field_len($result_id, int $field_number): int
* Gets the name of the field occupying the given column number in the given
* result identifier.
*
- * @param resource $result_id The result identifier.
- * @param int $field_number The field number. Field numbering starts at 1.
+ * @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.
* @throws UodbcException
*
*/
-function odbc_field_name($result_id, int $field_number): string
+function odbc_field_name($statement, int $field): string
{
error_clear_last();
- $result = \odbc_field_name($result_id, $field_number);
+ $result = \odbc_field_name($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -434,17 +483,17 @@ function odbc_field_name($result_id, int $field_number): string
* Gets the number of the column slot that corresponds to the named field in
* the given result identifier.
*
- * @param resource $result_id The result identifier.
- * @param string $field_name The field name.
+ * @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.
* @throws UodbcException
*
*/
-function odbc_field_num($result_id, string $field_name): int
+function odbc_field_num($statement, string $field): int
{
error_clear_last();
- $result = \odbc_field_num($result_id, $field_name);
+ $result = \odbc_field_num($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -456,16 +505,16 @@ function odbc_field_num($result_id, string $field_name): int
* Gets the scale of the field referenced by number in the given result
* identifier.
*
- * @param resource $result_id The result identifier.
- * @param int $field_number The field number. Field numbering starts at 1.
+ * @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.
* @throws UodbcException
*
*/
-function odbc_field_scale($result_id, int $field_number): int
+function odbc_field_scale($statement, int $field): int
{
error_clear_last();
- $result = \odbc_field_scale($result_id, $field_number);
+ $result = \odbc_field_scale($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -477,16 +526,16 @@ function odbc_field_scale($result_id, int $field_number): int
* Gets the SQL type of the field referenced by number in the given result
* identifier.
*
- * @param resource $result_id The result identifier.
- * @param int $field_number The field number. Field numbering starts at 1.
+ * @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.
* @throws UodbcException
*
*/
-function odbc_field_type($result_id, int $field_number): string
+function odbc_field_type($statement, int $field): string
{
error_clear_last();
- $result = \odbc_field_type($result_id, $field_number);
+ $result = \odbc_field_type($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -499,7 +548,7 @@ function odbc_field_type($result_id, int $field_number): string
* foreign keys in other tables that refer to the primary key in the
* specified table
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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.
@@ -530,10 +579,10 @@ function odbc_field_type($result_id, int $field_number): string
* @throws UodbcException
*
*/
-function odbc_foreignkeys($connection_id, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table)
+function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table)
{
error_clear_last();
- $result = \odbc_foreignkeys($connection_id, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table);
+ $result = \odbc_foreignkeys($odbc, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -544,7 +593,7 @@ function odbc_foreignkeys($connection_id, string $pk_catalog, string $pk_schema,
/**
* Retrieves information about data types supported by the data source.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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.
@@ -573,14 +622,10 @@ function odbc_foreignkeys($connection_id, string $pk_catalog, string $pk_schema,
* @throws UodbcException
*
*/
-function odbc_gettypeinfo($connection_id, int $data_type = null)
+function odbc_gettypeinfo($odbc, int $data_type = 0)
{
error_clear_last();
- if ($data_type !== null) {
- $result = \odbc_gettypeinfo($connection_id, $data_type);
- } else {
- $result = \odbc_gettypeinfo($connection_id);
- }
+ $result = \odbc_gettypeinfo($odbc, $data_type);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -593,17 +638,17 @@ function odbc_gettypeinfo($connection_id, int $data_type = null)
* The default length can be set using the
* uodbc.defaultlrl php.ini directive.
*
- * @param resource $result_id The result identifier.
+ * @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.
* @throws UodbcException
*
*/
-function odbc_longreadlen($result_id, int $length): void
+function odbc_longreadlen($statement, int $length): void
{
error_clear_last();
- $result = \odbc_longreadlen($result_id, $length);
+ $result = \odbc_longreadlen($statement, $length);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -611,6 +656,38 @@ function odbc_longreadlen($result_id, int $length): void
/**
+ * 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.
+ * @throws UodbcException
+ *
+ */
+function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
+{
+ error_clear_last();
+ $result = \odbc_pconnect($dsn, $user, $password, $cursor_option);
+ if ($result === false) {
+ throw UodbcException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Prepares a statement for execution. The result identifier can be used
* later to execute the statement with odbc_execute.
*
@@ -619,18 +696,18 @@ function odbc_longreadlen($result_id, int $length): void
* defined by the ODBC specification. However, the Unified ODBC driver
* currently only supports parameters of type IN to stored procedures.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
- * @param string $query_string The query string statement being prepared.
+ * @param string $query The query string statement being prepared.
* @return resource Returns an ODBC result identifier if the SQL command was prepared
* successfully.
* @throws UodbcException
*
*/
-function odbc_prepare($connection_id, string $query_string)
+function odbc_prepare($odbc, string $query)
{
error_clear_last();
- $result = \odbc_prepare($connection_id, $query_string);
+ $result = \odbc_prepare($odbc, $query);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -642,7 +719,7 @@ function odbc_prepare($connection_id, string $query_string)
* Returns a result identifier that can be used to fetch the column names
* that comprise the primary key for a table.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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).
@@ -662,10 +739,130 @@ function odbc_prepare($connection_id, string $query_string)
* @throws UodbcException
*
*/
-function odbc_primarykeys($connection_id, string $catalog, string $schema, string $table)
+function odbc_primarykeys($odbc, string $catalog, string $schema, string $table)
+{
+ error_clear_last();
+ $result = \odbc_primarykeys($odbc, $catalog, $schema, $table);
+ if ($result === false) {
+ throw UodbcException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Retrieve information about parameters to procedures.
+ *
+ * @param $odbc The ODBC connection identifier,
+ * 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 $procedure The proc.
+ * This parameter accepts the following search patterns:
+ * % to match zero or more characters,
+ * and _ to match a single character.
+ * @param 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.
+ * @throws UodbcException
+ *
+ */
+function odbc_procedurecolumns($odbc, string $catalog = null, string $schema = null, string $procedure = null, string $column = null)
{
error_clear_last();
- $result = \odbc_primarykeys($connection_id, $catalog, $schema, $table);
+ if ($column !== null) {
+ $result = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure, $column);
+ } elseif ($procedure !== null) {
+ $result = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure);
+ } elseif ($schema !== null) {
+ $result = \odbc_procedurecolumns($odbc, $catalog, $schema);
+ } elseif ($catalog !== null) {
+ $result = \odbc_procedurecolumns($odbc, $catalog);
+ } else {
+ $result = \odbc_procedurecolumns($odbc);
+ }
+ if ($result === false) {
+ throw UodbcException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Lists all procedures in the requested range.
+ *
+ * @param $odbc The ODBC connection identifier,
+ * 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 $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.
+ * @throws UodbcException
+ *
+ */
+function odbc_procedures($odbc, string $catalog = null, string $schema = null, string $procedure = null)
+{
+ error_clear_last();
+ if ($procedure !== null) {
+ $result = \odbc_procedures($odbc, $catalog, $schema, $procedure);
+ } elseif ($schema !== null) {
+ $result = \odbc_procedures($odbc, $catalog, $schema);
+ } elseif ($catalog !== null) {
+ $result = \odbc_procedures($odbc, $catalog);
+ } else {
+ $result = \odbc_procedures($odbc);
+ }
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -681,20 +878,16 @@ function odbc_primarykeys($connection_id, string $catalog, string $schema, strin
* 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 $result_id The result identifier.
+ * @param resource $statement The result identifier.
* @param string $format Additional overall table formatting.
* @return int Returns the number of rows in the result.
* @throws UodbcException
*
*/
-function odbc_result_all($result_id, string $format = null): int
+function odbc_result_all($statement, string $format = ""): int
{
error_clear_last();
- if ($format !== null) {
- $result = \odbc_result_all($result_id, $format);
- } else {
- $result = \odbc_result_all($result_id);
- }
+ $result = \odbc_result_all($statement, $format);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -705,7 +898,7 @@ function odbc_result_all($result_id, string $format = null): int
/**
* Get result data
*
- * @param resource $result_id The ODBC resource.
+ * @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.
@@ -714,10 +907,10 @@ function odbc_result_all($result_id, string $format = null): int
* @throws UodbcException
*
*/
-function odbc_result($result_id, $field)
+function odbc_result($statement, $field)
{
error_clear_last();
- $result = \odbc_result($result_id, $field);
+ $result = \odbc_result($statement, $field);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -728,15 +921,15 @@ function odbc_result($result_id, $field)
/**
* Rolls back all pending statements on the connection.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
* @throws UodbcException
*
*/
-function odbc_rollback($connection_id): void
+function odbc_rollback($odbc): void
{
error_clear_last();
- $result = \odbc_rollback($connection_id);
+ $result = \odbc_rollback($odbc);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -762,21 +955,21 @@ function odbc_rollback($connection_id): void
* to use a commercial product, that's all that really
* matters.
*
- * @param resource $id Is a connection id or result id on which to change the settings.
+ * @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 $function Is the ODBC function to use. The value should be
+ * @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 $param The value for the given option.
+ * @param int $value The value for the given option.
* @throws UodbcException
*
*/
-function odbc_setoption($id, int $function, int $option, int $param): void
+function odbc_setoption($odbc, int $which, int $option, int $value): void
{
error_clear_last();
- $result = \odbc_setoption($id, $function, $option, $param);
+ $result = \odbc_setoption($odbc, $which, $option, $value);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -788,7 +981,7 @@ function odbc_setoption($id, int $function, int $option, int $param): void
* row in the table, or columns that are automatically updated when any
* value in the row is updated by a transaction.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* see odbc_connect for details.
* @param int $type
* @param string $catalog The catalog ('qualifier' in ODBC 2 parlance).
@@ -816,10 +1009,10 @@ function odbc_setoption($id, int $function, int $option, int $param): void
* @throws UodbcException
*
*/
-function odbc_specialcolumns($connection_id, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable)
+function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable)
{
error_clear_last();
- $result = \odbc_specialcolumns($connection_id, $type, $catalog, $schema, $table, $scope, $nullable);
+ $result = \odbc_specialcolumns($odbc, $type, $catalog, $schema, $table, $scope, $nullable);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -830,11 +1023,11 @@ function odbc_specialcolumns($connection_id, int $type, string $catalog, string
/**
* Get statistics about a table and its indexes.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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_name The table name.
+ * @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.
@@ -862,10 +1055,10 @@ function odbc_specialcolumns($connection_id, int $type, string $catalog, string
* @throws UodbcException
*
*/
-function odbc_statistics($connection_id, string $catalog, string $schema, string $table_name, int $unique, int $accuracy)
+function odbc_statistics($odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy)
{
error_clear_last();
- $result = \odbc_statistics($connection_id, $catalog, $schema, $table_name, $unique, $accuracy);
+ $result = \odbc_statistics($odbc, $catalog, $schema, $table, $unique, $accuracy);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -877,14 +1070,14 @@ function odbc_statistics($connection_id, string $catalog, string $schema, string
* Lists tables in the requested range and the privileges associated
* with each table.
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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 $name The name.
+ * @param string $table The name.
* This parameter accepts the following search patterns:
* % to match zero or more characters,
* and _ to match a single character.
@@ -904,10 +1097,10 @@ function odbc_statistics($connection_id, string $catalog, string $schema, string
* @throws UodbcException
*
*/
-function odbc_tableprivileges($connection_id, string $catalog, string $schema, string $name)
+function odbc_tableprivileges($odbc, string $catalog, string $schema, string $table)
{
error_clear_last();
- $result = \odbc_tableprivileges($connection_id, $catalog, $schema, $name);
+ $result = \odbc_tableprivileges($odbc, $catalog, $schema, $table);
if ($result === false) {
throw UodbcException::createFromPhpError();
}
@@ -921,14 +1114,14 @@ function odbc_tableprivileges($connection_id, string $catalog, string $schema, s
* To support enumeration of qualifiers, owners, and table types,
* the following special semantics for the
* catalog, schema,
- * name, and
+ * table, and
* table_type are available:
*
*
*
* If catalog is a single percent
* character (%) and schema and
- * name are empty strings, then the result
+ * 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.)
@@ -938,7 +1131,7 @@ function odbc_tableprivileges($connection_id, string $catalog, string $schema, s
*
* If schema is a single percent character
* (%) and catalog and
- * name are empty strings, then the result
+ * 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.)
@@ -948,7 +1141,7 @@ function odbc_tableprivileges($connection_id, string $catalog, string $schema, s
*
* If table_type is a single percent
* character (%) and catalog,
- * schema and name
+ * 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.)
@@ -956,14 +1149,14 @@ function odbc_tableprivileges($connection_id, string $catalog, string $schema, s
*
*
*
- * @param resource $connection_id The ODBC connection identifier,
+ * @param resource $odbc The ODBC connection identifier,
* 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 $name The name.
+ * @param string $table The name.
* This parameter accepts the following search patterns:
* % to match zero or more characters,
* and _ to match a single character.
@@ -988,19 +1181,19 @@ function odbc_tableprivileges($connection_id, string $catalog, string $schema, s
* @throws UodbcException
*
*/
-function odbc_tables($connection_id, string $catalog = null, string $schema = null, string $name = null, string $types = null)
+function odbc_tables($odbc, string $catalog = null, string $schema = null, string $table = null, string $types = null)
{
error_clear_last();
if ($types !== null) {
- $result = \odbc_tables($connection_id, $catalog, $schema, $name, $types);
- } elseif ($name !== null) {
- $result = \odbc_tables($connection_id, $catalog, $schema, $name);
+ $result = \odbc_tables($odbc, $catalog, $schema, $table, $types);
+ } elseif ($table !== null) {
+ $result = \odbc_tables($odbc, $catalog, $schema, $table);
} elseif ($schema !== null) {
- $result = \odbc_tables($connection_id, $catalog, $schema);
+ $result = \odbc_tables($odbc, $catalog, $schema);
} elseif ($catalog !== null) {
- $result = \odbc_tables($connection_id, $catalog);
+ $result = \odbc_tables($odbc, $catalog);
} else {
- $result = \odbc_tables($connection_id);
+ $result = \odbc_tables($odbc);
}
if ($result === false) {
throw UodbcException::createFromPhpError();
diff --git a/vendor/thecodingmachine/safe/generated/url.php b/vendor/thecodingmachine/safe/generated/url.php
index 56c08b551..5871e6dc6 100644
--- a/vendor/thecodingmachine/safe/generated/url.php
+++ b/vendor/thecodingmachine/safe/generated/url.php
@@ -5,9 +5,9 @@ namespace Safe;
use Safe\Exceptions\UrlException;
/**
- * Decodes a base64 encoded data.
+ * Decodes a base64 encoded string.
*
- * @param string $data The encoded data.
+ * @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
@@ -17,10 +17,10 @@ use Safe\Exceptions\UrlException;
* @throws UrlException
*
*/
-function base64_decode(string $data, bool $strict = false): string
+function base64_decode(string $string, bool $strict = false): string
{
error_clear_last();
- $result = \base64_decode($data, $strict);
+ $result = \base64_decode($string, $strict);
if ($result === false) {
throw UrlException::createFromPhpError();
}
@@ -33,22 +33,23 @@ function base64_decode(string $data, bool $strict = false): string
* by the server in response to a HTTP request.
*
* @param string $url The target URL.
- * @param int $format If the optional format parameter is set to non-zero,
+ * @param bool $associative If the optional associative parameter is set to true,
* get_headers parses the response and sets the
* array's keys.
* @param resource $context A valid context resource created with
- * stream_context_create.
+ * stream_context_create, or NULL to use the
+ * default context.
* @return array Returns an indexed or associative array with the headers.
* @throws UrlException
*
*/
-function get_headers(string $url, int $format = 0, $context = null): array
+function get_headers(string $url, bool $associative = false, $context = null): array
{
error_clear_last();
if ($context !== null) {
- $result = \get_headers($url, $format, $context);
+ $result = \get_headers($url, $associative, $context);
} else {
- $result = \get_headers($url, $format);
+ $result = \get_headers($url, $associative);
}
if ($result === false) {
throw UrlException::createFromPhpError();
@@ -58,17 +59,63 @@ function get_headers(string $url, int $format = 0, $context = null): array
/**
+ * Opens filename and parses it line by line for
+ * &lt;meta&gt; tags in the file. The parsing stops at
+ * &lt;/head&gt;.
+ *
+ * @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.
+ * @throws UrlException
+ *
+ */
+function get_meta_tags(string $filename, bool $use_include_path = false): array
+{
+ error_clear_last();
+ $result = \get_meta_tags($filename, $use_include_path);
+ if ($result === false) {
+ throw UrlException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* 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
+ * 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. Invalid characters are replaced by
- * _.
+ * @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,
@@ -76,8 +123,8 @@ function get_headers(string $url, int $format = 0, $context = null): array
* 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 integer).
- * @return mixed On seriously malformed URLs, parse_url.
+ * value will be an int).
+ * @return array|int|string|null On seriously malformed URLs, parse_url.
*
* If the component parameter is omitted, an
* associative array is returned. At least one element will be
@@ -127,9 +174,22 @@ function get_headers(string $url, int $format = 0, $context = null): array
*
* If the component parameter is specified,
* parse_url returns a string (or an
- * integer, in the case of PHP_URL_PORT)
+ * 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 (_).
* @throws UrlException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/xml.php b/vendor/thecodingmachine/safe/generated/xml.php
index 4f9f6606c..6f2679dd6 100644
--- a/vendor/thecodingmachine/safe/generated/xml.php
+++ b/vendor/thecodingmachine/safe/generated/xml.php
@@ -5,72 +5,449 @@ namespace Safe;
use Safe\Exceptions\XmlException;
/**
- * xml_parser_create_ns creates a new XML parser
- * with XML namespace support and returns a resource handle referencing
- * it to be used by the other XML functions.
- *
- * @param string $encoding The input encoding is automatically detected, so that the
- * encoding parameter specifies only the output
- * encoding. In PHP 5.0.0 and 5.0.1, the default output charset is
- * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
- * encodings are ISO-8859-1, UTF-8 and
- * US-ASCII.
- * @param string $separator With a namespace aware parser tag parameters passed to the various
- * handler functions will consist of namespace and tag name separated by
- * the string specified in separator.
- * @return resource Returns a resource handle for the new XML parser.
+ * Frees the given XML parser.
+ *
+ * @param resource $parser
* @throws XmlException
*
*/
-function xml_parser_create_ns(string $encoding = null, string $separator = ":")
+function xml_parser_free($parser): void
{
error_clear_last();
- if ($separator !== ":") {
- $result = \xml_parser_create_ns($encoding, $separator);
- } elseif ($encoding !== null) {
- $result = \xml_parser_create_ns($encoding);
- } else {
- $result = \xml_parser_create_ns();
+ $result = \xml_parser_free($parser);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
}
+}
+
+
+/**
+ * Sets the character data handler function for the XML parser
+ * parser.
+ *
+ * @param resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_character_data_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_character_data_handler($parser, $handler);
if ($result === false) {
throw XmlException::createFromPhpError();
}
- return $result;
}
/**
- * xml_parser_create creates a new XML parser
- * and returns a resource handle referencing it to be used by the
- * other XML functions.
- *
- * @param string $encoding The optional encoding specifies the character
- * encoding for the input/output in PHP 4. Starting from PHP 5, the input
- * encoding is automatically detected, so that the
- * encoding parameter specifies only the output
- * encoding. In PHP 4, the default output encoding is the same as the
- * input charset. If empty string is passed, the parser attempts to identify
- * which encoding the document is encoded in by looking at the heading 3 or
- * 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is
- * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
- * encodings are ISO-8859-1, UTF-8 and
- * US-ASCII.
- * @return resource Returns a resource handle for the new XML parser.
+ * Sets the default handler function for the XML parser
+ * parser.
+ *
+ * @param resource $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.
* @throws XmlException
*
*/
-function xml_parser_create(string $encoding = null)
+function xml_set_default_handler($parser, callable $handler): void
{
error_clear_last();
- if ($encoding !== null) {
- $result = \xml_parser_create($encoding);
- } else {
- $result = \xml_parser_create();
+ $result = \xml_set_default_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
}
+}
+
+
+/**
+ * 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 resource $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
+ * @throws XmlException
+ *
+ */
+function xml_set_element_handler($parser, callable $start_handler, callable $end_handler): void
+{
+ error_clear_last();
+ $result = \xml_set_element_handler($parser, $start_handler, $end_handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_end_namespace_decl_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_end_namespace_decl_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * Sets the external entity reference handler function for the XML parser
+ * parser.
+ *
+ * @param resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_external_entity_ref_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_external_entity_ref_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_notation_decl_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_notation_decl_handler($parser, $handler);
if ($result === false) {
throw XmlException::createFromPhpError();
}
- return $result;
}
@@ -85,7 +462,7 @@ function xml_parser_create(string $encoding = null)
* @throws XmlException
*
*/
-function xml_set_object($parser, object &$object): void
+function xml_set_object($parser, object $object): void
{
error_clear_last();
$result = \xml_set_object($parser, $object);
@@ -93,3 +470,247 @@ function xml_set_object($parser, object &$object): void
throw XmlException::createFromPhpError();
}
}
+
+
+/**
+ * Sets the processing instruction (PI) handler function for the XML parser
+ * parser.
+ *
+ * A processing instruction has the following format:
+ *
+ * &lt;?target
+ * data?&gt;
+ *
+ *
+ * You can put PHP code into such a tag, but be aware of one limitation: in
+ * an XML PI, the PI end tag (?&gt;) 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 resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_processing_instruction_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_processing_instruction_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_start_namespace_decl_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_start_namespace_decl_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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 resource $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.
+ * @throws XmlException
+ *
+ */
+function xml_set_unparsed_entity_decl_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $result = \xml_set_unparsed_entity_decl_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
diff --git a/vendor/thecodingmachine/safe/generated/yaml.php b/vendor/thecodingmachine/safe/generated/yaml.php
index 38daaf759..fd297aad5 100644
--- a/vendor/thecodingmachine/safe/generated/yaml.php
+++ b/vendor/thecodingmachine/safe/generated/yaml.php
@@ -26,7 +26,11 @@ use Safe\Exceptions\YamlException;
function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, array $callbacks = null)
{
error_clear_last();
- $result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks);
+ if ($callbacks !== null) {
+ $result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks);
+ } else {
+ $result = \yaml_parse_file($filename, $pos, $ndocs);
+ }
if ($result === false) {
throw YamlException::createFromPhpError();
}
@@ -59,7 +63,11 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ar
function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, array $callbacks = null)
{
error_clear_last();
- $result = \yaml_parse_url($url, $pos, $ndocs, $callbacks);
+ if ($callbacks !== null) {
+ $result = \yaml_parse_url($url, $pos, $ndocs, $callbacks);
+ } else {
+ $result = \yaml_parse_url($url, $pos, $ndocs);
+ }
if ($result === false) {
throw YamlException::createFromPhpError();
}
@@ -89,7 +97,11 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, array $c
function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, array $callbacks = null)
{
error_clear_last();
- $result = \yaml_parse($input, $pos, $ndocs, $callbacks);
+ if ($callbacks !== null) {
+ $result = \yaml_parse($input, $pos, $ndocs, $callbacks);
+ } else {
+ $result = \yaml_parse($input, $pos, $ndocs);
+ }
if ($result === false) {
throw YamlException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/zip.php b/vendor/thecodingmachine/safe/generated/zip.php
index 8fd22bb9a..d4097eb16 100644
--- a/vendor/thecodingmachine/safe/generated/zip.php
+++ b/vendor/thecodingmachine/safe/generated/zip.php
@@ -22,9 +22,86 @@ 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.
+ * @throws ZipException
+ *
+ */
+function zip_entry_compressedsize($zip_entry): int
+{
+ error_clear_last();
+ $result = \zip_entry_compressedsize($zip_entry);
+ if ($result === false) {
+ throw ZipException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ZipException
+ *
+ */
+function zip_entry_compressionmethod($zip_entry): string
+{
+ error_clear_last();
+ $result = \zip_entry_compressionmethod($zip_entry);
+ if ($result === false) {
+ throw ZipException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ZipException
+ *
+ */
+function zip_entry_filesize($zip_entry): int
+{
+ error_clear_last();
+ $result = \zip_entry_filesize($zip_entry);
+ if ($result === false) {
+ throw ZipException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ZipException
+ *
+ */
+function zip_entry_name($zip_entry): string
+{
+ error_clear_last();
+ $result = \zip_entry_name($zip_entry);
+ if ($result === false) {
+ throw ZipException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
* Opens a directory entry in a zip file for reading.
*
- * @param resource $zip A valid resource handle returned by zip_open.
+ * @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.
@@ -35,14 +112,10 @@ function zip_entry_close($zip_entry): void
* @throws ZipException
*
*/
-function zip_entry_open($zip, $zip_entry, string $mode = null): void
+function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void
{
error_clear_last();
- if ($mode !== null) {
- $result = \zip_entry_open($zip, $zip_entry, $mode);
- } else {
- $result = \zip_entry_open($zip, $zip_entry);
- }
+ $result = \zip_entry_open($zip_dp, $zip_entry, $mode);
if ($result === false) {
throw ZipException::createFromPhpError();
}
@@ -53,17 +126,17 @@ function zip_entry_open($zip, $zip_entry, string $mode = null): void
* Reads from an open directory entry.
*
* @param resource $zip_entry A directory entry returned by zip_read.
- * @param int $length The number of bytes to return.
+ * @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.
* @throws ZipException
*
*/
-function zip_entry_read($zip_entry, int $length = 1024): string
+function zip_entry_read($zip_entry, int $len = 1024): string
{
error_clear_last();
- $result = \zip_entry_read($zip_entry, $length);
+ $result = \zip_entry_read($zip_entry, $len);
if ($result === false) {
throw ZipException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/generated/zlib.php b/vendor/thecodingmachine/safe/generated/zlib.php
index 4dc3ca94f..c365525e8 100644
--- a/vendor/thecodingmachine/safe/generated/zlib.php
+++ b/vendor/thecodingmachine/safe/generated/zlib.php
@@ -71,7 +71,11 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH):
* window
*
*
- * The zlib window size (logarithmic) in range 8..15; defaults to 15.
+ * 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.
*
*
*
@@ -101,7 +105,11 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH):
*
* The compression memory level in range 1..9; defaults to 8.
*
- * The zlib window size (logarithmic) in range 8..15; defaults to 15.
+ * 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,
@@ -115,7 +123,7 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH):
* @throws ZlibException
*
*/
-function deflate_init(int $encoding, array $options = null)
+function deflate_init(int $encoding, array $options = [])
{
error_clear_last();
$result = \deflate_init($encoding, $options);
@@ -129,15 +137,15 @@ function deflate_init(int $encoding, array $options = null)
/**
* Closes the given gz-file pointer.
*
- * @param resource $zp The gz-file pointer. It must be valid, and must point to a file
+ * @param resource $stream The gz-file pointer. It must be valid, and must point to a file
* successfully opened by gzopen.
* @throws ZlibException
*
*/
-function gzclose($zp): void
+function gzclose($stream): void
{
error_clear_last();
- $result = \gzclose($zp);
+ $result = \gzclose($stream);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -178,19 +186,15 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING
* data.
*
* @param string $data The data to decode, encoded by gzencode.
- * @param int $length The maximum length of data to decode.
- * @return string The decoded string.
+ * @param int $max_length The maximum length of data to decode.
+ * @return string The decoded string, or.
* @throws ZlibException
*
*/
-function gzdecode(string $data, int $length = null): string
+function gzdecode(string $data, int $max_length = 0): string
{
error_clear_last();
- if ($length !== null) {
- $result = \gzdecode($data, $length);
- } else {
- $result = \gzdecode($data);
- }
+ $result = \gzdecode($data, $max_length);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -239,24 +243,42 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_
* @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_mode The encoding mode. Can be FORCE_GZIP (the default)
+ * @param int $encoding The encoding mode. Can be FORCE_GZIP (the default)
* or FORCE_DEFLATE.
*
- * Prior to PHP 5.4.0, using FORCE_DEFLATE results in
- * a standard zlib deflated string (inclusive zlib headers) after a gzip
- * file header but without the trailing crc32 checksum.
- *
- * In PHP 5.4.0 and later, FORCE_DEFLATE generates
+ * FORCE_DEFLATE generates
* RFC 1950 compliant output, consisting of a zlib header, the deflated
* data, and an Adler checksum.
* @return string The encoded string.
* @throws ZlibException
*
*/
-function gzencode(string $data, int $level = -1, int $encoding_mode = FORCE_GZIP): string
+function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string
{
error_clear_last();
- $result = \gzencode($data, $level, $encoding_mode);
+ $result = \gzencode($data, $level, $encoding);
+ if ($result === false) {
+ throw ZlibException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 array An array containing the file, one line per cell, empty lines included, and with newlines still attached.
+ * @throws ZlibException
+ *
+ */
+function gzfile(string $filename, int $use_include_path = 0): array
+{
+ error_clear_last();
+ $result = \gzfile($filename, $use_include_path);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -269,20 +291,20 @@ function gzencode(string $data, int $level = -1, int $encoding_mode = FORCE_GZIP
* file pointer. Reading ends when length - 1 bytes have been read, on a
* newline, or on EOF (whichever comes first).
*
- * @param resource $zp The gz-file pointer. It must be valid, and must point to a file
+ * @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 length of data to get.
* @return string The uncompressed string.
* @throws ZlibException
*
*/
-function gzgets($zp, int $length = null): string
+function gzgets($stream, int $length = null): string
{
error_clear_last();
if ($length !== null) {
- $result = \gzgets($zp, $length);
+ $result = \gzgets($stream, $length);
} else {
- $result = \gzgets($zp);
+ $result = \gzgets($stream);
}
if ($result === false) {
throw ZlibException::createFromPhpError();
@@ -324,19 +346,56 @@ function gzgetss($zp, int $length, string $allowable_tags = null): string
* This function inflates a deflated string.
*
* @param string $data The data compressed by gzdeflate.
- * @param int $length The maximum length of data to decode.
+ * @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 more than the optional parameter length.
+ * or, unless max_length is 0, more than the optional parameter max_length.
* @throws ZlibException
*
*/
-function gzinflate(string $data, int $length = 0): string
+function gzinflate(string $data, int $max_length = 0): string
{
error_clear_last();
- $result = \gzinflate($data, $length);
+ $result = \gzinflate($data, $max_length);
+ if ($result === false) {
+ throw ZlibException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ZlibException
+ *
+ */
+function gzopen(string $filename, string $mode, int $use_include_path = 0)
+{
+ error_clear_last();
+ $result = \gzopen($filename, $mode, $use_include_path);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -348,17 +407,41 @@ function gzinflate(string $data, int $length = 0): string
* Reads to EOF on the given gz-file pointer from the current position and
* writes the (uncompressed) results to standard output.
*
- * @param resource $zp The gz-file pointer. It must be valid, and must point to a file
+ * @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.
* @throws ZlibException
*
*/
-function gzpassthru($zp): int
+function gzpassthru($stream): int
{
error_clear_last();
- $result = \gzpassthru($zp);
+ $result = \gzpassthru($stream);
+ if ($result === false) {
+ throw ZlibException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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.
+ * @throws ZlibException
+ *
+ */
+function gzread($stream, int $length): string
+{
+ error_clear_last();
+ $result = \gzread($stream, $length);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -370,15 +453,15 @@ function gzpassthru($zp): int
* Sets the file position indicator of the given gz-file pointer to the
* beginning of the file stream.
*
- * @param resource $zp The gz-file pointer. It must be valid, and must point to a file
+ * @param resource $stream The gz-file pointer. It must be valid, and must point to a file
* successfully opened by gzopen.
* @throws ZlibException
*
*/
-function gzrewind($zp): void
+function gzrewind($stream): void
{
error_clear_last();
- $result = \gzrewind($zp);
+ $result = \gzrewind($stream);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -389,19 +472,50 @@ function gzrewind($zp): void
* This function uncompress a compressed string.
*
* @param string $data The data compressed by gzcompress.
- * @param int $length The maximum length of data to decode.
+ * @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 length.
+ * or more than the optional parameter max_length.
+ * @throws ZlibException
+ *
+ */
+function gzuncompress(string $data, int $max_length = 0): string
+{
+ error_clear_last();
+ $result = \gzuncompress($data, $max_length);
+ if ($result === false) {
+ throw ZlibException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * 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 $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.
* @throws ZlibException
*
*/
-function gzuncompress(string $data, int $length = 0): string
+function gzwrite($stream, string $data, int $length = null): int
{
error_clear_last();
- $result = \gzuncompress($data, $length);
+ if ($length !== null) {
+ $result = \gzwrite($stream, $data, $length);
+ } else {
+ $result = \gzwrite($stream, $data);
+ }
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -412,15 +526,15 @@ function gzuncompress(string $data, int $length = 0): string
/**
*
*
- * @param resource $resource
+ * @param resource $context
* @return int Returns number of bytes read so far.
* @throws ZlibException
*
*/
-function inflate_get_read_len($resource): int
+function inflate_get_read_len($context): int
{
error_clear_last();
- $result = \inflate_get_read_len($resource);
+ $result = \inflate_get_read_len($context);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -431,15 +545,15 @@ function inflate_get_read_len($resource): int
/**
* Usually returns either ZLIB_OK or ZLIB_STREAM_END.
*
- * @param resource $resource
+ * @param resource $context
* @return int Returns decompression status.
* @throws ZlibException
*
*/
-function inflate_get_status($resource): int
+function inflate_get_status($context): int
{
error_clear_last();
- $result = \inflate_get_status($resource);
+ $result = \inflate_get_status($context);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -454,7 +568,7 @@ function inflate_get_status($resource): int
* available.
*
* @param resource $context A context created with inflate_init.
- * @param string $encoded_data A chunk of compressed data.
+ * @param string $data A chunk of compressed data.
* @param int $flush_mode One of ZLIB_BLOCK,
* ZLIB_NO_FLUSH,
* ZLIB_PARTIAL_FLUSH,
@@ -468,10 +582,10 @@ function inflate_get_status($resource): int
* @throws ZlibException
*
*/
-function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string
+function inflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string
{
error_clear_last();
- $result = \inflate_add($context, $encoded_data, $flush_mode);
+ $result = \inflate_add($context, $data, $flush_mode);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
@@ -550,7 +664,7 @@ function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC
* @throws ZlibException
*
*/
-function inflate_init(int $encoding, array $options = null)
+function inflate_init(int $encoding, array $options = [])
{
error_clear_last();
$result = \inflate_init($encoding, $options);
@@ -591,19 +705,15 @@ function readgzfile(string $filename, int $use_include_path = 0): int
* Uncompress any raw/gzip/zlib encoded data.
*
* @param string $data
- * @param int $max_decoded_len
+ * @param int $max_length
* @return string Returns the uncompressed data.
* @throws ZlibException
*
*/
-function zlib_decode(string $data, int $max_decoded_len = null): string
+function zlib_decode(string $data, int $max_length = 0): string
{
error_clear_last();
- if ($max_decoded_len !== null) {
- $result = \zlib_decode($data, $max_decoded_len);
- } else {
- $result = \zlib_decode($data);
- }
+ $result = \zlib_decode($data, $max_length);
if ($result === false) {
throw ZlibException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/lib/DateTime.php b/vendor/thecodingmachine/safe/lib/DateTime.php
index 581ef35c0..56eb809f8 100644
--- a/vendor/thecodingmachine/safe/lib/DateTime.php
+++ b/vendor/thecodingmachine/safe/lib/DateTime.php
@@ -24,7 +24,7 @@ class DateTime extends \DateTime
*/
public static function createFromFormat($format, $time, $timezone = null): self
{
- $datetime = parent::createFromFormat($format, $time, $timezone);
+ $datetime = \DateTime::createFromFormat($format, $time, $timezone);
if ($datetime === false) {
throw DatetimeException::createFromPhpError();
}
diff --git a/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php b/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php
index 114ec3a3d..5cedd24a0 100644
--- a/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php
+++ b/vendor/thecodingmachine/safe/lib/DateTimeImmutable.php
@@ -2,10 +2,6 @@
namespace Safe;
-use DateInterval;
-use DateTime;
-use DateTimeInterface;
-use DateTimeZone;
use Safe\Exceptions\DatetimeException;
/**
@@ -23,7 +19,7 @@ class DateTimeImmutable extends \DateTimeImmutable
/**
* DateTimeImmutable constructor.
* @param string $time
- * @param DateTimeZone|null $timezone
+ * @param \DateTimeZone|null $timezone
* @throws \Exception
*/
public function __construct($time = 'now', $timezone = null)
@@ -52,12 +48,12 @@ class DateTimeImmutable extends \DateTimeImmutable
/**
* @param string $format
* @param string $time
- * @param DateTimeZone|null $timezone
+ * @param \DateTimeZone|null $timezone
* @throws DatetimeException
*/
public static function createFromFormat($format, $time, $timezone = null): self
{
- $datetime = parent::createFromFormat($format, $time, $timezone);
+ $datetime = \DateTimeImmutable::createFromFormat($format, $time, $timezone);
if ($datetime === false) {
throw DatetimeException::createFromPhpError();
}
@@ -80,12 +76,12 @@ class DateTimeImmutable extends \DateTimeImmutable
}
/**
- * @param DateTimeInterface $datetime2
+ * @param \DateTimeInterface $datetime2
* @param bool $absolute
- * @return DateInterval
+ * @return \DateInterval
* @throws DatetimeException
*/
- public function diff($datetime2, $absolute = false): DateInterval
+ public function diff($datetime2, $absolute = false): \DateInterval
{
/** @var \DateInterval|false $result */
$result = $this->innerDateTime->diff($datetime2, $absolute);
@@ -178,7 +174,7 @@ class DateTimeImmutable extends \DateTimeImmutable
}
/**
- * @param DateTimeZone $timezone
+ * @param \DateTimeZone $timezone
* @return DateTimeImmutable
* @throws DatetimeException
*/
@@ -193,7 +189,7 @@ class DateTimeImmutable extends \DateTimeImmutable
}
/**
- * @param DateInterval $interval
+ * @param \DateInterval $interval
* @return DateTimeImmutable
* @throws DatetimeException
*/
@@ -224,7 +220,7 @@ class DateTimeImmutable extends \DateTimeImmutable
//overload getters to use the inner datetime immutable instead of itself
/**
- * @param DateInterval $interval
+ * @param \DateInterval $interval
* @return DateTimeImmutable
*/
public function add($interval): self
@@ -233,12 +229,14 @@ class DateTimeImmutable extends \DateTimeImmutable
}
/**
- * @param DateTime $dateTime
+ * @param \DateTime $dateTime
* @return DateTimeImmutable
*/
public static function createFromMutable($dateTime): self
{
- return self::createFromRegular(parent::createFromMutable($dateTime));
+ $date = \DateTimeImmutable::createFromMutable($dateTime);
+
+ return self::createFromRegular($date);
}
/**
@@ -250,7 +248,7 @@ class DateTimeImmutable extends \DateTimeImmutable
return self::createFromRegular(parent::__set_state($array));
}
- public function getTimezone(): DateTimeZone
+ public function getTimezone(): \DateTimeZone
{
return $this->innerDateTime->getTimezone();
}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
index 2814066b0..d0dbdb695 100644
--- a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
@@ -6,9 +6,9 @@ namespace Safe\Exceptions;
class CurlException extends \Exception implements SafeExceptionInterface
{
/**
- * @param resource $ch
+ * @param \CurlHandle $ch
*/
- public static function createFromCurlResource($ch): self
+ public static function createFromPhpError($ch): self
{
return new self(\curl_error($ch), \curl_errno($ch));
}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php b/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
index 4300d29e9..d7d5a010d 100644
--- a/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
@@ -3,7 +3,7 @@
namespace Safe\Exceptions;
-class JsonException extends \Exception implements SafeExceptionInterface
+class JsonException extends \JsonException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php
index 67804e133..477a9151c 100644
--- a/vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php
@@ -5,7 +5,7 @@ class SimplexmlException extends \ErrorException implements SafeExceptionInterfa
{
public static function createFromPhpError(): self
{
- $error = error_get_last();
+ $error = \error_get_last();
return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
}
}
diff --git a/vendor/thecodingmachine/safe/lib/special_cases.php b/vendor/thecodingmachine/safe/lib/special_cases.php
index d18e2118b..b95fe0b77 100644
--- a/vendor/thecodingmachine/safe/lib/special_cases.php
+++ b/vendor/thecodingmachine/safe/lib/special_cases.php
@@ -7,13 +7,18 @@
namespace Safe;
-use Safe\Exceptions\SocketsException;
+use Safe\Exceptions\FilesystemException;
use const PREG_NO_ERROR;
+
+use Safe\Exceptions\MiscException;
+use Safe\Exceptions\PosixException;
+use Safe\Exceptions\SocketsException;
use Safe\Exceptions\ApcException;
use Safe\Exceptions\ApcuException;
use Safe\Exceptions\JsonException;
use Safe\Exceptions\OpensslException;
use Safe\Exceptions\PcreException;
+use Safe\Exceptions\SimplexmlException;
/**
* Wrapper for json_decode that throws when an error occurs.
@@ -21,7 +26,7 @@ use Safe\Exceptions\PcreException;
* @param string $json JSON data to parse
* @param bool $assoc When true, returned objects will be converted
* into associative arrays.
- * @param int $depth User specified recursion depth.
+ * @param int<1, max> $depth User specified recursion depth.
* @param int $options Bitmask of JSON decode options.
*
* @return mixed
@@ -83,12 +88,12 @@ function apcu_fetch($key)
* pattern and replaces them with
* replacement.
*
- * @param mixed $pattern The pattern to search for. It can be either a string or an array with
+ * @param string[]|string $pattern The pattern to search for. It can be either a string or an array with
* strings.
*
* Several PCRE modifiers
* are also available.
- * @param mixed $replacement The string or an array with strings to replace. If this parameter is a
+ * @param string[]|string $replacement The string or an array with strings to replace. If this parameter is a
* string and the pattern parameter is an array,
* all patterns will be replaced by that string. If both
* pattern and replacement
@@ -216,7 +221,7 @@ function openssl_encrypt(string $data, string $method, string $key, int $options
* socket from the given
* buffer.
*
- * @param resource $socket
+ * @param \Socket $socket
* @param string $buffer The buffer to be written.
* @param int $length The optional parameter length can specify an
* alternate length of bytes written to the socket. If this length is
@@ -230,7 +235,7 @@ function openssl_encrypt(string $data, string $method, string $key, int $options
* @throws SocketsException
*
*/
-function socket_write($socket, string $buffer, int $length = 0): int
+function socket_write(\Socket $socket, string $buffer, int $length = 0): int
{
error_clear_last();
$result = $length === 0 ? \socket_write($socket, $buffer) : \socket_write($socket, $buffer, $length);
@@ -239,3 +244,164 @@ function socket_write($socket, string $buffer, int $length = 0): int
}
return $result;
}
+
+/**
+ * This function takes a node of a DOM
+ * document and makes it into a SimpleXML node. This new object can
+ * then be used as a native SimpleXML element.
+ *
+ * @param \DOMNode $node A DOM Element node
+ * @param string $class_name You may use this optional parameter so that
+ * simplexml_import_dom will return an object of
+ * the specified class. That class should extend the
+ * SimpleXMLElement class.
+ * @return \SimpleXMLElement Returns a SimpleXMLElement.
+ * @throws SimplexmlException
+ *
+ */
+function simplexml_import_dom(\DOMNode $node, string $class_name = \SimpleXMLElement::class): \SimpleXMLElement
+{
+ error_clear_last();
+ $result = \simplexml_import_dom($node, $class_name);
+ if ($result === null) {
+ throw SimplexmlException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * Convert the well-formed XML document in the given file to an object.
+ *
+ * @param string $filename Path to the XML file
+ * @param string $class_name You may use this optional parameter so that
+ * simplexml_load_file will return an object of
+ * the specified class. That class should extend the
+ * SimpleXMLElement class.
+ * @param int $options Since Libxml 2.6.0, you may also use the
+ * options parameter to specify additional Libxml parameters.
+ * @param string $namespace_or_prefix Namespace prefix or URI.
+ * @param bool $is_prefix TRUE if namespace_or_prefix is a prefix, FALSE if it's a URI;
+ * defaults to FALSE.
+ * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with
+ * properties containing the data held within the XML document.
+ * @throws SimplexmlException
+ *
+ */
+function simplexml_load_file(string $filename, string $class_name = \SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): \SimpleXMLElement
+{
+ error_clear_last();
+ $result = \simplexml_load_file($filename, $class_name, $options, $namespace_or_prefix, $is_prefix);
+ if ($result === false) {
+ throw SimplexmlException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * Takes a well-formed XML string and returns it as an object.
+ *
+ * @param string $data A well-formed XML string
+ * @param string $class_name You may use this optional parameter so that
+ * simplexml_load_string will return an object of
+ * the specified class. That class should extend the
+ * SimpleXMLElement class.
+ * @param int $options Since Libxml 2.6.0, you may also use the
+ * options parameter to specify additional Libxml parameters.
+ * @param string $namespace_or_prefix Namespace prefix or URI.
+ * @param bool $is_prefix TRUE if namespace_or_prefix is a prefix, FALSE if it's a URI;
+ * defaults to FALSE.
+ * @return \SimpleXMLElement Returns an object of class SimpleXMLElement with
+ * properties containing the data held within the xml document.
+ * @throws SimplexmlException
+ *
+ */
+function simplexml_load_string(string $data, string $class_name = \SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): \SimpleXMLElement
+{
+ error_clear_last();
+ $result = \simplexml_load_string($data, $class_name, $options, $namespace_or_prefix, $is_prefix);
+ if ($result === false) {
+ throw SimplexmlException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * Returns three samples representing the average system load
+ * (the number of processes in the system run queue) over the last 1, 5 and 15
+ * minutes, respectively. Returns FALSE on failure.
+ *
+ * @return array<int,float> Returns an array with three samples (last 1, 5 and 15
+ * minutes).
+ * @throws MiscException
+ *
+ */
+function sys_getloadavg(): array
+{
+ error_clear_last();
+ $result = \sys_getloadavg();
+ if ($result === false) {
+ throw MiscException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * Returns the process group identifier of the process
+ * process_id.
+ *
+ * @param int $process_id The process id.
+ * @return int Returns the identifier, as an int.
+ * @throws PosixException
+ *
+ */
+function posix_getpgid(int $process_id): int
+{
+ error_clear_last();
+ $result = \posix_getpgid($process_id);
+ if ($result === false) {
+ throw PosixException::createFromPhpError();
+ }
+ return $result;
+}
+
+
+/**
+ * fputcsv formats a line (passed as a
+ * fields array) as CSV and writes it (terminated by a
+ * newline) to the specified 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).
+ * @phpstan-param (scalar|\Stringable|null)[] $fields
+ * @param array $fields An array of strings.
+ * @param string $separator The optional separator parameter sets the field
+ * delimiter (one single-byte character only).
+ * @param string $enclosure The optional enclosure parameter sets the field
+ * enclosure (one single-byte character only).
+ * @param string $escape The optional escape parameter sets the
+ * escape character (at most one single-byte character).
+ * An empty string ("") disables the proprietary escape mechanism.
+ * @param string $eol The optional eol parameter sets
+ * a custom End of Line sequence.
+ * @return int Returns the length of the written string.
+ * @throws FilesystemException
+ *
+ */
+function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = "\"", string $escape = "\\", string $eol = "\n"): int
+{
+ error_clear_last();
+ if (PHP_VERSION_ID >= 80100) {
+ /** @phpstan-ignore-next-line */
+ $result = \fputcsv($stream, $fields, $separator, $enclosure, $escape, $eol);
+ } else {
+ $result = \fputcsv($stream, $fields, $separator, $enclosure, $escape);
+ }
+
+ if ($result === false) {
+ throw FilesystemException::createFromPhpError();
+ }
+ return $result;
+}
diff --git a/vendor/thecodingmachine/safe/phpunit.xml.dist b/vendor/thecodingmachine/safe/phpunit.xml.dist
new file mode 100644
index 000000000..ca32f3b38
--- /dev/null
+++ b/vendor/thecodingmachine/safe/phpunit.xml.dist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
+ colors="true"
+ bootstrap="vendor/autoload.php"
+>
+ <testsuites>
+ <testsuite name="Main test Suite">
+ <directory>./tests/</directory>
+ </testsuite>
+ </testsuites>
+</phpunit>
diff --git a/vendor/thecodingmachine/safe/rector-migrate-0.7.php b/vendor/thecodingmachine/safe/rector-migrate.php
index d1c599700..efa2a2862 100644
--- a/vendor/thecodingmachine/safe/rector-migrate-0.7.php
+++ b/vendor/thecodingmachine/safe/rector-migrate.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
-# This file configures rector/rector:~0.7.0 to replace all PHP functions with their equivalent "safe" functions
+// This file configures rector/rector to replace all PHP functions with their equivalent "safe" functions.
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
@@ -13,8 +13,8 @@ return static function (ContainerConfigurator $containerConfigurator): void {
->call('configure', [[ RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [
'apache_getenv' => 'Safe\apache_getenv',
'apache_get_version' => 'Safe\apache_get_version',
+ 'apache_lookup_uri' => 'Safe\apache_lookup_uri',
'apache_request_headers' => 'Safe\apache_request_headers',
- 'apache_reset_timeout' => 'Safe\apache_reset_timeout',
'apache_response_headers' => 'Safe\apache_response_headers',
'apache_setenv' => 'Safe\apache_setenv',
'apcu_cache_info' => 'Safe\apcu_cache_info',
@@ -24,14 +24,12 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'apcu_inc' => 'Safe\apcu_inc',
'apcu_sma_info' => 'Safe\apcu_sma_info',
'apc_fetch' => 'Safe\apc_fetch',
- 'array_combine' => 'Safe\array_combine',
- 'array_flip' => 'Safe\array_flip',
'array_replace' => 'Safe\array_replace',
'array_replace_recursive' => 'Safe\array_replace_recursive',
'array_walk_recursive' => 'Safe\array_walk_recursive',
- 'arsort' => 'Safe\arsort',
- 'asort' => 'Safe\asort',
+ 'assert_options' => 'Safe\assert_options',
'base64_decode' => 'Safe\base64_decode',
+ 'bindtextdomain' => 'Safe\bindtextdomain',
'bzclose' => 'Safe\bzclose',
'bzflush' => 'Safe\bzflush',
'bzread' => 'Safe\bzread',
@@ -47,32 +45,75 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'class_uses' => 'Safe\class_uses',
'cli_set_process_title' => 'Safe\cli_set_process_title',
'closelog' => 'Safe\closelog',
+ 'com_create_guid' => 'Safe\com_create_guid',
'com_event_sink' => 'Safe\com_event_sink',
'com_load_typelib' => 'Safe\com_load_typelib',
'com_print_typeinfo' => 'Safe\com_print_typeinfo',
'convert_uudecode' => 'Safe\convert_uudecode',
- 'convert_uuencode' => 'Safe\convert_uuencode',
'copy' => 'Safe\copy',
'create_function' => 'Safe\create_function',
+ 'cubrid_bind' => 'Safe\cubrid_bind',
+ 'cubrid_column_names' => 'Safe\cubrid_column_names',
+ 'cubrid_column_types' => 'Safe\cubrid_column_types',
+ 'cubrid_col_size' => 'Safe\cubrid_col_size',
+ 'cubrid_commit' => 'Safe\cubrid_commit',
+ 'cubrid_connect' => 'Safe\cubrid_connect',
+ 'cubrid_connect_with_url' => 'Safe\cubrid_connect_with_url',
+ 'cubrid_current_oid' => 'Safe\cubrid_current_oid',
+ 'cubrid_disconnect' => 'Safe\cubrid_disconnect',
+ 'cubrid_drop' => 'Safe\cubrid_drop',
'cubrid_free_result' => 'Safe\cubrid_free_result',
'cubrid_get_charset' => 'Safe\cubrid_get_charset',
+ 'cubrid_get_class_name' => 'Safe\cubrid_get_class_name',
'cubrid_get_client_info' => 'Safe\cubrid_get_client_info',
'cubrid_get_db_parameter' => 'Safe\cubrid_get_db_parameter',
+ 'cubrid_get_query_timeout' => 'Safe\cubrid_get_query_timeout',
'cubrid_get_server_info' => 'Safe\cubrid_get_server_info',
'cubrid_insert_id' => 'Safe\cubrid_insert_id',
+ 'cubrid_lob2_bind' => 'Safe\cubrid_lob2_bind',
+ 'cubrid_lob2_close' => 'Safe\cubrid_lob2_close',
+ 'cubrid_lob2_export' => 'Safe\cubrid_lob2_export',
+ 'cubrid_lob2_import' => 'Safe\cubrid_lob2_import',
'cubrid_lob2_new' => 'Safe\cubrid_lob2_new',
+ 'cubrid_lob2_read' => 'Safe\cubrid_lob2_read',
+ 'cubrid_lob2_seek' => 'Safe\cubrid_lob2_seek',
+ 'cubrid_lob2_seek64' => 'Safe\cubrid_lob2_seek64',
'cubrid_lob2_size' => 'Safe\cubrid_lob2_size',
'cubrid_lob2_size64' => 'Safe\cubrid_lob2_size64',
'cubrid_lob2_tell' => 'Safe\cubrid_lob2_tell',
'cubrid_lob2_tell64' => 'Safe\cubrid_lob2_tell64',
+ 'cubrid_lob2_write' => 'Safe\cubrid_lob2_write',
+ 'cubrid_lob_close' => 'Safe\cubrid_lob_close',
+ 'cubrid_lob_export' => 'Safe\cubrid_lob_export',
+ 'cubrid_lob_get' => 'Safe\cubrid_lob_get',
+ 'cubrid_lob_send' => 'Safe\cubrid_lob_send',
+ 'cubrid_lob_size' => 'Safe\cubrid_lob_size',
+ 'cubrid_lock_read' => 'Safe\cubrid_lock_read',
+ 'cubrid_lock_write' => 'Safe\cubrid_lock_write',
+ 'cubrid_move_cursor' => 'Safe\cubrid_move_cursor',
+ 'cubrid_next_result' => 'Safe\cubrid_next_result',
+ 'cubrid_pconnect' => 'Safe\cubrid_pconnect',
+ 'cubrid_pconnect_with_url' => 'Safe\cubrid_pconnect_with_url',
+ 'cubrid_prepare' => 'Safe\cubrid_prepare',
+ 'cubrid_put' => 'Safe\cubrid_put',
+ 'cubrid_rollback' => 'Safe\cubrid_rollback',
+ 'cubrid_schema' => 'Safe\cubrid_schema',
+ 'cubrid_seq_drop' => 'Safe\cubrid_seq_drop',
+ 'cubrid_seq_insert' => 'Safe\cubrid_seq_insert',
+ 'cubrid_seq_put' => 'Safe\cubrid_seq_put',
+ 'cubrid_set_add' => 'Safe\cubrid_set_add',
+ 'cubrid_set_autocommit' => 'Safe\cubrid_set_autocommit',
'cubrid_set_db_parameter' => 'Safe\cubrid_set_db_parameter',
+ 'cubrid_set_drop' => 'Safe\cubrid_set_drop',
+ 'cubrid_set_query_timeout' => 'Safe\cubrid_set_query_timeout',
+ 'curl_copy_handle' => 'Safe\curl_copy_handle',
'curl_escape' => 'Safe\curl_escape',
'curl_exec' => 'Safe\curl_exec',
'curl_getinfo' => 'Safe\curl_getinfo',
'curl_init' => 'Safe\curl_init',
- 'curl_multi_errno' => 'Safe\curl_multi_errno',
'curl_multi_info_read' => 'Safe\curl_multi_info_read',
'curl_multi_init' => 'Safe\curl_multi_init',
+ 'curl_multi_setopt' => 'Safe\curl_multi_setopt',
'curl_setopt' => 'Safe\curl_setopt',
'curl_share_errno' => 'Safe\curl_share_errno',
'curl_share_setopt' => 'Safe\curl_share_setopt',
@@ -112,6 +153,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'eio_event_loop' => 'Safe\eio_event_loop',
'eio_fallocate' => 'Safe\eio_fallocate',
'eio_fchmod' => 'Safe\eio_fchmod',
+ 'eio_fchown' => 'Safe\eio_fchown',
'eio_fdatasync' => 'Safe\eio_fdatasync',
'eio_fstat' => 'Safe\eio_fstat',
'eio_fstatvfs' => 'Safe\eio_fstatvfs',
@@ -141,16 +183,20 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'eio_utime' => 'Safe\eio_utime',
'eio_write' => 'Safe\eio_write',
'error_log' => 'Safe\error_log',
+ 'exec' => 'Safe\exec',
'fastcgi_finish_request' => 'Safe\fastcgi_finish_request',
'fbird_blob_cancel' => 'Safe\fbird_blob_cancel',
'fclose' => 'Safe\fclose',
+ 'fdatasync' => 'Safe\fdatasync',
'fflush' => 'Safe\fflush',
+ 'fgetcsv' => 'Safe\fgetcsv',
'file' => 'Safe\file',
'fileatime' => 'Safe\fileatime',
'filectime' => 'Safe\filectime',
'fileinode' => 'Safe\fileinode',
'filemtime' => 'Safe\filemtime',
'fileowner' => 'Safe\fileowner',
+ 'fileperms' => 'Safe\fileperms',
'filesize' => 'Safe\filesize',
'file_get_contents' => 'Safe\file_get_contents',
'file_put_contents' => 'Safe\file_put_contents',
@@ -163,6 +209,8 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'fputcsv' => 'Safe\fputcsv',
'fread' => 'Safe\fread',
'fsockopen' => 'Safe\fsockopen',
+ 'fstat' => 'Safe\fstat',
+ 'fsync' => 'Safe\fsync',
'ftp_alloc' => 'Safe\ftp_alloc',
'ftp_append' => 'Safe\ftp_append',
'ftp_cdup' => 'Safe\ftp_cdup',
@@ -177,10 +225,12 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'ftp_login' => 'Safe\ftp_login',
'ftp_mkdir' => 'Safe\ftp_mkdir',
'ftp_mlsd' => 'Safe\ftp_mlsd',
+ 'ftp_nb_put' => 'Safe\ftp_nb_put',
'ftp_nlist' => 'Safe\ftp_nlist',
'ftp_pasv' => 'Safe\ftp_pasv',
'ftp_put' => 'Safe\ftp_put',
'ftp_pwd' => 'Safe\ftp_pwd',
+ 'ftp_raw' => 'Safe\ftp_raw',
'ftp_rename' => 'Safe\ftp_rename',
'ftp_rmdir' => 'Safe\ftp_rmdir',
'ftp_site' => 'Safe\ftp_site',
@@ -200,19 +250,22 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'getopt' => 'Safe\getopt',
'getprotobyname' => 'Safe\getprotobyname',
'getprotobynumber' => 'Safe\getprotobynumber',
+ 'getrusage' => 'Safe\getrusage',
+ 'getservbyport' => 'Safe\getservbyport',
'get_headers' => 'Safe\get_headers',
+ 'get_include_path' => 'Safe\get_include_path',
+ 'get_meta_tags' => 'Safe\get_meta_tags',
'glob' => 'Safe\glob',
- 'gmdate' => 'Safe\gmdate',
- 'gmp_binomial' => 'Safe\gmp_binomial',
- 'gmp_export' => 'Safe\gmp_export',
- 'gmp_import' => 'Safe\gmp_import',
+ 'gmmktime' => 'Safe\gmmktime',
'gmp_random_seed' => 'Safe\gmp_random_seed',
+ 'gmstrftime' => 'Safe\gmstrftime',
'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey',
'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey',
'gnupg_addsignkey' => 'Safe\gnupg_addsignkey',
'gnupg_cleardecryptkeys' => 'Safe\gnupg_cleardecryptkeys',
'gnupg_clearencryptkeys' => 'Safe\gnupg_clearencryptkeys',
'gnupg_clearsignkeys' => 'Safe\gnupg_clearsignkeys',
+ 'gnupg_deletekey' => 'Safe\gnupg_deletekey',
'gnupg_setarmor' => 'Safe\gnupg_setarmor',
'gnupg_setsignmode' => 'Safe\gnupg_setsignmode',
'gzclose' => 'Safe\gzclose',
@@ -220,18 +273,23 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'gzdecode' => 'Safe\gzdecode',
'gzdeflate' => 'Safe\gzdeflate',
'gzencode' => 'Safe\gzencode',
+ 'gzfile' => 'Safe\gzfile',
'gzgets' => 'Safe\gzgets',
'gzgetss' => 'Safe\gzgetss',
'gzinflate' => 'Safe\gzinflate',
+ 'gzopen' => 'Safe\gzopen',
'gzpassthru' => 'Safe\gzpassthru',
+ 'gzread' => 'Safe\gzread',
'gzrewind' => 'Safe\gzrewind',
'gzuncompress' => 'Safe\gzuncompress',
+ 'gzwrite' => 'Safe\gzwrite',
'hash_hkdf' => 'Safe\hash_hkdf',
'hash_update_file' => 'Safe\hash_update_file',
'header_register_callback' => 'Safe\header_register_callback',
'hex2bin' => 'Safe\hex2bin',
'highlight_file' => 'Safe\highlight_file',
'highlight_string' => 'Safe\highlight_string',
+ 'hrtime' => 'Safe\hrtime',
'ibase_add_user' => 'Safe\ibase_add_user',
'ibase_backup' => 'Safe\ibase_backup',
'ibase_blob_cancel' => 'Safe\ibase_blob_cancel',
@@ -258,6 +316,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'iconv' => 'Safe\iconv',
'iconv_get_encoding' => 'Safe\iconv_get_encoding',
'iconv_set_encoding' => 'Safe\iconv_set_encoding',
+ 'idate' => 'Safe\idate',
'image2wbmp' => 'Safe\image2wbmp',
'imageaffine' => 'Safe\imageaffine',
'imageaffinematrixconcat' => 'Safe\imageaffinematrixconcat',
@@ -265,12 +324,14 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagealphablending' => 'Safe\imagealphablending',
'imageantialias' => 'Safe\imageantialias',
'imagearc' => 'Safe\imagearc',
+ 'imageavif' => 'Safe\imageavif',
'imagebmp' => 'Safe\imagebmp',
'imagechar' => 'Safe\imagechar',
'imagecharup' => 'Safe\imagecharup',
'imagecolorat' => 'Safe\imagecolorat',
'imagecolordeallocate' => 'Safe\imagecolordeallocate',
'imagecolormatch' => 'Safe\imagecolormatch',
+ 'imagecolorset' => 'Safe\imagecolorset',
'imageconvolution' => 'Safe\imageconvolution',
'imagecopy' => 'Safe\imagecopy',
'imagecopymerge' => 'Safe\imagecopymerge',
@@ -278,6 +339,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagecopyresampled' => 'Safe\imagecopyresampled',
'imagecopyresized' => 'Safe\imagecopyresized',
'imagecreate' => 'Safe\imagecreate',
+ 'imagecreatefromavif' => 'Safe\imagecreatefromavif',
'imagecreatefrombmp' => 'Safe\imagecreatefrombmp',
'imagecreatefromgd' => 'Safe\imagecreatefromgd',
'imagecreatefromgd2' => 'Safe\imagecreatefromgd2',
@@ -285,6 +347,8 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagecreatefromgif' => 'Safe\imagecreatefromgif',
'imagecreatefromjpeg' => 'Safe\imagecreatefromjpeg',
'imagecreatefrompng' => 'Safe\imagecreatefrompng',
+ 'imagecreatefromstring' => 'Safe\imagecreatefromstring',
+ 'imagecreatefromtga' => 'Safe\imagecreatefromtga',
'imagecreatefromwbmp' => 'Safe\imagecreatefromwbmp',
'imagecreatefromwebp' => 'Safe\imagecreatefromwebp',
'imagecreatefromxbm' => 'Safe\imagecreatefromxbm',
@@ -298,11 +362,12 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagefill' => 'Safe\imagefill',
'imagefilledarc' => 'Safe\imagefilledarc',
'imagefilledellipse' => 'Safe\imagefilledellipse',
- 'imagefilledpolygon' => 'Safe\imagefilledpolygon',
'imagefilledrectangle' => 'Safe\imagefilledrectangle',
'imagefilltoborder' => 'Safe\imagefilltoborder',
'imagefilter' => 'Safe\imagefilter',
'imageflip' => 'Safe\imageflip',
+ 'imageftbbox' => 'Safe\imageftbbox',
+ 'imagefttext' => 'Safe\imagefttext',
'imagegammacorrect' => 'Safe\imagegammacorrect',
'imagegd' => 'Safe\imagegd',
'imagegd2' => 'Safe\imagegd2',
@@ -313,10 +378,9 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagelayereffect' => 'Safe\imagelayereffect',
'imageline' => 'Safe\imageline',
'imageloadfont' => 'Safe\imageloadfont',
- 'imageopenpolygon' => 'Safe\imageopenpolygon',
'imagepng' => 'Safe\imagepng',
- 'imagepolygon' => 'Safe\imagepolygon',
'imagerectangle' => 'Safe\imagerectangle',
+ 'imageresolution' => 'Safe\imageresolution',
'imagerotate' => 'Safe\imagerotate',
'imagesavealpha' => 'Safe\imagesavealpha',
'imagescale' => 'Safe\imagescale',
@@ -337,29 +401,49 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'imagewbmp' => 'Safe\imagewbmp',
'imagewebp' => 'Safe\imagewebp',
'imagexbm' => 'Safe\imagexbm',
+ 'image_type_to_extension' => 'Safe\image_type_to_extension',
+ 'imap_8bit' => 'Safe\imap_8bit',
'imap_append' => 'Safe\imap_append',
+ 'imap_base64' => 'Safe\imap_base64',
+ 'imap_binary' => 'Safe\imap_binary',
+ 'imap_body' => 'Safe\imap_body',
+ 'imap_bodystruct' => 'Safe\imap_bodystruct',
'imap_check' => 'Safe\imap_check',
'imap_clearflag_full' => 'Safe\imap_clearflag_full',
'imap_close' => 'Safe\imap_close',
'imap_createmailbox' => 'Safe\imap_createmailbox',
'imap_deletemailbox' => 'Safe\imap_deletemailbox',
+ 'imap_fetchbody' => 'Safe\imap_fetchbody',
+ 'imap_fetchheader' => 'Safe\imap_fetchheader',
+ 'imap_fetchmime' => 'Safe\imap_fetchmime',
'imap_fetchstructure' => 'Safe\imap_fetchstructure',
+ 'imap_fetch_overview' => 'Safe\imap_fetch_overview',
'imap_gc' => 'Safe\imap_gc',
+ 'imap_getacl' => 'Safe\imap_getacl',
+ 'imap_getmailboxes' => 'Safe\imap_getmailboxes',
+ 'imap_getsubscribed' => 'Safe\imap_getsubscribed',
'imap_headerinfo' => 'Safe\imap_headerinfo',
+ 'imap_headers' => 'Safe\imap_headers',
+ 'imap_listscan' => 'Safe\imap_listscan',
+ 'imap_lsub' => 'Safe\imap_lsub',
'imap_mail' => 'Safe\imap_mail',
'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo',
'imap_mail_compose' => 'Safe\imap_mail_compose',
'imap_mail_copy' => 'Safe\imap_mail_copy',
'imap_mail_move' => 'Safe\imap_mail_move',
+ 'imap_mime_header_decode' => 'Safe\imap_mime_header_decode',
'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8',
'imap_num_msg' => 'Safe\imap_num_msg',
'imap_open' => 'Safe\imap_open',
+ 'imap_qprint' => 'Safe\imap_qprint',
'imap_renamemailbox' => 'Safe\imap_renamemailbox',
+ 'imap_rfc822_write_address' => 'Safe\imap_rfc822_write_address',
'imap_savebody' => 'Safe\imap_savebody',
'imap_setacl' => 'Safe\imap_setacl',
'imap_setflag_full' => 'Safe\imap_setflag_full',
'imap_set_quota' => 'Safe\imap_set_quota',
'imap_sort' => 'Safe\imap_sort',
+ 'imap_status' => 'Safe\imap_status',
'imap_subscribe' => 'Safe\imap_subscribe',
'imap_thread' => 'Safe\imap_thread',
'imap_timeout' => 'Safe\imap_timeout',
@@ -371,42 +455,25 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'inflate_get_read_len' => 'Safe\inflate_get_read_len',
'inflate_get_status' => 'Safe\inflate_get_status',
'inflate_init' => 'Safe\inflate_init',
- 'ingres_autocommit' => 'Safe\ingres_autocommit',
- 'ingres_close' => 'Safe\ingres_close',
- 'ingres_commit' => 'Safe\ingres_commit',
- 'ingres_connect' => 'Safe\ingres_connect',
- 'ingres_execute' => 'Safe\ingres_execute',
- 'ingres_field_name' => 'Safe\ingres_field_name',
- 'ingres_field_type' => 'Safe\ingres_field_type',
- 'ingres_free_result' => 'Safe\ingres_free_result',
- 'ingres_pconnect' => 'Safe\ingres_pconnect',
- 'ingres_result_seek' => 'Safe\ingres_result_seek',
- 'ingres_rollback' => 'Safe\ingres_rollback',
- 'ingres_set_environment' => 'Safe\ingres_set_environment',
'ini_get' => 'Safe\ini_get',
'ini_set' => 'Safe\ini_set',
'inotify_init' => 'Safe\inotify_init',
'inotify_rm_watch' => 'Safe\inotify_rm_watch',
'iptcembed' => 'Safe\iptcembed',
'iptcparse' => 'Safe\iptcparse',
- 'jdtounix' => 'Safe\jdtounix',
'jpeg2wbmp' => 'Safe\jpeg2wbmp',
'json_decode' => 'Safe\json_decode',
'json_encode' => 'Safe\json_encode',
- 'json_last_error_msg' => 'Safe\json_last_error_msg',
- 'krsort' => 'Safe\krsort',
- 'ksort' => 'Safe\ksort',
'lchgrp' => 'Safe\lchgrp',
'lchown' => 'Safe\lchown',
+ 'ldap_8859_to_t61' => 'Safe\ldap_8859_to_t61',
'ldap_add' => 'Safe\ldap_add',
- 'ldap_add_ext' => 'Safe\ldap_add_ext',
'ldap_bind' => 'Safe\ldap_bind',
- 'ldap_bind_ext' => 'Safe\ldap_bind_ext',
'ldap_control_paged_result' => 'Safe\ldap_control_paged_result',
'ldap_control_paged_result_response' => 'Safe\ldap_control_paged_result_response',
'ldap_count_entries' => 'Safe\ldap_count_entries',
'ldap_delete' => 'Safe\ldap_delete',
- 'ldap_delete_ext' => 'Safe\ldap_delete_ext',
+ 'ldap_dn2ufn' => 'Safe\ldap_dn2ufn',
'ldap_exop' => 'Safe\ldap_exop',
'ldap_exop_passwd' => 'Safe\ldap_exop_passwd',
'ldap_exop_whoami' => 'Safe\ldap_exop_whoami',
@@ -420,27 +487,22 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'ldap_get_option' => 'Safe\ldap_get_option',
'ldap_get_values' => 'Safe\ldap_get_values',
'ldap_get_values_len' => 'Safe\ldap_get_values_len',
- 'ldap_list' => 'Safe\ldap_list',
'ldap_modify_batch' => 'Safe\ldap_modify_batch',
'ldap_mod_add' => 'Safe\ldap_mod_add',
- 'ldap_mod_add_ext' => 'Safe\ldap_mod_add_ext',
'ldap_mod_del' => 'Safe\ldap_mod_del',
- 'ldap_mod_del_ext' => 'Safe\ldap_mod_del_ext',
'ldap_mod_replace' => 'Safe\ldap_mod_replace',
- 'ldap_mod_replace_ext' => 'Safe\ldap_mod_replace_ext',
'ldap_next_attribute' => 'Safe\ldap_next_attribute',
'ldap_parse_exop' => 'Safe\ldap_parse_exop',
'ldap_parse_result' => 'Safe\ldap_parse_result',
- 'ldap_read' => 'Safe\ldap_read',
'ldap_rename' => 'Safe\ldap_rename',
- 'ldap_rename_ext' => 'Safe\ldap_rename_ext',
'ldap_sasl_bind' => 'Safe\ldap_sasl_bind',
- 'ldap_search' => 'Safe\ldap_search',
'ldap_set_option' => 'Safe\ldap_set_option',
'ldap_unbind' => 'Safe\ldap_unbind',
'libxml_get_last_error' => 'Safe\libxml_get_last_error',
'libxml_set_external_entity_loader' => 'Safe\libxml_set_external_entity_loader',
'link' => 'Safe\link',
+ 'long2ip' => 'Safe\long2ip',
+ 'lstat' => 'Safe\lstat',
'lzf_compress' => 'Safe\lzf_compress',
'lzf_decompress' => 'Safe\lzf_decompress',
'mailparse_msg_extract_part_file' => 'Safe\mailparse_msg_extract_part_file',
@@ -449,6 +511,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'mailparse_msg_parse_file' => 'Safe\mailparse_msg_parse_file',
'mailparse_stream_encode' => 'Safe\mailparse_stream_encode',
'mb_chr' => 'Safe\mb_chr',
+ 'mb_convert_encoding' => 'Safe\mb_convert_encoding',
'mb_detect_order' => 'Safe\mb_detect_order',
'mb_encoding_aliases' => 'Safe\mb_encoding_aliases',
'mb_eregi_replace' => 'Safe\mb_eregi_replace',
@@ -458,6 +521,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'mb_ereg_search_init' => 'Safe\mb_ereg_search_init',
'mb_ereg_search_regs' => 'Safe\mb_ereg_search_regs',
'mb_ereg_search_setpos' => 'Safe\mb_ereg_search_setpos',
+ 'mb_get_info' => 'Safe\mb_get_info',
'mb_http_output' => 'Safe\mb_http_output',
'mb_internal_encoding' => 'Safe\mb_internal_encoding',
'mb_ord' => 'Safe\mb_ord',
@@ -465,42 +529,17 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'mb_regex_encoding' => 'Safe\mb_regex_encoding',
'mb_send_mail' => 'Safe\mb_send_mail',
'mb_split' => 'Safe\mb_split',
- 'mb_str_split' => 'Safe\mb_str_split',
'md5_file' => 'Safe\md5_file',
- 'metaphone' => 'Safe\metaphone',
'mime_content_type' => 'Safe\mime_content_type',
'mkdir' => 'Safe\mkdir',
'mktime' => 'Safe\mktime',
+ 'msg_get_queue' => 'Safe\msg_get_queue',
'msg_queue_exists' => 'Safe\msg_queue_exists',
'msg_receive' => 'Safe\msg_receive',
'msg_remove_queue' => 'Safe\msg_remove_queue',
'msg_send' => 'Safe\msg_send',
'msg_set_queue' => 'Safe\msg_set_queue',
- 'msql_affected_rows' => 'Safe\msql_affected_rows',
- 'msql_close' => 'Safe\msql_close',
- 'msql_connect' => 'Safe\msql_connect',
- 'msql_create_db' => 'Safe\msql_create_db',
- 'msql_data_seek' => 'Safe\msql_data_seek',
- 'msql_db_query' => 'Safe\msql_db_query',
- 'msql_drop_db' => 'Safe\msql_drop_db',
- 'msql_field_len' => 'Safe\msql_field_len',
- 'msql_field_name' => 'Safe\msql_field_name',
- 'msql_field_seek' => 'Safe\msql_field_seek',
- 'msql_field_table' => 'Safe\msql_field_table',
- 'msql_field_type' => 'Safe\msql_field_type',
- 'msql_free_result' => 'Safe\msql_free_result',
- 'msql_pconnect' => 'Safe\msql_pconnect',
- 'msql_query' => 'Safe\msql_query',
- 'msql_select_db' => 'Safe\msql_select_db',
- 'mysqli_get_cache_stats' => 'Safe\mysqli_get_cache_stats',
- 'mysqli_get_client_stats' => 'Safe\mysqli_get_client_stats',
- 'mysqlnd_ms_dump_servers' => 'Safe\mysqlnd_ms_dump_servers',
- 'mysqlnd_ms_fabric_select_global' => 'Safe\mysqlnd_ms_fabric_select_global',
- 'mysqlnd_ms_fabric_select_shard' => 'Safe\mysqlnd_ms_fabric_select_shard',
- 'mysqlnd_ms_get_last_used_connection' => 'Safe\mysqlnd_ms_get_last_used_connection',
- 'mysqlnd_qc_clear_cache' => 'Safe\mysqlnd_qc_clear_cache',
- 'mysqlnd_qc_set_is_select' => 'Safe\mysqlnd_qc_set_is_select',
- 'mysqlnd_qc_set_storage_handler' => 'Safe\mysqlnd_qc_set_storage_handler',
+ 'msg_stat_queue' => 'Safe\msg_stat_queue',
'mysql_close' => 'Safe\mysql_close',
'mysql_connect' => 'Safe\mysql_connect',
'mysql_create_db' => 'Safe\mysql_create_db',
@@ -532,19 +571,19 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'mysql_tablename' => 'Safe\mysql_tablename',
'mysql_thread_id' => 'Safe\mysql_thread_id',
'mysql_unbuffered_query' => 'Safe\mysql_unbuffered_query',
- 'natcasesort' => 'Safe\natcasesort',
- 'natsort' => 'Safe\natsort',
+ 'net_get_interfaces' => 'Safe\net_get_interfaces',
+ 'ob_clean' => 'Safe\ob_clean',
'ob_end_clean' => 'Safe\ob_end_clean',
'ob_end_flush' => 'Safe\ob_end_flush',
+ 'ob_flush' => 'Safe\ob_flush',
+ 'ob_start' => 'Safe\ob_start',
'oci_bind_array_by_name' => 'Safe\oci_bind_array_by_name',
'oci_bind_by_name' => 'Safe\oci_bind_by_name',
'oci_cancel' => 'Safe\oci_cancel',
- 'oci_close' => 'Safe\oci_close',
'oci_commit' => 'Safe\oci_commit',
'oci_connect' => 'Safe\oci_connect',
'oci_define_by_name' => 'Safe\oci_define_by_name',
'oci_execute' => 'Safe\oci_execute',
- 'oci_fetch_all' => 'Safe\oci_fetch_all',
'oci_field_name' => 'Safe\oci_field_name',
'oci_field_precision' => 'Safe\oci_field_precision',
'oci_field_scale' => 'Safe\oci_field_scale',
@@ -557,10 +596,10 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'oci_new_connect' => 'Safe\oci_new_connect',
'oci_new_cursor' => 'Safe\oci_new_cursor',
'oci_new_descriptor' => 'Safe\oci_new_descriptor',
- 'oci_num_fields' => 'Safe\oci_num_fields',
'oci_num_rows' => 'Safe\oci_num_rows',
'oci_parse' => 'Safe\oci_parse',
'oci_pconnect' => 'Safe\oci_pconnect',
+ 'oci_register_taf_callback' => 'Safe\oci_register_taf_callback',
'oci_result' => 'Safe\oci_result',
'oci_rollback' => 'Safe\oci_rollback',
'oci_server_version' => 'Safe\oci_server_version',
@@ -572,6 +611,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'oci_set_edition' => 'Safe\oci_set_edition',
'oci_set_module_name' => 'Safe\oci_set_module_name',
'oci_set_prefetch' => 'Safe\oci_set_prefetch',
+ 'oci_set_prefetch_lob' => 'Safe\oci_set_prefetch_lob',
'oci_statement_type' => 'Safe\oci_statement_type',
'oci_unregister_taf_callback' => 'Safe\oci_unregister_taf_callback',
'odbc_autocommit' => 'Safe\odbc_autocommit',
@@ -579,6 +619,8 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'odbc_columnprivileges' => 'Safe\odbc_columnprivileges',
'odbc_columns' => 'Safe\odbc_columns',
'odbc_commit' => 'Safe\odbc_commit',
+ 'odbc_connect' => 'Safe\odbc_connect',
+ 'odbc_cursor' => 'Safe\odbc_cursor',
'odbc_data_source' => 'Safe\odbc_data_source',
'odbc_exec' => 'Safe\odbc_exec',
'odbc_execute' => 'Safe\odbc_execute',
@@ -591,8 +633,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'odbc_foreignkeys' => 'Safe\odbc_foreignkeys',
'odbc_gettypeinfo' => 'Safe\odbc_gettypeinfo',
'odbc_longreadlen' => 'Safe\odbc_longreadlen',
+ 'odbc_pconnect' => 'Safe\odbc_pconnect',
'odbc_prepare' => 'Safe\odbc_prepare',
'odbc_primarykeys' => 'Safe\odbc_primarykeys',
+ 'odbc_procedurecolumns' => 'Safe\odbc_procedurecolumns',
+ 'odbc_procedures' => 'Safe\odbc_procedures',
'odbc_result' => 'Safe\odbc_result',
'odbc_result_all' => 'Safe\odbc_result_all',
'odbc_rollback' => 'Safe\odbc_rollback',
@@ -606,8 +651,14 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'opendir' => 'Safe\opendir',
'openlog' => 'Safe\openlog',
'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length',
+ 'openssl_cms_decrypt' => 'Safe\openssl_cms_decrypt',
+ 'openssl_cms_encrypt' => 'Safe\openssl_cms_encrypt',
+ 'openssl_cms_read' => 'Safe\openssl_cms_read',
+ 'openssl_cms_sign' => 'Safe\openssl_cms_sign',
+ 'openssl_cms_verify' => 'Safe\openssl_cms_verify',
'openssl_csr_export' => 'Safe\openssl_csr_export',
'openssl_csr_export_to_file' => 'Safe\openssl_csr_export_to_file',
+ 'openssl_csr_get_public_key' => 'Safe\openssl_csr_get_public_key',
'openssl_csr_get_subject' => 'Safe\openssl_csr_get_subject',
'openssl_csr_new' => 'Safe\openssl_csr_new',
'openssl_csr_sign' => 'Safe\openssl_csr_sign',
@@ -615,6 +666,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'openssl_dh_compute_key' => 'Safe\openssl_dh_compute_key',
'openssl_digest' => 'Safe\openssl_digest',
'openssl_encrypt' => 'Safe\openssl_encrypt',
+ 'openssl_get_curve_names' => 'Safe\openssl_get_curve_names',
'openssl_open' => 'Safe\openssl_open',
'openssl_pbkdf2' => 'Safe\openssl_pbkdf2',
'openssl_pkcs7_decrypt' => 'Safe\openssl_pkcs7_decrypt',
@@ -624,6 +676,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'openssl_pkcs12_export' => 'Safe\openssl_pkcs12_export',
'openssl_pkcs12_export_to_file' => 'Safe\openssl_pkcs12_export_to_file',
'openssl_pkcs12_read' => 'Safe\openssl_pkcs12_read',
+ 'openssl_pkey_derive' => 'Safe\openssl_pkey_derive',
'openssl_pkey_export' => 'Safe\openssl_pkey_export',
'openssl_pkey_export_to_file' => 'Safe\openssl_pkey_export_to_file',
'openssl_pkey_get_private' => 'Safe\openssl_pkey_get_private',
@@ -636,6 +689,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'openssl_random_pseudo_bytes' => 'Safe\openssl_random_pseudo_bytes',
'openssl_seal' => 'Safe\openssl_seal',
'openssl_sign' => 'Safe\openssl_sign',
+ 'openssl_spki_export' => 'Safe\openssl_spki_export',
+ 'openssl_spki_export_challenge' => 'Safe\openssl_spki_export_challenge',
+ 'openssl_spki_new' => 'Safe\openssl_spki_new',
+ 'openssl_spki_verify' => 'Safe\openssl_spki_verify',
+ 'openssl_verify' => 'Safe\openssl_verify',
'openssl_x509_export' => 'Safe\openssl_x509_export',
'openssl_x509_export_to_file' => 'Safe\openssl_x509_export_to_file',
'openssl_x509_fingerprint' => 'Safe\openssl_x509_fingerprint',
@@ -646,123 +704,43 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'parse_ini_file' => 'Safe\parse_ini_file',
'parse_ini_string' => 'Safe\parse_ini_string',
'parse_url' => 'Safe\parse_url',
- 'password_hash' => 'Safe\password_hash',
- 'pcntl_exec' => 'Safe\pcntl_exec',
+ 'passthru' => 'Safe\passthru',
'pcntl_getpriority' => 'Safe\pcntl_getpriority',
'pcntl_setpriority' => 'Safe\pcntl_setpriority',
+ 'pcntl_signal' => 'Safe\pcntl_signal',
'pcntl_signal_dispatch' => 'Safe\pcntl_signal_dispatch',
'pcntl_sigprocmask' => 'Safe\pcntl_sigprocmask',
- 'pcntl_strerror' => 'Safe\pcntl_strerror',
- 'PDF_activate_item' => 'Safe\PDF_activate_item',
- 'PDF_add_locallink' => 'Safe\PDF_add_locallink',
- 'PDF_add_nameddest' => 'Safe\PDF_add_nameddest',
- 'PDF_add_note' => 'Safe\PDF_add_note',
- 'PDF_add_pdflink' => 'Safe\PDF_add_pdflink',
- 'PDF_add_thumbnail' => 'Safe\PDF_add_thumbnail',
- 'PDF_add_weblink' => 'Safe\PDF_add_weblink',
- 'PDF_attach_file' => 'Safe\PDF_attach_file',
- 'PDF_begin_layer' => 'Safe\PDF_begin_layer',
- 'PDF_begin_page' => 'Safe\PDF_begin_page',
- 'PDF_begin_page_ext' => 'Safe\PDF_begin_page_ext',
- 'PDF_circle' => 'Safe\PDF_circle',
- 'PDF_clip' => 'Safe\PDF_clip',
- 'PDF_close' => 'Safe\PDF_close',
- 'PDF_closepath' => 'Safe\PDF_closepath',
- 'PDF_closepath_fill_stroke' => 'Safe\PDF_closepath_fill_stroke',
- 'PDF_closepath_stroke' => 'Safe\PDF_closepath_stroke',
- 'PDF_close_pdi' => 'Safe\PDF_close_pdi',
- 'PDF_close_pdi_page' => 'Safe\PDF_close_pdi_page',
- 'PDF_concat' => 'Safe\PDF_concat',
- 'PDF_continue_text' => 'Safe\PDF_continue_text',
- 'PDF_curveto' => 'Safe\PDF_curveto',
- 'PDF_delete' => 'Safe\PDF_delete',
- 'PDF_end_layer' => 'Safe\PDF_end_layer',
- 'PDF_end_page' => 'Safe\PDF_end_page',
- 'PDF_end_page_ext' => 'Safe\PDF_end_page_ext',
- 'PDF_end_pattern' => 'Safe\PDF_end_pattern',
- 'PDF_end_template' => 'Safe\PDF_end_template',
- 'PDF_fill' => 'Safe\PDF_fill',
- 'PDF_fill_stroke' => 'Safe\PDF_fill_stroke',
- 'PDF_fit_image' => 'Safe\PDF_fit_image',
- 'PDF_fit_pdi_page' => 'Safe\PDF_fit_pdi_page',
- 'PDF_fit_textline' => 'Safe\PDF_fit_textline',
- 'PDF_initgraphics' => 'Safe\PDF_initgraphics',
- 'PDF_lineto' => 'Safe\PDF_lineto',
- 'PDF_makespotcolor' => 'Safe\PDF_makespotcolor',
- 'PDF_moveto' => 'Safe\PDF_moveto',
- 'PDF_open_file' => 'Safe\PDF_open_file',
- 'PDF_place_image' => 'Safe\PDF_place_image',
- 'PDF_place_pdi_page' => 'Safe\PDF_place_pdi_page',
- 'PDF_rect' => 'Safe\PDF_rect',
- 'PDF_restore' => 'Safe\PDF_restore',
- 'PDF_rotate' => 'Safe\PDF_rotate',
- 'PDF_save' => 'Safe\PDF_save',
- 'PDF_scale' => 'Safe\PDF_scale',
- 'PDF_setcolor' => 'Safe\PDF_setcolor',
- 'PDF_setdash' => 'Safe\PDF_setdash',
- 'PDF_setdashpattern' => 'Safe\PDF_setdashpattern',
- 'PDF_setflat' => 'Safe\PDF_setflat',
- 'PDF_setfont' => 'Safe\PDF_setfont',
- 'PDF_setgray' => 'Safe\PDF_setgray',
- 'PDF_setgray_fill' => 'Safe\PDF_setgray_fill',
- 'PDF_setgray_stroke' => 'Safe\PDF_setgray_stroke',
- 'PDF_setlinejoin' => 'Safe\PDF_setlinejoin',
- 'PDF_setlinewidth' => 'Safe\PDF_setlinewidth',
- 'PDF_setmatrix' => 'Safe\PDF_setmatrix',
- 'PDF_setmiterlimit' => 'Safe\PDF_setmiterlimit',
- 'PDF_setrgbcolor' => 'Safe\PDF_setrgbcolor',
- 'PDF_setrgbcolor_fill' => 'Safe\PDF_setrgbcolor_fill',
- 'PDF_setrgbcolor_stroke' => 'Safe\PDF_setrgbcolor_stroke',
- 'PDF_set_border_color' => 'Safe\PDF_set_border_color',
- 'PDF_set_border_dash' => 'Safe\PDF_set_border_dash',
- 'PDF_set_border_style' => 'Safe\PDF_set_border_style',
- 'PDF_set_info' => 'Safe\PDF_set_info',
- 'PDF_set_layer_dependency' => 'Safe\PDF_set_layer_dependency',
- 'PDF_set_parameter' => 'Safe\PDF_set_parameter',
- 'PDF_set_text_pos' => 'Safe\PDF_set_text_pos',
- 'PDF_set_value' => 'Safe\PDF_set_value',
- 'PDF_show' => 'Safe\PDF_show',
- 'PDF_show_xy' => 'Safe\PDF_show_xy',
- 'PDF_skew' => 'Safe\PDF_skew',
- 'PDF_stroke' => 'Safe\PDF_stroke',
+ 'pcntl_sigtimedwait' => 'Safe\pcntl_sigtimedwait',
+ 'pcntl_sigwaitinfo' => 'Safe\pcntl_sigwaitinfo',
+ 'pfsockopen' => 'Safe\pfsockopen',
'pg_cancel_query' => 'Safe\pg_cancel_query',
- 'pg_client_encoding' => 'Safe\pg_client_encoding',
- 'pg_close' => 'Safe\pg_close',
'pg_connect' => 'Safe\pg_connect',
'pg_connection_reset' => 'Safe\pg_connection_reset',
'pg_convert' => 'Safe\pg_convert',
'pg_copy_from' => 'Safe\pg_copy_from',
'pg_copy_to' => 'Safe\pg_copy_to',
- 'pg_dbname' => 'Safe\pg_dbname',
'pg_delete' => 'Safe\pg_delete',
'pg_end_copy' => 'Safe\pg_end_copy',
'pg_execute' => 'Safe\pg_execute',
- 'pg_field_name' => 'Safe\pg_field_name',
'pg_field_table' => 'Safe\pg_field_table',
- 'pg_field_type' => 'Safe\pg_field_type',
'pg_flush' => 'Safe\pg_flush',
'pg_free_result' => 'Safe\pg_free_result',
'pg_host' => 'Safe\pg_host',
'pg_insert' => 'Safe\pg_insert',
- 'pg_last_error' => 'Safe\pg_last_error',
- 'pg_last_notice' => 'Safe\pg_last_notice',
'pg_last_oid' => 'Safe\pg_last_oid',
'pg_lo_close' => 'Safe\pg_lo_close',
'pg_lo_export' => 'Safe\pg_lo_export',
'pg_lo_import' => 'Safe\pg_lo_import',
'pg_lo_open' => 'Safe\pg_lo_open',
'pg_lo_read' => 'Safe\pg_lo_read',
- 'pg_lo_read_all' => 'Safe\pg_lo_read_all',
'pg_lo_seek' => 'Safe\pg_lo_seek',
'pg_lo_truncate' => 'Safe\pg_lo_truncate',
'pg_lo_unlink' => 'Safe\pg_lo_unlink',
'pg_lo_write' => 'Safe\pg_lo_write',
'pg_meta_data' => 'Safe\pg_meta_data',
- 'pg_options' => 'Safe\pg_options',
'pg_parameter_status' => 'Safe\pg_parameter_status',
'pg_pconnect' => 'Safe\pg_pconnect',
'pg_ping' => 'Safe\pg_ping',
- 'pg_port' => 'Safe\pg_port',
'pg_prepare' => 'Safe\pg_prepare',
'pg_put_line' => 'Safe\pg_put_line',
'pg_query' => 'Safe\pg_query',
@@ -770,21 +748,21 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'pg_result_error_field' => 'Safe\pg_result_error_field',
'pg_result_seek' => 'Safe\pg_result_seek',
'pg_select' => 'Safe\pg_select',
- 'pg_send_execute' => 'Safe\pg_send_execute',
- 'pg_send_prepare' => 'Safe\pg_send_prepare',
- 'pg_send_query' => 'Safe\pg_send_query',
- 'pg_send_query_params' => 'Safe\pg_send_query_params',
'pg_socket' => 'Safe\pg_socket',
'pg_trace' => 'Safe\pg_trace',
- 'pg_tty' => 'Safe\pg_tty',
'pg_update' => 'Safe\pg_update',
- 'pg_version' => 'Safe\pg_version',
'phpcredits' => 'Safe\phpcredits',
'phpinfo' => 'Safe\phpinfo',
+ 'php_sapi_name' => 'Safe\php_sapi_name',
'png2wbmp' => 'Safe\png2wbmp',
'posix_access' => 'Safe\posix_access',
+ 'posix_getgrgid' => 'Safe\posix_getgrgid',
'posix_getgrnam' => 'Safe\posix_getgrnam',
- 'posix_getpgid' => 'Safe\posix_getpgid',
+ 'posix_getgroups' => 'Safe\posix_getgroups',
+ 'posix_getlogin' => 'Safe\posix_getlogin',
+ 'posix_getpwuid' => 'Safe\posix_getpwuid',
+ 'posix_getrlimit' => 'Safe\posix_getrlimit',
+ 'posix_getsid' => 'Safe\posix_getsid',
'posix_initgroups' => 'Safe\posix_initgroups',
'posix_kill' => 'Safe\posix_kill',
'posix_mkfifo' => 'Safe\posix_mkfifo',
@@ -795,11 +773,13 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'posix_setpgid' => 'Safe\posix_setpgid',
'posix_setrlimit' => 'Safe\posix_setrlimit',
'posix_setuid' => 'Safe\posix_setuid',
+ 'posix_times' => 'Safe\posix_times',
+ 'posix_uname' => 'Safe\posix_uname',
+ 'preg_grep' => 'Safe\preg_grep',
'preg_match' => 'Safe\preg_match',
'preg_match_all' => 'Safe\preg_match_all',
'preg_replace' => 'Safe\preg_replace',
'preg_split' => 'Safe\preg_split',
- 'proc_get_status' => 'Safe\proc_get_status',
'proc_nice' => 'Safe\proc_nice',
'pspell_add_to_personal' => 'Safe\pspell_add_to_personal',
'pspell_add_to_session' => 'Safe\pspell_add_to_session',
@@ -815,6 +795,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'pspell_config_save_repl' => 'Safe\pspell_config_save_repl',
'pspell_new' => 'Safe\pspell_new',
'pspell_new_config' => 'Safe\pspell_new_config',
+ 'pspell_new_personal' => 'Safe\pspell_new_personal',
'pspell_save_wordlist' => 'Safe\pspell_save_wordlist',
'pspell_store_replacement' => 'Safe\pspell_store_replacement',
'ps_add_launchlink' => 'Safe\ps_add_launchlink',
@@ -896,14 +877,21 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'register_tick_function' => 'Safe\register_tick_function',
'rename' => 'Safe\rename',
'rewind' => 'Safe\rewind',
- 'rewinddir' => 'Safe\rewinddir',
'rmdir' => 'Safe\rmdir',
'rpmaddtag' => 'Safe\rpmaddtag',
'rrd_create' => 'Safe\rrd_create',
- 'rsort' => 'Safe\rsort',
+ 'rrd_first' => 'Safe\rrd_first',
+ 'rrd_graph' => 'Safe\rrd_graph',
+ 'rrd_info' => 'Safe\rrd_info',
+ 'rrd_lastupdate' => 'Safe\rrd_lastupdate',
+ 'rrd_restore' => 'Safe\rrd_restore',
+ 'rrd_tune' => 'Safe\rrd_tune',
+ 'rrd_update' => 'Safe\rrd_update',
+ 'rrd_xport' => 'Safe\rrd_xport',
'sapi_windows_cp_conv' => 'Safe\sapi_windows_cp_conv',
'sapi_windows_cp_set' => 'Safe\sapi_windows_cp_set',
'sapi_windows_generate_ctrl_event' => 'Safe\sapi_windows_generate_ctrl_event',
+ 'sapi_windows_set_ctrl_handler' => 'Safe\sapi_windows_set_ctrl_handler',
'sapi_windows_vt100_support' => 'Safe\sapi_windows_vt100_support',
'scandir' => 'Safe\scandir',
'sem_acquire' => 'Safe\sem_acquire',
@@ -911,19 +899,27 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'sem_release' => 'Safe\sem_release',
'sem_remove' => 'Safe\sem_remove',
'session_abort' => 'Safe\session_abort',
+ 'session_create_id' => 'Safe\session_create_id',
'session_decode' => 'Safe\session_decode',
'session_destroy' => 'Safe\session_destroy',
+ 'session_encode' => 'Safe\session_encode',
+ 'session_id' => 'Safe\session_id',
+ 'session_module_name' => 'Safe\session_module_name',
+ 'session_name' => 'Safe\session_name',
'session_regenerate_id' => 'Safe\session_regenerate_id',
'session_reset' => 'Safe\session_reset',
+ 'session_save_path' => 'Safe\session_save_path',
'session_unset' => 'Safe\session_unset',
'session_write_close' => 'Safe\session_write_close',
'settype' => 'Safe\settype',
'set_include_path' => 'Safe\set_include_path',
'set_time_limit' => 'Safe\set_time_limit',
'sha1_file' => 'Safe\sha1_file',
+ 'shell_exec' => 'Safe\shell_exec',
'shmop_delete' => 'Safe\shmop_delete',
'shmop_read' => 'Safe\shmop_read',
- 'shmop_write' => 'Safe\shmop_write',
+ 'shm_attach' => 'Safe\shm_attach',
+ 'shm_detach' => 'Safe\shm_detach',
'shm_put_var' => 'Safe\shm_put_var',
'shm_remove' => 'Safe\shm_remove',
'shm_remove_var' => 'Safe\shm_remove_var',
@@ -935,6 +931,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'socket_accept' => 'Safe\socket_accept',
'socket_addrinfo_bind' => 'Safe\socket_addrinfo_bind',
'socket_addrinfo_connect' => 'Safe\socket_addrinfo_connect',
+ 'socket_addrinfo_lookup' => 'Safe\socket_addrinfo_lookup',
'socket_bind' => 'Safe\socket_bind',
'socket_connect' => 'Safe\socket_connect',
'socket_create' => 'Safe\socket_create',
@@ -958,14 +955,23 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export',
'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import',
'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release',
- 'sodium_crypto_pwhash' => 'Safe\sodium_crypto_pwhash',
- 'sodium_crypto_pwhash_str' => 'Safe\sodium_crypto_pwhash_str',
+ 'sodium_crypto_aead_aes256gcm_decrypt' => 'Safe\sodium_crypto_aead_aes256gcm_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_decrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_encrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_encrypt',
+ 'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_ietf_decrypt',
+ 'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_ietf_encrypt',
+ 'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => 'Safe\sodium_crypto_aead_xchacha20poly1305_ietf_decrypt',
+ 'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => 'Safe\sodium_crypto_aead_xchacha20poly1305_ietf_encrypt',
+ 'sodium_crypto_auth_verify' => 'Safe\sodium_crypto_auth_verify',
+ 'sodium_crypto_box_open' => 'Safe\sodium_crypto_box_open',
+ 'sodium_crypto_box_seal_open' => 'Safe\sodium_crypto_box_seal_open',
+ 'sodium_crypto_generichash_update' => 'Safe\sodium_crypto_generichash_update',
+ 'sodium_crypto_secretbox_open' => 'Safe\sodium_crypto_secretbox_open',
+ 'sodium_crypto_sign_open' => 'Safe\sodium_crypto_sign_open',
+ 'sodium_crypto_sign_verify_detached' => 'Safe\sodium_crypto_sign_verify_detached',
'solr_get_version' => 'Safe\solr_get_version',
- 'sort' => 'Safe\sort',
- 'soundex' => 'Safe\soundex',
'spl_autoload_register' => 'Safe\spl_autoload_register',
'spl_autoload_unregister' => 'Safe\spl_autoload_unregister',
- 'sprintf' => 'Safe\sprintf',
'sqlsrv_begin_transaction' => 'Safe\sqlsrv_begin_transaction',
'sqlsrv_cancel' => 'Safe\sqlsrv_cancel',
'sqlsrv_client_info' => 'Safe\sqlsrv_client_info',
@@ -991,11 +997,14 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'ssh2_connect' => 'Safe\ssh2_connect',
'ssh2_disconnect' => 'Safe\ssh2_disconnect',
'ssh2_exec' => 'Safe\ssh2_exec',
+ 'ssh2_forward_accept' => 'Safe\ssh2_forward_accept',
+ 'ssh2_forward_listen' => 'Safe\ssh2_forward_listen',
'ssh2_publickey_add' => 'Safe\ssh2_publickey_add',
'ssh2_publickey_init' => 'Safe\ssh2_publickey_init',
'ssh2_publickey_remove' => 'Safe\ssh2_publickey_remove',
'ssh2_scp_recv' => 'Safe\ssh2_scp_recv',
'ssh2_scp_send' => 'Safe\ssh2_scp_send',
+ 'ssh2_send_eof' => 'Safe\ssh2_send_eof',
'ssh2_sftp' => 'Safe\ssh2_sftp',
'ssh2_sftp_chmod' => 'Safe\ssh2_sftp_chmod',
'ssh2_sftp_mkdir' => 'Safe\ssh2_sftp_mkdir',
@@ -1003,6 +1012,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'ssh2_sftp_rmdir' => 'Safe\ssh2_sftp_rmdir',
'ssh2_sftp_symlink' => 'Safe\ssh2_sftp_symlink',
'ssh2_sftp_unlink' => 'Safe\ssh2_sftp_unlink',
+ 'ssh2_shell' => 'Safe\ssh2_shell',
'stream_context_set_params' => 'Safe\stream_context_set_params',
'stream_copy_to_stream' => 'Safe\stream_copy_to_stream',
'stream_filter_append' => 'Safe\stream_filter_append',
@@ -1010,22 +1020,28 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'stream_filter_register' => 'Safe\stream_filter_register',
'stream_filter_remove' => 'Safe\stream_filter_remove',
'stream_get_contents' => 'Safe\stream_get_contents',
+ 'stream_get_line' => 'Safe\stream_get_line',
'stream_isatty' => 'Safe\stream_isatty',
'stream_resolve_include_path' => 'Safe\stream_resolve_include_path',
'stream_set_blocking' => 'Safe\stream_set_blocking',
'stream_set_timeout' => 'Safe\stream_set_timeout',
'stream_socket_accept' => 'Safe\stream_socket_accept',
'stream_socket_client' => 'Safe\stream_socket_client',
+ 'stream_socket_get_name' => 'Safe\stream_socket_get_name',
'stream_socket_pair' => 'Safe\stream_socket_pair',
+ 'stream_socket_recvfrom' => 'Safe\stream_socket_recvfrom',
+ 'stream_socket_sendto' => 'Safe\stream_socket_sendto',
'stream_socket_server' => 'Safe\stream_socket_server',
'stream_socket_shutdown' => 'Safe\stream_socket_shutdown',
'stream_supports_lock' => 'Safe\stream_supports_lock',
'stream_wrapper_register' => 'Safe\stream_wrapper_register',
'stream_wrapper_restore' => 'Safe\stream_wrapper_restore',
'stream_wrapper_unregister' => 'Safe\stream_wrapper_unregister',
+ 'strftime' => 'Safe\strftime',
'strptime' => 'Safe\strptime',
'strtotime' => 'Safe\strtotime',
- 'substr' => 'Safe\substr',
+ 'swoole_async_dns_lookup' => 'Safe\swoole_async_dns_lookup',
+ 'swoole_async_readfile' => 'Safe\swoole_async_readfile',
'swoole_async_write' => 'Safe\swoole_async_write',
'swoole_async_writefile' => 'Safe\swoole_async_writefile',
'swoole_event_defer' => 'Safe\swoole_event_defer',
@@ -1040,15 +1056,14 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'time_sleep_until' => 'Safe\time_sleep_until',
'tmpfile' => 'Safe\tmpfile',
'touch' => 'Safe\touch',
- 'uasort' => 'Safe\uasort',
- 'uksort' => 'Safe\uksort',
+ 'unixtojd' => 'Safe\unixtojd',
'unlink' => 'Safe\unlink',
'unpack' => 'Safe\unpack',
'uopz_extend' => 'Safe\uopz_extend',
'uopz_implement' => 'Safe\uopz_implement',
- 'usort' => 'Safe\usort',
+ 'variant_date_to_timestamp' => 'Safe\variant_date_to_timestamp',
+ 'variant_round' => 'Safe\variant_round',
'virtual' => 'Safe\virtual',
- 'vsprintf' => 'Safe\vsprintf',
'xdiff_file_bdiff' => 'Safe\xdiff_file_bdiff',
'xdiff_file_bpatch' => 'Safe\xdiff_file_bpatch',
'xdiff_file_diff' => 'Safe\xdiff_file_diff',
@@ -1059,9 +1074,17 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'xdiff_string_patch' => 'Safe\xdiff_string_patch',
'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary',
'xmlrpc_set_type' => 'Safe\xmlrpc_set_type',
- 'xml_parser_create' => 'Safe\xml_parser_create',
- 'xml_parser_create_ns' => 'Safe\xml_parser_create_ns',
+ 'xml_parser_free' => 'Safe\xml_parser_free',
+ 'xml_set_character_data_handler' => 'Safe\xml_set_character_data_handler',
+ 'xml_set_default_handler' => 'Safe\xml_set_default_handler',
+ 'xml_set_element_handler' => 'Safe\xml_set_element_handler',
+ 'xml_set_end_namespace_decl_handler' => 'Safe\xml_set_end_namespace_decl_handler',
+ 'xml_set_external_entity_ref_handler' => 'Safe\xml_set_external_entity_ref_handler',
+ 'xml_set_notation_decl_handler' => 'Safe\xml_set_notation_decl_handler',
'xml_set_object' => 'Safe\xml_set_object',
+ 'xml_set_processing_instruction_handler' => 'Safe\xml_set_processing_instruction_handler',
+ 'xml_set_start_namespace_decl_handler' => 'Safe\xml_set_start_namespace_decl_handler',
+ 'xml_set_unparsed_entity_decl_handler' => 'Safe\xml_set_unparsed_entity_decl_handler',
'yaml_parse' => 'Safe\yaml_parse',
'yaml_parse_file' => 'Safe\yaml_parse_file',
'yaml_parse_url' => 'Safe\yaml_parse_url',
@@ -1074,8 +1097,12 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'yaz_search' => 'Safe\yaz_search',
'yaz_wait' => 'Safe\yaz_wait',
'zip_entry_close' => 'Safe\zip_entry_close',
+ 'zip_entry_compressedsize' => 'Safe\zip_entry_compressedsize',
+ 'zip_entry_compressionmethod' => 'Safe\zip_entry_compressionmethod',
+ 'zip_entry_filesize' => 'Safe\zip_entry_filesize',
+ 'zip_entry_name' => 'Safe\zip_entry_name',
'zip_entry_open' => 'Safe\zip_entry_open',
'zip_entry_read' => 'Safe\zip_entry_read',
'zlib_decode' => 'Safe\zlib_decode',
-]]]);
+ ]]]);
};
diff --git a/vendor/thecodingmachine/safe/tests/DateTimeImmutableTest.php b/vendor/thecodingmachine/safe/tests/DateTimeImmutableTest.php
new file mode 100644
index 000000000..83bdd1e8f
--- /dev/null
+++ b/vendor/thecodingmachine/safe/tests/DateTimeImmutableTest.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+use PHPUnit\Framework\TestCase;
+
+final class DateTimeImmutableTest extends TestCase
+{
+ public function testCreateFromMutable(): void
+ {
+ $unsafeDate = new \DateTime('2021-10-16T12:30:16+00:00');
+ $safeImmutableDate = \Safe\DateTimeImmutable::createFromMutable($unsafeDate);
+
+ self::assertSame($unsafeDate->format(\DateTimeInterface::ATOM), $safeImmutableDate->format(\DateTimeInterface::ATOM));
+
+ $safeDate = new \Safe\DateTime('2021-10-16T12:30:16+00:00');
+ $safeImmutableDate = \Safe\DateTimeImmutable::createFromMutable($safeDate);
+
+ self::assertSame($safeDate->format(\DateTimeInterface::ATOM), $safeImmutableDate->format(\DateTimeInterface::ATOM));
+ }
+}
diff --git a/vendor/webmozart/assert/.editorconfig b/vendor/webmozart/assert/.editorconfig
deleted file mode 100644
index 384453bfb..000000000
--- a/vendor/webmozart/assert/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-root = true
-
-[*]
-charset=utf-8
-end_of_line=lf
-trim_trailing_whitespace=true
-insert_final_newline=true
-indent_style=space
-indent_size=4
-
-[*.yml]
-indent_size=2
diff --git a/vendor/webmozart/assert/.github/workflows/ci.yaml b/vendor/webmozart/assert/.github/workflows/ci.yaml
deleted file mode 100644
index 636fc5ab5..000000000
--- a/vendor/webmozart/assert/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
-# https://docs.github.com/en/actions
-
-name: "CI"
-
-on:
- pull_request: ~
- push:
- branches:
- - "master"
-
-env:
- COMPOSER_ROOT_VERSION: 1.99
-
-jobs:
- coding-standards:
- name: "Coding Standards"
-
- runs-on: "ubuntu-latest"
-
- steps:
- - name: "Checkout"
- uses: "actions/[email protected]"
-
- - name: "Install PHP"
- uses: "shivammathur/[email protected]"
- with:
- coverage: "none"
- extensions: "mbstring"
- php-version: "7.4"
- tools: "composer-normalize"
-
- - name: "Validate composer.json"
- run: "composer validate --strict"
-
- - name: "Normalize composer.json"
- run: "composer-normalize --dry-run"
-
- - name: "PHP-CS-Fixer"
- uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0"
- with:
- args: "--dry-run --diff-format udiff"
-
- static-code-analysis:
- name: "Static Code Analysis"
-
- runs-on: "ubuntu-latest"
-
- steps:
- - name: "Checkout"
- uses: "actions/[email protected]"
-
- - name: "Install PHP"
- uses: "shivammathur/[email protected]"
- with:
- coverage: "none"
- extensions: "mbstring"
- php-version: "7.4"
-
- - name: "Install dependencies with composer"
- run: "composer update --no-interaction --no-progress && composer i --working-dir=ci"
-
- - name: "Run vimeo/psalm"
- run: "ci/vendor/bin/psalm --threads=4"
-
- tests:
- name: "Tests"
-
- runs-on: "ubuntu-latest"
-
- strategy:
- matrix:
- php-version:
- - "7.2"
- - "7.3"
- - "7.4"
- - "8.0"
-
- steps:
- - name: "Checkout"
- uses: "actions/[email protected]"
-
- - name: "Install PHP"
- uses: "shivammathur/[email protected]"
- with:
- coverage: "none"
- extensions: "mbstring"
- php-version: "${{ matrix.php-version }}"
-
- - name: "Install dependencies with composer"
- run: "composer update --no-interaction --no-progress"
-
- - name: "Run unit tests"
- run: "vendor/bin/phpunit"
-
- windows-tests:
- name: "Windows tests"
-
- runs-on: "windows-latest"
-
- strategy:
- matrix:
- php-version:
- - "7.4"
-
- steps:
- - name: "Checkout"
- uses: "actions/[email protected]"
-
- - name: "Install PHP"
- uses: "shivammathur/[email protected]"
- with:
- coverage: "none"
- extensions: "mbstring"
- php-version: "${{ matrix.php-version }}"
-
- - name: "Install dependencies with composer"
- run: "composer update --no-interaction --no-progress"
-
- - name: "Run unit tests"
- run: "vendor/bin/phpunit tests/AssertTest.php"
diff --git a/vendor/webmozart/assert/.php_cs b/vendor/webmozart/assert/.php_cs
deleted file mode 100644
index f7afd3ed7..000000000
--- a/vendor/webmozart/assert/.php_cs
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-$finder = PhpCsFixer\Finder::create()
- ->in(__DIR__.'/src')
- ->in(__DIR__.'/tests')
-;
-
-return PhpCsFixer\Config::create()
- ->setRiskyAllowed(true)
- ->setRules([
- '@PSR2' => true,
- '@Symfony' => true,
- 'ordered_imports' => true,
- 'array_syntax' => ['syntax' => 'long'],
- 'no_superfluous_phpdoc_tags' => false,
- 'phpdoc_annotation_without_dot' => false,
- 'phpdoc_types_order' => false,
- 'phpdoc_summary' => false,
- 'phpdoc_to_comment' => false,
- 'phpdoc_align' => false,
- 'yoda_style' => false,
- ])
- ->setFinder($finder)
-;
diff --git a/vendor/webmozart/assert/CHANGELOG.md b/vendor/webmozart/assert/CHANGELOG.md
index 8629248bb..56c8011de 100644
--- a/vendor/webmozart/assert/CHANGELOG.md
+++ b/vendor/webmozart/assert/CHANGELOG.md
@@ -3,6 +3,23 @@ Changelog
## UNRELEASED
+## 1.11.0
+
+### Added
+
+* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support.
+
+### Changed
+
+* Trait methods will now check the assertion themselves, instead of using `__callStatic`
+* `isList` will now deal correctly with (modified) lists that contain `NaN`
+* `reportInvalidArgument` now has a return type of `never`.
+
+### Removed
+
+* Removed `symfony/polyfill-ctype` as a dependency, and require `ext-cytpe` instead.
+ * You can still require the `symfony/polyfill-ctype` in your project if you need it, as it provides `ext-ctype`
+
## 1.10.0
### Added
diff --git a/vendor/webmozart/assert/README.md b/vendor/webmozart/assert/README.md
index b85d59817..3b2397a1a 100644
--- a/vendor/webmozart/assert/README.md
+++ b/vendor/webmozart/assert/README.md
@@ -43,8 +43,8 @@ Installation
Use [Composer] to install the package:
-```
-$ composer require webmozart/assert
+```bash
+composer require webmozart/assert
```
Example
diff --git a/vendor/webmozart/assert/composer.json b/vendor/webmozart/assert/composer.json
index cfae60e5c..b340452c7 100644
--- a/vendor/webmozart/assert/composer.json
+++ b/vendor/webmozart/assert/composer.json
@@ -1,12 +1,12 @@
{
"name": "webmozart/assert",
"description": "Assertions to validate method input/output with nice error messages.",
+ "license": "MIT",
"keywords": [
"assert",
"check",
"validate"
],
- "license": "MIT",
"authors": [
{
"name": "Bernhard Schussek",
@@ -15,19 +15,14 @@
],
"require": {
"php": "^7.2 || ^8.0",
- "symfony/polyfill-ctype": "^1.8"
- },
- "conflict": {
- "phpstan/phpstan": "<0.12.20",
- "vimeo/psalm": "<4.6.1 || 4.6.2"
+ "ext-ctype": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.5.13"
},
- "extra": {
- "branch-alias": {
- "dev-master": "1.10-dev"
- }
+ "conflict": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
},
"autoload": {
"psr-4": {
@@ -39,5 +34,10 @@
"Webmozart\\Assert\\Tests\\": "tests/",
"Webmozart\\Assert\\Bin\\": "bin/src"
}
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.10-dev"
+ }
}
}
diff --git a/vendor/webmozart/assert/psalm.xml b/vendor/webmozart/assert/psalm.xml
deleted file mode 100644
index 9a4300819..000000000
--- a/vendor/webmozart/assert/psalm.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<psalm
- totallyTyped="true"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="https://getpsalm.org/schema/config"
- xsi:schemaLocation="https://getpsalm.org/schema/config ci/vendor/vimeo/psalm/config.xsd"
- phpVersion="7.3"
->
- <projectFiles>
- <directory name="bin" />
- <directory name="tests/static-analysis" />
- </projectFiles>
-
-</psalm>
diff --git a/vendor/webmozart/assert/src/Assert.php b/vendor/webmozart/assert/src/Assert.php
index e0fbabc86..db1f3a51a 100644
--- a/vendor/webmozart/assert/src/Assert.php
+++ b/vendor/webmozart/assert/src/Assert.php
@@ -463,7 +463,7 @@ class Assert
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance of any of %2$s. Got: %s',
static::typeToString($value),
- \implode(', ', \array_map(array('static', 'valueToString'), $classes))
+ \implode(', ', \array_map(array(static::class, 'valueToString'), $classes))
));
}
@@ -485,8 +485,8 @@ class Assert
if (!\is_a($value, $class, \is_string($value))) {
static::reportInvalidArgument(sprintf(
- $message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s',
- static::typeToString($value),
+ $message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s',
+ static::valueToString($value),
$class
));
}
@@ -511,8 +511,8 @@ class Assert
if (\is_a($value, $class, \is_string($value))) {
static::reportInvalidArgument(sprintf(
- $message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s',
- static::typeToString($value),
+ $message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s',
+ static::valueToString($value),
$class
));
}
@@ -539,9 +539,9 @@ class Assert
}
static::reportInvalidArgument(sprintf(
- $message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s',
- static::typeToString($value),
- \implode(', ', \array_map(array('static', 'valueToString'), $classes))
+ $message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s',
+ static::valueToString($value),
+ \implode(', ', $classes)
));
}
@@ -975,7 +975,7 @@ class Assert
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected one of: %2$s. Got: %s',
static::valueToString($value),
- \implode(', ', \array_map(array('static', 'valueToString'), $values))
+ \implode(', ', \array_map(array(static::class, 'valueToString'), $values))
));
}
}
@@ -1822,11 +1822,24 @@ class Assert
*/
public static function isList($array, $message = '')
{
- if (!\is_array($array) || $array !== \array_values($array)) {
+ if (!\is_array($array)) {
static::reportInvalidArgument(
$message ?: 'Expected list - non-associative array.'
);
}
+
+ if ($array === \array_values($array)) {
+ return;
+ }
+
+ $nextKey = -1;
+ foreach ($array as $k => $v) {
+ if ($k !== ++$nextKey) {
+ static::reportInvalidArgument(
+ $message ?: 'Expected list - non-associative array.'
+ );
+ }
+ }
}
/**
@@ -1955,7 +1968,7 @@ class Assert
if ('nullOr' === \substr($name, 0, 6)) {
if (null !== $arguments[0]) {
$method = \lcfirst(\substr($name, 6));
- \call_user_func_array(array('static', $method), $arguments);
+ \call_user_func_array(array(static::class, $method), $arguments);
}
return;
@@ -1970,7 +1983,7 @@ class Assert
foreach ($arguments[0] as $entry) {
$args[0] = $entry;
- \call_user_func_array(array('static', $method), $args);
+ \call_user_func_array(array(static::class, $method), $args);
}
return;
@@ -2054,6 +2067,7 @@ class Assert
* @throws InvalidArgumentException
*
* @psalm-pure this method is not supposed to perform side-effects
+ * @psalm-return never
*/
protected static function reportInvalidArgument($message)
{
diff --git a/vendor/webmozart/assert/src/Mixin.php b/vendor/webmozart/assert/src/Mixin.php
index 5e98823d4..0f0a75e33 100644
--- a/vendor/webmozart/assert/src/Mixin.php
+++ b/vendor/webmozart/assert/src/Mixin.php
@@ -1,9 +1,5 @@
<?php
-/**
- * provides type inference and auto-completion for magic static methods of Assert.
- */
-
namespace Webmozart\Assert;
use ArrayAccess;
@@ -12,7 +8,7 @@ use Countable;
use Throwable;
/**
- * This trait aids static analysis tooling in introspecting assertion magic methods.
+ * This trait provides nurllOr*, all* and allNullOr* variants of assertion base methods.
* Do not use this trait directly: it will change, and is not designed for reuse.
*/
trait Mixin
@@ -30,7 +26,7 @@ trait Mixin
*/
public static function nullOrString($value, $message = '')
{
- static::__callStatic('nullOrString', array($value, $message));
+ null === $value || static::string($value, $message);
}
/**
@@ -46,7 +42,31 @@ trait Mixin
*/
public static function allString($value, $message = '')
{
- static::__callStatic('allString', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::string($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<string|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrString($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::string($entry, $message);
+ }
}
/**
@@ -62,7 +82,7 @@ trait Mixin
*/
public static function nullOrStringNotEmpty($value, $message = '')
{
- static::__callStatic('nullOrStringNotEmpty', array($value, $message));
+ null === $value || static::stringNotEmpty($value, $message);
}
/**
@@ -78,7 +98,31 @@ trait Mixin
*/
public static function allStringNotEmpty($value, $message = '')
{
- static::__callStatic('allStringNotEmpty', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::stringNotEmpty($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<non-empty-string|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrStringNotEmpty($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::stringNotEmpty($entry, $message);
+ }
}
/**
@@ -94,7 +138,7 @@ trait Mixin
*/
public static function nullOrInteger($value, $message = '')
{
- static::__callStatic('nullOrInteger', array($value, $message));
+ null === $value || static::integer($value, $message);
}
/**
@@ -110,7 +154,31 @@ trait Mixin
*/
public static function allInteger($value, $message = '')
{
- static::__callStatic('allInteger', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::integer($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<int|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrInteger($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::integer($entry, $message);
+ }
}
/**
@@ -126,7 +194,7 @@ trait Mixin
*/
public static function nullOrIntegerish($value, $message = '')
{
- static::__callStatic('nullOrIntegerish', array($value, $message));
+ null === $value || static::integerish($value, $message);
}
/**
@@ -142,7 +210,31 @@ trait Mixin
*/
public static function allIntegerish($value, $message = '')
{
- static::__callStatic('allIntegerish', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::integerish($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<numeric|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIntegerish($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::integerish($entry, $message);
+ }
}
/**
@@ -158,7 +250,7 @@ trait Mixin
*/
public static function nullOrPositiveInteger($value, $message = '')
{
- static::__callStatic('nullOrPositiveInteger', array($value, $message));
+ null === $value || static::positiveInteger($value, $message);
}
/**
@@ -174,7 +266,31 @@ trait Mixin
*/
public static function allPositiveInteger($value, $message = '')
{
- static::__callStatic('allPositiveInteger', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::positiveInteger($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<positive-int|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrPositiveInteger($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::positiveInteger($entry, $message);
+ }
}
/**
@@ -190,7 +306,7 @@ trait Mixin
*/
public static function nullOrFloat($value, $message = '')
{
- static::__callStatic('nullOrFloat', array($value, $message));
+ null === $value || static::float($value, $message);
}
/**
@@ -206,7 +322,31 @@ trait Mixin
*/
public static function allFloat($value, $message = '')
{
- static::__callStatic('allFloat', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::float($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<float|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrFloat($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::float($entry, $message);
+ }
}
/**
@@ -222,7 +362,7 @@ trait Mixin
*/
public static function nullOrNumeric($value, $message = '')
{
- static::__callStatic('nullOrNumeric', array($value, $message));
+ null === $value || static::numeric($value, $message);
}
/**
@@ -238,7 +378,31 @@ trait Mixin
*/
public static function allNumeric($value, $message = '')
{
- static::__callStatic('allNumeric', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::numeric($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<numeric|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNumeric($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::numeric($entry, $message);
+ }
}
/**
@@ -254,7 +418,7 @@ trait Mixin
*/
public static function nullOrNatural($value, $message = '')
{
- static::__callStatic('nullOrNatural', array($value, $message));
+ null === $value || static::natural($value, $message);
}
/**
@@ -270,7 +434,31 @@ trait Mixin
*/
public static function allNatural($value, $message = '')
{
- static::__callStatic('allNatural', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::natural($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<positive-int|0|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNatural($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::natural($entry, $message);
+ }
}
/**
@@ -286,7 +474,7 @@ trait Mixin
*/
public static function nullOrBoolean($value, $message = '')
{
- static::__callStatic('nullOrBoolean', array($value, $message));
+ null === $value || static::boolean($value, $message);
}
/**
@@ -302,7 +490,31 @@ trait Mixin
*/
public static function allBoolean($value, $message = '')
{
- static::__callStatic('allBoolean', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::boolean($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<bool|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrBoolean($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::boolean($entry, $message);
+ }
}
/**
@@ -318,7 +530,7 @@ trait Mixin
*/
public static function nullOrScalar($value, $message = '')
{
- static::__callStatic('nullOrScalar', array($value, $message));
+ null === $value || static::scalar($value, $message);
}
/**
@@ -334,7 +546,31 @@ trait Mixin
*/
public static function allScalar($value, $message = '')
{
- static::__callStatic('allScalar', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::scalar($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<scalar|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrScalar($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::scalar($entry, $message);
+ }
}
/**
@@ -350,7 +586,7 @@ trait Mixin
*/
public static function nullOrObject($value, $message = '')
{
- static::__callStatic('nullOrObject', array($value, $message));
+ null === $value || static::object($value, $message);
}
/**
@@ -366,7 +602,31 @@ trait Mixin
*/
public static function allObject($value, $message = '')
{
- static::__callStatic('allObject', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::object($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<object|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrObject($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::object($entry, $message);
+ }
}
/**
@@ -383,7 +643,7 @@ trait Mixin
*/
public static function nullOrResource($value, $type = null, $message = '')
{
- static::__callStatic('nullOrResource', array($value, $type, $message));
+ null === $value || static::resource($value, $type, $message);
}
/**
@@ -400,7 +660,32 @@ trait Mixin
*/
public static function allResource($value, $type = null, $message = '')
{
- static::__callStatic('allResource', array($value, $type, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::resource($entry, $type, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<resource|null> $value
+ *
+ * @param mixed $value
+ * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrResource($value, $type = null, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::resource($entry, $type, $message);
+ }
}
/**
@@ -416,7 +701,7 @@ trait Mixin
*/
public static function nullOrIsCallable($value, $message = '')
{
- static::__callStatic('nullOrIsCallable', array($value, $message));
+ null === $value || static::isCallable($value, $message);
}
/**
@@ -432,7 +717,31 @@ trait Mixin
*/
public static function allIsCallable($value, $message = '')
{
- static::__callStatic('allIsCallable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isCallable($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<callable|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsCallable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isCallable($entry, $message);
+ }
}
/**
@@ -448,7 +757,7 @@ trait Mixin
*/
public static function nullOrIsArray($value, $message = '')
{
- static::__callStatic('nullOrIsArray', array($value, $message));
+ null === $value || static::isArray($value, $message);
}
/**
@@ -464,7 +773,31 @@ trait Mixin
*/
public static function allIsArray($value, $message = '')
{
- static::__callStatic('allIsArray', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isArray($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<array|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsArray($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isArray($entry, $message);
+ }
}
/**
@@ -482,7 +815,7 @@ trait Mixin
*/
public static function nullOrIsTraversable($value, $message = '')
{
- static::__callStatic('nullOrIsTraversable', array($value, $message));
+ null === $value || static::isTraversable($value, $message);
}
/**
@@ -500,7 +833,33 @@ trait Mixin
*/
public static function allIsTraversable($value, $message = '')
{
- static::__callStatic('allIsTraversable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isTraversable($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<iterable|null> $value
+ *
+ * @deprecated use "isIterable" or "isInstanceOf" instead
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsTraversable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isTraversable($entry, $message);
+ }
}
/**
@@ -516,7 +875,7 @@ trait Mixin
*/
public static function nullOrIsArrayAccessible($value, $message = '')
{
- static::__callStatic('nullOrIsArrayAccessible', array($value, $message));
+ null === $value || static::isArrayAccessible($value, $message);
}
/**
@@ -532,7 +891,31 @@ trait Mixin
*/
public static function allIsArrayAccessible($value, $message = '')
{
- static::__callStatic('allIsArrayAccessible', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isArrayAccessible($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<array|ArrayAccess|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsArrayAccessible($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isArrayAccessible($entry, $message);
+ }
}
/**
@@ -548,7 +931,7 @@ trait Mixin
*/
public static function nullOrIsCountable($value, $message = '')
{
- static::__callStatic('nullOrIsCountable', array($value, $message));
+ null === $value || static::isCountable($value, $message);
}
/**
@@ -564,7 +947,31 @@ trait Mixin
*/
public static function allIsCountable($value, $message = '')
{
- static::__callStatic('allIsCountable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isCountable($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<countable|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsCountable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isCountable($entry, $message);
+ }
}
/**
@@ -580,7 +987,7 @@ trait Mixin
*/
public static function nullOrIsIterable($value, $message = '')
{
- static::__callStatic('nullOrIsIterable', array($value, $message));
+ null === $value || static::isIterable($value, $message);
}
/**
@@ -596,7 +1003,31 @@ trait Mixin
*/
public static function allIsIterable($value, $message = '')
{
- static::__callStatic('allIsIterable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isIterable($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<iterable|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsIterable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isIterable($entry, $message);
+ }
}
/**
@@ -615,7 +1046,7 @@ trait Mixin
*/
public static function nullOrIsInstanceOf($value, $class, $message = '')
{
- static::__callStatic('nullOrIsInstanceOf', array($value, $class, $message));
+ null === $value || static::isInstanceOf($value, $class, $message);
}
/**
@@ -634,7 +1065,34 @@ trait Mixin
*/
public static function allIsInstanceOf($value, $class, $message = '')
{
- static::__callStatic('allIsInstanceOf', array($value, $class, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isInstanceOf($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $class
+ * @psalm-assert iterable<ExpectedType|null> $value
+ *
+ * @param mixed $value
+ * @param string|object $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsInstanceOf($value, $class, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isInstanceOf($entry, $class, $message);
+ }
}
/**
@@ -652,7 +1110,7 @@ trait Mixin
*/
public static function nullOrNotInstanceOf($value, $class, $message = '')
{
- static::__callStatic('nullOrNotInstanceOf', array($value, $class, $message));
+ null === $value || static::notInstanceOf($value, $class, $message);
}
/**
@@ -670,7 +1128,34 @@ trait Mixin
*/
public static function allNotInstanceOf($value, $class, $message = '')
{
- static::__callStatic('allNotInstanceOf', array($value, $class, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notInstanceOf($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $class
+ * @psalm-assert iterable<!ExpectedType|null> $value
+ *
+ * @param mixed $value
+ * @param string|object $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotInstanceOf($value, $class, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notInstanceOf($entry, $class, $message);
+ }
}
/**
@@ -687,7 +1172,7 @@ trait Mixin
*/
public static function nullOrIsInstanceOfAny($value, $classes, $message = '')
{
- static::__callStatic('nullOrIsInstanceOfAny', array($value, $classes, $message));
+ null === $value || static::isInstanceOfAny($value, $classes, $message);
}
/**
@@ -704,7 +1189,32 @@ trait Mixin
*/
public static function allIsInstanceOfAny($value, $classes, $message = '')
{
- static::__callStatic('allIsInstanceOfAny', array($value, $classes, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isInstanceOfAny($entry, $classes, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param array<class-string> $classes
+ *
+ * @param mixed $value
+ * @param array<object|string> $classes
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsInstanceOfAny($value, $classes, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isInstanceOfAny($entry, $classes, $message);
+ }
}
/**
@@ -723,7 +1233,7 @@ trait Mixin
*/
public static function nullOrIsAOf($value, $class, $message = '')
{
- static::__callStatic('nullOrIsAOf', array($value, $class, $message));
+ null === $value || static::isAOf($value, $class, $message);
}
/**
@@ -742,7 +1252,34 @@ trait Mixin
*/
public static function allIsAOf($value, $class, $message = '')
{
- static::__callStatic('allIsAOf', array($value, $class, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isAOf($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $class
+ * @psalm-assert iterable<ExpectedType|class-string<ExpectedType>|null> $value
+ *
+ * @param iterable<object|string|null> $value
+ * @param string $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsAOf($value, $class, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isAOf($entry, $class, $message);
+ }
}
/**
@@ -760,7 +1297,7 @@ trait Mixin
*/
public static function nullOrIsNotA($value, $class, $message = '')
{
- static::__callStatic('nullOrIsNotA', array($value, $class, $message));
+ null === $value || static::isNotA($value, $class, $message);
}
/**
@@ -778,7 +1315,35 @@ trait Mixin
*/
public static function allIsNotA($value, $class, $message = '')
{
- static::__callStatic('allIsNotA', array($value, $class, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isNotA($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template UnexpectedType of object
+ * @psalm-param class-string<UnexpectedType> $class
+ * @psalm-assert iterable<!UnexpectedType|null> $value
+ * @psalm-assert iterable<!class-string<UnexpectedType>|null> $value
+ *
+ * @param iterable<object|string|null> $value
+ * @param string $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsNotA($value, $class, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isNotA($entry, $class, $message);
+ }
}
/**
@@ -795,7 +1360,7 @@ trait Mixin
*/
public static function nullOrIsAnyOf($value, $classes, $message = '')
{
- static::__callStatic('nullOrIsAnyOf', array($value, $classes, $message));
+ null === $value || static::isAnyOf($value, $classes, $message);
}
/**
@@ -812,7 +1377,32 @@ trait Mixin
*/
public static function allIsAnyOf($value, $classes, $message = '')
{
- static::__callStatic('allIsAnyOf', array($value, $classes, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isAnyOf($entry, $classes, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param array<class-string> $classes
+ *
+ * @param iterable<object|string|null> $value
+ * @param string[] $classes
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsAnyOf($value, $classes, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isAnyOf($entry, $classes, $message);
+ }
}
/**
@@ -828,7 +1418,7 @@ trait Mixin
*/
public static function nullOrIsEmpty($value, $message = '')
{
- static::__callStatic('nullOrIsEmpty', array($value, $message));
+ null === $value || static::isEmpty($value, $message);
}
/**
@@ -844,7 +1434,31 @@ trait Mixin
*/
public static function allIsEmpty($value, $message = '')
{
- static::__callStatic('allIsEmpty', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::isEmpty($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<empty|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsEmpty($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::isEmpty($entry, $message);
+ }
}
/**
@@ -859,7 +1473,7 @@ trait Mixin
*/
public static function nullOrNotEmpty($value, $message = '')
{
- static::__callStatic('nullOrNotEmpty', array($value, $message));
+ null === $value || static::notEmpty($value, $message);
}
/**
@@ -874,7 +1488,31 @@ trait Mixin
*/
public static function allNotEmpty($value, $message = '')
{
- static::__callStatic('allNotEmpty', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notEmpty($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<!empty|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotEmpty($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notEmpty($entry, $message);
+ }
}
/**
@@ -890,7 +1528,11 @@ trait Mixin
*/
public static function allNull($value, $message = '')
{
- static::__callStatic('allNull', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::null($entry, $message);
+ }
}
/**
@@ -905,7 +1547,11 @@ trait Mixin
*/
public static function allNotNull($value, $message = '')
{
- static::__callStatic('allNotNull', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notNull($entry, $message);
+ }
}
/**
@@ -921,7 +1567,7 @@ trait Mixin
*/
public static function nullOrTrue($value, $message = '')
{
- static::__callStatic('nullOrTrue', array($value, $message));
+ null === $value || static::true($value, $message);
}
/**
@@ -937,7 +1583,31 @@ trait Mixin
*/
public static function allTrue($value, $message = '')
{
- static::__callStatic('allTrue', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::true($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<true|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrTrue($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::true($entry, $message);
+ }
}
/**
@@ -953,7 +1623,7 @@ trait Mixin
*/
public static function nullOrFalse($value, $message = '')
{
- static::__callStatic('nullOrFalse', array($value, $message));
+ null === $value || static::false($value, $message);
}
/**
@@ -969,7 +1639,31 @@ trait Mixin
*/
public static function allFalse($value, $message = '')
{
- static::__callStatic('allFalse', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::false($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<false|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrFalse($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::false($entry, $message);
+ }
}
/**
@@ -984,7 +1678,7 @@ trait Mixin
*/
public static function nullOrNotFalse($value, $message = '')
{
- static::__callStatic('nullOrNotFalse', array($value, $message));
+ null === $value || static::notFalse($value, $message);
}
/**
@@ -999,7 +1693,31 @@ trait Mixin
*/
public static function allNotFalse($value, $message = '')
{
- static::__callStatic('allNotFalse', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notFalse($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<!false|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotFalse($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notFalse($entry, $message);
+ }
}
/**
@@ -1012,7 +1730,7 @@ trait Mixin
*/
public static function nullOrIp($value, $message = '')
{
- static::__callStatic('nullOrIp', array($value, $message));
+ null === $value || static::ip($value, $message);
}
/**
@@ -1025,7 +1743,28 @@ trait Mixin
*/
public static function allIp($value, $message = '')
{
- static::__callStatic('allIp', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::ip($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIp($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::ip($entry, $message);
+ }
}
/**
@@ -1038,7 +1777,7 @@ trait Mixin
*/
public static function nullOrIpv4($value, $message = '')
{
- static::__callStatic('nullOrIpv4', array($value, $message));
+ null === $value || static::ipv4($value, $message);
}
/**
@@ -1051,7 +1790,28 @@ trait Mixin
*/
public static function allIpv4($value, $message = '')
{
- static::__callStatic('allIpv4', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::ipv4($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIpv4($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::ipv4($entry, $message);
+ }
}
/**
@@ -1064,7 +1824,7 @@ trait Mixin
*/
public static function nullOrIpv6($value, $message = '')
{
- static::__callStatic('nullOrIpv6', array($value, $message));
+ null === $value || static::ipv6($value, $message);
}
/**
@@ -1077,7 +1837,28 @@ trait Mixin
*/
public static function allIpv6($value, $message = '')
{
- static::__callStatic('allIpv6', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::ipv6($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIpv6($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::ipv6($entry, $message);
+ }
}
/**
@@ -1090,7 +1871,7 @@ trait Mixin
*/
public static function nullOrEmail($value, $message = '')
{
- static::__callStatic('nullOrEmail', array($value, $message));
+ null === $value || static::email($value, $message);
}
/**
@@ -1103,7 +1884,28 @@ trait Mixin
*/
public static function allEmail($value, $message = '')
{
- static::__callStatic('allEmail', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::email($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrEmail($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::email($entry, $message);
+ }
}
/**
@@ -1116,7 +1918,7 @@ trait Mixin
*/
public static function nullOrUniqueValues($values, $message = '')
{
- static::__callStatic('nullOrUniqueValues', array($values, $message));
+ null === $values || static::uniqueValues($values, $message);
}
/**
@@ -1129,7 +1931,28 @@ trait Mixin
*/
public static function allUniqueValues($values, $message = '')
{
- static::__callStatic('allUniqueValues', array($values, $message));
+ static::isIterable($values);
+
+ foreach ($values as $entry) {
+ static::uniqueValues($entry, $message);
+ }
+ }
+
+ /**
+ * @param iterable<array|null> $values
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrUniqueValues($values, $message = '')
+ {
+ static::isIterable($values);
+
+ foreach ($values as $entry) {
+ null === $entry || static::uniqueValues($entry, $message);
+ }
}
/**
@@ -1143,7 +1966,7 @@ trait Mixin
*/
public static function nullOrEq($value, $expect, $message = '')
{
- static::__callStatic('nullOrEq', array($value, $expect, $message));
+ null === $value || static::eq($value, $expect, $message);
}
/**
@@ -1157,7 +1980,29 @@ trait Mixin
*/
public static function allEq($value, $expect, $message = '')
{
- static::__callStatic('allEq', array($value, $expect, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::eq($entry, $expect, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param mixed $expect
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrEq($value, $expect, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::eq($entry, $expect, $message);
+ }
}
/**
@@ -1171,7 +2016,7 @@ trait Mixin
*/
public static function nullOrNotEq($value, $expect, $message = '')
{
- static::__callStatic('nullOrNotEq', array($value, $expect, $message));
+ null === $value || static::notEq($value, $expect, $message);
}
/**
@@ -1185,7 +2030,29 @@ trait Mixin
*/
public static function allNotEq($value, $expect, $message = '')
{
- static::__callStatic('allNotEq', array($value, $expect, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notEq($entry, $expect, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param mixed $expect
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotEq($value, $expect, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notEq($entry, $expect, $message);
+ }
}
/**
@@ -1201,7 +2068,7 @@ trait Mixin
*/
public static function nullOrSame($value, $expect, $message = '')
{
- static::__callStatic('nullOrSame', array($value, $expect, $message));
+ null === $value || static::same($value, $expect, $message);
}
/**
@@ -1217,7 +2084,31 @@ trait Mixin
*/
public static function allSame($value, $expect, $message = '')
{
- static::__callStatic('allSame', array($value, $expect, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::same($entry, $expect, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $expect
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrSame($value, $expect, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::same($entry, $expect, $message);
+ }
}
/**
@@ -1233,7 +2124,7 @@ trait Mixin
*/
public static function nullOrNotSame($value, $expect, $message = '')
{
- static::__callStatic('nullOrNotSame', array($value, $expect, $message));
+ null === $value || static::notSame($value, $expect, $message);
}
/**
@@ -1249,7 +2140,31 @@ trait Mixin
*/
public static function allNotSame($value, $expect, $message = '')
{
- static::__callStatic('allNotSame', array($value, $expect, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notSame($entry, $expect, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $expect
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotSame($value, $expect, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notSame($entry, $expect, $message);
+ }
}
/**
@@ -1265,7 +2180,7 @@ trait Mixin
*/
public static function nullOrGreaterThan($value, $limit, $message = '')
{
- static::__callStatic('nullOrGreaterThan', array($value, $limit, $message));
+ null === $value || static::greaterThan($value, $limit, $message);
}
/**
@@ -1281,7 +2196,31 @@ trait Mixin
*/
public static function allGreaterThan($value, $limit, $message = '')
{
- static::__callStatic('allGreaterThan', array($value, $limit, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::greaterThan($entry, $limit, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $limit
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrGreaterThan($value, $limit, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::greaterThan($entry, $limit, $message);
+ }
}
/**
@@ -1297,7 +2236,7 @@ trait Mixin
*/
public static function nullOrGreaterThanEq($value, $limit, $message = '')
{
- static::__callStatic('nullOrGreaterThanEq', array($value, $limit, $message));
+ null === $value || static::greaterThanEq($value, $limit, $message);
}
/**
@@ -1313,7 +2252,31 @@ trait Mixin
*/
public static function allGreaterThanEq($value, $limit, $message = '')
{
- static::__callStatic('allGreaterThanEq', array($value, $limit, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::greaterThanEq($entry, $limit, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $limit
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrGreaterThanEq($value, $limit, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::greaterThanEq($entry, $limit, $message);
+ }
}
/**
@@ -1329,7 +2292,7 @@ trait Mixin
*/
public static function nullOrLessThan($value, $limit, $message = '')
{
- static::__callStatic('nullOrLessThan', array($value, $limit, $message));
+ null === $value || static::lessThan($value, $limit, $message);
}
/**
@@ -1345,7 +2308,31 @@ trait Mixin
*/
public static function allLessThan($value, $limit, $message = '')
{
- static::__callStatic('allLessThan', array($value, $limit, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::lessThan($entry, $limit, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $limit
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrLessThan($value, $limit, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::lessThan($entry, $limit, $message);
+ }
}
/**
@@ -1361,7 +2348,7 @@ trait Mixin
*/
public static function nullOrLessThanEq($value, $limit, $message = '')
{
- static::__callStatic('nullOrLessThanEq', array($value, $limit, $message));
+ null === $value || static::lessThanEq($value, $limit, $message);
}
/**
@@ -1377,7 +2364,31 @@ trait Mixin
*/
public static function allLessThanEq($value, $limit, $message = '')
{
- static::__callStatic('allLessThanEq', array($value, $limit, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::lessThanEq($entry, $limit, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $limit
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrLessThanEq($value, $limit, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::lessThanEq($entry, $limit, $message);
+ }
}
/**
@@ -1394,7 +2405,7 @@ trait Mixin
*/
public static function nullOrRange($value, $min, $max, $message = '')
{
- static::__callStatic('nullOrRange', array($value, $min, $max, $message));
+ null === $value || static::range($value, $min, $max, $message);
}
/**
@@ -1411,7 +2422,32 @@ trait Mixin
*/
public static function allRange($value, $min, $max, $message = '')
{
- static::__callStatic('allRange', array($value, $min, $max, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::range($entry, $min, $max, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param mixed $min
+ * @param mixed $max
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrRange($value, $min, $max, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::range($entry, $min, $max, $message);
+ }
}
/**
@@ -1427,7 +2463,7 @@ trait Mixin
*/
public static function nullOrOneOf($value, $values, $message = '')
{
- static::__callStatic('nullOrOneOf', array($value, $values, $message));
+ null === $value || static::oneOf($value, $values, $message);
}
/**
@@ -1443,7 +2479,31 @@ trait Mixin
*/
public static function allOneOf($value, $values, $message = '')
{
- static::__callStatic('allOneOf', array($value, $values, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::oneOf($entry, $values, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param array $values
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrOneOf($value, $values, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::oneOf($entry, $values, $message);
+ }
}
/**
@@ -1459,7 +2519,7 @@ trait Mixin
*/
public static function nullOrInArray($value, $values, $message = '')
{
- static::__callStatic('nullOrInArray', array($value, $values, $message));
+ null === $value || static::inArray($value, $values, $message);
}
/**
@@ -1475,7 +2535,31 @@ trait Mixin
*/
public static function allInArray($value, $values, $message = '')
{
- static::__callStatic('allInArray', array($value, $values, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::inArray($entry, $values, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param array $values
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrInArray($value, $values, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::inArray($entry, $values, $message);
+ }
}
/**
@@ -1491,7 +2575,7 @@ trait Mixin
*/
public static function nullOrContains($value, $subString, $message = '')
{
- static::__callStatic('nullOrContains', array($value, $subString, $message));
+ null === $value || static::contains($value, $subString, $message);
}
/**
@@ -1507,7 +2591,31 @@ trait Mixin
*/
public static function allContains($value, $subString, $message = '')
{
- static::__callStatic('allContains', array($value, $subString, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::contains($entry, $subString, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $subString
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrContains($value, $subString, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::contains($entry, $subString, $message);
+ }
}
/**
@@ -1523,7 +2631,7 @@ trait Mixin
*/
public static function nullOrNotContains($value, $subString, $message = '')
{
- static::__callStatic('nullOrNotContains', array($value, $subString, $message));
+ null === $value || static::notContains($value, $subString, $message);
}
/**
@@ -1539,7 +2647,31 @@ trait Mixin
*/
public static function allNotContains($value, $subString, $message = '')
{
- static::__callStatic('allNotContains', array($value, $subString, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notContains($entry, $subString, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $subString
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotContains($value, $subString, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notContains($entry, $subString, $message);
+ }
}
/**
@@ -1554,7 +2686,7 @@ trait Mixin
*/
public static function nullOrNotWhitespaceOnly($value, $message = '')
{
- static::__callStatic('nullOrNotWhitespaceOnly', array($value, $message));
+ null === $value || static::notWhitespaceOnly($value, $message);
}
/**
@@ -1569,7 +2701,30 @@ trait Mixin
*/
public static function allNotWhitespaceOnly($value, $message = '')
{
- static::__callStatic('allNotWhitespaceOnly', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notWhitespaceOnly($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotWhitespaceOnly($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notWhitespaceOnly($entry, $message);
+ }
}
/**
@@ -1585,7 +2740,7 @@ trait Mixin
*/
public static function nullOrStartsWith($value, $prefix, $message = '')
{
- static::__callStatic('nullOrStartsWith', array($value, $prefix, $message));
+ null === $value || static::startsWith($value, $prefix, $message);
}
/**
@@ -1601,7 +2756,31 @@ trait Mixin
*/
public static function allStartsWith($value, $prefix, $message = '')
{
- static::__callStatic('allStartsWith', array($value, $prefix, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::startsWith($entry, $prefix, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $prefix
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrStartsWith($value, $prefix, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::startsWith($entry, $prefix, $message);
+ }
}
/**
@@ -1617,7 +2796,7 @@ trait Mixin
*/
public static function nullOrNotStartsWith($value, $prefix, $message = '')
{
- static::__callStatic('nullOrNotStartsWith', array($value, $prefix, $message));
+ null === $value || static::notStartsWith($value, $prefix, $message);
}
/**
@@ -1633,7 +2812,31 @@ trait Mixin
*/
public static function allNotStartsWith($value, $prefix, $message = '')
{
- static::__callStatic('allNotStartsWith', array($value, $prefix, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notStartsWith($entry, $prefix, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $prefix
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotStartsWith($value, $prefix, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notStartsWith($entry, $prefix, $message);
+ }
}
/**
@@ -1648,7 +2851,7 @@ trait Mixin
*/
public static function nullOrStartsWithLetter($value, $message = '')
{
- static::__callStatic('nullOrStartsWithLetter', array($value, $message));
+ null === $value || static::startsWithLetter($value, $message);
}
/**
@@ -1663,7 +2866,30 @@ trait Mixin
*/
public static function allStartsWithLetter($value, $message = '')
{
- static::__callStatic('allStartsWithLetter', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::startsWithLetter($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrStartsWithLetter($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::startsWithLetter($entry, $message);
+ }
}
/**
@@ -1679,7 +2905,7 @@ trait Mixin
*/
public static function nullOrEndsWith($value, $suffix, $message = '')
{
- static::__callStatic('nullOrEndsWith', array($value, $suffix, $message));
+ null === $value || static::endsWith($value, $suffix, $message);
}
/**
@@ -1695,7 +2921,31 @@ trait Mixin
*/
public static function allEndsWith($value, $suffix, $message = '')
{
- static::__callStatic('allEndsWith', array($value, $suffix, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::endsWith($entry, $suffix, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $suffix
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrEndsWith($value, $suffix, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::endsWith($entry, $suffix, $message);
+ }
}
/**
@@ -1711,7 +2961,7 @@ trait Mixin
*/
public static function nullOrNotEndsWith($value, $suffix, $message = '')
{
- static::__callStatic('nullOrNotEndsWith', array($value, $suffix, $message));
+ null === $value || static::notEndsWith($value, $suffix, $message);
}
/**
@@ -1727,7 +2977,31 @@ trait Mixin
*/
public static function allNotEndsWith($value, $suffix, $message = '')
{
- static::__callStatic('allNotEndsWith', array($value, $suffix, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notEndsWith($entry, $suffix, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $suffix
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotEndsWith($value, $suffix, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notEndsWith($entry, $suffix, $message);
+ }
}
/**
@@ -1743,7 +3017,7 @@ trait Mixin
*/
public static function nullOrRegex($value, $pattern, $message = '')
{
- static::__callStatic('nullOrRegex', array($value, $pattern, $message));
+ null === $value || static::regex($value, $pattern, $message);
}
/**
@@ -1759,7 +3033,31 @@ trait Mixin
*/
public static function allRegex($value, $pattern, $message = '')
{
- static::__callStatic('allRegex', array($value, $pattern, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::regex($entry, $pattern, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $pattern
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrRegex($value, $pattern, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::regex($entry, $pattern, $message);
+ }
}
/**
@@ -1775,7 +3073,7 @@ trait Mixin
*/
public static function nullOrNotRegex($value, $pattern, $message = '')
{
- static::__callStatic('nullOrNotRegex', array($value, $pattern, $message));
+ null === $value || static::notRegex($value, $pattern, $message);
}
/**
@@ -1791,7 +3089,31 @@ trait Mixin
*/
public static function allNotRegex($value, $pattern, $message = '')
{
- static::__callStatic('allNotRegex', array($value, $pattern, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::notRegex($entry, $pattern, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $pattern
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrNotRegex($value, $pattern, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::notRegex($entry, $pattern, $message);
+ }
}
/**
@@ -1806,7 +3128,7 @@ trait Mixin
*/
public static function nullOrUnicodeLetters($value, $message = '')
{
- static::__callStatic('nullOrUnicodeLetters', array($value, $message));
+ null === $value || static::unicodeLetters($value, $message);
}
/**
@@ -1821,7 +3143,30 @@ trait Mixin
*/
public static function allUnicodeLetters($value, $message = '')
{
- static::__callStatic('allUnicodeLetters', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::unicodeLetters($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrUnicodeLetters($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::unicodeLetters($entry, $message);
+ }
}
/**
@@ -1836,7 +3181,7 @@ trait Mixin
*/
public static function nullOrAlpha($value, $message = '')
{
- static::__callStatic('nullOrAlpha', array($value, $message));
+ null === $value || static::alpha($value, $message);
}
/**
@@ -1851,7 +3196,30 @@ trait Mixin
*/
public static function allAlpha($value, $message = '')
{
- static::__callStatic('allAlpha', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::alpha($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrAlpha($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::alpha($entry, $message);
+ }
}
/**
@@ -1866,7 +3234,7 @@ trait Mixin
*/
public static function nullOrDigits($value, $message = '')
{
- static::__callStatic('nullOrDigits', array($value, $message));
+ null === $value || static::digits($value, $message);
}
/**
@@ -1881,7 +3249,30 @@ trait Mixin
*/
public static function allDigits($value, $message = '')
{
- static::__callStatic('allDigits', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::digits($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrDigits($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::digits($entry, $message);
+ }
}
/**
@@ -1896,7 +3287,7 @@ trait Mixin
*/
public static function nullOrAlnum($value, $message = '')
{
- static::__callStatic('nullOrAlnum', array($value, $message));
+ null === $value || static::alnum($value, $message);
}
/**
@@ -1911,7 +3302,30 @@ trait Mixin
*/
public static function allAlnum($value, $message = '')
{
- static::__callStatic('allAlnum', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::alnum($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrAlnum($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::alnum($entry, $message);
+ }
}
/**
@@ -1927,7 +3341,7 @@ trait Mixin
*/
public static function nullOrLower($value, $message = '')
{
- static::__callStatic('nullOrLower', array($value, $message));
+ null === $value || static::lower($value, $message);
}
/**
@@ -1943,7 +3357,31 @@ trait Mixin
*/
public static function allLower($value, $message = '')
{
- static::__callStatic('allLower', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::lower($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<lowercase-string|null> $value
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrLower($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::lower($entry, $message);
+ }
}
/**
@@ -1958,7 +3396,7 @@ trait Mixin
*/
public static function nullOrUpper($value, $message = '')
{
- static::__callStatic('nullOrUpper', array($value, $message));
+ null === $value || static::upper($value, $message);
}
/**
@@ -1973,7 +3411,31 @@ trait Mixin
*/
public static function allUpper($value, $message = '')
{
- static::__callStatic('allUpper', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::upper($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<!lowercase-string|null> $value
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrUpper($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::upper($entry, $message);
+ }
}
/**
@@ -1989,7 +3451,7 @@ trait Mixin
*/
public static function nullOrLength($value, $length, $message = '')
{
- static::__callStatic('nullOrLength', array($value, $length, $message));
+ null === $value || static::length($value, $length, $message);
}
/**
@@ -2005,7 +3467,31 @@ trait Mixin
*/
public static function allLength($value, $length, $message = '')
{
- static::__callStatic('allLength', array($value, $length, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::length($entry, $length, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param int $length
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrLength($value, $length, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::length($entry, $length, $message);
+ }
}
/**
@@ -2021,7 +3507,7 @@ trait Mixin
*/
public static function nullOrMinLength($value, $min, $message = '')
{
- static::__callStatic('nullOrMinLength', array($value, $min, $message));
+ null === $value || static::minLength($value, $min, $message);
}
/**
@@ -2037,7 +3523,31 @@ trait Mixin
*/
public static function allMinLength($value, $min, $message = '')
{
- static::__callStatic('allMinLength', array($value, $min, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::minLength($entry, $min, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param int|float $min
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMinLength($value, $min, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::minLength($entry, $min, $message);
+ }
}
/**
@@ -2053,7 +3563,7 @@ trait Mixin
*/
public static function nullOrMaxLength($value, $max, $message = '')
{
- static::__callStatic('nullOrMaxLength', array($value, $max, $message));
+ null === $value || static::maxLength($value, $max, $message);
}
/**
@@ -2069,7 +3579,31 @@ trait Mixin
*/
public static function allMaxLength($value, $max, $message = '')
{
- static::__callStatic('allMaxLength', array($value, $max, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::maxLength($entry, $max, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param int|float $max
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMaxLength($value, $max, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::maxLength($entry, $max, $message);
+ }
}
/**
@@ -2086,7 +3620,7 @@ trait Mixin
*/
public static function nullOrLengthBetween($value, $min, $max, $message = '')
{
- static::__callStatic('nullOrLengthBetween', array($value, $min, $max, $message));
+ null === $value || static::lengthBetween($value, $min, $max, $message);
}
/**
@@ -2103,7 +3637,32 @@ trait Mixin
*/
public static function allLengthBetween($value, $min, $max, $message = '')
{
- static::__callStatic('allLengthBetween', array($value, $min, $max, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::lengthBetween($entry, $min, $max, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param int|float $min
+ * @param int|float $max
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrLengthBetween($value, $min, $max, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::lengthBetween($entry, $min, $max, $message);
+ }
}
/**
@@ -2116,7 +3675,7 @@ trait Mixin
*/
public static function nullOrFileExists($value, $message = '')
{
- static::__callStatic('nullOrFileExists', array($value, $message));
+ null === $value || static::fileExists($value, $message);
}
/**
@@ -2129,7 +3688,28 @@ trait Mixin
*/
public static function allFileExists($value, $message = '')
{
- static::__callStatic('allFileExists', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::fileExists($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrFileExists($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::fileExists($entry, $message);
+ }
}
/**
@@ -2142,7 +3722,7 @@ trait Mixin
*/
public static function nullOrFile($value, $message = '')
{
- static::__callStatic('nullOrFile', array($value, $message));
+ null === $value || static::file($value, $message);
}
/**
@@ -2155,7 +3735,28 @@ trait Mixin
*/
public static function allFile($value, $message = '')
{
- static::__callStatic('allFile', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::file($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrFile($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::file($entry, $message);
+ }
}
/**
@@ -2168,7 +3769,7 @@ trait Mixin
*/
public static function nullOrDirectory($value, $message = '')
{
- static::__callStatic('nullOrDirectory', array($value, $message));
+ null === $value || static::directory($value, $message);
}
/**
@@ -2181,7 +3782,28 @@ trait Mixin
*/
public static function allDirectory($value, $message = '')
{
- static::__callStatic('allDirectory', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::directory($entry, $message);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrDirectory($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::directory($entry, $message);
+ }
}
/**
@@ -2194,7 +3816,7 @@ trait Mixin
*/
public static function nullOrReadable($value, $message = '')
{
- static::__callStatic('nullOrReadable', array($value, $message));
+ null === $value || static::readable($value, $message);
}
/**
@@ -2207,7 +3829,28 @@ trait Mixin
*/
public static function allReadable($value, $message = '')
{
- static::__callStatic('allReadable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::readable($entry, $message);
+ }
+ }
+
+ /**
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrReadable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::readable($entry, $message);
+ }
}
/**
@@ -2220,7 +3863,7 @@ trait Mixin
*/
public static function nullOrWritable($value, $message = '')
{
- static::__callStatic('nullOrWritable', array($value, $message));
+ null === $value || static::writable($value, $message);
}
/**
@@ -2233,7 +3876,28 @@ trait Mixin
*/
public static function allWritable($value, $message = '')
{
- static::__callStatic('allWritable', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::writable($entry, $message);
+ }
+ }
+
+ /**
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrWritable($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::writable($entry, $message);
+ }
}
/**
@@ -2248,7 +3912,7 @@ trait Mixin
*/
public static function nullOrClassExists($value, $message = '')
{
- static::__callStatic('nullOrClassExists', array($value, $message));
+ null === $value || static::classExists($value, $message);
}
/**
@@ -2263,7 +3927,30 @@ trait Mixin
*/
public static function allClassExists($value, $message = '')
{
- static::__callStatic('allClassExists', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::classExists($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-assert iterable<class-string|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrClassExists($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::classExists($entry, $message);
+ }
}
/**
@@ -2282,7 +3969,7 @@ trait Mixin
*/
public static function nullOrSubclassOf($value, $class, $message = '')
{
- static::__callStatic('nullOrSubclassOf', array($value, $class, $message));
+ null === $value || static::subclassOf($value, $class, $message);
}
/**
@@ -2301,7 +3988,34 @@ trait Mixin
*/
public static function allSubclassOf($value, $class, $message = '')
{
- static::__callStatic('allSubclassOf', array($value, $class, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::subclassOf($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $class
+ * @psalm-assert iterable<class-string<ExpectedType>|ExpectedType|null> $value
+ *
+ * @param mixed $value
+ * @param string|object $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrSubclassOf($value, $class, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::subclassOf($entry, $class, $message);
+ }
}
/**
@@ -2316,7 +4030,7 @@ trait Mixin
*/
public static function nullOrInterfaceExists($value, $message = '')
{
- static::__callStatic('nullOrInterfaceExists', array($value, $message));
+ null === $value || static::interfaceExists($value, $message);
}
/**
@@ -2331,7 +4045,30 @@ trait Mixin
*/
public static function allInterfaceExists($value, $message = '')
{
- static::__callStatic('allInterfaceExists', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::interfaceExists($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-assert iterable<class-string|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrInterfaceExists($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::interfaceExists($entry, $message);
+ }
}
/**
@@ -2350,7 +4087,7 @@ trait Mixin
*/
public static function nullOrImplementsInterface($value, $interface, $message = '')
{
- static::__callStatic('nullOrImplementsInterface', array($value, $interface, $message));
+ null === $value || static::implementsInterface($value, $interface, $message);
}
/**
@@ -2369,7 +4106,34 @@ trait Mixin
*/
public static function allImplementsInterface($value, $interface, $message = '')
{
- static::__callStatic('allImplementsInterface', array($value, $interface, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::implementsInterface($entry, $interface, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $interface
+ * @psalm-assert iterable<class-string<ExpectedType>|null> $value
+ *
+ * @param mixed $value
+ * @param mixed $interface
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrImplementsInterface($value, $interface, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::implementsInterface($entry, $interface, $message);
+ }
}
/**
@@ -2386,7 +4150,7 @@ trait Mixin
*/
public static function nullOrPropertyExists($classOrObject, $property, $message = '')
{
- static::__callStatic('nullOrPropertyExists', array($classOrObject, $property, $message));
+ null === $classOrObject || static::propertyExists($classOrObject, $property, $message);
}
/**
@@ -2403,7 +4167,32 @@ trait Mixin
*/
public static function allPropertyExists($classOrObject, $property, $message = '')
{
- static::__callStatic('allPropertyExists', array($classOrObject, $property, $message));
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ static::propertyExists($entry, $property, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param iterable<class-string|object|null> $classOrObject
+ *
+ * @param iterable<string|object|null> $classOrObject
+ * @param mixed $property
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrPropertyExists($classOrObject, $property, $message = '')
+ {
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ null === $entry || static::propertyExists($entry, $property, $message);
+ }
}
/**
@@ -2420,7 +4209,7 @@ trait Mixin
*/
public static function nullOrPropertyNotExists($classOrObject, $property, $message = '')
{
- static::__callStatic('nullOrPropertyNotExists', array($classOrObject, $property, $message));
+ null === $classOrObject || static::propertyNotExists($classOrObject, $property, $message);
}
/**
@@ -2437,7 +4226,32 @@ trait Mixin
*/
public static function allPropertyNotExists($classOrObject, $property, $message = '')
{
- static::__callStatic('allPropertyNotExists', array($classOrObject, $property, $message));
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ static::propertyNotExists($entry, $property, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param iterable<class-string|object|null> $classOrObject
+ *
+ * @param iterable<string|object|null> $classOrObject
+ * @param mixed $property
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrPropertyNotExists($classOrObject, $property, $message = '')
+ {
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ null === $entry || static::propertyNotExists($entry, $property, $message);
+ }
}
/**
@@ -2454,7 +4268,7 @@ trait Mixin
*/
public static function nullOrMethodExists($classOrObject, $method, $message = '')
{
- static::__callStatic('nullOrMethodExists', array($classOrObject, $method, $message));
+ null === $classOrObject || static::methodExists($classOrObject, $method, $message);
}
/**
@@ -2471,7 +4285,32 @@ trait Mixin
*/
public static function allMethodExists($classOrObject, $method, $message = '')
{
- static::__callStatic('allMethodExists', array($classOrObject, $method, $message));
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ static::methodExists($entry, $method, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param iterable<class-string|object|null> $classOrObject
+ *
+ * @param iterable<string|object|null> $classOrObject
+ * @param mixed $method
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMethodExists($classOrObject, $method, $message = '')
+ {
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ null === $entry || static::methodExists($entry, $method, $message);
+ }
}
/**
@@ -2488,7 +4327,7 @@ trait Mixin
*/
public static function nullOrMethodNotExists($classOrObject, $method, $message = '')
{
- static::__callStatic('nullOrMethodNotExists', array($classOrObject, $method, $message));
+ null === $classOrObject || static::methodNotExists($classOrObject, $method, $message);
}
/**
@@ -2505,7 +4344,32 @@ trait Mixin
*/
public static function allMethodNotExists($classOrObject, $method, $message = '')
{
- static::__callStatic('allMethodNotExists', array($classOrObject, $method, $message));
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ static::methodNotExists($entry, $method, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-param iterable<class-string|object|null> $classOrObject
+ *
+ * @param iterable<string|object|null> $classOrObject
+ * @param mixed $method
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMethodNotExists($classOrObject, $method, $message = '')
+ {
+ static::isIterable($classOrObject);
+
+ foreach ($classOrObject as $entry) {
+ null === $entry || static::methodNotExists($entry, $method, $message);
+ }
}
/**
@@ -2521,7 +4385,7 @@ trait Mixin
*/
public static function nullOrKeyExists($array, $key, $message = '')
{
- static::__callStatic('nullOrKeyExists', array($array, $key, $message));
+ null === $array || static::keyExists($array, $key, $message);
}
/**
@@ -2537,7 +4401,31 @@ trait Mixin
*/
public static function allKeyExists($array, $key, $message = '')
{
- static::__callStatic('allKeyExists', array($array, $key, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::keyExists($entry, $key, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<array|null> $array
+ * @param string|int $key
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrKeyExists($array, $key, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::keyExists($entry, $key, $message);
+ }
}
/**
@@ -2553,7 +4441,7 @@ trait Mixin
*/
public static function nullOrKeyNotExists($array, $key, $message = '')
{
- static::__callStatic('nullOrKeyNotExists', array($array, $key, $message));
+ null === $array || static::keyNotExists($array, $key, $message);
}
/**
@@ -2569,7 +4457,31 @@ trait Mixin
*/
public static function allKeyNotExists($array, $key, $message = '')
{
- static::__callStatic('allKeyNotExists', array($array, $key, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::keyNotExists($entry, $key, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<array|null> $array
+ * @param string|int $key
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrKeyNotExists($array, $key, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::keyNotExists($entry, $key, $message);
+ }
}
/**
@@ -2585,7 +4497,7 @@ trait Mixin
*/
public static function nullOrValidArrayKey($value, $message = '')
{
- static::__callStatic('nullOrValidArrayKey', array($value, $message));
+ null === $value || static::validArrayKey($value, $message);
}
/**
@@ -2601,7 +4513,31 @@ trait Mixin
*/
public static function allValidArrayKey($value, $message = '')
{
- static::__callStatic('allValidArrayKey', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::validArrayKey($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<array-key|null> $value
+ *
+ * @param mixed $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrValidArrayKey($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::validArrayKey($entry, $message);
+ }
}
/**
@@ -2615,7 +4551,7 @@ trait Mixin
*/
public static function nullOrCount($array, $number, $message = '')
{
- static::__callStatic('nullOrCount', array($array, $number, $message));
+ null === $array || static::count($array, $number, $message);
}
/**
@@ -2629,7 +4565,29 @@ trait Mixin
*/
public static function allCount($array, $number, $message = '')
{
- static::__callStatic('allCount', array($array, $number, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::count($entry, $number, $message);
+ }
+ }
+
+ /**
+ * @param iterable<Countable|array|null> $array
+ * @param int $number
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrCount($array, $number, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::count($entry, $number, $message);
+ }
}
/**
@@ -2643,7 +4601,7 @@ trait Mixin
*/
public static function nullOrMinCount($array, $min, $message = '')
{
- static::__callStatic('nullOrMinCount', array($array, $min, $message));
+ null === $array || static::minCount($array, $min, $message);
}
/**
@@ -2657,7 +4615,29 @@ trait Mixin
*/
public static function allMinCount($array, $min, $message = '')
{
- static::__callStatic('allMinCount', array($array, $min, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::minCount($entry, $min, $message);
+ }
+ }
+
+ /**
+ * @param iterable<Countable|array|null> $array
+ * @param int|float $min
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMinCount($array, $min, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::minCount($entry, $min, $message);
+ }
}
/**
@@ -2671,7 +4651,7 @@ trait Mixin
*/
public static function nullOrMaxCount($array, $max, $message = '')
{
- static::__callStatic('nullOrMaxCount', array($array, $max, $message));
+ null === $array || static::maxCount($array, $max, $message);
}
/**
@@ -2685,7 +4665,29 @@ trait Mixin
*/
public static function allMaxCount($array, $max, $message = '')
{
- static::__callStatic('allMaxCount', array($array, $max, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::maxCount($entry, $max, $message);
+ }
+ }
+
+ /**
+ * @param iterable<Countable|array|null> $array
+ * @param int|float $max
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrMaxCount($array, $max, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::maxCount($entry, $max, $message);
+ }
}
/**
@@ -2700,7 +4702,7 @@ trait Mixin
*/
public static function nullOrCountBetween($array, $min, $max, $message = '')
{
- static::__callStatic('nullOrCountBetween', array($array, $min, $max, $message));
+ null === $array || static::countBetween($array, $min, $max, $message);
}
/**
@@ -2715,7 +4717,30 @@ trait Mixin
*/
public static function allCountBetween($array, $min, $max, $message = '')
{
- static::__callStatic('allCountBetween', array($array, $min, $max, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::countBetween($entry, $min, $max, $message);
+ }
+ }
+
+ /**
+ * @param iterable<Countable|array|null> $array
+ * @param int|float $min
+ * @param int|float $max
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrCountBetween($array, $min, $max, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::countBetween($entry, $min, $max, $message);
+ }
}
/**
@@ -2731,7 +4756,7 @@ trait Mixin
*/
public static function nullOrIsList($array, $message = '')
{
- static::__callStatic('nullOrIsList', array($array, $message));
+ null === $array || static::isList($array, $message);
}
/**
@@ -2747,7 +4772,31 @@ trait Mixin
*/
public static function allIsList($array, $message = '')
{
- static::__callStatic('allIsList', array($array, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::isList($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<list|null> $array
+ *
+ * @param mixed $array
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsList($array, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::isList($entry, $message);
+ }
}
/**
@@ -2763,7 +4812,7 @@ trait Mixin
*/
public static function nullOrIsNonEmptyList($array, $message = '')
{
- static::__callStatic('nullOrIsNonEmptyList', array($array, $message));
+ null === $array || static::isNonEmptyList($array, $message);
}
/**
@@ -2779,7 +4828,31 @@ trait Mixin
*/
public static function allIsNonEmptyList($array, $message = '')
{
- static::__callStatic('allIsNonEmptyList', array($array, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::isNonEmptyList($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-assert iterable<non-empty-list|null> $array
+ *
+ * @param mixed $array
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsNonEmptyList($array, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::isNonEmptyList($entry, $message);
+ }
}
/**
@@ -2797,7 +4870,7 @@ trait Mixin
*/
public static function nullOrIsMap($array, $message = '')
{
- static::__callStatic('nullOrIsMap', array($array, $message));
+ null === $array || static::isMap($array, $message);
}
/**
@@ -2815,7 +4888,33 @@ trait Mixin
*/
public static function allIsMap($array, $message = '')
{
- static::__callStatic('allIsMap', array($array, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::isMap($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template T
+ * @psalm-param iterable<mixed|array<T>|null> $array
+ * @psalm-assert iterable<array<string, T>|null> $array
+ *
+ * @param mixed $array
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsMap($array, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::isMap($entry, $message);
+ }
}
/**
@@ -2832,7 +4931,7 @@ trait Mixin
*/
public static function nullOrIsNonEmptyMap($array, $message = '')
{
- static::__callStatic('nullOrIsNonEmptyMap', array($array, $message));
+ null === $array || static::isNonEmptyMap($array, $message);
}
/**
@@ -2849,7 +4948,34 @@ trait Mixin
*/
public static function allIsNonEmptyMap($array, $message = '')
{
- static::__callStatic('allIsNonEmptyMap', array($array, $message));
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ static::isNonEmptyMap($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ * @psalm-template T
+ * @psalm-param iterable<mixed|array<T>|null> $array
+ * @psalm-assert iterable<array<string, T>|null> $array
+ * @psalm-assert iterable<!empty|null> $array
+ *
+ * @param mixed $array
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrIsNonEmptyMap($array, $message = '')
+ {
+ static::isIterable($array);
+
+ foreach ($array as $entry) {
+ null === $entry || static::isNonEmptyMap($entry, $message);
+ }
}
/**
@@ -2864,7 +4990,7 @@ trait Mixin
*/
public static function nullOrUuid($value, $message = '')
{
- static::__callStatic('nullOrUuid', array($value, $message));
+ null === $value || static::uuid($value, $message);
}
/**
@@ -2879,7 +5005,30 @@ trait Mixin
*/
public static function allUuid($value, $message = '')
{
- static::__callStatic('allUuid', array($value, $message));
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ static::uuid($entry, $message);
+ }
+ }
+
+ /**
+ * @psalm-pure
+ *
+ * @param iterable<string|null> $value
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrUuid($value, $message = '')
+ {
+ static::isIterable($value);
+
+ foreach ($value as $entry) {
+ null === $entry || static::uuid($entry, $message);
+ }
}
/**
@@ -2895,7 +5044,7 @@ trait Mixin
*/
public static function nullOrThrows($expression, $class = 'Exception', $message = '')
{
- static::__callStatic('nullOrThrows', array($expression, $class, $message));
+ null === $expression || static::throws($expression, $class, $message);
}
/**
@@ -2911,6 +5060,30 @@ trait Mixin
*/
public static function allThrows($expression, $class = 'Exception', $message = '')
{
- static::__callStatic('allThrows', array($expression, $class, $message));
+ static::isIterable($expression);
+
+ foreach ($expression as $entry) {
+ static::throws($entry, $class, $message);
+ }
+ }
+
+ /**
+ * @psalm-param class-string<Throwable> $class
+ *
+ * @param iterable<Closure|null> $expression
+ * @param string $class
+ * @param string $message
+ *
+ * @throws InvalidArgumentException
+ *
+ * @return void
+ */
+ public static function allNullOrThrows($expression, $class = 'Exception', $message = '')
+ {
+ static::isIterable($expression);
+
+ foreach ($expression as $entry) {
+ null === $entry || static::throws($entry, $class, $message);
+ }
}
}