-
+
@@ -26,13 +26,13 @@ can be checked before you run the actual line.
-
+
-
+
@@ -40,9 +40,9 @@ can be checked before you run the actual line.
-
+
-
+
@@ -53,6 +53,14 @@ can be checked before you run the actual line.
+
+
+
+
+
+
+
+
[**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
Binary files a/vendor/phpstan/phpstan/phpstan.phar and b/vendor/phpstan/phpstan/phpstan.phar 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 .
+Copyright (c) 2014-2022, Sebastian Bergmann .
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)
-
-
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 | #...
-| License | MIT
-| Tests added |
-| Doc PR |
-
-
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 `security@spomky-labs.com`.
+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 @@
-
- *
- * 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
- */
-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 @@
-
- *
- * 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 @@
-
- *
- * 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": "BackEndTea@gmail.com"
- },
- {
- "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
similarity index 100%
rename from vendor/thecodingmachine/safe/generated/Exceptions/MysqliException.php
rename to 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
similarity index 85%
rename from vendor/thecodingmachine/safe/generated/Exceptions/PasswordException.php
rename to 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 @@
+ *
+ *
+ * @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 > 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 > 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
similarity index 73%
rename from vendor/thecodingmachine/safe/generated/Exceptions/PdfException.php
rename to 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 @@
+ *
+ * @param string $text Text to be inserted into image.
+ * @param array $options
+ * Possible array indexes for options
+ *
+ *
+ *
+ * Key
+ * Type
+ * Meaning
+ *
+ *
+ *
+ *
+ * linespacing
+ * float
+ * Defines drawing linespacing
+ *
+ *
+ *
+ *
+ * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise:
+ *
+ *
+ *
+ *
+ * 0
+ * lower left x-coordinate
+ *
+ *
+ * 1
+ * lower left y-coordinate
+ *
+ *
+ * 2
+ * lower right x-coordinate
+ *
+ *
+ * 3
+ * lower right y-coordinate
+ *
+ *
+ * 4
+ * upper right x-coordinate
+ *
+ *
+ * 5
+ * upper right y-coordinate
+ *
+ *
+ * 6
+ * upper left x-coordinate
+ *
+ *
+ * 7
+ * upper left y-coordinate
+ *
+ *
+ *
+ *
+ *
+ * On failure, FALSE is returned.
+ * @throws ImageException
+ *
+ */
+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 = \imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options);
+ if ($result === false) {
+ throw ImageException::createFromPhpError();
+ }
+ return $result;
+}
+
+
/**
* 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();
}
@@ -1746,58 +2046,13 @@ 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,54 +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 ($result === false) {
- throw ImageException::createFromPhpError();
+ 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);
}
-}
-
-
-/**
- * imagepolygon creates a 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 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 imagepolygon($image, array $points, int $num_points, int $color): void
-{
- error_clear_last();
- $result = \imagepolygon($image, $points, $num_points, $color);
if ($result === false) {
throw ImageException::createFromPhpError();
}
@@ -1871,7 +2090,7 @@ function imagepolygon($image, array $points, int $num_points, int $color): void
* 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 int $x1 Upper left x coordinate.
* @param int $y1 Upper left y coordinate
@@ -1892,6 +2111,48 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color):
}
+/**
+ * imageresolution allows to set and get the resolution of
+ * an image in DPI (dots per inch). If the optional parameters are NULL,
+ * the current resolution is returned as an indexed array. If only
+ * resolution_x is not NULL, the horizontal and vertical resolution
+ * are set to this value. If none of the optional parameters are NULL, the horizontal
+ * and vertical resolution are set to these values, respectively.
+ *
+ * The resolution is only used as meta information when images are read from and
+ * written to formats supporting this kind of information (curently PNG and
+ * JPEG). It does not affect any drawing operations. The default resolution
+ * for new images is 96 DPI.
+ *
+ * @param resource $image A GdImage object, returned by one of the image creation functions,
+ * such as imagecreatetruecolor.
+ * @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 imageresolution($image, int $resolution_x = null, int $resolution_y = null)
+{
+ error_clear_last();
+ 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;
+}
+
+
/**
* Rotates the image image using the given
* angle in degrees.
@@ -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();
- $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date);
+ 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_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,32 +294,279 @@ 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();
}
}
+/**
+ * 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_stream, $caches);
+ $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" => "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_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_stream, int $msg_number, int $fromlength = 0, int $subjectlength = 0, string $defaulthost = null): \stdClass
+function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass
{
error_clear_last();
- $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost);
+ $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_lsub($imap, string $reference, string $pattern): array
+{
+ error_clear_last();
+ $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 $username, string $password, int $options = 0, int $n_retries = 0, ?array $params = null)
+function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = [])
{
error_clear_last();
- $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params);
+ $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_qprint(string $string): string
+{
+ error_clear_last();
+ $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 $new_mbox The new mailbox name, see imap_open for more
+ * @param string $to The new mailbox name, see imap_open for more
* information
* @throws ImapException
*
*/
-function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): void
+function imap_renamemailbox($imap, string $from, string $to): void
{
error_clear_last();
- $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox);
+ $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_rfc822_write_address(?string $mailbox, ?string $hostname, ?string $personal): string
+{
+ error_clear_last();
+ $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->messages to the
+ * number of messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_RECENT - set $status->recent to the number
+ * of recent messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UNSEEN - set $status->unseen to the number
+ * of unseen (new) messages in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UIDNEXT - set $status->uidnext to the next
+ * uid to be used in the mailbox
+ *
+ *
+ *
+ *
+ * SA_UIDVALIDITY - set $status->uidvalidity to a
+ * constant that changes when uids for the mailbox may no longer be
+ * valid
+ *
+ *
+ *
+ *
+ * SA_ALL - set all of the above
+ *
+ *
+ *
+ * @return \stdClass This function returns an object containing status information.
+ * The object has the following properties: messages,
+ * recent, unseen,
+ * uidnext, and uidvalidity.
+ *
+ * flags is also set, which contains a bitmask which can
+ * be checked against any of the above constants.
+ * @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
@@ -4,6 +4,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
@@ -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,16 +194,34 @@ 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();
}
}
+/**
+ *
+ *
+ * @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.
*
@@ -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($varname, $newvalue);
+ $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 = \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 @@
-
*
*
- * @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 ($controls !== null) {
+ $result = \ldap_add($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_add($ldap, $dn, $entry);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
}
-/**
- * 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,37 +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);
- if ($result === false) {
- throw LdapException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Does the same thing as ldap_delete but returns the LDAP result resource to be parsed with ldap_parse_result.
- *
- * @param resource $link_identifier
- * @param string $dn
- * @param array $serverctrls
- * @return resource Returns an LDAP result identifier.
- * @throws LdapException
- *
- */
-function ldap_delete_ext($link_identifier, string $dn, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_delete_ext($link_identifier, $dn, $serverctrls);
+ $result = \ldap_count_entries($ldap, $result);
if ($result === false) {
throw LdapException::createFromPhpError();
}
@@ -184,41 +153,65 @@ function ldap_delete_ext($link_identifier, string $dn, array $serverctrls = null
/**
* Deletes a particular entry in 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 $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_delete($link_identifier, string $dn, array $serverctrls = null): void
+function ldap_delete($ldap, string $dn, array $controls = null): void
{
error_clear_last();
- $result = \ldap_delete($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();
}
}
+/**
+ * Turns the specified dn, into a more user-friendly
+ * form, stripping off type names.
+ *
+ * @param string $dn The distinguished name of an LDAP entity.
+ * @return string Returns the user friendly name.
+ * @throws LdapException
+ *
+ */
+function ldap_dn2ufn(string $dn): string
+{
+ error_clear_last();
+ $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,104 +731,72 @@ 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 ($controls !== null) {
+ $result = \ldap_mod_add($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_mod_add($ldap, $dn, $entry);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
}
-/**
- * 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;
-}
-
-
/**
* Removes one or more attribute values from the specified dn.
* 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 ($controls !== null) {
+ $result = \ldap_mod_del($ldap, $dn, $entry, $controls);
+ } else {
+ $result = \ldap_mod_del($ldap, $dn, $entry);
+ }
if ($result === false) {
throw LdapException::createFromPhpError();
}
}
-/**
- * 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;
-}
-
-
/**
* 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.
+ * @param array|null $controls 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
+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_parse_result($link, $result, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls);
+ $result = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls);
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.
- * @throws LdapException
- *
- */
-function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null)
-{
- error_clear_last();
- $result = \ldap_rename_ext($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls);
- 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
+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();
- $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)
-{
- 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($cp);
+ $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_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 $replace, string $string, string $option = "msri"): string
+function mb_eregi_replace(string $pattern, string $replacement, string $string, string $options = null): string
{
error_clear_last();
- $result = \mb_eregi_replace($pattern, $replace, $string, $option);
+ 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_get_info(string $type = "all")
+{
+ error_clear_last();
+ $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.
*
- * If enable is specified, the function will try to enable or disable the VT100 features of the stream stream.
+ * @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 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 @@
-
- * ]]>
- *
- *
- *
* @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
@@ -4,6 +4,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.
*
@@ -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
@@ -192,6 +220,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
@@ -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($sem_identifier);
+ $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 = \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
@@ -21,6 +21,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
@@ -69,6 +105,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.
@@ -112,6 +293,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 @@
-
- *
- *
- * @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 > 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 > 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
-{
- 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
@@ -4,6 +4,46 @@ namespace Safe;
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();
+ }
+}
+
+
/**
*
*
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,26 +261,88 @@ 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();
}
}
+/**
+ *
+ *
+ * @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,23 +638,55 @@ 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();
}
}
+/**
+ * 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($connection_id, $catalog, $schema, $table);
+ $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();
+ 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();
@@ -57,18 +58,64 @@ function get_headers(string $url, int $format = 0, $context = null): array
}
+/**
+ * Opens filename and parses it line by line for
+ * <meta> tags in the file. The parsing stops at
+ * </head>.
+ *
+ * @param string $filename The path to the HTML file, as a string. This can be a local file or an
+ * URL.
+ *
+ *
+ * What get_meta_tags parses
+ *
+ *
+ *
+ *
+ *
+ *
+ * ]]>
+ *
+ *
+ * @param bool $use_include_path Setting use_include_path to TRUE will result
+ * in PHP trying to open the file along the standard include path as per
+ * the include_path directive.
+ * This is used for local files, not URLs.
+ * @return array Returns an array with all the parsed meta tags.
+ *
+ * The value of the name property becomes the key, the value of the content
+ * property becomes the value of the returned array, so you can easily use
+ * standard array functions to traverse it or access single values.
+ * Special characters in the value of the name property are substituted with
+ * '_', the rest is converted to lower case. If two meta tags have the same
+ * name, only the last one is returned.
+ *
+ * Returns FALSE on failure.
+ * @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.
+ * Frees the given XML parser.
*
- * @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.
+ * @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();
}
- 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.
+ * Sets the character data handler function for the XML parser
+ * parser.
*
- * @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.
+ * @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_parser_create(string $encoding = null)
+function xml_set_character_data_handler($parser, callable $handler): void
{
error_clear_last();
- if ($encoding !== null) {
- $result = \xml_parser_create($encoding);
- } else {
- $result = \xml_parser_create();
- }
+ $result = \xml_set_character_data_handler($parser, $handler);
+ if ($result === false) {
+ throw XmlException::createFromPhpError();
+ }
+}
+
+
+/**
+ * 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_set_default_handler($parser, callable $handler): void
+{
+ error_clear_last();
+ $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:
+ *
+ * <?target
+ * data?>
+ *
+ *
+ * You can put PHP code into such a tag, but be aware of one limitation: in
+ * an XML PI, the PI end tag (?>) can not be quoted,
+ * so this character sequence should not appear in the PHP code you embed
+ * with PIs in XML documents.If it does, the rest of the PHP code, as well
+ * as the "real" PI end tag, will be treated as character data.
+ *
+ * @param 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
@@ -21,10 +21,87 @@ 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 $length = 0): string
+function gzuncompress(string $data, int $max_length = 0): string
{
error_clear_last();
- $result = \gzuncompress($data, $length);
+ $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 gzwrite($stream, string $data, int $length = null): int
+{
+ error_clear_last();
+ 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
similarity index 88%
rename from vendor/thecodingmachine/safe/generated/Exceptions/SimplexmlException.php
rename to 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 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 @@
+
+
+
+
+
+ ./tests/
+
+
+
diff --git a/vendor/thecodingmachine/safe/rector-migrate-0.7.php b/vendor/thecodingmachine/safe/rector-migrate.php
similarity index 79%
rename from vendor/thecodingmachine/safe/rector-migrate-0.7.php
rename to 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 @@
+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/checkout@v2.3.4"
-
- - name: "Install PHP"
- uses: "shivammathur/setup-php@2.9.0"
- 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/checkout@v2.3.4"
-
- - name: "Install PHP"
- uses: "shivammathur/setup-php@2.9.0"
- 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/checkout@v2.3.4"
-
- - name: "Install PHP"
- uses: "shivammathur/setup-php@2.9.0"
- 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/checkout@v2.3.4"
-
- - name: "Install PHP"
- uses: "shivammathur/setup-php@2.9.0"
- 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 @@
-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 @@
-
-
-
-
-
-
-
-
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 @@
$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 $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 $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 $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 $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 $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 $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 $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 $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 $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