fix stubs according to reflection for new extensions

This commit is contained in:
Ivan Fedorov 2021-03-16 18:45:39 +03:00 committed by Ivan Fedorov
parent 0a07bffcae
commit 75615968a4
26 changed files with 994 additions and 676 deletions

View File

@ -13,7 +13,6 @@ RUN set -eux; \
RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \
pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap
#TODO: Uncomment below after php 8 released
#RUN pecl install xmlrpc
#RUN docker-php-ext-enable xmlrpc

View File

@ -161,7 +161,7 @@ final class Ev
* watcher could not be properly started because libev ran out of memory, a file descriptor was found to be closed
* or any other problem. Libev considers these application bugs.
*/
public const ERROR = 2147483648;
public const ERROR = -2147483648;
/**
* select(2) backend
@ -199,7 +199,7 @@ final class Ev
* applied here(e.g. Ev::BACKEND_ALL & ~ Ev::BACKEND_KQUEUE ) Use Ev::recommendedBackends() , or don't specify any
* backends at all.
*/
public const BACKEND_ALL = 63;
public const BACKEND_ALL = 255;
/**
* Not a backend, but a mask to select all backend bits from flags value to mask out any backends(e.g. when
@ -439,9 +439,9 @@ abstract class EvWatcher
*
* Feeds the given revents set into the event loop, as if the specified event had happened for the watcher.
*
* @param int $events Bit mask of watcher received events.
* @param int $revents Bit mask of watcher received events.
*/
public function feed($events) {}
public function feed($revents) {}
/**
* Returns the loop responsible for the watcher.
@ -453,9 +453,9 @@ abstract class EvWatcher
/**
* Invokes the watcher callback with the given received events bit mask.
*
* @param int $events Bit mask of watcher received events.
* @param int $revents Bit mask of watcher received events.
*/
public function invoke($events) {}
public function invoke($revents) {}
/**
* Configures whether to keep the loop from returning.
@ -471,7 +471,7 @@ abstract class EvWatcher
* @param bool $value With keepalive value set to FALSE the watcher won't keep Ev::run() / EvLoop::run() from
* returning even though the watcher is active.
*/
public function keepalive($value) {}
public function keepalive($value = true) {}
/**
* Sets new callback for the watcher.
@ -643,19 +643,19 @@ final class EvEmbed extends EvWatcher
* This watcher is most useful on BSD systems without working kqueue to still be able to handle a large number of
* sockets.
*
* @param EvLoop $embed The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
* @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
* @param callable $callback
* @param mixed $data
* @param int $priority
*/
public function __construct(EvLoop $embed, callable $callback, $data = null, $priority = 0) {}
public function __construct(EvLoop $other, callable $callback, $data = null, $priority = 0) {}
/**
* Configures the watcher.
*
* @param EvLoop $embed The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
* @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
*/
public function set(EvLoop $embed) {}
public function set(EvLoop $other) {}
/**
* Make a single, non-blocking sweep over the embedded loop.
@ -667,14 +667,14 @@ final class EvEmbed extends EvWatcher
*
* The same as EvEmbed::__construct() , but doesn't start the watcher automatically.
*
* @param EvLoop $embed The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
* @param EvLoop $other The loop to embed, this loop must be embeddable(see Ev::embeddableBackends()).
* @param callable $callback
* @param mixed $data
* @param int $priority
*
* @return EvEmbed
*/
final public static function createStopped(EvLoop $embed, callable $callback, $data = null, $priority = 0) {}
final public static function createStopped(EvLoop $other, callable $callback, $data = null, $priority = 0) {}
}
/**
@ -854,7 +854,7 @@ final class EvPeriodic extends EvWatcher
* @param float $interval The same meaning as for {@see EvPeriodic::__construct}
* @return void
*/
public function set($offset, $interval) {}
public function set($offset, $interval, $reschedule_cb = null) {}
}
/**
@ -1209,7 +1209,7 @@ final class EvFork extends EvWatcher
* @param mixed $data
* @param int $priority
*/
public function __construct(callable $callback, $data = null, $priority = 0) {}
public function __construct($loop, callable $callback, $data = null, $priority = 0) {}
/**
* Creates a stopped EvFork instance.
@ -1220,7 +1220,7 @@ final class EvFork extends EvWatcher
*
* @return EvFork
*/
final public static function createStopped(callable $callback, $data = null, $priority = 0) {}
final public static function createStopped($loop, callable $callback, $data = null, $priority = 0) {}
}
/**
@ -1413,7 +1413,7 @@ final class EvLoop
* @param mixed $data
* @param int $priority
*/
final public function periodic($offset, $interval, callable $callback, $data = null, $priority = 0) {}
final public function periodic($offset, $interval, $reschedule_cb, callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvPrepare object associated with the current event loop instance.
@ -1446,13 +1446,13 @@ final class EvLoop
/**
* Creates EvSignal object associated with the current event loop instance.
*
* @param int $signal
* @param int $signum
* @param callable $callback
* @param mixed $data
* @param int $priority
* @return EvSignal
*/
final public function signal($signal, callable $callback, $data = null, $priority = 0) {}
final public function signal($signum, callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvStats object associated with the current event loop instance.

View File

@ -445,7 +445,7 @@ const CLASSES = array (
'MongoDBRef' => 'mongo/mongo.php',
'MongoDB\\BSON\\Binary' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\BinaryInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\DbPointer' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\DBPointer' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Decimal128' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Decimal128Interface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Int64' => 'mongodb/mongodb.php',

View File

@ -7,7 +7,7 @@ use JetBrains\PhpStorm\Pure;
/**
* Create GMP number
* @link https://php.net/manual/en/function.gmp-init.php
* @param mixed $number <p>
* @param mixed $num <p>
* An integer or a string. The string representation can be decimal,
* hexadecimal or octal.
* </p>
@ -24,33 +24,33 @@ use JetBrains\PhpStorm\Pure;
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_init($number, $base = 0) {}
function gmp_init(string|int $num, int $base = 0): GMP {}
/**
* Convert GMP number to integer
* @link https://php.net/manual/en/function.gmp-intval.php
* @param resource|string|GMP $gmpnumber <p>
* @param resource|int|string|GMP $num <p>
* A GMP number.
* </p>
* @return int An integer value of <i>gmpnumber</i>.
*/
#[Pure]
function gmp_intval($gmpnumber) {}
function gmp_intval(GMP|string|int $num): int {}
/**
* Sets the RNG seed
* @param resource|string|GMP $seed <p>
* @param resource|string|int|GMP $seed <p>
* The seed to be set for the {@see gmp_random()}, {@see gmp_random_bits()}, and {@see gmp_random_range()} functions.
* </p>
* Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
* @return null|false Returns NULL on success.
* @return void|null|false Returns NULL on success.
* @since 7.0
*/
function gmp_random_seed($seed) {}
function gmp_random_seed(GMP|string|int $seed): void {}
/**
* Convert GMP number to string
* @link https://php.net/manual/en/function.gmp-strval.php
* @param resource|string|GMP $gmpnumber <p>
* @param resource|int|string|GMP $num <p>
* The GMP number that will be converted to a string.
* </p>
* <p>It can be either a GMP number resource, or a
@ -62,17 +62,17 @@ function gmp_random_seed($seed) {}
* @return string The number, as a string.
*/
#[Pure]
function gmp_strval($gmpnumber, $base = 10) {}
function gmp_strval(GMP|string|int $num, int $base = 10): string {}
/**
* Add numbers
* @link https://php.net/manual/en/function.gmp-add.php
* @param resource|string|GMP $a <p>
* @param resource|int|string|GMP $num1 <p>
* A number that will be added.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>
* @param resource|string|GMP $num2 <p>
* A number that will be added.
* </p>
* <p>It can be either a GMP number resource, or a
@ -80,17 +80,17 @@ function gmp_strval($gmpnumber, $base = 10) {}
* @return resource|GMP A GMP number representing the sum of the arguments.
*/
#[Pure]
function gmp_add($a, $b) {}
function gmp_add(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Subtract numbers
* @link https://php.net/manual/en/function.gmp-sub.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* The number being subtracted from.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>
* @param resource|string|GMP $num2 <p>
* The number subtracted from <i>a</i>.
* </p>
* <p>It can be either a GMP number resource, or a
@ -98,17 +98,17 @@ function gmp_add($a, $b) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_sub($a, $b) {}
function gmp_sub(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Multiply numbers
* @link https://php.net/manual/en/function.gmp-mul.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* A number that will be multiplied by <i>b</i>.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>
* @param resource|string|GMP $num2 <p>
* A number that will be multiplied by <i>a</i>.
* </p>
* <p>It can be either a GMP number resource, or a
@ -116,22 +116,22 @@ function gmp_sub($a, $b) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_mul($a, $b) {}
function gmp_mul(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Divide numbers and get quotient and remainder
* @link https://php.net/manual/en/function.gmp-div-qr.php
* @param resource|string|GMP $n <p>
* @param resource|string|GMP $num1 <p>
* The number being divided.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $d <p>
* @param resource|string|GMP $num2 <p>
* The number that <i>n</i> is being divided by.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $round [optional] <p>
* @param int $rounding_mode [optional] <p>
* See the <b>gmp_div_q</b> function for description
* of the <i>round</i> argument.
* </p>
@ -141,22 +141,22 @@ function gmp_mul($a, $b) {}
* (the remainder of the division).
*/
#[Pure]
function gmp_div_qr($n, $d, $round = GMP_ROUND_ZERO) {}
function gmp_div_qr(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): array {}
/**
* Divide numbers
* @link https://php.net/manual/en/function.gmp-div-q.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* The number being divided.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>
* @param resource|string|GMP $num2 <p>
* The number that <i>a</i> is being divided by.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $round [optional] <p>
* @param int $rounding_mode [optional] <p>
* The result rounding is defined by the
* <i>round</i>, which can have the following
* values:
@ -165,44 +165,44 @@ function gmp_div_qr($n, $d, $round = GMP_ROUND_ZERO) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_div_q($a, $b, $round = GMP_ROUND_ZERO) {}
function gmp_div_q(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
/**
* Remainder of the division of numbers
* @link https://php.net/manual/en/function.gmp-div-r.php
* @param resource|string|GMP $n <p>
* @param resource|string|GMP $num1 <p>
* The number being divided.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $d <p>
* @param resource|string|GMP $num2 <p>
* The number that <i>n</i> is being divided by.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $round [optional] <p>
* @param int $rounding_mode [optional] <p>
* See the <b>gmp_div_q</b> function for description
* of the <i>round</i> argument.
* </p>
* @return resource|GMP The remainder, as a GMP number.
*/
#[Pure]
function gmp_div_r($n, $d, $round = GMP_ROUND_ZERO) {}
function gmp_div_r(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
/**
* Divide numbers
* @link https://php.net/manual/en/function.gmp-div-q.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* The number being divided.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>
* @param resource|string|GMP $num2 <p>
* The number that <i>a</i> is being divided by.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $round [optional] <p>
* @param int $rounding_mode [optional] <p>
* The result rounding is defined by the
* <i>round</i>, which can have the following
* values:
@ -211,14 +211,14 @@ function gmp_div_r($n, $d, $round = GMP_ROUND_ZERO) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_div($a, $b, $round = GMP_ROUND_ZERO) {}
function gmp_div(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {}
/**
* Modulo operation
* @link https://php.net/manual/en/function.gmp-mod.php
* @param resource|string|GMP $n <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $d <p>
* @param resource|string|GMP $num2 <p>
* The modulo that is being evaluated.
* </p>
* <p>It can be either a GMP number resource, or a
@ -226,17 +226,17 @@ function gmp_div($a, $b, $round = GMP_ROUND_ZERO) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_mod($n, $d) {}
function gmp_mod(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Exact division of numbers
* @link https://php.net/manual/en/function.gmp-divexact.php
* @param resource|string|GMP $n <p>
* @param resource|string|GMP $num1 <p>
* The number being divided.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $d <p>
* @param resource|string|GMP $num2 <p>
* The number that <i>a</i> is being divided by.
* </p>
* <p>It can be either a GMP number resource, or a
@ -244,32 +244,32 @@ function gmp_mod($n, $d) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_divexact($n, $d) {}
function gmp_divexact(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Negate number
* @link https://php.net/manual/en/function.gmp-neg.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP -<i>a</i>, as a GMP number.
*/
#[Pure]
function gmp_neg($a) {}
function gmp_neg(GMP|string|int $num): GMP {}
/**
* Absolute value
* @link https://php.net/manual/en/function.gmp-abs.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP the absolute value of <i>a</i>, as a GMP number.
*/
#[Pure]
function gmp_abs($a) {}
function gmp_abs(GMP|string|int $num): GMP {}
/**
* Factorial
* @link https://php.net/manual/en/function.gmp-fact.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num <p>
* The factorial number.
* </p>
* <p>It can be either a GMP number resource, or a
@ -277,22 +277,22 @@ function gmp_abs($a) {}
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_fact($a) {}
function gmp_fact(GMP|string|int $num): GMP {}
/**
* Calculate square root
* @link https://php.net/manual/en/function.gmp-sqrt.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP The integer portion of the square root, as a GMP number.
*/
#[Pure]
function gmp_sqrt($a) {}
function gmp_sqrt(GMP|string|int $num): GMP {}
/**
* Square root with remainder
* @link https://php.net/manual/en/function.gmp-sqrtrem.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num <p>
* The number being square rooted.
* </p>
* <p>It can be either a GMP number resource, or a
@ -303,39 +303,39 @@ function gmp_sqrt($a) {}
* first element squared).
*/
#[Pure]
function gmp_sqrtrem($a) {}
function gmp_sqrtrem(GMP|string|int $num): array {}
/**
* Raise number into power
* @link https://php.net/manual/en/function.gmp-pow.php
* @param resource|string|GMP $base <p>
* @param resource|string|GMP $num <p>
* The base number.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $exp <p>
* @param int $exponent <p>
* The positive power to raise the <i>base</i>.
* </p>
* @return resource|GMP The new (raised) number, as a GMP number. The case of
* 0^0 yields 1.
*/
#[Pure]
function gmp_pow($base, $exp) {}
function gmp_pow(GMP|string|int $num, int $exponent): GMP {}
/**
* Raise number into power with modulo
* @link https://php.net/manual/en/function.gmp-powm.php
* @param resource|string|GMP $base <p>
* @param resource|string|GMP $num <p>
* The base number.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $exp <p>
* @param resource|string|GMP $exponent <p>
* The positive power to raise the <i>base</i>.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $mod <p>
* @param resource|string|GMP $modulus <p>
* The modulo.
* </p>
* <p>It can be either a GMP number resource, or a
@ -343,12 +343,12 @@ function gmp_pow($base, $exp) {}
* @return resource|GMP The new (raised) number, as a GMP number.
*/
#[Pure]
function gmp_powm($base, $exp, $mod) {}
function gmp_powm(GMP|string|int $num, GMP|string|int $exponent, GMP|string|int $modulus): GMP {}
/**
* Perfect square check
* @link https://php.net/manual/en/function.gmp-perfect-square.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num <p>
* The number being checked as a perfect square.
* </p>
* <p>It can be either a GMP number resource, or a
@ -357,17 +357,17 @@ function gmp_powm($base, $exp, $mod) {}
* <b>FALSE</b> otherwise.
*/
#[Pure]
function gmp_perfect_square($a) {}
function gmp_perfect_square(GMP|string|int $num): bool {}
/**
* Check if number is "probably prime"
* @link https://php.net/manual/en/function.gmp-prob-prime.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num <p>
* The number being checked as a prime.
* </p>
* <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $reps [optional] <p>
* @param int $repetitions [optional] <p>
* Reasonable values
* of <i>reps</i> vary from 5 to 10 (default being
* 10); a higher value lowers the probability for a non-prime to
@ -381,7 +381,7 @@ function gmp_perfect_square($a) {}
* then <i>a</i> is surely prime.
*/
#[Pure]
function gmp_prob_prime($a, $reps = 10) {}
function gmp_prob_prime(GMP|string|int $num, int $repetitions = 10): int {}
/**
* Random number
@ -392,61 +392,61 @@ function gmp_prob_prime($a, $reps = 10) {}
* @return GMP A random GMP number.
*/
#[Pure]
function gmp_random_bits($bits) {}
function gmp_random_bits(int $bits): GMP {}
/**
* Random number
* @link https://php.net/manual/en/function.gmp-random-range.php
* @param GMP $min <p>A GMP number representing the lower bound for the random number</p>
* @param GMP $max <p>A GMP number representing the upper bound for the random number</p>
* @param GMP|string|int $min <p>A GMP number representing the lower bound for the random number</p>
* @param GMP|string|int $max <p>A GMP number representing the upper bound for the random number</p>
* @return GMP A random GMP number.
*/
#[Pure]
function gmp_random_range(GMP $min, GMP $max) {}
function gmp_random_range(GMP|string|int $min, GMP|string|int $max): GMP {}
/**
* Calculate GCD
* @link https://php.net/manual/en/function.gmp-gcd.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP A positive GMP number that divides into both
* <i>a</i> and <i>b</i>.
*/
#[Pure]
function gmp_gcd($a, $b) {}
function gmp_gcd(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Calculate GCD and multipliers
* @link https://php.net/manual/en/function.gmp-gcdext.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return array An array of GMP numbers.
*/
#[Pure]
function gmp_gcdext($a, $b) {}
function gmp_gcdext(GMP|string|int $num1, GMP|string|int $num2): array {}
/**
* Inverse by modulo
* @link https://php.net/manual/en/function.gmp-invert.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP|false A GMP number on success or <b>FALSE</b> if an inverse does not exist.
*/
#[Pure]
function gmp_invert($a, $b) {}
function gmp_invert(GMP|string|int $num1, GMP|string|int $num2): GMP|false {}
/**
* Jacobi symbol
* @link https://php.net/manual/en/function.gmp-jacobi.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $p <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* <p>
* Should be odd and must be positive.
@ -454,14 +454,14 @@ function gmp_invert($a, $b) {}
* @return int A GMP number resource.
*/
#[Pure]
function gmp_jacobi($a, $p) {}
function gmp_jacobi(GMP|string|int $num1, GMP|string|int $num2): int {}
/**
* Legendre symbol
* @link https://php.net/manual/en/function.gmp-legendre.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $p <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* <p>
* Should be odd and must be positive.
@ -469,33 +469,33 @@ function gmp_jacobi($a, $p) {}
* @return int A GMP number resource.
*/
#[Pure]
function gmp_legendre($a, $p) {}
function gmp_legendre(GMP|string|int $num1, GMP|string|int $num2): int {}
/**
* Compare numbers
* @link https://php.net/manual/en/function.gmp-cmp.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return int a positive value if a &gt; b, zero if
* a = b and a negative value if a &lt;
* b.
*/
#[Pure]
function gmp_cmp($a, $b) {}
function gmp_cmp(GMP|string|int $num1, GMP|string|int $num2): int {}
/**
* Sign of number
* @link https://php.net/manual/en/function.gmp-sign.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return int 1 if <i>a</i> is positive,
* -1 if <i>a</i> is negative,
* and 0 if <i>a</i> is zero.
*/
#[Pure]
function gmp_sign($a) {}
function gmp_sign(GMP|string|int $num): int {}
/**
* Random number
@ -517,53 +517,53 @@ function gmp_random($limiter = 20) {}
/**
* Bitwise AND
* @link https://php.net/manual/en/function.gmp-and.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP A GMP number representing the bitwise AND comparison.
*/
#[Pure]
function gmp_and($a, $b) {}
function gmp_and(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Bitwise OR
* @link https://php.net/manual/en/function.gmp-or.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_or($a, $b) {}
function gmp_or(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Calculates one's complement
* @link https://php.net/manual/en/function.gmp-com.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP the one's complement of <i>a</i>, as a GMP number.
*/
#[Pure]
function gmp_com($a) {}
function gmp_com(GMP|string|int $num): GMP {}
/**
* Bitwise XOR
* @link https://php.net/manual/en/function.gmp-xor.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource|GMP A GMP number resource.
*/
#[Pure]
function gmp_xor($a, $b) {}
function gmp_xor(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Set bit
* @link https://php.net/manual/en/function.gmp-setbit.php
* @param resource|string|GMP &$a <p>
* @param resource|string|GMP $num <p>
* The number being set to.
* </p>
* <p>It can be either a GMP number resource, or a
@ -571,29 +571,29 @@ function gmp_xor($a, $b) {}
* @param int $index <p>
* The set bit.
* </p>
* @param bool $set_clear [optional] <p>
* @param bool $value [optional] <p>
* Defines if the bit is set to 0 or 1. By default the bit is set to
* 1. Index starts at 0.
* </p>
* @return void A GMP number resource.
*/
function gmp_setbit(&$a, $index, $set_clear = true) {}
function gmp_setbit(GMP $num, int $index, bool $value = true): void {}
/**
* Clear bit
* @link https://php.net/manual/en/function.gmp-clrbit.php
* @param resource|string|GMP &$a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $index <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return void A GMP number resource.
*/
function gmp_clrbit(&$a, $index) {}
function gmp_clrbit(GMP $num, int $index): void {}
/**
* Scan for 0
* @link https://php.net/manual/en/function.gmp-scan0.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* The number to scan.
* </p>
* <p>It can be either a GMP number resource, or a
@ -605,12 +605,12 @@ function gmp_clrbit(&$a, $index) {}
* index starts from 0.
*/
#[Pure]
function gmp_scan0($a, $start) {}
function gmp_scan0(GMP|string|int $num1, int $start): int {}
/**
* Scan for 1
* @link https://php.net/manual/en/function.gmp-scan1.php
* @param resource|string|GMP $a <p>
* @param resource|string|GMP $num1 <p>
* The number to scan.
* </p>
* <p>It can be either a GMP number resource, or a
@ -622,12 +622,12 @@ function gmp_scan0($a, $start) {}
* If no set bit is found, -1 is returned.
*/
#[Pure]
function gmp_scan1($a, $start) {}
function gmp_scan1(GMP|string|int $num1, int $start): int {}
/**
* Tests if a bit is set
* @link https://php.net/manual/en/function.gmp-testbit.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @param int $index <p>
* The bit to test
@ -635,27 +635,27 @@ function gmp_scan1($a, $start) {}
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
#[Pure]
function gmp_testbit($a, $index) {}
function gmp_testbit(GMP|string|int $num, int $index): bool {}
/**
* Population count
* @link https://php.net/manual/en/function.gmp-popcount.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return int The population count of <i>a</i>, as an integer.
*/
#[Pure]
function gmp_popcount($a) {}
function gmp_popcount(GMP|string|int $num): int {}
/**
* Hamming distance
* @link https://php.net/manual/en/function.gmp-hamdist.php
* @param resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num1 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* <p>
* It should be positive.
* </p>
* @param resource|string|GMP $b <p>It can be either a GMP number resource, or a
* @param resource|string|GMP $num2 <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* <p>
* It should be positive.
@ -663,7 +663,7 @@ function gmp_popcount($a) {}
* @return int A GMP number resource.
*/
#[Pure]
function gmp_hamdist($a, $b) {}
function gmp_hamdist(GMP|string|int $num1, GMP|string|int $num2): int {}
/**
* Import from a binary string
@ -671,42 +671,42 @@ function gmp_hamdist($a, $b) {}
* @param string $data The binary string being imported
* @param int $word_size <p>Default value is 1. The number of bytes in each chunk of binary
* data. This is mainly used in conjunction with the options parameter.</p>
* @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
* @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
* @return GMP|false Returns a GMP number or FALSE on failure.
* @since 5.6.1
*/
#[Pure]
function gmp_import($data, $word_size = 1, $options = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN) {}
function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): GMP {}
/**
* Export to a binary string
* @link https://php.net/manual/en/function.gmp-export.php
* @param GMP $gmpnumber The GMP number being exported
* @param GMP|string|int $num The GMP number being exported
* @param int $word_size <p>Default value is 1. The number of bytes in each chunk of binary
* data. This is mainly used in conjunction with the options parameter.</p>
* @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
* @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN.
* @return string|false Returns a string or FALSE on failure.
* @since 5.6.1
*/
#[Pure]
function gmp_export(GMP $gmpnumber, $word_size = 1, $options = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN) {}
function gmp_export(GMP|string|int $num, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): string {}
/**
* Takes the nth root of a and returns the integer component of the result.
* @link https://php.net/manual/en/function.gmp-root.php
* @param GMP $a <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
* @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
* and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
* @param int $nth The positive root to take of a.
* @return GMP The integer component of the resultant root, as a GMP number.
* @since 5.6
*/
#[Pure]
function gmp_root(GMP $a, $nth) {}
function gmp_root(GMP|string|int $num, int $nth): GMP {}
/**
* Takes the nth root of a and returns the integer component and remainder of the result.
* @link https://php.net/manual/en/function.gmp-rootrem.php
* @param GMP $a <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
* @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
* and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
* @param int $nth The positive root to take of a.
* @return array|GMP[] <p>A two element array, where the first element is the integer component of
@ -714,73 +714,73 @@ function gmp_root(GMP $a, $nth) {}
* @since 5.6
*/
#[Pure]
function gmp_rootrem(GMP $a, $nth) {}
function gmp_rootrem(GMP|string|int $num, int $nth): array {}
/**
* Find next prime number
* @link https://php.net/manual/en/function.gmp-nextprime.php
* @param int|resource|string|GMP $a <p>It can be either a GMP number resource, or a
* @param int|resource|string|GMP $num <p>It can be either a GMP number resource, or a
* numeric string given that it is possible to convert the latter to a number.</p>
* @return resource Return the next prime number greater than <i>a</i>,
* @return resource|GMP Return the next prime number greater than <i>a</i>,
* as a GMP number.
*/
#[Pure]
function gmp_nextprime($a) {}
function gmp_nextprime(GMP|string|int $num): GMP {}
/**
* Calculates binomial coefficient
*
* @link https://www.php.net/manual/en/function.gmp-binomial.php
*
* @param GMP|string|float|int $a
* @param int $b
* @param GMP|string|float|int $n
* @param int $k
* @return GMP|false
*
* @since 7.3
*/
#[Pure]
function gmp_binomial($a, $b) {}
function gmp_binomial(GMP|string|int $n, int $k): GMP {}
/**
* Computes the Kronecker symbol
*
* @link https://www.php.net/manual/en/function.gmp-kronecker.php
*
* @param GMP|string|float|int $a
* @param GMP|string|float|int $b
* @param GMP|string|float|int $num1
* @param GMP|string|float|int $num2
* @return int
*
* @since 7.3
*/
#[Pure]
function gmp_kronecker($a, $b) {}
function gmp_kronecker(GMP|string|int $num1, GMP|string|int $num2): int {}
/**
* Computes the least common multiple of A and B
*
* @link https://www.php.net/manual/en/function.gmp-lcm.php
*
* @param GMP|string|float|int $a
* @param GMP|string|float|int $b
* @param GMP|string|float|int $num1
* @param GMP|string|float|int $num2
* @return GMP
*
* @since 7.3
*/
#[Pure]
function gmp_lcm($a, $b) {}
function gmp_lcm(GMP|string|int $num1, GMP|string|int $num2): GMP {}
/**
* Perfect power check
*
* @link https://www.php.net/manual/en/function.gmp-perfect-power.php
*
* @param GMP|string|float|int $a
* @param GMP|string|float|int $num
* @return bool
*
* @since 7.3
*/
#[Pure]
function gmp_perfect_power($a) {}
function gmp_perfect_power(GMP|string|int $num): bool {}
define('GMP_ROUND_ZERO', 0);
define('GMP_ROUND_PLUSINF', 1);
@ -795,7 +795,7 @@ define('GMP_NATIVE_ENDIAN', 16);
* The GMP library version
* @link https://php.net/manual/en/gmp.constants.php
*/
define('GMP_VERSION', "");
define('GMP_VERSION', "6.2.1");
define('GMP_MPIR_VERSION', '3.0.0');

File diff suppressed because it is too large Load Diff

View File

@ -67,11 +67,11 @@ function inotify_read($inotify_instance) {}
* @link https://secure.php.net/manual/en/function.inotify-rm-watch.php
*
* @param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
* @param int $watch_descriptor <p>watch to remove from the instance</p>
* @param int $mask <p>watch to remove from the instance</p>
*
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function inotify_rm_watch($inotify_instance, $watch_descriptor) {}
function inotify_rm_watch($inotify_instance, $mask) {}
/**
* @link https://php.net/manual/en/inotify.constants.php

View File

@ -62,11 +62,11 @@ function mcrypt_ofb($cipher, $key, $data, $mode, $iv = null) {}
* Get the key size of the specified cipher
* @link https://php.net/manual/en/function.mcrypt-get-key-size.php
* @param int|string $cipher
* @param string $mode
* @param string $module
* @return int
*/
#[Deprecated(since: '7.1')]
function mcrypt_get_key_size($cipher, $mode) {}
function mcrypt_get_key_size($cipher, $module) {}
/**
* Get the block size of the specified cipher
@ -75,12 +75,12 @@ function mcrypt_get_key_size($cipher, $mode) {}
* One of the MCRYPT_ciphername constants or the name
* of the algorithm as string.
* </p>
* @param string $mode <p>
* @param string $module <p>
* One of the <b>MCRYPT_MODE_modename</b> constants, or one of the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".</p>
* @return int Gets the block size, as an integer.
*/
#[Deprecated(since: '7.1')]
function mcrypt_get_block_size($cipher, $mode) {}
function mcrypt_get_block_size($cipher, $module) {}
/**
* Get the name of the specified cipher
@ -157,7 +157,7 @@ function mcrypt_list_modes($lib_dir = null) {}
* One of the MCRYPT_ciphername constants of the name
* of the algorithm as string.
* </p>
* @param string $mode <p>
* @param string $module <p>
* mode is one of the MCRYPT_MODE_modename constants
* or one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". The IV is
* ignored in ECB mode as this mode does not require it. You will need to
@ -169,7 +169,7 @@ function mcrypt_list_modes($lib_dir = null) {}
* combination zero is returned.
*/
#[Deprecated(since: '7.1')]
function mcrypt_get_iv_size($cipher, $mode) {}
function mcrypt_get_iv_size($cipher, $module) {}
/**
* Encrypts plaintext with given parameters
@ -248,10 +248,10 @@ function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {}
/**
* Opens the module of the algorithm and the mode to be used
* @link https://php.net/manual/en/function.mcrypt-module-open.php
* @param string $algorithm <p>
* @param string $cipher <p>
* The algorithm to be used.
* </p>
* @param string $algorithm_directory <p>
* @param string $cipher_directory <p>
* The algorithm_directory and
* mode_directory are used to locate the encryption
* modules. When you supply a directory name, it is used. When you set one
@ -270,7 +270,7 @@ function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {}
* @return resource|false Normally it returns an encryption descriptor, or false on error.
*/
#[Deprecated(since: '7.1')]
function mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory) {}
function mcrypt_module_open($cipher, $cipher_directory, $mode, $mode_directory) {}
/**
* This function initializes all buffers needed for encryption

View File

@ -41,12 +41,14 @@ namespace MongoDB\Driver {
* Manager constructor.
* @link https://php.net/manual/en/mongodb-driver-manager.construct.php
* @param string $uri A mongodb:// connection URI
* @param array $uriOptions Connection string options
* @param array $options Connection string options
* @param array $driverOptions Any driver-specific options not included in MongoDB connection spec.
* @throws InvalidArgumentException on argument parsing errors
* @throws RuntimeException if the uri format is invalid
*/
final public function __construct($uri, array $uriOptions = [], array $driverOptions = []) {}
final public function __construct($uri = '', array $options = [], array $driverOptions = []) {}
final public function __wakeup() {}
/**
* Return a ClientEncryption instance.
@ -62,7 +64,7 @@ namespace MongoDB\Driver {
* Execute one or more write operations
* @link https://php.net/manual/en/mongodb-driver-manager.executebulkwrite.php
* @param string $namespace A fully qualified namespace (databaseName.collectionName)
* @param BulkWrite $bulk The MongoDB\Driver\BulkWrite to execute.
* @param BulkWrite $zbulk The MongoDB\Driver\BulkWrite to execute.
* @param array|WriteConcern $options WriteConcern type for backwards compatibility
* @return WriteResult
* @throws InvalidArgumentException on argument parsing errors.
@ -72,7 +74,7 @@ namespace MongoDB\Driver {
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
* @since 1.4.0 added $options argument
*/
final public function executeBulkWrite($namespace, BulkWrite $bulk, $options = []) {}
final public function executeBulkWrite($namespace, BulkWrite $zbulk, $options = []) {}
/**
* @link https://php.net/manual/en/mongodb-driver-manager.executecommand.php
@ -94,7 +96,7 @@ namespace MongoDB\Driver {
* Execute a MongoDB query
* @link https://php.net/manual/en/mongodb-driver-manager.executequery.php
* @param string $namespace A fully qualified namespace (databaseName.collectionName)
* @param Query $query A MongoDB\Driver\Query to execute.
* @param Query $zquery A MongoDB\Driver\Query to execute.
* @param array|ReadPreference $options ReadPreference type for backwards compatibility
* @return Cursor
* @throws Exception
@ -103,7 +105,7 @@ namespace MongoDB\Driver {
* @throws RuntimeException on other errors (invalid command, command arguments, ...)
* @since 1.4.0 added $options argument
*/
final public function executeQuery($namespace, Query $query, $options = []) {}
final public function executeQuery($namespace, Query $zquery, $options = []) {}
/**
* @link https://php.net/manual/en/mongodb-driver-manager.executereadcommand.php
@ -231,11 +233,13 @@ namespace MongoDB\Driver {
*/
final private function __construct() {}
final public function __wakeup() {}
/**
* Execute one or more write operations on this server
* @link https://php.net/manual/en/mongodb-driver-server.executebulkwrite.php
* @param string $namespace A fully qualified namespace (e.g. "databaseName.collectionName").
* @param BulkWrite $zwrite The MongoDB\Driver\BulkWrite to execute.
* @param BulkWrite $zbulk The MongoDB\Driver\BulkWrite to execute.
* @param array $options
* @throws BulkWriteException on any write failure (e.g. write error, failure to apply a write concern).
* @throws InvalidArgumentException on argument parsing errors.
@ -245,14 +249,14 @@ namespace MongoDB\Driver {
* @return WriteResult
* @since 1.0.0
*/
final public function executeBulkWrite($namespace, BulkWrite $zwrite, $options = []) {}
final public function executeBulkWrite($namespace, BulkWrite $zbulk, $options = []) {}
/**
* Execute a database command on this server
* @link https://php.net/manual/en/mongodb-driver-server.executecommand.php
* @param string $db The name of the database on which to execute the command.
* @param Command $command The MongoDB\Driver\Command to execute.
* @param ReadPreference $readPreference Optionally, a MongoDB\Driver\ReadPreference to select the server for this operation. If none is given, the read preference from the MongoDB Connection URI will be used.
* @param ReadPreference $options Optionally, a MongoDB\Driver\ReadPreference to select the server for this operation. If none is given, the read preference from the MongoDB Connection URI will be used.
* @throws InvalidArgumentException on argument parsing errors.
* @throws ConnectionException if connection to the server fails (for reasons other than authentication).
* @throws AuthenticationException if authentication is needed and fails.
@ -260,14 +264,14 @@ namespace MongoDB\Driver {
* @return Cursor
* @since 1.0.0
*/
final public function executeCommand($db, Command $command, ReadPreference $readPreference = null) {}
final public function executeCommand($db, Command $command, ReadPreference $options = null) {}
/**
* Execute a database command that reads on this server
* @link https://secure.php.net/manual/en/mongodb-driver-server.executereadcommand.php
* @param string $db
* @param \MongoDB\Driver\Command $command
* @param array $option
* @param array $options
* @return Cursor
* @throws InvalidArgumentException On argument parsing errors or if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option.
* @throws ConnectionException If connection to the server fails (for reasons other than authentication).
@ -275,14 +279,14 @@ namespace MongoDB\Driver {
* @throws RuntimeException On other errors (e.g. invalid command).
* @since 1.4.0
*/
final public function executeReadCommand($db, Command $command, array $option = []) {}
final public function executeReadCommand($db, Command $command, array $options = []) {}
/**
* Execute a database command that reads and writes on this server
* @link https://secure.php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
* @param string $db
* @param \MongoDB\Driver\Command $command
* @param array $option
* @param array $options
* @return Cursor
* @throws InvalidArgumentException On argument parsing errors OR if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option OR if the "session" option is used in combination with an unacknowledged write concern
* @throws ConnectionException If connection to the server fails (for reasons other than authentication).
@ -290,14 +294,14 @@ namespace MongoDB\Driver {
* @throws RuntimeException On other errors (e.g. invalid command).
* @since 1.4.0
*/
final public function executeReadWriteCommand($db, Command $command, array $option = []) {}
final public function executeReadWriteCommand($db, Command $command, array $options = []) {}
/**
* Execute a database command that writes on this server
* @link https://secure.php.net/manual/en/mongodb-driver-server.executewritecommand.php
* @param string $db
* @param \MongoDB\Driver\Command $command
* @param array $option
* @param array $options
* @return Cursor
* @throws InvalidArgumentException On argument parsing errors or if the "session" option is used with an associated transaction in combination with a "readConcern" or "writeConcern" option.
* @throws ConnectionException If connection to the server fails (for reasons other than authentication).
@ -305,13 +309,13 @@ namespace MongoDB\Driver {
* @throws RuntimeException On other errors (e.g. invalid command).
* @since 1.4.0
*/
final public function executeWriteCommand($db, Command $command, array $option = []) {}
final public function executeWriteCommand($db, Command $command, array $options = []) {}
/**
* Execute a database query on this server
* @link https://php.net/manual/en/mongodb-driver-server.executequery.php
* @param string $namespace A fully qualified namespace (e.g. "databaseName.collectionName").
* @param Query $query The MongoDB\Driver\Query to execute.
* @param Query $zquery The MongoDB\Driver\Query to execute.
* @param array|ReadPreference $options
* <table>
* <caption><strong>options</strong></caption>
@ -354,7 +358,7 @@ namespace MongoDB\Driver {
* @throws RuntimeException on other errors (e.g. invalid command, issuing a write command to a secondary).
* @return Cursor
*/
final public function executeQuery($namespace, Query $query, $option = []) {}
final public function executeQuery($namespace, Query $zquery, $options = []) {}
/**
* Returns the hostname of this server
@ -455,10 +459,12 @@ namespace MongoDB\Driver {
* Construct new Query
* @link https://php.net/manual/en/mongodb-driver-query.construct.php
* @param array|object $filter The search filter.
* @param array $queryOptions
* @param array $options
* @throws InvalidArgumentException on argument parsing errors.
*/
final public function __construct($filter, array $queryOptions = []) {}
final public function __construct($filter, array $options = []) {}
final public function __wakeup() {}
}
/**
@ -472,12 +478,14 @@ namespace MongoDB\Driver {
/**
* Construct new Command
* @param array|object $document The complete command to construct
* @param array $commandOptions Do not use this parameter to specify options described in the command's reference in the MongoDB manual.
* @param array $options Do not use this parameter to specify options described in the command's reference in the MongoDB manual.
* @throws InvalidArgumentException on argument parsing errors.
* @link https://secure.php.net/manual/en/mongodb-driver-command.construct.php
* @since 1.0.0
*/
final public function __construct($document, array $commandOptions = []) {}
final public function __construct($document, array $options = []) {}
final public function __wakeup() {}
}
/**
@ -532,6 +540,8 @@ namespace MongoDB\Driver {
*/
final public function __construct(string|int $mode, array $tagSets = null, array $options = []) {}
public static function __set_state(array $properties) {}
/**
* Returns the ReadPreference's "hedge" option
* @since 1.8.0
@ -591,6 +601,8 @@ namespace MongoDB\Driver {
* @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
*/
final public function unserialize($serialized) {}
final public function getMaxStalenessSeconds() {}
}
/**
@ -618,6 +630,8 @@ namespace MongoDB\Driver {
*/
final public function __construct($level = null) {}
public static function __set_state(array $properties) {}
/**
* Returns the ReadConcern's "level" option
* @link https://php.net/manual/en/mongodb-driver-readconcern.getlevel.php
@ -677,6 +691,8 @@ namespace MongoDB\Driver {
*/
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the current element.
* @link https://www.php.net/manual/en/mongodb-driver-cursor.current.php
@ -786,6 +802,8 @@ namespace MongoDB\Driver {
*/
final public function __toString() {}
final public function __wakeup() {}
/**
* Serialize a CursorId
* @since 1.7.0
@ -827,6 +845,8 @@ namespace MongoDB\Driver {
*/
final public function __construct(array $options = []) {}
final public function __wakeup() {}
/**
* Count expected roundtrips for executing the bulk
* Returns the expected number of client-to-server roundtrips required to execute all write operations in the BulkWrite.
@ -834,16 +854,16 @@ namespace MongoDB\Driver {
* @return int number of expected roundtrips to execute the BulkWrite.
* @throws InvalidArgumentException on argument parsing errors.
*/
public function count() {}
final public function count() {}
/**
* Add a delete operation to the bulk
* @link https://php.net/manual/en/mongodb-driver-bulkwrite.delete.php
* @param array|object $filter The search filter
* @param array|object $query The search filter
* @param array $deleteOptions
* @throws InvalidArgumentException on argument parsing errors.
*/
public function delete($filter, array $deleteOptions = []) {}
final public function delete($query, array $deleteOptions = []) {}
/**
* Add an insert operation to the bulk
@ -858,12 +878,12 @@ namespace MongoDB\Driver {
/**
* Add an update operation to the bulk
* @link https://php.net/manual/en/mongodb-driver-bulkwrite.update.php
* @param array|object $filter The search filter
* @param array|object $query The search filter
* @param array|object $newObj A document containing either update operators (e.g. $set) or a replacement document (i.e. only field:value expressions)
* @param array $updateOptions
* @throws InvalidArgumentException on argument parsing errors.
*/
public function update($filter, $newObj, array $updateOptions = []) {}
final public function update($query, $newObj, array $updateOptions = []) {}
}
/**
@ -886,6 +906,8 @@ namespace MongoDB\Driver {
*/
final public function __construct($w, $wtimeout = 0, $journal = false) {}
public static function __set_state(array $properties) {}
/**
* Returns the WriteConcern's "journal" option
* @link https://php.net/manual/en/mongodb-driver-writeconcern.getjournal.php
@ -935,6 +957,8 @@ namespace MongoDB\Driver {
* @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
*/
final public function unserialize($serialized) {}
final public function isDefault() {}
}
/**
@ -943,6 +967,10 @@ namespace MongoDB\Driver {
*/
final class WriteResult
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the number of documents deleted
* @link https://php.net/manual/en/mongodb-driver-writeresult.getdeletedcount.php
@ -1019,6 +1047,10 @@ namespace MongoDB\Driver {
*/
final class WriteError
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the WriteError's error code
* @link https://php.net/manual/en/mongodb-driver-writeerror.getcode.php
@ -1054,6 +1086,10 @@ namespace MongoDB\Driver {
*/
final class WriteConcernError
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the WriteConcernError's error code
* @link https://php.net/manual/en/mongodb-driver-writeconcernerror.getcode.php
@ -1112,6 +1148,8 @@ namespace MongoDB\Driver {
*/
final private function __construct() {}
final public function __wakeup() {}
/**
* Aborts a transaction
* @link https://secure.php.net/manual/en/mongodb-driver-session.aborttransaction.php
@ -1133,12 +1171,12 @@ namespace MongoDB\Driver {
/**
* Advances the operation time for this session
* @link https://secure.php.net/manual/en/mongodb-driver-session.advanceoperationtime.php
* @param \MongoDB\BSON\TimestampInterface $operationTime
* @param \MongoDB\BSON\TimestampInterface $timestamp
* @return void
* @throws \MongoDB\Driver\Exception\InvalidArgumentException On argument parsing errors
* @since 1.4.0
*/
final public function advanceOperationTime(\MongoDB\BSON\TimestampInterface $operationTime) {}
final public function advanceOperationTime(\MongoDB\BSON\TimestampInterface $timestamp) {}
/**
* @link https://secure.php.net/manual/en/mongodb-driver-session.committransaction.php
@ -1238,7 +1276,7 @@ namespace MongoDB\Driver {
* @throws \MongoDB\Driver\Exception\RuntimeException If the the transaction could not be started (e.g. a transaction was already started).
* @since 1.4.0
*/
final public function startTransaction($options) {}
final public function startTransaction($options = []) {}
}
/**
@ -1303,6 +1341,8 @@ namespace MongoDB\Driver {
final private function __construct() {}
final public function __wakeup() {}
/**
* Creates a new key document and inserts into the key vault collection.
* @link https://www.php.net/manual/en/mongodb-driver-clientencryption.createdatakey.php
@ -1317,12 +1357,12 @@ namespace MongoDB\Driver {
/**
* Decrypts an encrypted value (BSON binary of subtype 6).
* @link https://www.php.net/manual/en/mongodb-driver-clientencryption.decrypt.php
* @param \MongoDB\BSON\Binary $value A MongoDB\BSON\Binary instance with subtype 6 containing the encrypted value.
* @param \MongoDB\BSON\Binary $keyVaultClient A MongoDB\BSON\Binary instance with subtype 6 containing the encrypted value.
* @return mixed Returns the decrypted value
* @throws InvalidArgumentException On argument parsing errors.
* @throws EncryptionException If an error occurs while decrypting the value.
*/
final public function decrypt(\MongoDB\BSON\Binary $value) {}
final public function decrypt(\MongoDB\BSON\Binary $keyVaultClient) {}
/**
* Encrypts a value with a given key and algorithm.
@ -1356,11 +1396,11 @@ namespace MongoDB\Driver\Exception {
/**
* Whether the given errorLabel is associated with this exception
*
* @param string $errorLabel
* @since 1.6.0
* @param string $label
* @return bool
*@since 1.6.0
*/
final public function hasErrorLabel($errorLabel) {}
final public function hasErrorLabel($label) {}
}
/**
@ -1388,7 +1428,7 @@ namespace MongoDB\Driver\Exception {
* @link https://php.net/manual/en/class.mongodb-driver-exception-invalidargumentexception.php
* @since 1.0.0
*/
class InvalidArgumentException extends \InvalidArgumentException {}
class InvalidArgumentException extends \InvalidArgumentException implements Exception {}
/**
* Thrown when a command fails
@ -1398,6 +1438,8 @@ namespace MongoDB\Driver\Exception {
*/
class CommandException extends ServerException
{
protected $resultDocument;
/**
* Returns the result document for the failed command
* @link https://secure.php.net/manual/en/mongodb-driver-commandexception.getresultdocument.php
@ -1570,6 +1612,10 @@ namespace MongoDB\Driver\Monitoring {
*/
class CommandSucceededEvent
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the command name.
* @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandsucceededevent.getcommandname.php
@ -1636,6 +1682,10 @@ namespace MongoDB\Driver\Monitoring {
*/
class CommandFailedEvent
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the command name.
* @link https://secure.php.net/manual/en/mongodb-driver-monitoring-commandfailedevent.getcommandname.php
@ -1711,6 +1761,10 @@ namespace MongoDB\Driver\Monitoring {
*/
class CommandStartedEvent
{
final private function __construct() {}
final public function __wakeup() {}
/**
* Returns the command document
* The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
@ -1842,12 +1896,12 @@ namespace MongoDB\BSON {
* The typeMap parameter may be used to control the PHP types used for converting BSON arrays and documents (both root and embedded).
* @link https://php.net/manual/en/function.mongodb.bson-tophp.php
* @param string $bson BSON value to be unserialized.
* @param array $typeMap
* @param array $typemap
* @return object The unserialized PHP value
* @throws UnexpectedValueException if the input did not contain exactly one BSON document.
* @throws InvalidArgumentException if a class in the type map cannot be instantiated or does not implement MongoDB\BSON\Unserializable.
*/
function toPHP($bson, array $typeMap) {}
function toPHP($bson, array $typemap = []) {}
/**
* Class Binary
@ -1889,7 +1943,7 @@ namespace MongoDB\BSON {
*/
final public function getType() {}
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Returns the Binary's data
@ -1948,7 +2002,7 @@ namespace MongoDB\BSON {
*/
final public function __toString() {}
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Serialize a Decimal128
@ -1989,12 +2043,12 @@ namespace MongoDB\BSON {
/**
* Construct a new Javascript
* @link https://php.net/manual/en/mongodb-bson-javascript.construct.php
* @param string $code
* @param string $javascript
* @param array|object $scope
*/
final public function __construct($code, $scope = []) {}
final public function __construct($javascript, $scope = []) {}
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Returns the Javascript's code
@ -2053,7 +2107,7 @@ namespace MongoDB\BSON {
*/
final class MaxKey implements Type, MaxKeyInterface, \Serializable, JsonSerializable
{
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Serialize a MaxKey
@ -2091,7 +2145,7 @@ namespace MongoDB\BSON {
*/
final class MinKey implements Type, MinKeyInterface, \Serializable, JsonSerializable
{
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Serialize a MinKey
@ -2144,6 +2198,8 @@ namespace MongoDB\BSON {
*/
final public function __toString() {}
public static function __set_state(array $properties) {}
/**
* Returns the timestamp component of this ObjectId
* @since 1.2.0
@ -2211,7 +2267,7 @@ namespace MongoDB\BSON {
*/
final public function __toString() {}
public static function __set_state($an_array) {}
public static function __set_state($properties) {}
/**
* Serialize a Regex
@ -2264,6 +2320,8 @@ namespace MongoDB\BSON {
*/
final public function __toString() {}
public static function __set_state(array $properties) {}
/**
* Returns the increment component of this TimestampInterface
* @link https://secure.php.net/manual/en/mongodb-bson-timestampinterface.getincrement.php
@ -2323,6 +2381,8 @@ namespace MongoDB\BSON {
*/
final public function __construct($milliseconds = null) {}
public static function __set_state(array $properties) {}
/**
* Returns the DateTime representation of this UTCDateTime
* @link https://php.net/manual/en/mongodb-bson-utcdatetime.todatetime.php
@ -2469,7 +2529,7 @@ namespace MongoDB\BSON {
* @link https://secure.php.net/manual/en/class.mongodb-bson-dbpointer.php
*/
#[Deprecated]
final class DbPointer implements Type, \Serializable, \JsonSerializable
final class DBPointer implements Type, \Serializable, \JsonSerializable
{
final private function __construct() {}

View File

@ -23,7 +23,7 @@ abstract class RdKafka
* @throws Exception
* @return Metadata
*/
public function getMetadata($all_topics, $only_topic = null, $timeout_ms) {}
public function getMetadata($all_topics, $only_topic = null, $timeout_ms = 0) {}
/**
* @return int
@ -53,12 +53,12 @@ abstract class RdKafka
public function setLogLevel($level) {}
/**
* @param TopicPartition[] $topicPartitions
* @param TopicPartition[] $topic_partitions
* @param int $timeout_ms
*
* @return TopicPartition[]
*/
public function offsetsForTimes(array $topicPartitions, int $timeout_ms) {}
public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
/**
* @param string $topic
@ -69,7 +69,7 @@ abstract class RdKafka
*
* @return void
*/
public function queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeout_ms) {}
public function queryWatermarkOffsets(string $topic, int $partition = 0, int &$low = 0, int &$high = 0, int $timeout_ms = 0) {}
/**
* @param int $purge_flags
@ -84,4 +84,10 @@ abstract class RdKafka
* @return int
*/
public function flush(int $timeout_ms) {}
public function metadata($all_topics, $only_topic = false, $timeout_ms = 0) {}
public function setLogger($logger) {}
public function outqLen() {}
}

View File

@ -45,4 +45,8 @@ class ConsumerTopic extends Topic
* @return void
*/
public function offsetStore($partition, $offset) {}
public function consumeCallback($partition, $timeout_ms, $callback) {}
public function consumeBatch($partition, $timeout_ms, $batch_size) {}
}

View File

@ -78,20 +78,20 @@ class KafkaConsumer
public function unsubscribe() {}
/**
* @param array $topics
* @param array $topic_partitions
* @param int $timeout_ms
*
* @return array
*/
public function getCommittedOffsets(array $topics, int $timeout_ms) {}
public function getCommittedOffsets(array $topic_partitions, int $timeout_ms) {}
/**
* @param TopicPartition[] $topicPartitions
* @param TopicPartition[] $topic_partitions
* @param int $timeout_ms
*
* @return TopicPartition[]
*/
public function offsetsForTimes(array $topicPartitions, int $timeout_ms) {}
public function offsetsForTimes(array $topic_partitions, int $timeout_ms) {}
/**
* @param string $topic
@ -102,12 +102,12 @@ class KafkaConsumer
*
* @return void
*/
public function queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeout_ms) {}
public function queryWatermarkOffsets(string $topic, int $partition = 0, int &$low = 0, int &$high = 0, int $timeout_ms = 0) {}
/**
* @param TopicPartition[] $topicPartitions
* @param TopicPartition[] $topic_partitions
*/
public function getOffsetPositions(array $topicPartitions) {}
public function getOffsetPositions(array $topic_partitions) {}
/**
* @param string $topic_name

View File

@ -4,6 +4,8 @@ namespace RdKafka;
class KafkaConsumerTopic extends Topic
{
private function __construct() {}
/**
* @param int $partition
* @param int $offset

View File

@ -2,17 +2,17 @@
namespace RdKafka;
class KafkaErrorException extends \Exception
class KafkaErrorException extends Exception
{
/**
* @param string $message
* @param int $code
* @param string $errorString
* @param string $error_string
* @param bool $isFatal
* @param bool $isRetriable
* @param bool $transactionRequiresAbort
*/
public function __construct($message, $code, $errorString, $isFatal, $isRetriable, $transactionRequiresAbort) {}
public function __construct($message, $code, $error_string, $isFatal, $isRetriable, $transactionRequiresAbort) {}
/**
* @return string

View File

@ -49,6 +49,8 @@ class Message
*/
public $headers;
public $opaque;
/**
* @return string
*/

View File

@ -0,0 +1,12 @@
<?php
namespace RdKafka\Metadata;
class Broker
{
public function getId() {}
public function getHost() {}
public function getPort() {}
}

View File

@ -18,11 +18,11 @@ class Producer extends \RdKafka
public function newTopic($topic_name, ?TopicConf $topic_conf = null) {}
/**
* @param int $timeoutMs
* @param int $timeout_ms
*
* @return void
*/
public function initTransactions(int $timeoutMs) {}
public function initTransactions(int $timeout_ms) {}
/**
* @return void
@ -30,16 +30,16 @@ class Producer extends \RdKafka
public function beginTransaction() {}
/**
* @param int $timeoutMs
* @param int $timeout_ms
*
* @return void
*/
public function commitTransaction(int $timeoutMs) {}
public function commitTransaction(int $timeout_ms) {}
/**
* @param int $timeoutMs
* @param int $timeout_ms
*
* @return void
*/
public function abortTransaction(int $timeoutMs) {}
public function abortTransaction(int $timeout_ms) {}
}

View File

@ -14,7 +14,7 @@ class ProducerTopic extends Topic
*
* @return void
*/
public function produce($partition, $msgflags, $payload = null, $key = null) {}
public function produce($partition, $msgflags, $payload = null, $key = null, $msg_opaque = null) {}
/**
* @param int $partition
@ -26,5 +26,5 @@ class ProducerTopic extends Topic
*
* @return void
*/
public function producev($partition, $msgflags, $payload = null, $key = null, $headers = null, $timestamp_ms = 0) {}
public function producev($partition, $msgflags, $payload = null, $key = null, $headers = null, $timestamp_ms = 0, $msg_opaque = null) {}
}

View File

@ -7,6 +7,8 @@ namespace RdKafka;
*/
class TopicConf
{
public function __construct() {}
/**
* @return array
*/

View File

@ -101,10 +101,57 @@ const RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52;
const RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53;
const RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54;
const RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55;
const RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14;
const RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15;
const RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16;
const RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56;
const RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57;
const RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58;
const RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59;
const RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65;
const RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66;
const RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67;
const RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68;
const RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69;
const RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70;
const RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71;
const RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72;
const RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73;
const RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74;
const RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75;
const RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76;
const RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77;
const RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78;
const RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79;
const RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80;
const RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81;
const RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82;
const RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE = 83;
const RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED = 84;
const RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS = 85;
const RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC = 86;
const RD_KAFKA_RESP_ERR_INVALID_RECORD = 87;
const RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT = 88;
const RD_KAFKA_RESP_ERR__READ_ONLY = -157;
const RD_KAFKA_RESP_ERR__NOENT = -156;
const RD_KAFKA_RESP_ERR__UNDERFLOW = -155;
const RD_KAFKA_RESP_ERR__INVALID_TYPE = -154;
const RD_KAFKA_RESP_ERR__RETRY = -153;
const RD_KAFKA_RESP_ERR__PURGE_QUEUE = -152;
const RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = -151;
const RD_KAFKA_RESP_ERR__FATAL = -150;
const RD_KAFKA_RESP_ERR__INCONSISTENT = -149;
const RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = -148;
const RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = -147;
const RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = -146;
const RD_KAFKA_RESP_ERR__NOT_CONFIGURED = -145;
const RD_KAFKA_RESP_ERR__FENCED = -144;
const RD_KAFKA_RESP_ERR__APPLICATION = -143;
const RD_KAFKA_CONSUMER = 1;
const RD_KAFKA_OFFSET_BEGINNING = -2;
const RD_KAFKA_OFFSET_END = -1;
@ -112,13 +159,20 @@ const RD_KAFKA_OFFSET_STORED = -1000;
const RD_KAFKA_OFFSET_INVALID = -1001;
const RD_KAFKA_PARTITION_UA = -1;
const RD_KAFKA_PRODUCER = 0;
const RD_KAFKA_VERSION = 722687;
const RD_KAFKA_BUILD_VERSION = 722687;
const RD_KAFKA_VERSION = 17105919;
const RD_KAFKA_BUILD_VERSION = 17105919;
const RD_KAFKA_CONF_UNKNOWN = -2;
const RD_KAFKA_CONF_INVALID = -1;
const RD_KAFKA_CONF_OK = 0;
const RD_KAFKA_MSG_PARTITIONER_RANDOM = 2;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT = 3;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM = 4;
const RD_KAFKA_MSG_PARTITIONER_MURMUR2 = 5;
const RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM = 6;
const RD_KAFKA_MSG_F_BLOCK = 4;
const RD_KAFKA_LOG_PRINT = 100;
const RD_KAFKA_LOG_SYSLOG = 101;
const RD_KAFKA_LOG_SYSLOG_PRINT = 102;
const RD_KAFKA_PURGE_F_QUEUE = 1;
const RD_KAFKA_PURGE_F_INFLIGHT = 2;
const RD_KAFKA_PURGE_F_NON_BLOCKING = 4;

View File

@ -1,5 +1,7 @@
<?php
use JetBrains\PhpStorm\Deprecated;
/**
* Returns the full list of error codes.
* @return array
@ -24,11 +26,13 @@ function rd_kafka_err2str($err) {}
*
* @return int Returns a kafka error code as an integer.
*/
#[Deprecated]
function rd_kafka_errno2err($errnox) {}
/**
* @return int Returns the system errno as an integer.
*/
#[Deprecated]
function rd_kafka_errno() {}
/**

View File

@ -95,7 +95,7 @@ class StubsTest extends BaseStubsTest
static::assertEquals(
$constantValue,
$stubConstants[$constantName]->value,
"Constant value mismatch: const $constantName \n
"Constant value mismatch: const $class->name::$constantName \n
Expected value: $constantValue but was {$stubConstants[$constantName]->value}"
);
}
@ -254,7 +254,8 @@ class StubsTest extends BaseStubsTest
/** @var PHPParameter $stubOptionalParameter */
$stubOptionalParameter = array_pop($stubParameters);
self::assertEquals($parameter->isOptional, $stubOptionalParameter->isOptional,
sprintf('Reflection method %s::%s has optional parameter %s', $class->name, $method->name, $parameter->name));
sprintf('Reflection method %s::%s has optional parameter %s but stub parameter is not optional',
$class->name, $method->name, $parameter->name));
}
/**
@ -375,7 +376,7 @@ class StubsTest extends BaseStubsTest
* @param PHPMethod $method
* @throws Exception|RuntimeException
*/
public function testClassesParametersCount(PHPClass|PHPInterface $class, PHPMethod $method)
public function testClassMethodsParametersCount(PHPClass|PHPInterface $class, PHPMethod $method)
{
$className = $class->name;
if ($class instanceof PHPClass) {

View File

@ -527,55 +527,55 @@
{
"name": "gmp_div_r",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_mod",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_divexact",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_neg",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_abs",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_fact",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_sqrt",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "gmp_sqrtrem",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "min",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"specific overloading case"
@ -584,7 +584,7 @@
{
"name": "max",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"specific overloading case"
@ -593,31 +593,31 @@
{
"name": "uopz_add_function",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "uopz_del_function",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "numfmt_format",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "datefmt_format_object",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "oci_lob_is_equal",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"Oci_lob vs Oci-lob"
@ -626,7 +626,7 @@
{
"name": "oci_lob_copy",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"Oci_lob vs Oci-lob"
@ -635,7 +635,7 @@
{
"name": "xmlrpc_server_register_method",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
@ -1172,7 +1172,7 @@
{
"name": "sem_get",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": "Invalid documentation"
},
@ -1269,7 +1269,7 @@
},
{
"name": "bcscale",
"problems" : [
"problems": [
"has duplicate in stubs"
],
"parameters": [
@ -1384,13 +1384,29 @@
}
],
"classes": [
{
"name": "Yaf_Application",
"methods": [
{
"name": "execute",
"parameters": [
{
"name": "...",
"problems": [
"parameter name mismatch"
]
}
]
}
]
},
{
"name": "Yaf_Dispatcher",
"methods": [
{
"name": "setErrorHandler",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"call == callable"
@ -1404,7 +1420,7 @@
{
"name": "export",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1458,7 +1474,7 @@
{
"name": "getSockOpt",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1469,7 +1485,7 @@
{
"name": "export",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1480,19 +1496,19 @@
{
"name": "getQuery",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "getPost",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "getCookie",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1503,7 +1519,7 @@
{
"name": "getParam",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$default is mixed"
@ -1517,7 +1533,7 @@
{
"name": "set",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value is mixed"
@ -1531,7 +1547,7 @@
{
"name": "getServer",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value is mixed"
@ -1545,7 +1561,7 @@
{
"name": "offsetGet",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$name is mixed in ArrayAccess"
@ -1559,7 +1575,7 @@
{
"name": "addRoute",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"There is no Yaf_Route_Abstract class"
@ -1573,7 +1589,7 @@
{
"name": "format",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value is number"
@ -1587,7 +1603,7 @@
{
"name": "createStopped",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1598,7 +1614,7 @@
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1609,7 +1625,7 @@
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1620,7 +1636,7 @@
{
"name": "createStopped",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1631,19 +1647,33 @@
{
"name": "child",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "embed",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs",
"parameter mismatch"
]
},
{
"name": "check",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs",
"parameter mismatch"
]
},
{
"name": "prepare",
"problems": [
"parameter mismatch"
]
},
{
"name": "fork",
"problems": [
"parameter mismatch"
]
}
]
@ -1653,7 +1683,7 @@
"methods": {
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
},
@ -1662,7 +1692,7 @@
"methods": {
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
},
@ -1672,13 +1702,35 @@
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "createStopped",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
},
{
"name": "Yaf_Route_Rewrite",
"methods": [
{
"name": "__construct",
"problems": [
"parameter mismatch"
]
}
]
},
{
"name": "Yar_Concurrent_Client",
"methods": [
{
"name": "call",
"problems": [
"parameter mismatch"
]
}
]
@ -1689,7 +1741,7 @@
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value is scalar"
@ -1698,7 +1750,7 @@
{
"name": "set",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value is scalar"
@ -1712,7 +1764,7 @@
{
"name": "call",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$use_self appears to be bool"
@ -1721,7 +1773,7 @@
{
"name": "assign",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"$value appears to be mixed"
@ -1735,13 +1787,13 @@
{
"name": "SoapFault",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
},
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1752,7 +1804,7 @@
{
"name": "__construct",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1763,7 +1815,7 @@
{
"name": "transformToXml",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1774,7 +1826,7 @@
{
"name": "setFacetDateHardEnd",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
]
}
]
@ -1785,7 +1837,7 @@
{
"name": "getImageDistortion",
"problems": [
"wrong parmeter type in docs"
"wrong parameter type in docs"
],
"comment": [
"magickwand is a type from c sources"

View File

@ -191,7 +191,7 @@ function xdebug_break(): bool {}
* @param int $options
* @return string
*/
function xdebug_start_trace(?string $traceFile, int $options = 0): string {}
function xdebug_start_trace(?string $traceFile = null, int $options = 0): string {}
/**
* Stop tracing function calls and closes the trace file.
@ -363,8 +363,9 @@ define('XDEBUG_TRACE_NAKED_FILENAME', 8);
define('XDEBUG_CC_UNUSED', 1);
define('XDEBUG_CC_DEAD_CODE', 2);
define('XDEBUG_CC_BRANCH_CHECK', 4);
define('XDEBUG_FILTER_TRACING', 256);
define('XDEBUG_FILTER_CODE_COVERAGE', 512);
define('XDEBUG_FILTER_TRACING', 768);
define('XDEBUG_FILTER_STACK', 512);
define('XDEBUG_FILTER_CODE_COVERAGE', 256);
define('XDEBUG_FILTER_NONE', 0);
define('XDEBUG_PATH_WHITELIST', 1);
define('XDEBUG_PATH_BLACKLIST', 2);

View File

@ -4,7 +4,7 @@
* The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
* @link https://php.net/manual/en/yaf.constants.php
*/
define('YAF_VERSION', '3.0.8', true);
define('YAF_VERSION', '3.3.2', true);
define('YAF_ENVIRON', 'product', true);
define('YAF_ERR_STARTUP_FAILED', 512, true);
define('YAF_ERR_ROUTE_FAILED', 513, true);
@ -16,6 +16,7 @@ define('YAF_ERR_NOTFOUND_VIEW', 518, true);
define('YAF_ERR_CALL_FAILED', 519, true);
define('YAF_ERR_AUTOLOAD_FAILED', 520, true);
define('YAF_ERR_TYPE_ERROR', 521, true);
define('YAF_ERR_ACCESS_ERROR', 522);
//================================================
@ -109,11 +110,13 @@ final class Yaf_Application
* ;defined modules<br/>
* ap.modules=Index
* </p>
* @param string $envrion Which section will be loaded as the final config
* @param string $environ Which section will be loaded as the final config
*
* @throws Yaf_Exception_TypeError|Yaf_Exception_StartupError
*/
public function __construct($config, $envrion = null) {}
public function __construct($config, $environ = null) {}
public function getInstance() {}
/**
* Run a Yaf_Application, let the Yaf_Application accept a request, and route the request, dispatch to controller/action, and render response.
@ -189,35 +192,34 @@ final class Yaf_Application
/**
* Change the application directory
*
* @since 2.1.4
* @link https://secure.php.net/manual/en/yaf-application.setappdirectory.php
*
* @param string $directory
* @return Yaf_Application
* @since 2.1.4
* @link https://secure.php.net/manual/en/yaf-application.setappdirectory.php
*/
public function setAppDirectory($directory) {}
/**
* @since 2.1.4
* @return string
* @link https://secure.php.net/manual/en/yaf-application.getappdirectory.php
*
* @return string
* @since 2.1.4
*/
public function getAppDirectory() {}
/**
* @since 2.1.2
* @return int
* @link https://secure.php.net/manual/en/yaf-application.getlasterrorno.php
*
* @return int
* @since 2.1.2
*/
public function getLastErrorNo() {}
/**
* @since 2.1.2
* @return string
* @link https://secure.php.net/manual/en/yaf-application.getlasterrormsg.php
*
* @return string
* @since 2.1.2
*/
public function getLastErrorMsg() {}
@ -330,6 +332,14 @@ final class Yaf_Dispatcher
*/
public function enableView() {}
public function getResponse() {}
public function getDefaultModule() {}
public function getDefaultController() {}
public function getDefaultAction() {}
/**
* <p>disable view engine, used in some app that user will output by himself</p><br/>
* <b>Note:</b>
@ -403,7 +413,7 @@ final class Yaf_Dispatcher
*
* @return Yaf_Dispatcher
*/
public function setErrorHandler(callable $callback, $error_types) {}
public function setErrorHandler(callable $callback, $error_types = YAF_ERR_TYPE_ERROR) {}
/**
* Change default module name
@ -528,6 +538,8 @@ final class Yaf_Dispatcher
* @return Yaf_Dispatcher
*/
public function registerPlugin(Yaf_Plugin_Abstract $plugin) {}
public function setResponse($response) {}
}
/**
@ -611,11 +623,11 @@ class Yaf_Loader
* <p>If yaf.library is not configured, then the global library directory is assumed to be the local library directory. in that case, all autoloading will look for local library directory. But if you want your Yaf application be strong, then always register your own classes as local classes.</p>
* @link https://secure.php.net/manual/en/yaf-loader.registerlocalnamespace.php
*
* @param string|string[] $name_prefix a string or a array of class name prefix. all class prefix with these prefix will be loaded in local library path.
* @param string|string[] $namespace a string or a array of class name prefix. all class prefix with these prefix will be loaded in local library path.
*
* @return bool
*/
public function registerLocalNamespace($name_prefix) {}
public function registerLocalNamespace($namespace, $path = '') {}
/**
* @link https://secure.php.net/manual/en/yaf-loader.getlocalnamespace.php
@ -624,6 +636,8 @@ class Yaf_Loader
*/
public function getLocalNamespace() {}
public function getNamespaces() {}
/**
* @link https://secure.php.net/manual/en/yaf-loader.clearlocalnamespace.php
*/
@ -648,25 +662,28 @@ class Yaf_Loader
public static function import($file) {}
/**
* @since 2.1.4
* @link https://secure.php.net/manual/en/yaf-loader.setlibrarypath.php
*
* @param string $directory
* @param bool $global
* @param string $library_path
* @param bool $is_global
*
* @return Yaf_Loader
* @link https://secure.php.net/manual/en/yaf-loader.setlibrarypath.php
*
* @since 2.1.4
*/
public function setLibraryPath($directory, $global = false) {}
public function setLibraryPath($library_path, $is_global = false) {}
/**
* @since 2.1.4
* @link https://secure.php.net/manual/en/yaf-loader.getlibrarypath.php
*
* @param bool $is_global
*
* @return string
* @since 2.1.4
* @link https://secure.php.net/manual/en/yaf-loader.getlibrarypath.php
*/
public function getLibraryPath($is_global = false) {}
public function registerNamespace($namespace, $path = '') {}
public function getNamespacePath($class_name) {}
}
/**
@ -740,7 +757,7 @@ final class Yaf_Registry
* @link https://secure.php.net/manual/en/class.yaf-session.php
* @version 2.2.9
*/
final class Yaf_Session implements Iterator, Traversable, ArrayAccess, Countable
final class Yaf_Session implements Iterator, ArrayAccess, Countable
{
/**
* @var Yaf_Session
@ -864,8 +881,8 @@ final class Yaf_Session implements Iterator, Traversable, ArrayAccess, Countable
/**
* @param string $name
* @see ArrayAccess::offsetGet
* @return mixed
* @see ArrayAccess::offsetGet
*/
public function offsetGet($name) {}
@ -875,11 +892,10 @@ final class Yaf_Session implements Iterator, Traversable, ArrayAccess, Countable
public function offsetExists($name) {}
/**
* @see ArrayAccess::offsetSet
*
* @param string $name
* @param string $value
* @return void
* @see ArrayAccess::offsetSet
*/
public function offsetSet($name, $value) {}
@ -902,6 +918,8 @@ final class Yaf_Session implements Iterator, Traversable, ArrayAccess, Countable
* @see Yaf_Session::del()
*/
public function __unset($name) {}
public function clear() {}
}
/**
@ -1111,13 +1129,14 @@ abstract class Yaf_Controller_Abstract
*/
public function getView() {}
public function getName() {}
/**
* @deprecated not_implemented
* @link https://secure.php.net/manual/en/yaf-controller-abstract.initview.php
*
* @param array $options
*
* @return Yaf_Response_Abstract
* @deprecated not_implemented
* @link https://secure.php.net/manual/en/yaf-controller-abstract.initview.php
*/
public function initView(array $options = null) {}
@ -1195,20 +1214,19 @@ abstract class Yaf_Controller_Abstract
/**
* <b>Yaf_Controller_Abstract</b>::__construct() is final, which means it can not be overridden. You may want to see Yaf_Controller_Abstract::init() instead.
*
* @see Yaf_Controller_Abstract::init()
* @link https://secure.php.net/manual/en/yaf-controller-abstract.construct.php
*
* @param Yaf_Request_Abstract $request
* @param Yaf_Response_Abstract $response
* @param Yaf_View_Interface $view
* @param array $invokeArgs
* @param array $args
* @see Yaf_Controller_Abstract::init()
* @link https://secure.php.net/manual/en/yaf-controller-abstract.construct.php
*/
final public function __construct(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response, Yaf_View_Interface $view, array $invokeArgs = null) {}
public function __construct(Yaf_Request_Abstract $request, Yaf_Response_Abstract $response, Yaf_View_Interface $view, array $args = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-controller-abstract.clone.php
*/
final private function __clone() {}
private function __clone() {}
}
/**
@ -1245,12 +1263,14 @@ abstract class Yaf_Action_Abstract extends Yaf_Controller_Abstract
* @return Yaf_Controller_Abstract
*/
public function getController() {}
public function getControllerName() {}
}
/**
* @link https://secure.php.net/manual/en/class.yaf-config-abstract.php
*/
abstract class Yaf_Config_Abstract
abstract class Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
/**
* @var array
@ -1278,6 +1298,18 @@ abstract class Yaf_Config_Abstract
*/
abstract public function set($name, $value);
public function count() {}
public function rewind() {}
public function current() {}
public function key() {}
public function next() {}
public function valid() {}
/**
* @link https://secure.php.net/manual/en/yaf-config-abstract.readonly.php
*
@ -1291,6 +1323,18 @@ abstract class Yaf_Config_Abstract
* @return array
*/
abstract public function toArray();
public function offsetSet($name, $value) {}
public function offsetUnset($name) {}
public function offsetExists($name) {}
public function offsetGet($name = '') {}
public function __get($name = '') {}
public function __isset($name) {}
}
/**
@ -1352,6 +1396,14 @@ abstract class Yaf_Request_Abstract
*/
public function isGet() {}
public function isDelete() {}
public function isPatch() {}
public function getRaw() {}
public function clearParams() {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.ispost.php
*
@ -1392,14 +1444,14 @@ abstract class Yaf_Request_Abstract
*
* @return bool
*/
public function isDispatched() {}
final public function isDispatched() {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.isrouted.php
*
* @return bool
*/
public function isRouted() {}
final public function isRouted() {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.isxmlhttprequest.php
@ -1440,7 +1492,7 @@ abstract class Yaf_Request_Abstract
*
* @return mixed
*/
public function getParam($name, $default = null) {}
public function getParam($name = '', $default = '') {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.getparams.php
@ -1494,7 +1546,7 @@ abstract class Yaf_Request_Abstract
*
* @return Yaf_Request_Abstract|bool
*/
public function setModuleName($module) {}
public function setModuleName($module, $format_name = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.setcontrollername.php
@ -1503,7 +1555,7 @@ abstract class Yaf_Request_Abstract
*
* @return Yaf_Request_Abstract|bool
*/
public function setControllerName($controller) {}
public function setControllerName($controller, $format_name = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.setactionname.php
@ -1512,7 +1564,7 @@ abstract class Yaf_Request_Abstract
*
* @return Yaf_Request_Abstract|bool
*/
public function setActionName($action) {}
public function setActionName($action, $format_name = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-request-abstract.getmethod.php
@ -1557,10 +1609,10 @@ abstract class Yaf_Request_Abstract
public function getRequestUri() {}
/**
* @since 2.1.0
* @param string $uri request URI
* @link https://secure.php.net/manual/en/yaf-request-abstract.setrequesturi.php
*
* @param string $uri request URI
* @since 2.1.0
*/
public function setRequestUri($uri) {}
@ -1571,7 +1623,7 @@ abstract class Yaf_Request_Abstract
*
* @return bool
*/
public function setDispatched() {}
final public function setDispatched($dispatched = null) {}
/**
* Set request as routed
@ -1580,7 +1632,19 @@ abstract class Yaf_Request_Abstract
*
* @return Yaf_Request_Abstract|bool
*/
public function setRouted() {}
final public function setRouted($flag = null) {}
public function get($name = null, $default = null) {}
public function getFiles($name = null, $default = null) {}
public function getCookie($name = null, $default = null) {}
public function getPost($name = null, $default = null) {}
public function getRequest($name = null, $default = null) {}
public function getQuery($name = null, $default = null) {}
}
/**
@ -1723,84 +1787,84 @@ abstract class Yaf_Response_Abstract
*
* @param string $name header name
* @param string $value header value
* @param bool $replace
* @param bool $rep
*
* @return bool
*/
public function setHeader($name, $value, $replace = false) {}
public function setHeader($name, $value, $rep = false) {}
/**
* Set content to response
*
* @link https://secure.php.net/manual/en/yaf-response-abstract.setbody.php
*
* @param string $content content string
* @param string $key <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* @param string $body content string
* @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* <br/>
* <b>Note:</b>
* <p>this parameter is introduced as of 2.2.0</p>
*
* @return bool
*/
public function setBody($content, $key = self::DEFAULT_BODY) {}
public function setBody($body, $name = self::DEFAULT_BODY) {}
/**
* append a content to a exists content block
*
* @link https://secure.php.net/manual/en/yaf-response-abstract.appendbody.php
*
* @param string $content content string
* @param string $key <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* @param string $body content string
* @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* <br/>
* <b>Note:</b>
* <p>this parameter is introduced as of 2.2.0</p>
*
* @return bool
*/
public function appendBody($content, $key = self::DEFAULT_BODY) {}
public function appendBody($body, $name = self::DEFAULT_BODY) {}
/**
* prepend a content to a exists content block
*
* @link https://secure.php.net/manual/en/yaf-response-abstract.prependbody.php
*
* @param string $content content string
* @param string $key <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* @param string $body content string
* @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* <br/>
* <b>Note:</b>
* <p>this parameter is introduced as of 2.2.0</p>
*
* @return bool
*/
public function prependBody($content, $key = self::DEFAULT_BODY) {}
public function prependBody($body, $name = self::DEFAULT_BODY) {}
/**
* Clear existing content
*
* @link https://secure.php.net/manual/en/yaf-response-abstract.clearbody.php
*
* @param string $key <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* @param string $name <p>the content key, you can set a content with a key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used</p>
* <br/>
* <b>Note:</b>
* <p>this parameter is introduced as of 2.2.0</p>
*
* @return bool
*/
public function clearBody($key = self::DEFAULT_BODY) {}
public function clearBody($name = self::DEFAULT_BODY) {}
/**
* Retrieve an existing content
*
* @link https://secure.php.net/manual/en/yaf-response-abstract.getbody.php
*
* @param string|null $key <p>the content key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used. if you pass in a NULL, then all contents will be returned as a array</p>
* @param string|null $name <p>the content key, if you don't specific, then Yaf_Response_Abstract::DEFAULT_BODY will be used. if you pass in a NULL, then all contents will be returned as a array</p>
* <br/>
* <b>Note:</b>
* <p>this parameter is introduced as of 2.2.0</p>
*
* @return mixed
*/
public function getBody($key = self::DEFAULT_BODY) {}
public function getBody($name = self::DEFAULT_BODY) {}
}
/**
@ -1819,7 +1883,7 @@ interface Yaf_View_Interface
* @param string $value
* @return bool
*/
public function assign($name, $value);
public function assign($name, $value = '');
/**
* Render a template and output the result immediately.
@ -1837,7 +1901,7 @@ interface Yaf_View_Interface
*
* @return string
*/
public function getScriptPath();
public function getScriptPath($request = null);
/**
* Render a template and return the result.
@ -1897,7 +1961,12 @@ interface Yaf_Route_Interface
/**
* @link https://secure.php.net/manual/en/class.yaf-exception.php
*/
class Yaf_Exception extends Exception {}
class Yaf_Exception extends Exception
{
protected $message;
protected $code;
protected $previous;
}
class Yaf_Response_Http extends Yaf_Response_Abstract
{
@ -1911,19 +1980,19 @@ class Yaf_Response_Http extends Yaf_Response_Abstract
/**
* @return string
*/
private function __toString() {}
public function __toString() {}
/**
* @link https://secure.php.net/manual/en/yaf-response-abstract.setheader.php
*
* @param string $name
* @param string $value
* @param bool $replace
* @param bool $rep
* @param int $response_code
*
* @return bool
*/
public function setHeader($name, $value, $replace = false, $response_code = 0) {}
public function setHeader($name, $value, $rep = false, $response_code = 0) {}
/**
* @link https://secure.php.net/manual/en/yaf-response-abstract.setallheaders.php
@ -1977,7 +2046,7 @@ class Yaf_Response_Cli extends Yaf_Response_Abstract
/**
* @return string
*/
private function __toString() {}
public function __toString() {}
}
/**
@ -2077,7 +2146,7 @@ class Yaf_Request_Http extends Yaf_Request_Abstract
* @param string $request_uri
* @param string $base_uri
*/
public function __construct($request_uri, $base_uri) {}
public function __construct($request_uri = '', $base_uri = '') {}
/**
* @link https://secure.php.net/manual/en/yaf-request-http.clone.php
@ -2183,7 +2252,7 @@ class Yaf_Request_Simple extends Yaf_Request_Abstract
*
* @throws Yaf_Exception_TypeError
*/
public function __construct($method, $controller, $action, $params = null) {}
public function __construct($method = '', $module = '', $controller = '', $action = '', $params = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-request-simple.clone.php
@ -2197,7 +2266,7 @@ class Yaf_Request_Simple extends Yaf_Request_Abstract
* <p>Yaf_Config_Ini utilizes the » parse_ini_file() PHP function. Please review this documentation to be aware of its specific behaviors, which propagate to Yaf_Config_Ini, such as how the special values of "TRUE", "FALSE", "yes", "no", and "NULL" are handled.</p>
* @link https://secure.php.net/manual/en/class.yaf-config-ini.php
*/
class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, Traversable, ArrayAccess, Countable
class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
/**
* @see Yaf_Config_Abstract::get
@ -2285,7 +2354,7 @@ class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, Traversabl
/**
* @see ArrayAccess::offsetGet
*/
public function offsetGet($name) {}
public function offsetGet($name = '') {}
/**
* @see ArrayAccess::offsetExists
@ -2301,7 +2370,7 @@ class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, Traversabl
/**
* @link https://secure.php.net/manual/en/class.yaf-config-simple.php
*/
class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, Traversable, ArrayAccess, Countable
class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable
{
/**
* @see Yaf_Config_Abstract::get
@ -2336,10 +2405,10 @@ class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, Travers
/**
* @link https://secure.php.net/manual/en/yaf-config-simple.construct.php
*
* @param array $array
* @param array $config
* @param bool $readonly
*/
public function __construct(array $array, $readonly = null) {}
public function __construct(array $config, $readonly = null) {}
/**
* @link https://secure.php.net/manual/en/yaf-config-simple.isset.php
@ -2401,15 +2470,6 @@ class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, Travers
/**
* <b>Yaf_View_Simple</b> is the built-in template engine in Yaf, it is a simple but fast template engine, and only support PHP script template.
* @link https://secure.php.net/manual/en/class.yaf-view-simple.php
*
* @method void|bool eval(string $tpl_str, array $vars = null) <p>Render a string template and return the result.</p>
*
* @link https://secure.php.net/manual/en/yaf-view-simple.eval.php
*
* @param string $tpl_str string template
* @param array $vars
*
* @return void|false return FALSE on failure
*/
class Yaf_View_Simple implements Yaf_View_Interface
{
@ -2518,7 +2578,7 @@ class Yaf_View_Simple implements Yaf_View_Interface
*
* @return string
*/
public function getScriptPath() {}
public function getScriptPath($request = null) {}
/**
* <p>Retrieve assigned variable</p>
@ -2544,6 +2604,17 @@ class Yaf_View_Simple implements Yaf_View_Interface
* @param mixed $value mixed value
*/
public function __set($name, $value = null) {}
/**
* <p>Render a string template and return the result.</p>
* @link https://secure.php.net/manual/en/yaf-view-simple.eval.php
* @param string $tpl_str string template
* @param array $vars
* @return void|false return FALSE on failure
*/
public function eval(string $tpl_str, array $vars = null) {}
public function get($name = '') {}
}
/**
@ -2559,12 +2630,11 @@ class Yaf_View_Simple implements Yaf_View_Interface
class Yaf_Route_Static implements Yaf_Route_Interface
{
/**
* @deprecated not_implemented
* @link https://secure.php.net/manual/en/yaf-route-static.match.php
*
* @param string $uri
*
* @return bool
* @deprecated not_implemented
* @link https://secure.php.net/manual/en/yaf-route-static.match.php
*/
public function match($uri) {}
@ -2744,6 +2814,8 @@ final class Yaf_Route_Rewrite extends Yaf_Router implements Yaf_Route_Interface
* @return bool
*/
public function assemble(array $info, array $query = null) {}
public function match($uri) {}
}
/**
@ -2810,6 +2882,8 @@ final class Yaf_Route_Regex extends Yaf_Router implements Yaf_Route_Interface
* @return bool
*/
public function assemble(array $info, array $query = null) {}
public function match($uri) {}
}
/**

View File

@ -5,7 +5,7 @@
* and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
* @link https://secure.php.net/manual/en/yar.constants.php
*/
define('YAR_VERSION', '2.0.5');
define('YAR_VERSION', '2.2.0');
define('YAR_CLIENT_PROTOCOL_HTTP', 1);
define('YAR_OPT_PACKAGER', 1);
define('YAR_OPT_TIMEOUT', 4);
@ -28,6 +28,7 @@ define('YAR_ERR_EXCEPTION', 64);
define('YAR_CLIENT_PROTOCOL_TCP', 2);
define('YAR_CLIENT_PROTOCOL_UNIX', 4);
define('YAR_OPT_RESOLVE', 32);
/**
* Class Yar_Server
* Date 2018/6/9 下午3:02
@ -46,7 +47,7 @@ class Yar_Server
* @param object $obj An Object, all public methods of its will be registered as RPC services.
* @link https://secure.php.net/manual/en/yar-server.construct.php
*/
final public function __construct($obj) {}
final public function __construct($obj, $protocol = null) {}
/**
* Start RPC Server
@ -84,12 +85,14 @@ class Yar_Client
* @param string $url Yar Server URL.
* @link https://secure.php.net/manual/en/yar-client.construct.php
*/
final public function __construct($url) {}
final public function __construct($url, $async = null) {}
public function call($method, $parameters) {}
/**
* Set calling contexts
*
* @param int $name it can be:
* @param int $type it can be:
* - YAR_OPT_PACKAGER,
* - YAR_OPT_PERSISTENT (Need server support),
* - YAR_OPT_TIMEOUT,
@ -99,14 +102,18 @@ class Yar_Client
* @return static|false Returns $this on success or FALSE on failure.
* @link https://secure.php.net/manual/en/yar-client.setopt.php
*/
public function setOpt($name, $value) {}
public function setOpt($type, $value) {}
public function getOpt($type) {}
}
class Yar_Concurrent_Client
{
public static $_callstack;
public static $_callback;
public static $_error_callback;
protected static $_callstack;
protected static $_callback;
protected static $_error_callback;
protected static $_start;
/**
* Register a concurrent call
@ -119,7 +126,7 @@ class Yar_Concurrent_Client
* @return int An unique id, can be used to identified which call it is.
* @link https://secure.php.net/manual/en/yar-concurrent-client.call.php
*/
public static function call($uri, $method, $parameters, callable $callback, callable $error_callback, array $options) {}
public static function call($uri, $method, $parameters, callable $callback = null, callable $error_callback, array $options) {}
/**
* Send all calls
@ -131,7 +138,7 @@ class Yar_Concurrent_Client
* @return bool
* @link https://secure.php.net/manual/en/yar-concurrent-client.loop.php
*/
public static function loop($callback, $error_callback) {}
public static function loop($callback = null, $error_callback = null) {}
/**
* Clean all registered calls
@ -176,3 +183,17 @@ class Yar_Client_Exception extends Exception
*/
public function getType() {}
}
class Yar_Server_Request_Exception extends Yar_Server_Exception {}
class Yar_Server_Protocol_Exception extends Yar_Server_Exception {}
class Yar_Server_Packager_Exception extends Yar_Server_Exception {}
class Yar_Server_Output_Exception extends Yar_Server_Exception {}
class Yar_Client_Transport_Exception extends Yar_Client_Exception {}
class Yar_Client_Packager_Exception extends Yar_Client_Exception {}
class Yar_Client_Protocol_Exception extends Yar_Client_Exception {}

View File

@ -1,6 +1,7 @@
<?php
// Start of zip v.1.14.0
use JetBrains\PhpStorm\Deprecated;
/**
* A file archive, compressed with Zip.
@ -13,7 +14,7 @@ class ZipArchive implements Countable
* @link https://php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const LIBZIP_VERSION = '1.5.1';
public const LIBZIP_VERSION = '1.7.3';
/**
* Create the archive if it does not exist.
@ -64,6 +65,14 @@ class ZipArchive implements Countable
*/
public const FL_UNCHANGED = 8;
public const FL_RECOMPRESS = 16;
public const FL_ENCRYPTED = 32;
public const FL_OVERWRITE = 8192;
public const FL_LOCAL = 256;
public const FL_CENTRAL = 512;
public const EM_TRAD_PKWARE = 1;
public const EM_UNKNOWN = 65535;
/**
* better of deflate or store.
* @link https://php.net/manual/en/zip.constants.php
@ -318,119 +327,119 @@ class ZipArchive implements Countable
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const RDONLY = 260;
public const RDONLY = 16;
/**
* Guess string encoding (is default)
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.0.8
*/
public const FL_ENC_GUESS = 261;
public const FL_ENC_GUESS = 0;
/**
* Get unmodified string
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.0.8
*/
public const FL_ENC_RAW = 262;
public const FL_ENC_RAW = 64;
/**
* Follow specification strictly
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.0.8
*/
public const FL_ENC_STRICT = 263;
public const FL_ENC_STRICT = 128;
/**
* String is UTF-8 encoded
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.0.8
*/
public const FL_ENC_UTF_8 = 264;
public const FL_ENC_UTF_8 = 2048;
/**
* String is CP437 encoded
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.0.8
*/
public const FL_ENC_CP437 = 265;
public const FL_ENC_CP437 = 4096;
/**
* LZMA2 algorithm
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const CM_LZMA2 = 266;
public const CM_LZMA2 = 33;
/**
* XZ algorithm
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const CM_XZ = 267;
public const CM_XZ = 95;
/**
* Encryption method not support
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_ENCRNOTSUPP = 268;
public const ER_ENCRNOTSUPP = 24;
/**
* Read-only archive
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_RDONLY = 269;
public const ER_RDONLY = 25;
/**
* No password provided
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_NOPASSWD = 270;
public const ER_NOPASSWD = 26;
/**
* Wrong password provided
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_WRONGPASSWD = 271;
public const ER_WRONGPASSWD = 27;
/**
* Operation not supported
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_OPNOTSUPP = 272;
public const ER_OPNOTSUPP = 28;
/**
* Resource still in use
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_INUSE = 273;
public const ER_INUSE = 29;
/**
* Tell error
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_TELL = 274;
public const ER_TELL = 30;
/**
* Compressed data invalid
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_COMPRESSED_DATA = 275;
public const ER_COMPRESSED_DATA = 31;
/**
* Operation cancelled
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.4.3
*/
public const ER_CANCELLED = 276;
public const ER_CANCELLED = 32;
/**
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
@ -556,7 +565,7 @@ class ZipArchive implements Countable
/**
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
*/
public const OPSYS_CPM = 20;
public const OPSYS_CPM = 9;
/**
* @link https://www.php.net/manual/en/zip.constants.php#ziparchive.constants.opsys.default
@ -705,26 +714,26 @@ class ZipArchive implements Countable
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
* Add a file to a ZIP archive using its contents
* @link https://php.net/manual/en/ziparchive.addfromstring.php
* @param string $localname <p>
* @param string $name <p>
* The name of the entry to create.
* </p>
* @param string $contents <p>
* @param string $content <p>
* The contents to use to create the entry. It is used in a binary
* safe mode.
* </p>
* @param int $flags [optional] Set how to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addFromString($localname, $contents, $flags) {}
public function addFromString($name, $content, $flags = 8192) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
* Adds a file to a ZIP archive from the given path
* @link https://php.net/manual/en/ziparchive.addfile.php
* @param string $filename <p>
* @param string $filepath <p>
* The path to the file to add.
* </p>
* @param string $localname [optional] <p>
* @param string $entryname [optional] <p>
* If supplied, this is the local name inside the ZIP archive that will override the <i>filename</i>.
* </p>
* @param int $start [optional] <p>
@ -736,7 +745,7 @@ class ZipArchive implements Countable
* @param int $flags [optional] Set how to manage name encoding (ZipArchive::FL_ENC_*) and entry replacement (ZipArchive::FL_OVERWRITE)
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addFile($filename, $localname = null, $start = 0, $length = 0, $flags) {}
public function addFile($filepath, $entryname = null, $start = 0, $length = 0, $flags = 8192) {}
/**
* (PHP 5 &gt;= 5.3.0, PECL zip &gt;= 1.9.0)<br/>
@ -788,12 +797,12 @@ class ZipArchive implements Countable
* @param int $index <p>
* Index of the entry to rename.
* </p>
* @param string $newname <p>
* @param string $new_name <p>
* New name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function renameIndex($index, $newname) {}
public function renameIndex($index, $new_name) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.5.0)<br/>
@ -802,12 +811,12 @@ class ZipArchive implements Countable
* @param string $name <p>
* Name of the entry to rename.
* </p>
* @param string $newname <p>
* @param string $new_name <p>
* New name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function renameName($name, $newname) {}
public function renameName($name, $new_name) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.4.0)<br/>
@ -864,23 +873,23 @@ class ZipArchive implements Countable
* Set the compression method of an entry defined by its index
* @link https://php.net/manual/en/ziparchive.setcompressionindex.php
* @param int $index Index of the entry.
* @param int $comp_method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
* @param int $comp_flags [optional] Compression flags. Currently unused.
* @param int $method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
* @param int $compflags [optional] Compression flags. Currently unused.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.0
*/
public function setCompressionIndex($index, $comp_method, $comp_flags = 0) {}
public function setCompressionIndex($index, $method, $compflags = 0) {}
/**
* Set the compression method of an entry defined by its name
* https://secure.php.net/manual/en/ziparchive.setcompressionname.php
* @param string $name Name of the entry.
* @param int $comp_method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
* @param int $comp_flags [optional] Compression flags. Currently unused.
* @param int $method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE.
* @param int $compflags [optional] Compression flags. Currently unused.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.0
*/
public function setCompressionName($name, $comp_method, $comp_flags = 0) {}
public function setCompressionName($name, $method, $compflags = 0) {}
/**
* Set the encryption method of an entry defined by its index
@ -1070,16 +1079,16 @@ class ZipArchive implements Countable
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
* Extract the archive contents
* @link https://php.net/manual/en/ziparchive.extractto.php
* @param string $destination <p>
* @param string $pathto <p>
* Location where to extract the files.
* </p>
* @param mixed $entries [optional] <p>
* @param mixed $files [optional] <p>
* The entries to extract. It accepts either a single entry name or
* an array of names.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function extractTo($destination, $entries = null) {}
public function extractTo($pathto, $files = null) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
@ -1088,7 +1097,7 @@ class ZipArchive implements Countable
* @param string $name <p>
* Name of the entry
* </p>
* @param int $length [optional] <p>
* @param int $len [optional] <p>
* The length to be read from the entry. If 0, then the
* entire entry is read.
* </p>
@ -1099,7 +1108,7 @@ class ZipArchive implements Countable
* </p>
* @return string|false the contents of the entry on success or <b>FALSE</b> on failure.
*/
public function getFromName($name, $length = 0, $flags = null) {}
public function getFromName($name, $len = 0, $flags = null) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.3.0)<br/>
@ -1108,7 +1117,7 @@ class ZipArchive implements Countable
* @param int $index <p>
* Index of the entry
* </p>
* @param int $length [optional] <p>
* @param int $len [optional] <p>
* The length to be read from the entry. If 0, then the
* entire entry is read.
* </p>
@ -1121,7 +1130,7 @@ class ZipArchive implements Countable
* </p>
* @return string|false the contents of the entry on success or <b>FALSE</b> on failure.
*/
public function getFromIndex($index, $length = 0, $flags = null) {}
public function getFromIndex($index, $len = 0, $flags = null) {}
/**
* (PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.1.0)<br/>
@ -1177,6 +1186,20 @@ class ZipArchive implements Countable
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function getExternalAttributesIndex($index, &$opsys, &$attr, $flags = null) {}
public static function isEncryptionMethodSupported($method, $enc = true) {}
public static function isCompressionMethodSupported($method, $enc = true) {}
public function registerCancelCallback($callback) {}
public function registerProgressCallback($rate, $callback) {}
public function setMtimeName($name, $timestamp, $flags = null) {}
public function setMtimeIndex($index, $timestamp, $flags = null) {}
public function replaceFile($filepath, $index, $start = null, $length = null, $flags = null) {}
}
/**
@ -1192,7 +1215,7 @@ class ZipArchive implements Countable
* exist or in case of other error.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_open($filename) {}
function zip_open(string $filename) {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1204,7 +1227,7 @@ function zip_open($filename) {}
* @return void No value is returned.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_close($zip) {}
function zip_close($zip): void {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1225,7 +1248,7 @@ function zip_read($zip) {}
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
* Open a directory entry for reading
* @link https://php.net/manual/en/function.zip-entry-open.php
* @param resource $zip <p>
* @param resource $zip_dp <p>
* A valid resource handle returned by <b>zip_open</b>.
* </p>
* @param resource $zip_entry <p>
@ -1248,19 +1271,20 @@ function zip_read($zip) {}
* reading or closing the directory entry.
* </p>
*/
function zip_entry_open($zip, $zip_entry, $mode = null) {}
#[Deprecated]
function zip_entry_open($zip_dp, $zip_entry, string $mode = 'rb'): bool {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
* Close a directory entry
* @link https://php.net/manual/en/function.zip-entry-close.php
* @param resource $zip_entry <p>
* @param resource $zip_ent <p>
* A directory entry previously opened <b>zip_entry_open</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_close($zip_entry) {}
function zip_entry_close($zip_ent): bool {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1269,7 +1293,7 @@ function zip_entry_close($zip_entry) {}
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @param int $length [optional] <p>
* @param int $len [optional] <p>
* The number of bytes to return.
* </p>
* <p>
@ -1278,7 +1302,7 @@ function zip_entry_close($zip_entry) {}
* @return string|false the data read, empty string on end of a file, or <b>FALSE</b> on error.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_read($zip_entry, $length = 1024) {}
function zip_entry_read($zip_entry, int $len = 1024): string|false {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1287,10 +1311,10 @@ function zip_entry_read($zip_entry, $length = 1024) {}
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @return int The size of the directory entry.
* @return int|false The size of the directory entry.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_filesize($zip_entry) {}
function zip_entry_filesize($zip_entry): int|false {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1299,10 +1323,10 @@ function zip_entry_filesize($zip_entry) {}
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @return string The name of the directory entry.
* @return string|false The name of the directory entry.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_name($zip_entry) {}
function zip_entry_name($zip_entry): string|false {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1311,10 +1335,10 @@ function zip_entry_name($zip_entry) {}
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @return int The compressed size.
* @return int|false The compressed size.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_compressedsize($zip_entry) {}
function zip_entry_compressedsize($zip_entry): int|false {}
/**
* (PHP 4 &gt;= 4.1.0, PHP 5 &gt;= 5.2.0, PECL zip &gt;= 1.0.0)<br/>
@ -1323,9 +1347,9 @@ function zip_entry_compressedsize($zip_entry) {}
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @return string The compression method.
* @return string|false The compression method.
* @deprecated 8.0 Use {@link ZipArchive} instead.
*/
function zip_entry_compressionmethod($zip_entry) {}
function zip_entry_compressionmethod($zip_entry): string|false {}
// End of zip v.1.11.0