Update stubs to php 8.1 alpha2
This commit is contained in:
parent
2d00eb7410
commit
2cd87268ec
|
@ -13,7 +13,7 @@ jobs:
|
|||
run: docker-compose -f docker-compose.yml build >/dev/null
|
||||
|
||||
- name: Composer Install
|
||||
run: docker-compose -f docker-compose.yml run php composer install --ignore-platform-reqs -d /opt/project/phpstorm-stubs
|
||||
run: composer install --ignore-platform-reqs
|
||||
|
||||
- name: Run Tests
|
||||
run: docker-compose -f docker-compose.yml run php /opt/project/phpstorm-stubs/vendor/bin/phpunit /opt/project/phpstorm-stubs/tests/
|
||||
|
@ -22,4 +22,4 @@ jobs:
|
|||
run: ./tests/check-stub-map
|
||||
|
||||
- name: run cs fixer
|
||||
run: docker-compose -f docker-compose.yml run php composer cs -d /opt/project/phpstorm-stubs
|
||||
run: composer cs
|
||||
|
|
229
Core/Core_c.php
229
Core/Core_c.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of Core v.5.3.6-13ubuntu3.2
|
||||
use JetBrains\PhpStorm\ExpectedValues;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -252,8 +253,10 @@ class Exception implements Throwable
|
|||
/** The error code */
|
||||
protected $code;
|
||||
/** The filename where the error happened */
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
protected $file;
|
||||
/** The line where the error happened */
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
protected $line;
|
||||
|
||||
/**
|
||||
|
@ -262,7 +265,7 @@ class Exception implements Throwable
|
|||
* @link https://php.net/manual/en/exception.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
/**
|
||||
* Construct the exception. Note: The message is NOT binary safe.
|
||||
|
@ -356,8 +359,10 @@ class Error implements Throwable
|
|||
/** The error code */
|
||||
protected $code;
|
||||
/** The filename where the error happened */
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
protected $file;
|
||||
/** The line where the error happened */
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
protected $line;
|
||||
|
||||
/**
|
||||
|
@ -448,7 +453,7 @@ class Error implements Throwable
|
|||
* @return void
|
||||
* @link https://php.net/manual/en/error.clone.php
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
public function __wakeup() {}
|
||||
}
|
||||
|
@ -515,6 +520,7 @@ class UnhandledMatchError extends Error {}
|
|||
*/
|
||||
class ErrorException extends Exception
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
protected $severity;
|
||||
|
||||
/**
|
||||
|
@ -791,82 +797,6 @@ final class Attribute
|
|||
public function __construct(#[ExpectedValues(flagsFromClass: Attribute::class)] int $flags = self::TARGET_ALL) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* A class for working with PHP tokens, which is an alternative to
|
||||
* the {@see token_get_all()} function.
|
||||
*
|
||||
* @since 8.0
|
||||
*/
|
||||
class PhpToken implements Stringable
|
||||
{
|
||||
/**
|
||||
* One of the T_* constants, or an integer < 256 representing a
|
||||
* single-char token.
|
||||
*/
|
||||
public int $id;
|
||||
|
||||
/**
|
||||
* The textual content of the token.
|
||||
*/
|
||||
public string $text;
|
||||
|
||||
/**
|
||||
* The starting line number (1-based) of the token.
|
||||
*/
|
||||
public int $line;
|
||||
|
||||
/**
|
||||
* The starting position (0-based) in the tokenized string.
|
||||
*/
|
||||
public int $pos;
|
||||
|
||||
/**
|
||||
* @param int $id An integer identifier
|
||||
* @param string $text Textual content
|
||||
* @param int $line Strating line
|
||||
* @param int $pos Straring position (line offset)
|
||||
*/
|
||||
final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) {}
|
||||
|
||||
/**
|
||||
* Get the name of the token.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTokenName() {}
|
||||
|
||||
/**
|
||||
* Same as {@see token_get_all()}, but returning array of {@see PhpToken}
|
||||
* or an instance of a child class.
|
||||
*
|
||||
* @param string $code An a PHP source code
|
||||
* @param int $flags
|
||||
* @return static[]
|
||||
*/
|
||||
public static function tokenize(string $code, int $flags = 0) {}
|
||||
|
||||
/**
|
||||
* Whether the token has the given ID, the given text, or has an ID/text
|
||||
* part of the given array.
|
||||
*
|
||||
* @param int|string|array $kind
|
||||
* @return bool
|
||||
*/
|
||||
public function is($kind) {}
|
||||
|
||||
/**
|
||||
* Whether this token would be ignored by the PHP parser.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isIgnorable() {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
|
@ -894,7 +824,7 @@ interface UnitEnum
|
|||
/**
|
||||
* @return static[]
|
||||
*/
|
||||
public static function cases(): array;
|
||||
public static function cases();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -904,9 +834,17 @@ interface BackedEnum extends UnitEnum
|
|||
{
|
||||
public string $value;
|
||||
|
||||
public static function from(int|string $scalar): static;
|
||||
/**
|
||||
* @param int|string $value
|
||||
* @return static
|
||||
*/
|
||||
public static function from(int|string $value);
|
||||
|
||||
public static function tryFrom(int|string $scalar): ?static;
|
||||
/**
|
||||
* @param int|string $value
|
||||
* @return static|null
|
||||
*/
|
||||
public static function tryFrom(int|string $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -919,9 +857,17 @@ interface IntBackedEnum extends BackedEnum
|
|||
{
|
||||
public int $value;
|
||||
|
||||
public static function from(int $scalar): static;
|
||||
/**
|
||||
* @param int $value
|
||||
* @return static
|
||||
*/
|
||||
public static function from(int $value);
|
||||
|
||||
public static function tryFrom(int $scalar): ?static;
|
||||
/**
|
||||
* @param int $value
|
||||
* @return static|null
|
||||
*/
|
||||
public static function tryFrom(int $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -934,7 +880,120 @@ interface StringBackedEnum extends BackedEnum
|
|||
{
|
||||
public string $value;
|
||||
|
||||
public static function from(string $scalar): static;
|
||||
public static function from(string $value): static;
|
||||
|
||||
public static function tryFrom(string $scalar): ?static;
|
||||
public static function tryFrom(string $value): ?static;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
final class Fiber
|
||||
{
|
||||
/**
|
||||
* @param callable $callback Function to invoke when starting the fiber.
|
||||
*/
|
||||
public function __construct(callable $callback) {}
|
||||
|
||||
/**
|
||||
* Starts execution of the fiber. Returns when the fiber suspends or terminates.
|
||||
*
|
||||
* @param mixed ...$args Arguments passed to fiber function.
|
||||
*
|
||||
* @return mixed Value from the first suspension point or NULL if the fiber returns.
|
||||
*
|
||||
* @throw FiberError If the fiber has already been started.
|
||||
* @throw Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function start(mixed ...$args) {}
|
||||
|
||||
/**
|
||||
* Resumes the fiber, returning the given value from {@see Fiber::suspend()}.
|
||||
* Returns when the fiber suspends or terminates.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed Value from the next suspension point or NULL if the fiber returns.
|
||||
*
|
||||
* @throw FiberError If the fiber has not started, is running, or has terminated.
|
||||
* @throw Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function resume(mixed $value = null) {}
|
||||
|
||||
/**
|
||||
* Throws the given exception into the fiber from {@see Fiber::suspend()}.
|
||||
* Returns when the fiber suspends or terminates.
|
||||
*
|
||||
* @param Throwable $exception
|
||||
*
|
||||
* @return mixed Value from the next suspension point or NULL if the fiber returns.
|
||||
*
|
||||
* @throw FiberError If the fiber has not started, is running, or has terminated.
|
||||
* @throw Throwable If the fiber callable throws an uncaught exception.
|
||||
*/
|
||||
public function throw(Throwable $exception) {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber has been started.
|
||||
*/
|
||||
public function isStarted() {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber is suspended.
|
||||
*/
|
||||
public function isSuspended() {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber is currently running.
|
||||
*/
|
||||
public function isRunning() {}
|
||||
|
||||
/**
|
||||
* @return bool True if the fiber has completed execution (returned or threw).
|
||||
*/
|
||||
public function isTerminated() {}
|
||||
|
||||
/**
|
||||
* @return mixed Return value of the fiber callback. NULL is returned if the fiber does not have a return statement.
|
||||
*
|
||||
* @throws FiberError If the fiber has not terminated or the fiber threw an exception.
|
||||
*/
|
||||
public function getReturn() {}
|
||||
|
||||
public static function getCurrent() {}
|
||||
|
||||
/**
|
||||
* @return self|null Returns the currently executing fiber instance or NULL if in {main}.
|
||||
*/
|
||||
public static function this() {}
|
||||
|
||||
/**
|
||||
* Suspend execution of the fiber. The fiber may be resumed with {@see Fiber::resume()} or {@see Fiber::throw()}.
|
||||
*
|
||||
* Cannot be called from {main}.
|
||||
*
|
||||
* @param mixed $value Value to return from {@see Fiber::resume()} or {@see Fiber::throw()}.
|
||||
*
|
||||
* @return mixed Value provided to {@see Fiber::resume()}.
|
||||
*
|
||||
* @throws FiberError Thrown if not within a fiber (i.e., if called from {main}).
|
||||
* @throws Throwable Exception provided to {@see Fiber::throw()}.
|
||||
*/
|
||||
public static function suspend(mixed $value = null) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
final class FiberError extends Error
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
final class ReturnTypeWillChange
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM php:8.0.7-alpine
|
||||
FROM php:8.1.0alpha2-alpine
|
||||
RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
|
@ -13,8 +13,8 @@ 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
|
||||
|
||||
RUN pecl install xdebug
|
||||
RUN docker-php-ext-enable xdebug
|
||||
#RUN pecl install xdebug
|
||||
#RUN docker-php-ext-enable xdebug
|
||||
#TODO: Uncomment below after php 8 released
|
||||
#RUN pecl install xmlrpc
|
||||
#RUN docker-php-ext-enable xmlrpc
|
||||
|
@ -45,8 +45,8 @@ RUN pecl install zip
|
|||
RUN docker-php-ext-enable zip
|
||||
RUN pecl install mongodb
|
||||
RUN docker-php-ext-enable mongodb
|
||||
RUN pecl install rdkafka
|
||||
RUN docker-php-ext-enable rdkafka
|
||||
#RUN pecl install rdkafka
|
||||
#RUN docker-php-ext-enable rdkafka
|
||||
RUN pecl install yaf
|
||||
RUN docker-php-ext-enable yaf
|
||||
RUN pecl install yar
|
||||
|
|
26
PDO/PDO.php
26
PDO/PDO.php
|
@ -3,6 +3,7 @@
|
|||
// Start of PDO v.1.0.4dev
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
|
@ -14,6 +15,7 @@ use JetBrains\PhpStorm\Pure;
|
|||
*/
|
||||
class PDOException extends RuntimeException
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => '?array'], default: '')]
|
||||
public $errorInfo;
|
||||
}
|
||||
|
||||
|
@ -27,7 +29,7 @@ class PDO
|
|||
* Represents a boolean data type.
|
||||
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-bool
|
||||
*/
|
||||
public const PARAM_BOOL = 5;
|
||||
public const PARAM_BOOL = 1;
|
||||
|
||||
/**
|
||||
* Represents the SQL NULL data type.
|
||||
|
@ -39,13 +41,13 @@ class PDO
|
|||
* Represents the SQL INTEGER data type.
|
||||
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-int
|
||||
*/
|
||||
public const PARAM_INT = 1;
|
||||
public const PARAM_INT = 2;
|
||||
|
||||
/**
|
||||
* Represents the SQL CHAR, VARCHAR, or other string data type.
|
||||
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str
|
||||
*/
|
||||
public const PARAM_STR = 2;
|
||||
public const PARAM_STR = 3;
|
||||
|
||||
/**
|
||||
* Flag to denote a string uses the national character set.
|
||||
|
@ -99,13 +101,13 @@ class PDO
|
|||
* Represents the SQL large object data type.
|
||||
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-lob
|
||||
*/
|
||||
public const PARAM_LOB = 3;
|
||||
public const PARAM_LOB = 4;
|
||||
|
||||
/**
|
||||
* Represents a recordset type. Not currently supported by any drivers.
|
||||
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-stmt
|
||||
*/
|
||||
public const PARAM_STMT = 4;
|
||||
public const PARAM_STMT = 5;
|
||||
|
||||
/**
|
||||
* Specifies that the parameter is an INOUT parameter for a stored
|
||||
|
@ -753,6 +755,11 @@ class PDO
|
|||
*/
|
||||
public const MYSQL_ATTR_SSL_VERIFY_SERVER_CERT = 1014;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
public const MYSQL_ATTR_LOCAL_INFILE_DIRECTORY = 1015;
|
||||
|
||||
#[Deprecated("Use PDO::ATTR_EMULATE_PREPARES instead")]
|
||||
public const PGSQL_ASSOC = 1;
|
||||
public const PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = 1000;
|
||||
|
@ -1259,6 +1266,7 @@ class PDOStatement implements IteratorAggregate
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $queryString;
|
||||
|
||||
/**
|
||||
|
@ -1371,7 +1379,7 @@ class PDOStatement implements IteratorAggregate
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
public function bindColumn($column, &$var, $type = 2, $maxLength = null, $driverOptions = null) {}
|
||||
public function bindColumn($column, &$var, $type = PDO::PARAM_STR, $maxLength = null, $driverOptions = null) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)<br/>
|
||||
|
@ -1682,7 +1690,11 @@ class PDOStatement implements IteratorAggregate
|
|||
public function getIterator() {}
|
||||
}
|
||||
|
||||
final class PDORow {}
|
||||
final class PDORow
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $queryString;
|
||||
}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.3, PHP 7, PECL pdo >= 1.0.3)<br/>
|
||||
|
|
|
@ -45,6 +45,7 @@ const CLASSES = array (
|
|||
'BlackfireProbe' => 'blackfire/blackfire.php',
|
||||
'COM' => 'com_dotnet/com_dotnet.php',
|
||||
'CURLFile' => 'curl/curl.php',
|
||||
'CURLStringFile' => 'curl/CURLStringFile.php',
|
||||
'CachingIterator' => 'SPL/SPL.php',
|
||||
'CallbackFilterIterator' => 'SPL/SPL.php',
|
||||
'Cassandra' => 'cassandra/cassandra.php',
|
||||
|
@ -319,6 +320,9 @@ const CLASSES = array (
|
|||
'FFI\\CType' => 'FFI/FFI.php',
|
||||
'FFI\\Exception' => 'FFI/FFI.php',
|
||||
'FFI\\ParserException' => 'FFI/FFI.php',
|
||||
'FTP\\Connection' => 'ftp/Connection.php',
|
||||
'Fiber' => 'Core/Core_c.php',
|
||||
'FiberError' => 'Core/Core_c.php',
|
||||
'FilesystemIterator' => 'SPL/SPL_c1.php',
|
||||
'FilterIterator' => 'SPL/SPL.php',
|
||||
'GEOSGeometry' => 'geos/geos.php',
|
||||
|
@ -327,6 +331,7 @@ const CLASSES = array (
|
|||
'GEOSWKTReader' => 'geos/geos.php',
|
||||
'GEOSWKTWriter' => 'geos/geos.php',
|
||||
'GMP' => 'gmp/gmp.php',
|
||||
'GdFont' => 'gd/GdFont.php',
|
||||
'GdImage' => 'gd/gd.php',
|
||||
'GearmanClient' => 'gearman/gearman.php',
|
||||
'GearmanException' => 'gearman/gearman.php',
|
||||
|
@ -371,6 +376,7 @@ const CLASSES = array (
|
|||
'HttpSocketException' => 'http/http.php',
|
||||
'HttpUrlException' => 'http/http.php',
|
||||
'HttpUtil' => 'http/http.php',
|
||||
'IMAP\\Connection' => 'imap/Connection.php',
|
||||
'Imagick' => 'imagick/imagick.php',
|
||||
'ImagickDraw' => 'imagick/imagick.php',
|
||||
'ImagickDrawException' => 'imagick/imagick.php',
|
||||
|
@ -390,6 +396,7 @@ const CLASSES = array (
|
|||
'IntlChar' => 'intl/IntlChar.php',
|
||||
'IntlCodePointBreakIterator' => 'intl/intl.php',
|
||||
'IntlDateFormatter' => 'intl/intl.php',
|
||||
'IntlDatePatternGenerator' => 'intl/IntlDatePatternGenerator.php',
|
||||
'IntlException' => 'intl/intl.php',
|
||||
'IntlGregorianCalendar' => 'intl/intl.php',
|
||||
'IntlIterator' => 'intl/intl.php',
|
||||
|
@ -405,6 +412,9 @@ const CLASSES = array (
|
|||
'JsonIncrementalParser' => 'json/json.php',
|
||||
'JsonSerializable' => 'json/json.php',
|
||||
'Judy' => 'judy/judy.php',
|
||||
'LDAP\\Connection' => 'ldap/Connection.php',
|
||||
'LDAP\\Result' => 'ldap/Result.php',
|
||||
'LDAP\\ResultEntry' => 'ldap/ResultEntry.php',
|
||||
'LengthException' => 'SPL/SPL.php',
|
||||
'LevelDB' => 'leveldb/LevelDB.php',
|
||||
'LevelDBException' => 'leveldb/LevelDB.php',
|
||||
|
@ -570,7 +580,7 @@ const CLASSES = array (
|
|||
'PharData' => 'Phar/Phar.php',
|
||||
'PharException' => 'Phar/Phar.php',
|
||||
'PharFileInfo' => 'Phar/Phar.php',
|
||||
'PhpToken' => 'Core/Core_c.php',
|
||||
'PhpToken' => 'tokenizer/PhpToken.php',
|
||||
'Pool' => 'pthreads/pthreads.php',
|
||||
'RRDCreator' => 'rrd/rrd.php',
|
||||
'RRDGraph' => 'rrd/rrd.php',
|
||||
|
@ -624,6 +634,7 @@ const CLASSES = array (
|
|||
'ReflectionEnumUnitCase' => 'Reflection/ReflectionEnumUnitCase.php',
|
||||
'ReflectionException' => 'Reflection/ReflectionException.php',
|
||||
'ReflectionExtension' => 'Reflection/ReflectionExtension.php',
|
||||
'ReflectionFiber' => 'Reflection/ReflectionFiber.php',
|
||||
'ReflectionFunction' => 'Reflection/ReflectionFunction.php',
|
||||
'ReflectionFunctionAbstract' => 'Reflection/ReflectionFunctionAbstract.php',
|
||||
'ReflectionGenerator' => 'Reflection/ReflectionGenerator.php',
|
||||
|
@ -639,6 +650,7 @@ const CLASSES = array (
|
|||
'Reflector' => 'Reflection/Reflector.php',
|
||||
'RegexIterator' => 'SPL/SPL.php',
|
||||
'ResourceBundle' => 'intl/intl.php',
|
||||
'ReturnTypeWillChange' => 'Core/Core_c.php',
|
||||
'RuntimeException' => 'SPL/SPL.php',
|
||||
'SNMP' => 'snmp/snmp.php',
|
||||
'SNMPException' => 'snmp/snmp.php',
|
||||
|
@ -3646,6 +3658,7 @@ const FUNCTIONS = array (
|
|||
'mysqli_fetch_all' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_array' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_assoc' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_column' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_field' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_field_direct' => 'mysqli/mysqli.php',
|
||||
'mysqli_fetch_fields' => 'mysqli/mysqli.php',
|
||||
|
@ -4726,6 +4739,19 @@ const FUNCTIONS = array (
|
|||
'sodium_crypto_box_seal_open' => 'sodium/sodium.php',
|
||||
'sodium_crypto_box_secretkey' => 'sodium/sodium.php',
|
||||
'sodium_crypto_box_seed_keypair' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_add' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_from_hash' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_is_valid_point' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_random' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_add' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_complement' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_invert' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_mul' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_negate' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_random' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_reduce' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_scalar_sub' => 'sodium/sodium.php',
|
||||
'sodium_crypto_core_ristretto255_sub' => 'sodium/sodium.php',
|
||||
'sodium_crypto_generichash' => 'sodium/sodium.php',
|
||||
'sodium_crypto_generichash_final' => 'sodium/sodium.php',
|
||||
'sodium_crypto_generichash_init' => 'sodium/sodium.php',
|
||||
|
@ -4749,6 +4775,8 @@ const FUNCTIONS = array (
|
|||
'sodium_crypto_pwhash_str_verify' => 'sodium/sodium.php',
|
||||
'sodium_crypto_scalarmult' => 'sodium/sodium.php',
|
||||
'sodium_crypto_scalarmult_base' => 'sodium/sodium.php',
|
||||
'sodium_crypto_scalarmult_ristretto255' => 'sodium/sodium.php',
|
||||
'sodium_crypto_scalarmult_ristretto255_base' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretbox' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretbox_keygen' => 'sodium/sodium.php',
|
||||
'sodium_crypto_secretbox_open' => 'sodium/sodium.php',
|
||||
|
@ -4774,6 +4802,9 @@ const FUNCTIONS = array (
|
|||
'sodium_crypto_sign_verify_detached' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream_keygen' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream_xchacha20' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream_xchacha20_keygen' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream_xchacha20_xor' => 'sodium/sodium.php',
|
||||
'sodium_crypto_stream_xor' => 'sodium/sodium.php',
|
||||
'sodium_hex2bin' => 'sodium/sodium.php',
|
||||
'sodium_increment' => 'sodium/sodium.php',
|
||||
|
@ -6308,6 +6339,7 @@ const CONSTANTS = array (
|
|||
'CURLOPT_DNS_SERVERS' => 'curl/curl_d.php',
|
||||
'CURLOPT_DNS_SHUFFLE_ADDRESSES' => 'curl/curl_d.php',
|
||||
'CURLOPT_DNS_USE_GLOBAL_CACHE' => 'curl/curl_d.php',
|
||||
'CURLOPT_DOH_URL' => 'curl/curl_d.php',
|
||||
'CURLOPT_EGDSOCKET' => 'curl/curl_d.php',
|
||||
'CURLOPT_ENCODING' => 'curl/curl_d.php',
|
||||
'CURLOPT_EXPECT_100_TIMEOUT_MS' => 'curl/curl_d.php',
|
||||
|
@ -7552,6 +7584,7 @@ const CONSTANTS = array (
|
|||
'IMG_ARC_NOFILL' => 'gd/gd.php',
|
||||
'IMG_ARC_PIE' => 'gd/gd.php',
|
||||
'IMG_ARC_ROUNDED' => 'gd/gd.php',
|
||||
'IMG_AVIF' => 'gd/gd.php',
|
||||
'IMG_BELL' => 'gd/gd.php',
|
||||
'IMG_BESSEL' => 'gd/gd.php',
|
||||
'IMG_BICUBIC' => 'gd/gd.php',
|
||||
|
@ -8004,6 +8037,9 @@ const CONSTANTS = array (
|
|||
'MHASH_MD2' => 'hash/hash.php',
|
||||
'MHASH_MD4' => 'hash/hash.php',
|
||||
'MHASH_MD5' => 'hash/hash.php',
|
||||
'MHASH_MURMUR3A' => 'hash/hash.php',
|
||||
'MHASH_MURMUR3C' => 'hash/hash.php',
|
||||
'MHASH_MURMUR3F' => 'hash/hash.php',
|
||||
'MHASH_RIPEMD128' => 'hash/hash.php',
|
||||
'MHASH_RIPEMD160' => 'hash/hash.php',
|
||||
'MHASH_RIPEMD256' => 'hash/hash.php',
|
||||
|
@ -8018,6 +8054,10 @@ const CONSTANTS = array (
|
|||
'MHASH_TIGER128' => 'hash/hash.php',
|
||||
'MHASH_TIGER160' => 'hash/hash.php',
|
||||
'MHASH_WHIRLPOOL' => 'hash/hash.php',
|
||||
'MHASH_XXH128' => 'hash/hash.php',
|
||||
'MHASH_XXH3' => 'hash/hash.php',
|
||||
'MHASH_XXH32' => 'hash/hash.php',
|
||||
'MHASH_XXH64' => 'hash/hash.php',
|
||||
'MING_NEW' => 'ming/ming.php',
|
||||
'MING_ZLIB' => 'ming/ming.php',
|
||||
'MK_E_UNAVAILABLE' => 'com_dotnet/com_dotnet.php',
|
||||
|
@ -9550,6 +9590,7 @@ const CONSTANTS = array (
|
|||
'MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_CONNECT_TIMEOUT' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_INT_AND_FLOAT_NATIVE' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_LOAD_DATA_LOCAL_DIR' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_LOCAL_INFILE' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_NET_CMD_BUFFER_SIZE' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_OPT_NET_READ_BUFFER_SIZE' => 'mysqli/mysqli.php',
|
||||
|
@ -9564,6 +9605,7 @@ const CONSTANTS = array (
|
|||
'MYSQLI_REFRESH_HOSTS' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_LOG' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_MASTER' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_REPLICA' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_SLAVE' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_STATUS' => 'mysqli/mysqli.php',
|
||||
'MYSQLI_REFRESH_TABLES' => 'mysqli/mysqli.php',
|
||||
|
@ -11164,6 +11206,10 @@ const CONSTANTS = array (
|
|||
'SODIUM_CRYPTO_BOX_SEALBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_BOX_SECRETKEYBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_BOX_SEEDBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_GENERICHASH_BYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_GENERICHASH_BYTES_MAX' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_GENERICHASH_BYTES_MIN' => 'sodium/sodium.php',
|
||||
|
@ -11198,6 +11244,8 @@ const CONSTANTS = array (
|
|||
'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_PWHASH_STRPREFIX' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SCALARMULT_BYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SCALARMULT_SCALARBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SECRETBOX_KEYBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_SECRETBOX_MACBYTES' => 'sodium/sodium.php',
|
||||
|
@ -11219,6 +11267,8 @@ const CONSTANTS = array (
|
|||
'SODIUM_CRYPTO_SIGN_SEEDBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_STREAM_KEYBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_STREAM_NONCEBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES' => 'sodium/sodium.php',
|
||||
'SODIUM_LIBRARY_MAJOR_VERSION' => 'sodium/sodium.php',
|
||||
'SODIUM_LIBRARY_MINOR_VERSION' => 'sodium/sodium.php',
|
||||
'SODIUM_LIBRARY_VERSION' => 'sodium/sodium.php',
|
||||
|
@ -11756,6 +11806,7 @@ const CONSTANTS = array (
|
|||
'Sodium\\CRYPTO_STREAM_NONCEBYTES' => 'libsodium/libsodium.php',
|
||||
'Spinner' => 'winbinder/winbinder.php',
|
||||
'StatusBar' => 'winbinder/winbinder.php',
|
||||
'TCP_DEFER_ACCEPT' => 'sockets/sockets.php',
|
||||
'TCP_NODELAY' => 'sockets/sockets.php',
|
||||
'THOUSEP' => 'standard/standard_defines.php',
|
||||
'TIDY_NODETYPE_ASP' => 'tidy/tidy.php',
|
||||
|
@ -11982,6 +12033,7 @@ const CONSTANTS = array (
|
|||
'T_ENDSWITCH' => 'tokenizer/tokenizer.php',
|
||||
'T_ENDWHILE' => 'tokenizer/tokenizer.php',
|
||||
'T_END_HEREDOC' => 'tokenizer/tokenizer.php',
|
||||
'T_ENUM' => 'tokenizer/tokenizer.php',
|
||||
'T_EVAL' => 'tokenizer/tokenizer.php',
|
||||
'T_EXIT' => 'tokenizer/tokenizer.php',
|
||||
'T_EXTENDS' => 'tokenizer/tokenizer.php',
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -15,6 +17,7 @@ class ReflectionClass implements Reflector
|
|||
* @var string Name of the class, same as calling the {@see ReflectionClass::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -599,5 +602,8 @@ class ReflectionClass implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionclass.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function isEnum() {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -16,12 +18,14 @@ class ReflectionClassConstant implements Reflector
|
|||
* @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string Fully qualified class name where this constant was defined
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $class;
|
||||
|
||||
/**
|
||||
|
@ -174,5 +178,8 @@ class ReflectionClassConstant implements Reflector
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function isEnumCase() {}
|
||||
}
|
||||
|
|
|
@ -6,19 +6,32 @@
|
|||
*/
|
||||
class ReflectionEnum extends ReflectionClass
|
||||
{
|
||||
public function hasCase(string $name): bool {}
|
||||
public function __construct(object|string $objectOrClass) {}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function hasCase(string $name) {}
|
||||
|
||||
/**
|
||||
* @return ReflectionEnumPureCase[]|ReflectionEnumBackedCase[]
|
||||
*/
|
||||
public function getCases(): array {}
|
||||
public function getCases() {}
|
||||
|
||||
/**
|
||||
* @throws ReflectionException If no found single reflection object for the corresponding case
|
||||
* @return ReflectionEnumPureCase|ReflectionEnumBackedCase
|
||||
*/
|
||||
public function getCase(string $name): ReflectionEnumPureCase|ReflectionEnumBackedCase {}
|
||||
public function getCase(string $name) {}
|
||||
|
||||
public function isBacked(): bool {}
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isBacked() {}
|
||||
|
||||
public function getBackingType(): ?ReflectionType {}
|
||||
/**
|
||||
* @return ReflectionType|null
|
||||
*/
|
||||
public function getBackingType() {}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,10 @@
|
|||
*/
|
||||
class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
|
||||
{
|
||||
public function getBackingValue(): int|string {}
|
||||
public function __construct(object|string $class, string $constant) {}
|
||||
|
||||
/**
|
||||
* @return int|string
|
||||
*/
|
||||
public function getBackingValue() {}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
*/
|
||||
class ReflectionEnumUnitCase extends ReflectionClassConstant
|
||||
{
|
||||
public function __construct(object|string $class, string $constant) {}
|
||||
|
||||
public function getValue() {}
|
||||
|
||||
public function getEnum(): ReflectionEnum {}
|
||||
/**
|
||||
* @return ReflectionEnum
|
||||
*/
|
||||
public function getEnum() {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -15,6 +16,7 @@ class ReflectionExtension implements Reflector
|
|||
* @var string Name of the extension, same as calling the {@see ReflectionExtension::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -164,5 +166,5 @@ class ReflectionExtension implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionextension.clone.php
|
||||
* @return void No value is returned, if called a fatal error will occur.
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
final class ReflectionFiber
|
||||
{
|
||||
public function __construct(Fiber $fiber) {}
|
||||
|
||||
/**
|
||||
* @return Fiber
|
||||
*/
|
||||
public function getFiber() {}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExecutingFile() {}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getExecutingLine() {}
|
||||
|
||||
/**
|
||||
* @return callable
|
||||
*/
|
||||
public function getCallable() {}
|
||||
|
||||
/**
|
||||
* @param int $options
|
||||
* @return array
|
||||
*/
|
||||
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) {}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -16,6 +17,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @var string Name of the function, same as calling the {@see ReflectionFunctionAbstract::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +26,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
/**
|
||||
* Checks if function in namespace
|
||||
|
@ -271,4 +273,13 @@ abstract class ReflectionFunctionAbstract implements Reflector
|
|||
*/
|
||||
#[Pure]
|
||||
public function getAttributes(?string $name = null, int $flags = 0) {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function getClosureUsedVariables() {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function hasTentativeReturnType() {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function getTentativeReturnType() {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -22,6 +23,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract
|
|||
* @var string Fully qualified class name where this method was defined
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $class;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,7 @@ class ReflectionParameter implements Reflector
|
|||
* @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -264,5 +265,5 @@ class ReflectionParameter implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionparameter.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
}
|
||||
|
|
|
@ -17,12 +17,14 @@ class ReflectionProperty implements Reflector
|
|||
* @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string Fully qualified class name where this property was defined
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $class;
|
||||
|
||||
/**
|
||||
|
@ -250,7 +252,7 @@ class ReflectionProperty implements Reflector
|
|||
* @link https://php.net/manual/en/reflectionproperty.clone.php
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
|
|
|
@ -48,5 +48,5 @@ abstract class ReflectionType implements Stringable
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Immutable;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -13,6 +14,7 @@ class ReflectionZendExtension implements Reflector
|
|||
* @var string Name of the extension, same as calling the {@see ReflectionZendExtension::getName()} method
|
||||
*/
|
||||
#[Immutable]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -104,5 +106,5 @@ class ReflectionZendExtension implements Reflector
|
|||
* @return void
|
||||
* @since 5.4
|
||||
*/
|
||||
final private function __clone() {}
|
||||
private function __clone() {}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of SPL v.0.2
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
/**
|
||||
* Exception that represents error in the program logic. This kind of
|
||||
|
@ -1074,6 +1075,7 @@ class RegexIterator extends FilterIterator
|
|||
|
||||
public const INVERT_MATCH = 2;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $replacement;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of SPL v.0.2
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
* The SplFileInfo class offers a high-level object oriented interface to
|
||||
|
@ -362,12 +363,12 @@ class FilesystemIterator extends DirectoryIterator
|
|||
public const CURRENT_AS_SELF = 16;
|
||||
public const KEY_MODE_MASK = 3840;
|
||||
public const KEY_AS_PATHNAME = 0;
|
||||
public const FOLLOW_SYMLINKS = 512;
|
||||
public const FOLLOW_SYMLINKS = 16384;
|
||||
public const KEY_AS_FILENAME = 256;
|
||||
public const NEW_CURRENT_AND_KEY = 256;
|
||||
public const SKIP_DOTS = 4096;
|
||||
public const UNIX_PATHS = 8192;
|
||||
public const OTHER_MODE_MASK = 12288;
|
||||
public const OTHER_MODE_MASK = 28672;
|
||||
|
||||
/**
|
||||
* Constructs a new filesystem iterator
|
||||
|
@ -641,7 +642,13 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
|
|||
* @return int|false Returns the length of the written string or FALSE on failure.
|
||||
* @since 5.4
|
||||
*/
|
||||
public function fputcsv(array $fields, $separator = ',', $enclosure = '"', $escape = "\\") {}
|
||||
public function fputcsv(
|
||||
array $fields,
|
||||
$separator = ',',
|
||||
$enclosure = '"',
|
||||
$escape = "\\",
|
||||
#[PhpStormStubsElementAvailable('8.1')] $eol = PHP_EOL
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Set the delimiter and enclosure character for CSV
|
||||
|
@ -1584,7 +1591,7 @@ class SplPriorityQueue implements Iterator, Countable
|
|||
* implementation.
|
||||
* @link https://php.net/manual/en/class.splfixedarray.php
|
||||
*/
|
||||
class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate
|
||||
class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate, JsonSerializable
|
||||
{
|
||||
/**
|
||||
* Constructs a new fixed array
|
||||
|
@ -1722,6 +1729,8 @@ class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggrega
|
|||
* @return Traversable
|
||||
*/
|
||||
public function getIterator() {}
|
||||
|
||||
public function jsonSerialize() {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class CURLStringFile
|
||||
{
|
||||
public string $data;
|
||||
public string $mime;
|
||||
public string $postname;
|
||||
|
||||
public function __construct(string $data, string $postname, string $mime = 'application/octet-stream') {}
|
||||
}
|
|
@ -6,8 +6,11 @@ use JetBrains\PhpStorm\Pure;
|
|||
|
||||
class CURLFile
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $mime;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $postname;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3826,3 +3826,8 @@ define('CURLOPT_HTTP09_ALLOWED', 285);
|
|||
* @since 7.3.6
|
||||
*/
|
||||
define('CURL_VERSION_ALTSVC', 16777216);
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('CURLOPT_DOH_URL', 10279);
|
||||
|
|
134
dom/dom_c.php
134
dom/dom_c.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
//20120405 AG synced to official docs
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
/**
|
||||
* The DOMNode class
|
||||
|
@ -14,6 +15,7 @@ class DOMNode
|
|||
* Returns the most accurate name for the current node type
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodename
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $nodeName;
|
||||
|
||||
/**
|
||||
|
@ -21,6 +23,7 @@ class DOMNode
|
|||
* The value of this node, depending on its type
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodevalue
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $nodeValue;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +32,7 @@ class DOMNode
|
|||
* <a href="https://secure.php.net/manual/en/dom.constants.php">XML_xxx_NODE</a> constants
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodetype
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $nodeType;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +40,7 @@ class DOMNode
|
|||
* The parent of this node. If there is no such node, this returns NULL.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $parentNode;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +48,7 @@ class DOMNode
|
|||
* A <classname>DOMNodeList</classname> that contains all children of this node. If there are no children, this is an empty <classname>DOMNodeList</classname>.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.childnodes
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMNodeList'], default: '')]
|
||||
public $childNodes;
|
||||
|
||||
/**
|
||||
|
@ -50,6 +56,7 @@ class DOMNode
|
|||
* The first child of this node. If there is no such node, this returns NULL.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.firstchild
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $firstChild;
|
||||
|
||||
/**
|
||||
|
@ -57,6 +64,7 @@ class DOMNode
|
|||
* The last child of this node. If there is no such node, this returns NULL.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.lastchild
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $lastChild;
|
||||
|
||||
/**
|
||||
|
@ -64,6 +72,7 @@ class DOMNode
|
|||
* The node immediately preceding this node. If there is no such node, this returns NULL.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.previoussibling
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $previousSibling;
|
||||
|
||||
/**
|
||||
|
@ -71,6 +80,7 @@ class DOMNode
|
|||
* The node immediately following this node. If there is no such node, this returns NULL.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nextsibling
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $nextSibling;
|
||||
|
||||
/**
|
||||
|
@ -78,6 +88,7 @@ class DOMNode
|
|||
* A <classname>DOMNamedNodeMap</classname> containing the attributes of this node (if it is a <classname>DOMElement</classname>) or NULL otherwise.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.attributes
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNamedNodeMap'], default: '')]
|
||||
public $attributes;
|
||||
|
||||
/**
|
||||
|
@ -85,6 +96,7 @@ class DOMNode
|
|||
* The <classname>DOMDocument</classname> object associated with this node, or NULL if this node is a <classname>DOMDocument</classname>.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.ownerdocument
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMDocument'], default: '')]
|
||||
public $ownerDocument;
|
||||
|
||||
/**
|
||||
|
@ -92,6 +104,7 @@ class DOMNode
|
|||
* The namespace URI of this node, or NULL if it is unspecified.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.namespaceuri
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $namespaceURI;
|
||||
|
||||
/**
|
||||
|
@ -99,6 +112,7 @@ class DOMNode
|
|||
* The namespace prefix of this node, or NULL if it is unspecified.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.prefix
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $prefix;
|
||||
|
||||
/**
|
||||
|
@ -106,6 +120,7 @@ class DOMNode
|
|||
* Returns the local part of the qualified name of this node.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.localname
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $localName;
|
||||
|
||||
/**
|
||||
|
@ -113,6 +128,7 @@ class DOMNode
|
|||
* The absolute base URI of this node or NULL if the implementation wasn't able to obtain an absolute URI.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.baseuri
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $baseURI;
|
||||
|
||||
/**
|
||||
|
@ -120,6 +136,7 @@ class DOMNode
|
|||
* This attribute returns the text content of this node and its descendants.
|
||||
* @link https://php.net/manual/en/class.domnode.php#domnode.props.textcontent
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $textContent;
|
||||
|
||||
/**
|
||||
|
@ -472,7 +489,25 @@ class DOMImplementation
|
|||
public function createDocument($namespace = null, $qualifiedName = null, DOMDocumentType $doctype = null) {}
|
||||
}
|
||||
|
||||
class DOMNameSpaceNode {}
|
||||
class DOMNameSpaceNode
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMNode'], default: '')]
|
||||
public $parentNode;
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMDocument'], default: '')]
|
||||
public $ownerDocument;
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $namespaceURI;
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $localName;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $prefix;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $nodeType;
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $nodeValue;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $nodeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* The DOMDocumentFragment class
|
||||
|
@ -480,6 +515,15 @@ class DOMNameSpaceNode {}
|
|||
*/
|
||||
class DOMDocumentFragment extends DOMNode implements DOMParentNode
|
||||
{
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $childElementCount;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $lastElementChild;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $firstElementChild;
|
||||
|
||||
public function __construct() {}
|
||||
|
||||
/**
|
||||
|
@ -511,10 +555,11 @@ class DOMDocumentFragment extends DOMNode implements DOMParentNode
|
|||
class DOMDocument extends DOMNode implements DOMParentNode
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding
|
||||
*/
|
||||
#[Deprecated("Actual encoding of the document, is a readonly equivalent to encoding.")]
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $actualEncoding;
|
||||
|
||||
/**
|
||||
|
@ -523,6 +568,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @see DOMDocument::normalizeDocument()
|
||||
*/
|
||||
#[Deprecated("Configuration used when DOMDocument::normalizeDocument() is invoked.")]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $config;
|
||||
|
||||
/**
|
||||
|
@ -530,6 +576,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* The Document Type Declaration associated with this document.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.doctype
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMDocumentType'], default: '')]
|
||||
public $doctype;
|
||||
|
||||
/**
|
||||
|
@ -538,6 +585,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* that is the document element of the document.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documentelement
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $documentElement;
|
||||
|
||||
/**
|
||||
|
@ -545,15 +593,17 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* The location of the document or NULL if undefined.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documenturi
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $documentURI;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
* Encoding of the document, as specified by the XML declaration. This attribute is not present
|
||||
* in the final DOM Level 3 specification, but is the only way of manipulating XML document
|
||||
* encoding in this implementation.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.encoding
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $encoding;
|
||||
|
||||
/**
|
||||
|
@ -561,6 +611,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Nicely formats output with indentation and extra space.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $formatOutput;
|
||||
|
||||
/**
|
||||
|
@ -568,6 +619,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* The <classname>DOMImplementation</classname> object that handles this document.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.implementation
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMImplementation'], default: '')]
|
||||
public $implementation;
|
||||
|
||||
/**
|
||||
|
@ -575,6 +627,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Do not remove redundant white space. Default to TRUE.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.preservewhitespace
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $preserveWhiteSpace = true;
|
||||
|
||||
/**
|
||||
|
@ -583,6 +636,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* This attribute is not part of the DOM specification and is specific to libxml.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.recover
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $recover;
|
||||
|
||||
/**
|
||||
|
@ -591,6 +645,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* including character entities in your XML document.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $resolveExternals;
|
||||
|
||||
/**
|
||||
|
@ -598,6 +653,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.standalone
|
||||
*/
|
||||
#[Deprecated("Whether or not the document is standalone, as specified by the XML declaration, corresponds to xmlStandalone.")]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $standalone;
|
||||
|
||||
/**
|
||||
|
@ -605,6 +661,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Throws <classname>DOMException</classname> on errors. Default to TRUE.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.stricterrorchecking
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $strictErrorChecking = true;
|
||||
|
||||
/**
|
||||
|
@ -613,6 +670,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* specification and is specific to libxml.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.substituteentities
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $substituteEntities;
|
||||
|
||||
/**
|
||||
|
@ -620,6 +678,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* Loads and validates against the DTD. Default to FALSE.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.validateonparse
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $validateOnParse = false;
|
||||
|
||||
/**
|
||||
|
@ -627,14 +686,16 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.version
|
||||
*/
|
||||
#[Deprecated('Version of XML, corresponds to xmlVersion')]
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $version;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
* An attribute specifying, as part of the XML declaration, the encoding of this document. This is NULL when
|
||||
* unspecified or when it is not known, such as when the Document was created in memory.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlencoding
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $xmlEncoding;
|
||||
|
||||
/**
|
||||
|
@ -643,16 +704,27 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
|||
* This is FALSE when unspecified.
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $xmlStandalone;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var string|null
|
||||
* An attribute specifying, as part of the XML declaration, the version number of this document. If there is no
|
||||
* declaration and if this document supports the "XML" feature, the value is "1.0".
|
||||
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlversion
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $xmlVersion;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $childElementCount;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $lastElementChild;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $firstElementChild;
|
||||
|
||||
/**
|
||||
* Create new element node
|
||||
* @link https://php.net/manual/en/domdocument.createelement.php
|
||||
|
@ -1066,6 +1138,7 @@ class DOMNodeList implements IteratorAggregate, Countable
|
|||
* The number of nodes in the list. The range of valid child node indices is 0 to length - 1 inclusive.
|
||||
* @link https://php.net/manual/en/class.domnodelist.php#domnodelist.props.length
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $length;
|
||||
|
||||
/**
|
||||
|
@ -1183,6 +1256,7 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* The contents of the node.
|
||||
* @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.data
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $data;
|
||||
|
||||
/**
|
||||
|
@ -1190,8 +1264,15 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
|
|||
* The length of the contents.
|
||||
* @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.length
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $length;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $nextElementSibling;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $previousElementSibling;
|
||||
|
||||
/**
|
||||
* Extracts a range of data from the node
|
||||
* @link https://php.net/manual/en/domcharacterdata.substringdata.php
|
||||
|
@ -1296,6 +1377,7 @@ class DOMAttr extends DOMNode
|
|||
* The name of the attribute
|
||||
* @link https://php.net/manual/en/class.domattr.php#domattr.props.name
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -1304,6 +1386,7 @@ class DOMAttr extends DOMNode
|
|||
* The element which contains the attribute
|
||||
* @link https://php.net/manual/en/class.domattr.php#domattr.props.ownerelement
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $ownerElement;
|
||||
|
||||
/**
|
||||
|
@ -1312,6 +1395,7 @@ class DOMAttr extends DOMNode
|
|||
* Not implemented yet, always is NULL
|
||||
* @link https://php.net/manual/en/class.domattr.php#domattr.props.schematypeinfo
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $schemaTypeInfo;
|
||||
|
||||
/**
|
||||
|
@ -1320,6 +1404,7 @@ class DOMAttr extends DOMNode
|
|||
* Not implemented yet, always is NULL
|
||||
* @link https://php.net/manual/en/class.domattr.php#domattr.props.specified
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $specified;
|
||||
|
||||
/**
|
||||
|
@ -1328,6 +1413,7 @@ class DOMAttr extends DOMNode
|
|||
* The value of the attribute
|
||||
* @link https://php.net/manual/en/class.domattr.php#domattr.props.value
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $value;
|
||||
|
||||
/**
|
||||
|
@ -1392,6 +1478,7 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* Not implemented yet, always return NULL
|
||||
* @link https://php.net/manual/en/class.domelement.php#domelement.props.schematypeinfo
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $schemaTypeInfo;
|
||||
|
||||
/**
|
||||
|
@ -1399,8 +1486,24 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
|||
* The element name
|
||||
* @link https://php.net/manual/en/class.domelement.php#domelement.props.tagname
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $tagName;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $firstElementChild;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $lastElementChild;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $childElementCount;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $previousElementSibling;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => '?DOMElement'], default: '')]
|
||||
public $nextElementSibling;
|
||||
|
||||
/**
|
||||
* Returns value of attribute
|
||||
* @link https://php.net/manual/en/domelement.getattribute.php
|
||||
|
@ -1677,6 +1780,7 @@ class DOMText extends DOMCharacterData
|
|||
* Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.
|
||||
* @link https://php.net/manual/en/class.domtext.php#domtext.props.wholeText
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $wholeText;
|
||||
|
||||
/**
|
||||
|
@ -1809,6 +1913,7 @@ class DOMDocumentType extends DOMNode
|
|||
* The public identifier of the external subset.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.publicid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $publicId;
|
||||
|
||||
/**
|
||||
|
@ -1816,6 +1921,7 @@ class DOMDocumentType extends DOMNode
|
|||
* The system identifier of the external subset. This may be an absolute URI or not.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.systemid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $systemId;
|
||||
|
||||
/**
|
||||
|
@ -1823,6 +1929,7 @@ class DOMDocumentType extends DOMNode
|
|||
* The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.name
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $name;
|
||||
|
||||
/**
|
||||
|
@ -1830,6 +1937,7 @@ class DOMDocumentType extends DOMNode
|
|||
* A <classname>DOMNamedNodeMap</classname> containing the general entities, both external and internal, declared in the DTD.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.entities
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')]
|
||||
public $entities;
|
||||
|
||||
/**
|
||||
|
@ -1837,6 +1945,7 @@ class DOMDocumentType extends DOMNode
|
|||
* A <clasname>DOMNamedNodeMap</classname> containing the notations declared in the DTD.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.notations
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')]
|
||||
public $notations;
|
||||
|
||||
/**
|
||||
|
@ -1844,6 +1953,7 @@ class DOMDocumentType extends DOMNode
|
|||
* The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets.
|
||||
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.internalsubset
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $internalSubset;
|
||||
}
|
||||
|
||||
|
@ -1858,6 +1968,7 @@ class DOMNotation extends DOMNode
|
|||
*
|
||||
* @link https://php.net/manual/en/class.domnotation.php#domnotation.props.publicid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $publicId;
|
||||
|
||||
/**
|
||||
|
@ -1865,6 +1976,7 @@ class DOMNotation extends DOMNode
|
|||
*
|
||||
* @link https://php.net/manual/en/class.domnotation.php#domnotation.props.systemid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $systemId;
|
||||
}
|
||||
|
||||
|
@ -1879,6 +1991,7 @@ class DOMEntity extends DOMNode
|
|||
* The public identifier associated with the entity if specified, and NULL otherwise.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.publicid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $publicId;
|
||||
|
||||
/**
|
||||
|
@ -1887,6 +2000,7 @@ class DOMEntity extends DOMNode
|
|||
* absolute URI or not.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.systemid
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $systemId;
|
||||
|
||||
/**
|
||||
|
@ -1894,6 +2008,7 @@ class DOMEntity extends DOMNode
|
|||
* For unparsed entities, the name of the notation for the entity. For parsed entities, this is NULL.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.notationname
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $notationName;
|
||||
|
||||
/**
|
||||
|
@ -1902,6 +2017,7 @@ class DOMEntity extends DOMNode
|
|||
* parsed entity. This is NULL if it an entity from the internal subset or if it is not known.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.actualencoding
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $actualEncoding;
|
||||
|
||||
/**
|
||||
|
@ -1910,6 +2026,7 @@ class DOMEntity extends DOMNode
|
|||
* parsed entity. This is NULL otherwise.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.encoding
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $encoding;
|
||||
|
||||
/**
|
||||
|
@ -1918,6 +2035,7 @@ class DOMEntity extends DOMNode
|
|||
* external parsed entity. This is NULL otherwise.
|
||||
* @link https://php.net/manual/en/class.domentity.php#domentity.props.version
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $version;
|
||||
}
|
||||
|
||||
|
@ -1944,11 +2062,13 @@ class DOMProcessingInstruction extends DOMNode
|
|||
/**
|
||||
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.target
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $target;
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.data
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $data;
|
||||
|
||||
/**
|
||||
|
@ -1984,8 +2104,12 @@ class DOMXPath
|
|||
*
|
||||
* @link https://php.net/manual/en/class.domxpath.php#domxpath.props.document
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'DOMDocument'], default: '')]
|
||||
public $document;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $registerNodeNamespaces;
|
||||
|
||||
/**
|
||||
* Creates a new <classname>DOMXPath</classname> object
|
||||
* @link https://php.net/manual/en/domxpath.construct.php
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of fileinfo v.1.0.5
|
||||
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
class finfo
|
||||
|
@ -81,6 +82,7 @@ class finfo
|
|||
* </p>
|
||||
* @return resource|false a magic database resource on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'finfo|false'], default: 'resource|false')]
|
||||
function finfo_open(int $flags, ?string $magic_database = null) {}
|
||||
|
||||
/**
|
||||
|
@ -92,7 +94,7 @@ function finfo_open(int $flags, ?string $magic_database = null) {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function finfo_close($finfo): bool {}
|
||||
function finfo_close(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: '')] $finfo): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
|
||||
|
@ -107,7 +109,7 @@ function finfo_close($finfo): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function finfo_set_flags($finfo, int $flags): bool {}
|
||||
function finfo_set_flags(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: '')] $finfo, int $flags): bool {}
|
||||
|
||||
/**
|
||||
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
|
||||
|
@ -129,7 +131,7 @@ function finfo_set_flags($finfo, int $flags): bool {}
|
|||
* @return string|false a textual description of the contents of the
|
||||
* <i>filename</i> argument, or <b>FALSE</b> if an error occurred.
|
||||
*/
|
||||
function finfo_file($finfo, string $filename, int $flags, $context): string|false {}
|
||||
function finfo_file(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: '')] $finfo, string $filename, int $flags, $context): string|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
|
||||
|
@ -147,7 +149,7 @@ function finfo_file($finfo, string $filename, int $flags, $context): string|fals
|
|||
* @return string|false a textual description of the <i>string</i>
|
||||
* argument, or <b>FALSE</b> if an error occurred.
|
||||
*/
|
||||
function finfo_buffer($finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {}
|
||||
function finfo_buffer(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: '')] $finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {}
|
||||
|
||||
/**
|
||||
* Detect MIME Content-type for a file
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace FTP;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class Connection {}
|
76
ftp/ftp.php
76
ftp/ftp.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of ftp v.
|
||||
use JetBrains\PhpStorm\ExpectedValues as EV;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
/**
|
||||
* append the contents of a file to another file on the ftp server
|
||||
|
@ -12,7 +13,7 @@ use JetBrains\PhpStorm\ExpectedValues as EV;
|
|||
* @return bool
|
||||
* @since 7.2
|
||||
*/
|
||||
function ftp_append($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
|
||||
function ftp_append(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool {}
|
||||
|
||||
/**
|
||||
* returns a list of files in the given directory
|
||||
|
@ -21,7 +22,7 @@ function ftp_append($ftp, string $remote_filename, string $local_filename, int $
|
|||
* @return array|false
|
||||
* @since 7.2
|
||||
*/
|
||||
function ftp_mlsd($ftp, string $directory): array|false {}
|
||||
function ftp_mlsd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {}
|
||||
|
||||
/**
|
||||
* Opens an FTP connection
|
||||
|
@ -42,6 +43,7 @@ function ftp_mlsd($ftp, string $directory): array|false {}
|
|||
* </p>
|
||||
* @return resource|false a FTP stream on success or <b>FALSE</b> on error.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')]
|
||||
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}
|
||||
|
||||
/**
|
||||
|
@ -63,6 +65,7 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}
|
|||
* </p>
|
||||
* @return resource|false a SSL-FTP stream on success or <b>FALSE</b> on error.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')]
|
||||
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +83,7 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* If login fails, PHP will also throw a warning.
|
||||
*/
|
||||
function ftp_login($ftp, string $username, string $password): bool {}
|
||||
function ftp_login(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $username, string $password): bool {}
|
||||
|
||||
/**
|
||||
* Returns the current directory name
|
||||
|
@ -90,7 +93,7 @@ function ftp_login($ftp, string $username, string $password): bool {}
|
|||
* </p>
|
||||
* @return string|false the current directory name or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ftp_pwd($ftp): string|false {}
|
||||
function ftp_pwd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}
|
||||
|
||||
/**
|
||||
* Changes to the parent directory
|
||||
|
@ -100,7 +103,7 @@ function ftp_pwd($ftp): string|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_cdup($ftp): bool {}
|
||||
function ftp_cdup(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}
|
||||
|
||||
/**
|
||||
* Changes the current directory on a FTP server
|
||||
|
@ -114,7 +117,7 @@ function ftp_cdup($ftp): bool {}
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* If changing directory fails, PHP will also throw a warning.
|
||||
*/
|
||||
function ftp_chdir($ftp, string $directory): bool {}
|
||||
function ftp_chdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}
|
||||
|
||||
/**
|
||||
* Requests execution of a command on the FTP server
|
||||
|
@ -128,7 +131,7 @@ function ftp_chdir($ftp, string $directory): bool {}
|
|||
* @return bool <b>TRUE</b> if the command was successful (server sent response code:
|
||||
* 200); otherwise returns <b>FALSE</b>.
|
||||
*/
|
||||
function ftp_exec($ftp, string $command): bool {}
|
||||
function ftp_exec(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {}
|
||||
|
||||
/**
|
||||
* Sends an arbitrary command to an FTP server
|
||||
|
@ -143,7 +146,7 @@ function ftp_exec($ftp, string $command): bool {}
|
|||
* No parsing is performed on the response string, nor does
|
||||
* <b>ftp_raw</b> determine if the command succeeded.
|
||||
*/
|
||||
function ftp_raw($ftp, string $command): array {}
|
||||
function ftp_raw(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): array {}
|
||||
|
||||
/**
|
||||
* Creates a directory
|
||||
|
@ -156,7 +159,7 @@ function ftp_raw($ftp, string $command): array {}
|
|||
* </p>
|
||||
* @return string|false the newly created directory name on success or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ftp_mkdir($ftp, string $directory): string|false {}
|
||||
function ftp_mkdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): string|false {}
|
||||
|
||||
/**
|
||||
* Removes a directory
|
||||
|
@ -170,7 +173,7 @@ function ftp_mkdir($ftp, string $directory): string|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_rmdir($ftp, string $directory): bool {}
|
||||
function ftp_rmdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {}
|
||||
|
||||
/**
|
||||
* Set permissions on a file via FTP
|
||||
|
@ -186,7 +189,7 @@ function ftp_rmdir($ftp, string $directory): bool {}
|
|||
* </p>
|
||||
* @return int|false the new file permissions on success or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ftp_chmod($ftp, int $permissions, string $filename): int|false {}
|
||||
function ftp_chmod(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $permissions, string $filename): int|false {}
|
||||
|
||||
/**
|
||||
* Allocates space for a file to be uploaded
|
||||
|
@ -203,7 +206,7 @@ function ftp_chmod($ftp, int $permissions, string $filename): int|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_alloc($ftp, int $size, &$response): bool {}
|
||||
function ftp_alloc(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $size, &$response): bool {}
|
||||
|
||||
/**
|
||||
* Returns a list of files in the given directory
|
||||
|
@ -220,7 +223,7 @@ function ftp_alloc($ftp, int $size, &$response): bool {}
|
|||
* @return array|false an array of filenames from the specified directory on success or
|
||||
* <b>FALSE</b> on error.
|
||||
*/
|
||||
function ftp_nlist($ftp, string $directory): array|false {}
|
||||
function ftp_nlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {}
|
||||
|
||||
/**
|
||||
* Returns a detailed list of files in the given directory
|
||||
|
@ -242,7 +245,7 @@ function ftp_nlist($ftp, string $directory): array|false {}
|
|||
* should be interpreted.
|
||||
* </p>
|
||||
*/
|
||||
function ftp_rawlist($ftp, string $directory, bool $recursive = false): array|false {}
|
||||
function ftp_rawlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory, bool $recursive = false): array|false {}
|
||||
|
||||
/**
|
||||
* Returns the system type identifier of the remote FTP server
|
||||
|
@ -252,7 +255,7 @@ function ftp_rawlist($ftp, string $directory, bool $recursive = false): array|fa
|
|||
* </p>
|
||||
* @return string|false the remote system type, or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ftp_systype($ftp): string|false {}
|
||||
function ftp_systype(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {}
|
||||
|
||||
/**
|
||||
* Turns passive mode on or off
|
||||
|
@ -265,7 +268,7 @@ function ftp_systype($ftp): string|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_pasv($ftp, bool $enable): bool {}
|
||||
function ftp_pasv(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, bool $enable): bool {}
|
||||
|
||||
/**
|
||||
* Downloads a file from the FTP server
|
||||
|
@ -288,7 +291,7 @@ function ftp_pasv($ftp, bool $enable): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_get($ftp, string $local_filename, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
function ftp_get(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $local_filename, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
|
||||
/**
|
||||
* Downloads a file from the FTP server and saves to an open file
|
||||
|
@ -311,7 +314,7 @@ function ftp_get($ftp, string $local_filename, string $remote_filename, #[EV([FT
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_fget($ftp, $stream, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
function ftp_fget(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, $stream, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
|
||||
/**
|
||||
* Uploads a file to the FTP server
|
||||
|
@ -332,7 +335,7 @@ function ftp_fget($ftp, $stream, string $remote_filename, #[EV([FTP_ASCII, FTP_B
|
|||
* @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_put($ftp, string $remote_filename, string $local_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
function ftp_put(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $remote_filename, string $local_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
|
||||
/**
|
||||
* Uploads from an open file to the FTP server
|
||||
|
@ -353,7 +356,7 @@ function ftp_put($ftp, string $remote_filename, string $local_filename, #[EV([FT
|
|||
* @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_fput($ftp, string $remote_filename, $stream, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
function ftp_fput(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $remote_filename, $stream, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
|
||||
|
||||
/**
|
||||
* Returns the size of the given file
|
||||
|
@ -366,7 +369,7 @@ function ftp_fput($ftp, string $remote_filename, $stream, #[EV([FTP_ASCII, FTP_B
|
|||
* </p>
|
||||
* @return int the file size on success, or -1 on error.
|
||||
*/
|
||||
function ftp_size($ftp, string $filename): int {}
|
||||
function ftp_size(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {}
|
||||
|
||||
/**
|
||||
* Returns the last modified time of the given file
|
||||
|
@ -380,7 +383,7 @@ function ftp_size($ftp, string $filename): int {}
|
|||
* @return int the last modified time as a Unix timestamp on success, or -1 on
|
||||
* error.
|
||||
*/
|
||||
function ftp_mdtm($ftp, string $filename): int {}
|
||||
function ftp_mdtm(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {}
|
||||
|
||||
/**
|
||||
* Renames a file or a directory on the FTP server
|
||||
|
@ -396,7 +399,7 @@ function ftp_mdtm($ftp, string $filename): int {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_rename($ftp, string $from, string $to): bool {}
|
||||
function ftp_rename(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $from, string $to): bool {}
|
||||
|
||||
/**
|
||||
* Deletes a file on the FTP server
|
||||
|
@ -409,7 +412,7 @@ function ftp_rename($ftp, string $from, string $to): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_delete($ftp, string $filename): bool {}
|
||||
function ftp_delete(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): bool {}
|
||||
|
||||
/**
|
||||
* Sends a SITE command to the server
|
||||
|
@ -423,7 +426,7 @@ function ftp_delete($ftp, string $filename): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_site($ftp, string $command): bool {}
|
||||
function ftp_site(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {}
|
||||
|
||||
/**
|
||||
* Closes an FTP connection
|
||||
|
@ -433,7 +436,7 @@ function ftp_site($ftp, string $command): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_close($ftp): bool {}
|
||||
function ftp_close(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}
|
||||
|
||||
/**
|
||||
* Set miscellaneous runtime FTP options
|
||||
|
@ -473,7 +476,7 @@ function ftp_close($ftp): bool {}
|
|||
* supported or the passed <i>value</i> doesn't match the
|
||||
* expected value for the given <i>option</i>.
|
||||
*/
|
||||
function ftp_set_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {}
|
||||
function ftp_set_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {}
|
||||
|
||||
/**
|
||||
* Retrieves various runtime behaviours of the current FTP stream
|
||||
|
@ -503,7 +506,7 @@ function ftp_set_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_US
|
|||
* <i>option</i> is not supported. In the latter case, a
|
||||
* warning message is also thrown.
|
||||
*/
|
||||
function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int $option): int|bool {}
|
||||
function ftp_get_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int $option): int|bool {}
|
||||
|
||||
/**
|
||||
* Retrieves a file from the FTP server and writes it to an open file (non-blocking)
|
||||
|
@ -525,7 +528,8 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
|
||||
* or <b>FTP_MOREDATA</b>.
|
||||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] function ftp_nb_fget($ftp, $stream, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_fget(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, $stream, string $remote_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
|
||||
/**
|
||||
* Retrieves a file from the FTP server and writes it to a local file (non-blocking)
|
||||
|
@ -547,7 +551,8 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
|
||||
* or <b>FTP_MOREDATA</b>.
|
||||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] function ftp_nb_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_get(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
|
||||
/**
|
||||
* Continues retrieving/sending a file (non-blocking)
|
||||
|
@ -558,7 +563,8 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
|
||||
* or <b>FTP_MOREDATA</b>.
|
||||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] function ftp_nb_continue($ftp): int {}
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_continue(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): int {}
|
||||
|
||||
/**
|
||||
* Stores a file on the FTP server (non-blocking)
|
||||
|
@ -580,7 +586,8 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @return int|false <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
|
||||
* or <b>FTP_MOREDATA</b>.
|
||||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] function ftp_nb_put($ftp, string $remote_filename, string $local_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int|false {}
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_put(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $remote_filename, string $local_filename, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int|false {}
|
||||
|
||||
/**
|
||||
* Stores a file from an open file to the FTP server (non-blocking)
|
||||
|
@ -602,7 +609,8 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
|
||||
* or <b>FTP_MOREDATA</b>.
|
||||
*/
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] function ftp_nb_fput($ftp, string $remote_filename, $stream, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
|
||||
function ftp_nb_fput(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $remote_filename, $stream, #[EV([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
|
||||
|
||||
/**
|
||||
* Alias of <b>ftp_close</b>
|
||||
|
@ -610,7 +618,7 @@ function ftp_get_option($ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int
|
|||
* @param resource $ftp
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ftp_quit($ftp): bool {}
|
||||
function ftp_quit(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {}
|
||||
|
||||
/**
|
||||
* <p></p>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class GdFont {}
|
48
gd/gd.php
48
gd/gd.php
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -160,7 +161,14 @@ function imageellipse(GdImage $image, int $center_x, int $center_y, int $width,
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imagechar(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
|
||||
function imagechar(
|
||||
GdImage $image,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
|
||||
int $x,
|
||||
int $y,
|
||||
string $char,
|
||||
int $color
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Draw a character vertically
|
||||
|
@ -182,7 +190,14 @@ function imagechar(GdImage $image, int $font, int $x, int $y, string $char, int
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imagecharup(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
|
||||
function imagecharup(
|
||||
GdImage $image,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
|
||||
int $x,
|
||||
int $y,
|
||||
string $char,
|
||||
int $color
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Get the index of the color of a pixel
|
||||
|
@ -1184,7 +1199,7 @@ function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, in
|
|||
* @return int the width of the pixel
|
||||
*/
|
||||
#[Pure]
|
||||
function imagefontwidth(int $font): int {}
|
||||
function imagefontwidth(#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font): int {}
|
||||
|
||||
/**
|
||||
* Get font height
|
||||
|
@ -1193,7 +1208,7 @@ function imagefontwidth(int $font): int {}
|
|||
* @return int the height of the pixel.
|
||||
*/
|
||||
#[Pure]
|
||||
function imagefontheight(int $font): int {}
|
||||
function imagefontheight(#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font): int {}
|
||||
|
||||
/**
|
||||
* Enable or disable interlace
|
||||
|
@ -1283,7 +1298,8 @@ function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $colo
|
|||
* @return int|false The font identifier which is always bigger than 5 to avoid conflicts with
|
||||
* built-in fonts or false on errors.
|
||||
*/
|
||||
function imageloadfont(string $filename): int|false {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'GdFont|false'], default: 'int|false')]
|
||||
function imageloadfont(string $filename) {}
|
||||
|
||||
/**
|
||||
* Draws a polygon
|
||||
|
@ -1382,7 +1398,14 @@ function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function imagestring(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
|
||||
function imagestring(
|
||||
GdImage $image,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
|
||||
int $x,
|
||||
int $y,
|
||||
string $string,
|
||||
int $color
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Draw a string vertically
|
||||
|
@ -1404,7 +1427,14 @@ function imagestring(GdImage $image, int $font, int $x, int $y, string $string,
|
|||
* </p>
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
function imagestringup(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
|
||||
function imagestringup(
|
||||
GdImage $image,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'GdFont|int'], default: 'int')] $font,
|
||||
int $x,
|
||||
int $y,
|
||||
string $string,
|
||||
int $color
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Get image width
|
||||
|
@ -2836,6 +2866,10 @@ define('IMG_TRIANGLE', 20);
|
|||
|
||||
define('IMG_TGA', 128);
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('IMG_AVIF', 256);
|
||||
/**
|
||||
* Return an image containing the affine tramsformed src image, using an optional clipping area
|
||||
* @link https://secure.php.net/manual/en/function.imageaffine.php
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of hash v.1.0
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -23,7 +24,7 @@ use JetBrains\PhpStorm\Pure;
|
|||
* binary representation of the message digest is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
function hash(string $algo, string $data, bool $binary = false): string|false {}
|
||||
function hash(string $algo, string $data, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = null): string|false {}
|
||||
|
||||
/**
|
||||
* Timing attack safe string comparison
|
||||
|
@ -55,7 +56,7 @@ function hash_equals(string $known_string, string $user_string): bool {}
|
|||
* binary representation of the message digest is returned.
|
||||
*/
|
||||
#[Pure]
|
||||
function hash_file(string $algo, string $filename, bool $binary = false): string|false {}
|
||||
function hash_file(string $algo, string $filename, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = null): string|false {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
|
||||
|
@ -131,7 +132,7 @@ function hash_hmac_file(string $algo, string $data, string $key, bool $binary =
|
|||
*/
|
||||
#[Pure]
|
||||
#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")]
|
||||
function hash_init(string $algo, int $flags = 0, string $key) {}
|
||||
function hash_init(string $algo, int $flags = 0, string $key, #[PhpStormStubsElementAvailable('8.1')] array $options = null) {}
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
|
||||
|
@ -406,6 +407,34 @@ define('MHASH_FNV1A32', 30);
|
|||
define('MHASH_FNV164', 31);
|
||||
define('MHASH_FNV1A64', 32);
|
||||
define('MHASH_JOAAT', 33);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_MURMUR3A', 35);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_MURMUR3C', 36);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_MURMUR3F', 37);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_XXH32', 38);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_XXH64', 39);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_XXH3', 40);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('MHASH_XXH128', 41);
|
||||
|
||||
class HashContext
|
||||
{
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace IMAP;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class Connection {}
|
139
imap/imap.php
139
imap/imap.php
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of imap v.
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
|
@ -47,6 +48,7 @@ use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
|||
* DISABLE_AUTHENTICATOR - Disable authentication properties</p>
|
||||
* @return resource|false an IMAP stream on success or <b>FALSE</b> on error.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection|false'], default: 'resource|false')]
|
||||
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, ?array $options = null) {}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +68,12 @@ function imap_open(string $mailbox, string $user, string $password, int $flags =
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> if the stream is reopened, <b>FALSE</b> otherwise.
|
||||
*/
|
||||
function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
|
||||
function imap_reopen(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
string $mailbox,
|
||||
int $flags = 0,
|
||||
int $retries = 0
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Close an IMAP stream
|
||||
|
@ -80,7 +87,7 @@ function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0):
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_close($imap, int $flags = 0): bool {}
|
||||
function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Gets the number of messages in the current mailbox
|
||||
|
@ -88,7 +95,7 @@ function imap_close($imap, int $flags = 0): bool {}
|
|||
* @param resource $imap
|
||||
* @return int|false Return the number of messages in the current mailbox, as an integer.
|
||||
*/
|
||||
function imap_num_msg($imap): int|false {}
|
||||
function imap_num_msg(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int|false {}
|
||||
|
||||
/**
|
||||
* Gets the number of recent messages in current mailbox
|
||||
|
@ -97,7 +104,7 @@ function imap_num_msg($imap): int|false {}
|
|||
* @return int the number of recent messages in the current mailbox, as an
|
||||
* integer.
|
||||
*/
|
||||
function imap_num_recent($imap): int {}
|
||||
function imap_num_recent(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int {}
|
||||
|
||||
/**
|
||||
* Returns headers for all messages in a mailbox
|
||||
|
@ -106,7 +113,7 @@ function imap_num_recent($imap): int {}
|
|||
* @return array|false an array of string formatted with header info. One
|
||||
* element per mail message.
|
||||
*/
|
||||
function imap_headers($imap): array|false {}
|
||||
function imap_headers(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): array|false {}
|
||||
|
||||
/**
|
||||
* Read the header of the message
|
||||
|
@ -273,7 +280,11 @@ function imap_rfc822_parse_adrlist(string $string, string $default_hostname): ar
|
|||
* <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
|
||||
* @return string|false the body of the specified message, as a string.
|
||||
*/
|
||||
function imap_body($imap, int $message_num, int $flags = 0): string|false {}
|
||||
function imap_body(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
int $message_num,
|
||||
int $flags = 0
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Read the structure of a specified body section of a specific message
|
||||
|
@ -289,7 +300,8 @@ function imap_body($imap, int $message_num, int $flags = 0): string|false {}
|
|||
* of the object structure and properties see
|
||||
* <b>imap_fetchstructure</b>.
|
||||
*/
|
||||
function imap_bodystruct($imap, int $message_num, string $section) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: 'object')]
|
||||
function imap_bodystruct(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, string $section) {}
|
||||
|
||||
/**
|
||||
* Fetch a particular section of the body of the message
|
||||
|
@ -308,7 +320,12 @@ function imap_bodystruct($imap, int $message_num, string $section) {}
|
|||
* @return string|false a particular section of the body of the specified messages as a
|
||||
* text string.
|
||||
*/
|
||||
function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string|false {}
|
||||
function imap_fetchbody(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
int $message_num,
|
||||
string $section,
|
||||
int $flags = 0
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Fetch MIME headers for a particular section of the message
|
||||
|
@ -328,7 +345,12 @@ function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0
|
|||
* text string.
|
||||
* @since 5.3.6
|
||||
*/
|
||||
function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string|false {}
|
||||
function imap_fetchmime(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
int $message_num,
|
||||
string $section,
|
||||
int $flags = 0
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Save a specific body section to a file
|
||||
|
@ -351,7 +373,13 @@ function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.1.3
|
||||
*/
|
||||
function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}
|
||||
function imap_savebody(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
$file,
|
||||
int $message_num,
|
||||
string $section = "",
|
||||
int $flags = 0
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Returns header for a message
|
||||
|
@ -366,7 +394,11 @@ function imap_savebody($imap, $file, int $message_num, string $section = "", int
|
|||
* argument is a UID</p>
|
||||
* @return string|false the header of the specified message as a text string.
|
||||
*/
|
||||
function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false {}
|
||||
function imap_fetchheader(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap,
|
||||
int $message_num,
|
||||
int $flags = 0
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Read the structure of a particular message
|
||||
|
@ -490,7 +522,7 @@ function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false
|
|||
* <tr valign="top"><td>5</td><td>OTHER</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|false {}
|
||||
function imap_fetchstructure(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, int $flags = 0): stdClass|false {}
|
||||
|
||||
/**
|
||||
* Clears IMAP cache
|
||||
|
@ -505,7 +537,7 @@ function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_gc($imap, int $flags): bool {}
|
||||
function imap_gc(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags): bool {}
|
||||
|
||||
/**
|
||||
* Delete all messages marked for deletion
|
||||
|
@ -513,7 +545,7 @@ function imap_gc($imap, int $flags): bool {}
|
|||
* @param resource $imap
|
||||
* @return bool <b>TRUE</b>.
|
||||
*/
|
||||
function imap_expunge($imap): bool {}
|
||||
function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {}
|
||||
|
||||
/**
|
||||
* Mark a message for deletion from current mailbox
|
||||
|
@ -529,7 +561,7 @@ function imap_expunge($imap): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b>.
|
||||
*/
|
||||
function imap_delete($imap, string $message_num, int $flags = 0): bool {}
|
||||
function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_num, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Unmark the message which is marked deleted
|
||||
|
@ -541,7 +573,7 @@ function imap_delete($imap, string $message_num, int $flags = 0): bool {}
|
|||
* @param int $flags [optional]
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_undelete($imap, string $message_num, int $flags = 0): bool {}
|
||||
function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_num, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Check current mailbox
|
||||
|
@ -558,7 +590,7 @@ function imap_undelete($imap, string $message_num, int $flags = 0): bool {}
|
|||
* <p>
|
||||
* Returns <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_check($imap): stdClass|false {}
|
||||
function imap_check(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): stdClass|false {}
|
||||
|
||||
/**
|
||||
* Returns the list of mailboxes that matches the given text
|
||||
|
@ -586,7 +618,7 @@ function imap_check($imap): stdClass|false {}
|
|||
* @return array|false an array containing the names of the mailboxes that have
|
||||
* <i>content</i> in the text of the mailbox.
|
||||
*/
|
||||
function imap_listscan($imap, string $reference, string $pattern, string $content): array|false {}
|
||||
function imap_listscan(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}
|
||||
|
||||
/**
|
||||
* Copy specified messages to a mailbox
|
||||
|
@ -605,7 +637,7 @@ function imap_listscan($imap, string $reference, string $pattern, string $conten
|
|||
* <b>CP_UID</b> - the sequence numbers contain UIDS</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
|
||||
function imap_mail_copy(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Move specified messages to a mailbox
|
||||
|
@ -624,7 +656,7 @@ function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags
|
|||
* <b>CP_UID</b> - the sequence numbers contain UIDS</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
|
||||
function imap_mail_move(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
|
||||
|
||||
/**
|
||||
* Create a MIME message based on given envelope and body sections
|
||||
|
@ -659,7 +691,7 @@ function imap_mail_compose(array $envelope, array $bodies): string|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_createmailbox($imap, string $mailbox): bool {}
|
||||
function imap_createmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}
|
||||
|
||||
/**
|
||||
* Rename an old mailbox to new mailbox
|
||||
|
@ -675,7 +707,7 @@ function imap_createmailbox($imap, string $mailbox): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_renamemailbox($imap, string $from, string $to): bool {}
|
||||
function imap_renamemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $from, string $to): bool {}
|
||||
|
||||
/**
|
||||
* Delete a mailbox
|
||||
|
@ -687,7 +719,7 @@ function imap_renamemailbox($imap, string $from, string $to): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_deletemailbox($imap, string $mailbox): bool {}
|
||||
function imap_deletemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}
|
||||
|
||||
/**
|
||||
* Subscribe to a mailbox
|
||||
|
@ -699,7 +731,7 @@ function imap_deletemailbox($imap, string $mailbox): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_subscribe($imap, string $mailbox): bool {}
|
||||
function imap_subscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}
|
||||
|
||||
/**
|
||||
* Unsubscribe from a mailbox
|
||||
|
@ -711,7 +743,7 @@ function imap_subscribe($imap, string $mailbox): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_unsubscribe($imap, string $mailbox): bool {}
|
||||
function imap_unsubscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}
|
||||
|
||||
/**
|
||||
* Append a string message to a specified mailbox
|
||||
|
@ -738,7 +770,7 @@ function imap_unsubscribe($imap, string $mailbox): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_append($imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
|
||||
function imap_append(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
|
||||
|
||||
/**
|
||||
* Check if the IMAP stream is still active
|
||||
|
@ -746,7 +778,7 @@ function imap_append($imap, string $folder, string $message, ?string $options =
|
|||
* @param resource $imap
|
||||
* @return bool <b>TRUE</b> if the stream is still alive, <b>FALSE</b> otherwise.
|
||||
*/
|
||||
function imap_ping($imap): bool {}
|
||||
function imap_ping(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {}
|
||||
|
||||
/**
|
||||
* Decode BASE64 encoded text
|
||||
|
@ -820,7 +852,8 @@ function imap_utf8(string $mime_encoded_text): string {}
|
|||
* flags is also set, which contains a bitmask which can
|
||||
* be checked against any of the above constants.</p>
|
||||
*/
|
||||
function imap_status($imap, string $mailbox, int $flags) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: '')]
|
||||
function imap_status(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox, int $flags) {}
|
||||
|
||||
/**
|
||||
* @param $stream_id
|
||||
|
@ -872,7 +905,7 @@ function imap_status_current($stream_id, $options) {}
|
|||
* <p>
|
||||
* Returns <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_mailboxmsginfo($imap): stdClass {}
|
||||
function imap_mailboxmsginfo(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): stdClass {}
|
||||
|
||||
/**
|
||||
* Sets flags on messages
|
||||
|
@ -895,7 +928,7 @@ function imap_mailboxmsginfo($imap): stdClass {}
|
|||
* instead of sequence numbers</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_setflag_full($imap, string $sequence, string $flag, int $options = NIL): bool {}
|
||||
function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL): bool {}
|
||||
|
||||
/**
|
||||
* Clears flags on messages
|
||||
|
@ -917,7 +950,7 @@ function imap_setflag_full($imap, string $sequence, string $flag, int $options =
|
|||
* instead of sequence numbers</p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
|
||||
function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0): bool {}
|
||||
|
||||
/**
|
||||
* Gets and sort messages
|
||||
|
@ -938,7 +971,7 @@ function imap_clearflag_full($imap, string $sequence, string $flag, int $options
|
|||
* @return array|false an array of message numbers sorted by the given
|
||||
* parameters.
|
||||
*/
|
||||
function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = 'NIL'): array|false {}
|
||||
function imap_sort(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = 'NIL'): array|false {}
|
||||
|
||||
/**
|
||||
* This function returns the UID for the given message sequence number
|
||||
|
@ -949,7 +982,7 @@ function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string
|
|||
* </p>
|
||||
* @return int|false The UID of the given message.
|
||||
*/
|
||||
function imap_uid($imap, int $message_num): int|false {}
|
||||
function imap_uid(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num): int|false {}
|
||||
|
||||
/**
|
||||
* Gets the message sequence number for the given UID
|
||||
|
@ -961,7 +994,7 @@ function imap_uid($imap, int $message_num): int|false {}
|
|||
* @return int the message sequence number for the given
|
||||
* <i>uid</i>.
|
||||
*/
|
||||
function imap_msgno($imap, int $message_uid): int {}
|
||||
function imap_msgno(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_uid): int {}
|
||||
|
||||
/**
|
||||
* Read the list of mailboxes
|
||||
|
@ -985,7 +1018,7 @@ function imap_msgno($imap, int $message_uid): int {}
|
|||
* mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
|
||||
* @return array|false an array containing the names of the mailboxes.
|
||||
*/
|
||||
function imap_list($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_list(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* List all the subscribed mailboxes
|
||||
|
@ -1009,7 +1042,7 @@ function imap_list($imap, string $reference, string $pattern): array|false {}
|
|||
* mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
|
||||
* @return array|false an array of all the subscribed mailboxes.
|
||||
*/
|
||||
function imap_lsub($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_lsub(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* Read an overview of the information in the headers of the given message
|
||||
|
@ -1045,7 +1078,7 @@ function imap_lsub($imap, string $reference, string $pattern): array|false {}
|
|||
* seen - this message is flagged as already read
|
||||
* draft - this message is flagged as being a draft
|
||||
*/
|
||||
function imap_fetch_overview($imap, string $sequence, int $flags = 0): array|false {}
|
||||
function imap_fetch_overview(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, int $flags = 0): array|false {}
|
||||
|
||||
/**
|
||||
* Returns all IMAP alert messages that have occurred
|
||||
|
@ -1095,7 +1128,7 @@ function imap_last_error(): string|false {}
|
|||
* <i>criteria</i> or no messages have been found.
|
||||
* </p>
|
||||
*/
|
||||
function imap_search($imap, string $criteria, int $flags = SE_FREE, string $charset = NIL): array|false {}
|
||||
function imap_search(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $criteria, int $flags = SE_FREE, string $charset = NIL): array|false {}
|
||||
|
||||
/**
|
||||
* Decodes a modified UTF-7 encoded string
|
||||
|
@ -1163,7 +1196,7 @@ function imap_mime_header_decode(string $string): array|false {}
|
|||
* $thread["XX.branch"]
|
||||
* </p>
|
||||
*/
|
||||
function imap_thread($imap, int $flags = SE_FREE): array|false {}
|
||||
function imap_thread(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = SE_FREE): array|false {}
|
||||
|
||||
/**
|
||||
* Set or fetch imap timeout
|
||||
|
@ -1214,7 +1247,7 @@ function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
|
|||
* For backwards compatibility reasons, the original access methods are
|
||||
* still available for use, although it is suggested to update.
|
||||
*/
|
||||
function imap_get_quota($imap, string $quota_root): array|false {}
|
||||
function imap_get_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root): array|false {}
|
||||
|
||||
/**
|
||||
* Retrieve the quota settings per user
|
||||
|
@ -1233,7 +1266,7 @@ function imap_get_quota($imap, string $quota_root): array|false {}
|
|||
* array of information about the connection upon an un-parsable response
|
||||
* from the server.
|
||||
*/
|
||||
function imap_get_quotaroot($imap, string $mailbox): array|false {}
|
||||
function imap_get_quotaroot(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): array|false {}
|
||||
|
||||
/**
|
||||
* Sets a quota for a given mailbox
|
||||
|
@ -1248,7 +1281,7 @@ function imap_get_quotaroot($imap, string $mailbox): array|false {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
|
||||
function imap_set_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root, int $mailbox_size): bool {}
|
||||
|
||||
/**
|
||||
* Sets the ACL for a given mailbox
|
||||
|
@ -1267,7 +1300,7 @@ function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function imap_setacl($imap, string $mailbox, string $user_id, string $rights): bool {}
|
||||
function imap_setacl(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox, string $user_id, string $rights): bool {}
|
||||
|
||||
/**
|
||||
* Gets the ACL for a given mailbox
|
||||
|
@ -1279,7 +1312,7 @@ function imap_setacl($imap, string $mailbox, string $user_id, string $rights): b
|
|||
* </p>
|
||||
* @return array|false an associative array of "folder" => "acl" pairs.
|
||||
*/
|
||||
function imap_getacl($imap, string $mailbox): array|false {}
|
||||
function imap_getacl(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): array|false {}
|
||||
|
||||
/**
|
||||
* @param $stream_id
|
||||
|
@ -1390,7 +1423,7 @@ function imap_header($stream_id, $msg_no, $from_length = 0, $subject_length = 0,
|
|||
* @param string $pattern
|
||||
* @return array|false
|
||||
*/
|
||||
function imap_listmailbox($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_listmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* Read the list of mailboxes, returning detailed information on each one
|
||||
|
@ -1439,7 +1472,7 @@ function imap_listmailbox($imap, string $reference, string $pattern): array|fals
|
|||
* provided, you can assume the IMAP server supports this feature for this mailbox.
|
||||
* </p>
|
||||
*/
|
||||
function imap_getmailboxes($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_getmailboxes(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* Alias of <b>imap_listscan</b>
|
||||
|
@ -1449,7 +1482,7 @@ function imap_getmailboxes($imap, string $reference, string $pattern): array|fal
|
|||
* @param $pattern
|
||||
* @param $content
|
||||
*/
|
||||
function imap_scanmailbox($imap, string $reference, string $pattern, string $content): array|false {}
|
||||
function imap_scanmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}
|
||||
|
||||
/**
|
||||
* Alias of <b>imap_lsub</b>
|
||||
|
@ -1459,7 +1492,7 @@ function imap_scanmailbox($imap, string $reference, string $pattern, string $con
|
|||
* @param string $pattern
|
||||
* @return array|false
|
||||
*/
|
||||
function imap_listsubscribed($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_listsubscribed(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* List all the subscribed mailboxes
|
||||
|
@ -1497,7 +1530,7 @@ function imap_listsubscribed($imap, string $reference, string $pattern): array|f
|
|||
* <b>LATT_UNMARKED</b> - This mailbox is not marked.
|
||||
* Only used by UW-IMAPD.
|
||||
*/
|
||||
function imap_getsubscribed($imap, string $reference, string $pattern): array|false {}
|
||||
function imap_getsubscribed(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern): array|false {}
|
||||
|
||||
/**
|
||||
* (PHP 4, PHP 5)<br/>
|
||||
|
@ -1510,7 +1543,7 @@ function imap_getsubscribed($imap, string $reference, string $pattern): array|fa
|
|||
* <li>FT_INTERNAL - The return string is in internal format, will not canonicalize to CRLF.</ul><p>
|
||||
* @return string|false body of the specified message
|
||||
*/
|
||||
function imap_fetchtext($imap, int $message_num, int $flags = 0): string|false {}
|
||||
function imap_fetchtext(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, int $flags = 0): string|false {}
|
||||
|
||||
/**
|
||||
* Alias of <b>imap_listscan</b>
|
||||
|
@ -1520,7 +1553,7 @@ function imap_fetchtext($imap, int $message_num, int $flags = 0): string|false {
|
|||
* @param $pattern
|
||||
* @param $content
|
||||
*/
|
||||
function imap_scan($imap, string $reference, string $pattern, string $content): array|false {}
|
||||
function imap_scan(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {}
|
||||
|
||||
/**
|
||||
* Alias of <b>imap_createmailbox</b>
|
||||
|
@ -1528,7 +1561,7 @@ function imap_scan($imap, string $reference, string $pattern, string $content):
|
|||
* @param $imap
|
||||
* @param $mailbox
|
||||
*/
|
||||
function imap_create($imap, string $mailbox): bool {}
|
||||
function imap_create(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {}
|
||||
|
||||
/**
|
||||
* Alias of <b>imap_renamemailbox</b>
|
||||
|
@ -1537,7 +1570,7 @@ function imap_create($imap, string $mailbox): bool {}
|
|||
* @param $from
|
||||
* @param $to
|
||||
*/
|
||||
function imap_rename($imap, string $from, string $to): bool {}
|
||||
function imap_rename(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $from, string $to): bool {}
|
||||
|
||||
/**
|
||||
* Decode a modified UTF-7 string to UTF-8
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class IntlDatePatternGenerator
|
||||
{
|
||||
public function __construct(?string $locale = null) {}
|
||||
|
||||
public static function create(?string $locale = null) {}
|
||||
|
||||
public function getBestPattern(string $skeleton) {}
|
||||
}
|
|
@ -1717,8 +1717,8 @@ class IntlDateFormatter
|
|||
|
||||
/**
|
||||
* @param string|null $locale
|
||||
* @param int $dateType
|
||||
* @param int $timeType
|
||||
* @param int $dateType [optional]
|
||||
* @param int $timeType [optional]
|
||||
* @param mixed|null $timezone [optional]
|
||||
* @param mixed|null $calendar [optional]
|
||||
* @param string $pattern [optional]
|
||||
|
@ -1733,14 +1733,14 @@ class IntlDateFormatter
|
|||
* @param string $locale <p>
|
||||
* Locale to use when formatting or parsing; default is specified in the ini setting intl.default_locale.
|
||||
* </p>
|
||||
* @param int $dateType <p>
|
||||
* @param int $dateType [optional] <p>
|
||||
* Date type to use (<b>none</b>,
|
||||
* <b>short</b>, <b>medium</b>,
|
||||
* <b>long</b>, <b>full</b>).
|
||||
* This is one of the
|
||||
* IntlDateFormatter constants.
|
||||
* </p>
|
||||
* @param int $timeType <p>
|
||||
* @param int $timeType [optional] <p>
|
||||
* Time type to use (<b>none</b>,
|
||||
* <b>short</b>, <b>medium</b>,
|
||||
* <b>long</b>, <b>full</b>).
|
||||
|
@ -2128,6 +2128,7 @@ class Transliterator
|
|||
public const FORWARD = 0;
|
||||
public const REVERSE = 1;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $id;
|
||||
|
||||
/**
|
||||
|
@ -4262,14 +4263,14 @@ function msgfmt_get_error_message(MessageFormatter $formatter): string {}
|
|||
* @param string|null $locale <p>
|
||||
* Locale to use when formatting or parsing.
|
||||
* </p>
|
||||
* @param int $dateType <p>
|
||||
* @param int $dateType [optional] <p>
|
||||
* Date type to use (<b>none</b>,
|
||||
* <b>short</b>, <b>medium</b>,
|
||||
* <b>long</b>, <b>full</b>).
|
||||
* This is one of the
|
||||
* IntlDateFormatter constants.
|
||||
* </p>
|
||||
* @param int $timeType <p>
|
||||
* @param int $timeType [optional] <p>
|
||||
* Time type to use (<b>none</b>,
|
||||
* <b>short</b>, <b>medium</b>,
|
||||
* <b>long</b>, <b>full</b>).
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace LDAP;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class Connection {}
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace LDAP;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class Result {}
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace LDAP;
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
class ResultEntry {}
|
186
ldap/ldap.php
186
ldap/ldap.php
|
@ -15,7 +15,7 @@ use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
|||
* @return string|bool Returns the generated password if newpw is empty or omitted. Otherwise returns TRUE on success and FALSE on failure.
|
||||
* @since 7.2
|
||||
*/
|
||||
function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = []): string|bool {}
|
||||
function ldap_exop_passwd(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = []): string|bool {}
|
||||
|
||||
/**
|
||||
* Refresh extended operation helper
|
||||
|
@ -26,7 +26,7 @@ function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", s
|
|||
* @return int|false From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error.
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {}
|
||||
function ldap_exop_refresh(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, int $ttl): int|false {}
|
||||
|
||||
/**
|
||||
* WHOAMI extended operation helper
|
||||
|
@ -35,7 +35,7 @@ function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {}
|
|||
* @return string|false The data returned by the server, or FALSE on error.
|
||||
* @since 7.2
|
||||
*/
|
||||
function ldap_exop_whoami($ldap): string|false {}
|
||||
function ldap_exop_whoami(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string|false {}
|
||||
|
||||
/**
|
||||
* Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.
|
||||
|
@ -49,7 +49,8 @@ function ldap_exop_whoami($ldap): string|false {}
|
|||
* @return resource|bool When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error.
|
||||
* @since 7.2
|
||||
*/
|
||||
function ldap_exop($ldap, string $request_oid, ?string $request_data, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = [], &$response_data, &$response_oid) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|bool'], default: 'resource|bool')]
|
||||
function ldap_exop(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $request_oid, ?string $request_data, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = [], &$response_data, &$response_oid) {}
|
||||
|
||||
/**
|
||||
* Parse LDAP extended operation data from result object result
|
||||
|
@ -61,7 +62,12 @@ function ldap_exop($ldap, string $request_oid, ?string $request_data, #[Language
|
|||
* @return bool Returns TRUE on success or FALSE on failure.
|
||||
* @since 7.2
|
||||
*/
|
||||
function ldap_parse_exop($ldap, $result, &$response_data, &$response_oid): bool {}
|
||||
function ldap_parse_exop(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result,
|
||||
&$response_data,
|
||||
&$response_oid
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Translate 8859 characters to t61 characters
|
||||
|
@ -102,6 +108,7 @@ function ldap_t61_to_8859(string $value): string {}
|
|||
* If no arguments are specified then the link identifier of the already
|
||||
* opened link will be returned.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection|false'], default: '')]
|
||||
function ldap_connect(?string $uri, int $port = 389) {}
|
||||
|
||||
/**
|
||||
|
@ -110,7 +117,7 @@ function ldap_connect(?string $uri, int $port = 389) {}
|
|||
* @param resource $ldap
|
||||
* @return bool
|
||||
*/
|
||||
function ldap_close($ldap): bool {}
|
||||
function ldap_close(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}
|
||||
|
||||
/**
|
||||
* Bind to LDAP directory
|
||||
|
@ -122,7 +129,7 @@ function ldap_close($ldap): bool {}
|
|||
* @param string|null $password [optional]
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_bind($ldap, ?string $dn, ?string $password): bool {}
|
||||
function ldap_bind(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?string $dn, ?string $password): bool {}
|
||||
|
||||
/**
|
||||
* Bind to LDAP directory
|
||||
|
@ -137,7 +144,8 @@ function ldap_bind($ldap, ?string $dn, ?string $password): bool {}
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_bind_ext($ldap, ?string $dn, ?string $password, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_bind_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?string $dn, ?string $password, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Bind to LDAP directory using SASL
|
||||
|
@ -152,7 +160,7 @@ function ldap_bind_ext($ldap, ?string $dn, ?string $password, #[LanguageLevelTyp
|
|||
* @param string $props [optional]
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_sasl_bind($ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {}
|
||||
function ldap_sasl_bind(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {}
|
||||
|
||||
/**
|
||||
* Unbind from LDAP directory
|
||||
|
@ -162,7 +170,7 @@ function ldap_sasl_bind($ldap, $binddn = null, $password = null, $sasl_mech = nu
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_unbind($ldap): bool {}
|
||||
function ldap_unbind(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}
|
||||
|
||||
/**
|
||||
* Read an entry
|
||||
|
@ -226,7 +234,8 @@ function ldap_unbind($ldap): bool {}
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return resource|false a search result identifier or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_read($ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|array|false'], default: '')]
|
||||
function ldap_read(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Single-level search
|
||||
|
@ -284,7 +293,8 @@ function ldap_read($ldap, array|string $base, array|string $filter, array $attri
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return resource|false a search result identifier or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_list($ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|array|false'], default: '')]
|
||||
function ldap_list(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Search LDAP tree
|
||||
|
@ -346,15 +356,16 @@ function ldap_list($ldap, array|string $base, array|string $filter, array $attri
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return resource|false a search result identifier or <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_search($ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|array|false'], default: '')]
|
||||
function ldap_search(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, array|string $base, array|string $filter, array $attributes, int $attributes_only, int $sizelimit = -1, int $timelimit = -1, int $deref, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Free result memory
|
||||
* @link https://php.net/manual/en/function.ldap-free-result.php
|
||||
* @param resource $ldap
|
||||
* @param resource $result
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_free_result($ldap): bool {}
|
||||
function ldap_free_result(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result): bool {}
|
||||
|
||||
/**
|
||||
* Count the number of entries in a search
|
||||
|
@ -368,7 +379,10 @@ function ldap_free_result($ldap): bool {}
|
|||
* @return int|false number of entries in the result or <b>FALSE</b> on error.
|
||||
*/
|
||||
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
|
||||
function ldap_count_entries($ldap, $result) {}
|
||||
function ldap_count_entries(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Return first result id
|
||||
|
@ -380,7 +394,11 @@ function ldap_count_entries($ldap, $result) {}
|
|||
* @return resource|false the result entry identifier for the first entry on success and
|
||||
* <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_first_entry($ldap, $result) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry|false'], default: '')]
|
||||
function ldap_first_entry(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get next result entry
|
||||
|
@ -393,7 +411,11 @@ function ldap_first_entry($ldap, $result) {}
|
|||
* are being read starting with <b>ldap_first_entry</b>. If
|
||||
* there are no more entries in the result then it returns <b>FALSE</b>.
|
||||
*/
|
||||
function ldap_next_entry($ldap, $entry) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry|false'], default: '')]
|
||||
function ldap_next_entry(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get all result entries
|
||||
|
@ -421,7 +443,10 @@ function ldap_next_entry($ldap, $entry) {}
|
|||
* return_value[i]["attribute"][j] = jth value of attribute in ith entry
|
||||
* </pre>
|
||||
*/
|
||||
function ldap_get_entries($ldap, $result): array|false {}
|
||||
function ldap_get_entries(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
): array|false {}
|
||||
|
||||
/**
|
||||
* Return first attribute
|
||||
|
@ -433,7 +458,10 @@ function ldap_get_entries($ldap, $result): array|false {}
|
|||
* @return string|false the first attribute in the entry on success and <b>FALSE</b> on
|
||||
* error.
|
||||
*/
|
||||
function ldap_first_attribute($ldap, $entry): string|false {}
|
||||
function ldap_first_attribute(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Get the next attribute in result
|
||||
|
@ -445,7 +473,10 @@ function ldap_first_attribute($ldap, $entry): string|false {}
|
|||
* @return string|false the next attribute in an entry on success and <b>FALSE</b> on
|
||||
* error.
|
||||
*/
|
||||
function ldap_next_attribute($ldap, $entry): string|false {}
|
||||
function ldap_next_attribute(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Get attributes from a search result entry
|
||||
|
@ -457,7 +488,10 @@ function ldap_next_attribute($ldap, $entry): string|false {}
|
|||
* @return array a complete entry information in a multi-dimensional array
|
||||
* on success and <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_get_attributes($ldap, $entry): array {}
|
||||
function ldap_get_attributes(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
): array {}
|
||||
|
||||
/**
|
||||
* Get all values from a result entry
|
||||
|
@ -480,7 +514,11 @@ function ldap_get_attributes($ldap, $entry): array {}
|
|||
* return_value[0] = first value of attribute
|
||||
* return_value[i] = ith value of attribute
|
||||
*/
|
||||
function ldap_get_values($ldap, $entry, string $attribute): array|false {}
|
||||
function ldap_get_values(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
|
||||
string $attribute
|
||||
): array|false {}
|
||||
|
||||
/**
|
||||
* Get all binary values from a result entry
|
||||
|
@ -495,7 +533,11 @@ function ldap_get_values($ldap, $entry, string $attribute): array|false {}
|
|||
* first index is 0. The number of values can be found by indexing "count"
|
||||
* in the resultant array.
|
||||
*/
|
||||
function ldap_get_values_len($ldap, $entry, string $attribute): array|false {}
|
||||
function ldap_get_values_len(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
|
||||
string $attribute
|
||||
): array|false {}
|
||||
|
||||
/**
|
||||
* Get the DN of a result entry
|
||||
|
@ -506,7 +548,10 @@ function ldap_get_values_len($ldap, $entry, string $attribute): array|false {}
|
|||
* @param resource $entry
|
||||
* @return string|false the DN of the result entry and <b>FALSE</b> on error.
|
||||
*/
|
||||
function ldap_get_dn($ldap, $entry): string|false {}
|
||||
function ldap_get_dn(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
): string|false {}
|
||||
|
||||
/**
|
||||
* Splits DN into its component parts
|
||||
|
@ -560,7 +605,7 @@ function ldap_dn2ufn(string $dn): string|false {}
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_add($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_add(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Add entries to LDAP directory
|
||||
|
@ -587,7 +632,8 @@ function ldap_add($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_add_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_add_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Delete an entry from a directory
|
||||
|
@ -601,7 +647,7 @@ function ldap_add_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_delete($ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_delete(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Delete an entry from a directory
|
||||
|
@ -617,7 +663,8 @@ function ldap_delete($ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "null
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_delete_ext($ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_delete_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* This function is an alias of: ldap_mod_replace().
|
||||
|
@ -634,7 +681,7 @@ function ldap_delete_ext($ldap, string $dn, #[LanguageLevelTypeAware(["8.0" => "
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 7.0
|
||||
*/
|
||||
function ldap_modify($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_modify(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Add attribute values to current attributes
|
||||
|
@ -649,7 +696,7 @@ function ldap_modify($ldap, string $dn, array $entry, #[LanguageLevelTypeAware([
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_mod_add($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_mod_add(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Add attribute values to current attributes
|
||||
|
@ -666,7 +713,8 @@ function ldap_mod_add($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_mod_add_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_mod_add_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Replace attribute values with new ones
|
||||
|
@ -681,7 +729,7 @@ function ldap_mod_add_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAw
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_mod_replace($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_mod_replace(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Replace attribute values with new ones
|
||||
|
@ -698,7 +746,8 @@ function ldap_mod_replace($ldap, string $dn, array $entry, #[LanguageLevelTypeAw
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_mod_replace_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_mod_replace_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Delete attribute values from current attributes
|
||||
|
@ -713,7 +762,7 @@ function ldap_mod_replace_ext($ldap, string $dn, array $entry, #[LanguageLevelTy
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_mod_del($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_mod_del(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Delete attribute values from current attributes
|
||||
|
@ -730,7 +779,8 @@ function ldap_mod_del($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_mod_del_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_mod_del_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Return the LDAP error number of the last LDAP command
|
||||
|
@ -741,7 +791,7 @@ function ldap_mod_del_ext($ldap, string $dn, array $entry, #[LanguageLevelTypeAw
|
|||
* @return int Return the LDAP error number of the last LDAP command for this
|
||||
* link.
|
||||
*/
|
||||
function ldap_errno($ldap): int {}
|
||||
function ldap_errno(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): int {}
|
||||
|
||||
/**
|
||||
* Convert LDAP error number into string error message
|
||||
|
@ -761,7 +811,7 @@ function ldap_err2str(int $errno): string {}
|
|||
* </p>
|
||||
* @return string string error message.
|
||||
*/
|
||||
function ldap_error($ldap): string {}
|
||||
function ldap_error(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string {}
|
||||
|
||||
/**
|
||||
* Compare value of attribute found in entry specified with DN
|
||||
|
@ -782,7 +832,7 @@ function ldap_error($ldap): string {}
|
|||
* @return int|bool <b>TRUE</b> if <i>value</i> matches otherwise returns
|
||||
* <b>FALSE</b>. Returns -1 on error.
|
||||
*/
|
||||
function ldap_compare($ldap, string $dn, string $attribute, string $value, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): int|bool {}
|
||||
function ldap_compare(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, string $attribute, string $value, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): int|bool {}
|
||||
|
||||
/**
|
||||
* Sort LDAP result entries
|
||||
|
@ -801,7 +851,7 @@ function ldap_compare($ldap, string $dn, string $attribute, string $value, #[Lan
|
|||
* @return bool
|
||||
*/
|
||||
#[Deprecated(since: "7.0")]
|
||||
function ldap_sort($ldap, $result, string $sortfilter): bool {}
|
||||
function ldap_sort(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, string $sortfilter): bool {}
|
||||
|
||||
/**
|
||||
* Modify the name of an entry
|
||||
|
@ -825,7 +875,7 @@ function ldap_sort($ldap, $result, string $sortfilter): bool {}
|
|||
* @param array|null $controls [optional] Array of LDAP Controls to send with the request.
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_rename(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* Modify the name of an entry
|
||||
|
@ -851,7 +901,8 @@ function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, boo
|
|||
* @return resource|false
|
||||
* @since 7.3
|
||||
*/
|
||||
function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result|false'], default: '')]
|
||||
function ldap_rename_ext(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []) {}
|
||||
|
||||
/**
|
||||
* Get the current value for given option
|
||||
|
@ -923,7 +974,7 @@ function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent,
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_get_option($ldap, int $option, &$value = null): bool {}
|
||||
function ldap_get_option(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, int $option, &$value = null): bool {}
|
||||
|
||||
/**
|
||||
* Set the value of the given option
|
||||
|
@ -1024,7 +1075,11 @@ function ldap_get_option($ldap, int $option, &$value = null): bool {}
|
|||
* </p>
|
||||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
*/
|
||||
function ldap_set_option($ldap, int $option, $value): bool {}
|
||||
function ldap_set_option(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection|null'], default: 'resource')] $ldap,
|
||||
int $option,
|
||||
$value
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Return first reference
|
||||
|
@ -1033,7 +1088,11 @@ function ldap_set_option($ldap, int $option, $value): bool {}
|
|||
* @param resource $result
|
||||
* @return resource
|
||||
*/
|
||||
function ldap_first_reference($ldap, $result) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry|false'], default: '')]
|
||||
function ldap_first_reference(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get next reference
|
||||
|
@ -1042,7 +1101,11 @@ function ldap_first_reference($ldap, $result) {}
|
|||
* @param resource $entry
|
||||
* @return resource
|
||||
*/
|
||||
function ldap_next_reference($ldap, $entry) {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry|false'], default: '')]
|
||||
function ldap_next_reference(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Extract information from reference entry
|
||||
|
@ -1052,7 +1115,11 @@ function ldap_next_reference($ldap, $entry) {}
|
|||
* @param array &$referrals
|
||||
* @return bool
|
||||
*/
|
||||
function ldap_parse_reference($ldap, $entry, &$referrals): bool {}
|
||||
function ldap_parse_reference(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry,
|
||||
&$referrals
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Extract information from result
|
||||
|
@ -1066,7 +1133,15 @@ function ldap_parse_reference($ldap, $entry, &$referrals): bool {}
|
|||
* @param array &$controls [optional] An array of LDAP Controls which have been sent with the response.
|
||||
* @return bool
|
||||
*/
|
||||
function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn, &$error_message, &$referrals, &$controls = []): bool {}
|
||||
function ldap_parse_result(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result,
|
||||
&$error_code,
|
||||
&$matched_dn,
|
||||
&$error_message,
|
||||
&$referrals,
|
||||
&$controls = []
|
||||
): bool {}
|
||||
|
||||
/**
|
||||
* Start TLS
|
||||
|
@ -1074,7 +1149,7 @@ function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn, &$error_m
|
|||
* @param resource $ldap
|
||||
* @return bool
|
||||
*/
|
||||
function ldap_start_tls($ldap): bool {}
|
||||
function ldap_start_tls(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {}
|
||||
|
||||
/**
|
||||
* Set a callback function to do re-binds on referral chasing
|
||||
|
@ -1083,7 +1158,7 @@ function ldap_start_tls($ldap): bool {}
|
|||
* @param callable|null $callback
|
||||
* @return bool
|
||||
*/
|
||||
function ldap_set_rebind_proc($ldap, ?callable $callback): bool {}
|
||||
function ldap_set_rebind_proc(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?callable $callback): bool {}
|
||||
|
||||
/**
|
||||
* Send LDAP pagination control
|
||||
|
@ -1108,7 +1183,7 @@ function ldap_set_rebind_proc($ldap, ?callable $callback): bool {}
|
|||
* @removed 8.0
|
||||
*/
|
||||
#[Deprecated(since: "7.4")]
|
||||
function ldap_control_paged_result($ldap, int $pagesize, $iscritical = false, $cookie = ""): bool {}
|
||||
function ldap_control_paged_result(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, int $pagesize, $iscritical = false, $cookie = ""): bool {}
|
||||
|
||||
/**
|
||||
* Retrieve the LDAP pagination cookie
|
||||
|
@ -1128,7 +1203,7 @@ function ldap_control_paged_result($ldap, int $pagesize, $iscritical = false, $c
|
|||
* @removed 8.0
|
||||
*/
|
||||
#[Deprecated(since: "7.4")]
|
||||
function ldap_control_paged_result_response($ldap, $result, &$cookie = null, &$estimated = null): bool {}
|
||||
function ldap_control_paged_result_response(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, &$cookie = null, &$estimated = null): bool {}
|
||||
|
||||
/**
|
||||
* Escape a string for use in an LDAP filter or DN
|
||||
|
@ -1213,7 +1288,7 @@ function ldap_escape(string $value, string $ignore = "", int $flags = 0): string
|
|||
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
|
||||
* @since 5.4
|
||||
*/
|
||||
function ldap_modify_batch($ldap, string $dn, array $modifications_info, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
function ldap_modify_batch(#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $modifications_info, #[LanguageLevelTypeAware(["8.0" => "null|array"], default: "array")] $controls = []): bool {}
|
||||
|
||||
/**
|
||||
* @param resource $ldap
|
||||
|
@ -1221,7 +1296,10 @@ function ldap_modify_batch($ldap, string $dn, array $modifications_info, #[Langu
|
|||
* @return int returns the number of reference messages in a search result.
|
||||
* @since 8.0
|
||||
*/
|
||||
function ldap_count_references($ldap, $result): int {}
|
||||
function ldap_count_references(
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result
|
||||
): int {}
|
||||
|
||||
define('LDAP_ESCAPE_FILTER', 1);
|
||||
define('LDAP_ESCAPE_DN', 2);
|
||||
|
|
|
@ -18,6 +18,7 @@ class Deprecated
|
|||
"7.3",
|
||||
"7.4",
|
||||
"8.0",
|
||||
"8.1",
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -2749,6 +2749,7 @@ namespace MongoDB\BSON {
|
|||
* Classes that implement this interface may return data to be serialized as a BSON array or document in lieu of the object's public properties
|
||||
* @link https://php.net/manual/en/class.mongodb-bson-serializable.php
|
||||
*/
|
||||
#[Deprecated(since: '8.1')]
|
||||
interface Serializable extends Type
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
* mysqli_sql_exception
|
||||
|
@ -17,6 +18,7 @@ class mysqli_sql_exception extends RuntimeException
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
protected $sqlstate;
|
||||
|
||||
/**
|
||||
|
@ -36,14 +38,17 @@ final class mysqli_driver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $client_info;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $client_version;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $driver_version;
|
||||
/**
|
||||
* @var string
|
||||
|
@ -52,10 +57,12 @@ final class mysqli_driver
|
|||
/**
|
||||
* @var bool
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
|
||||
public $reconnect;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $report_mode;
|
||||
}
|
||||
|
||||
|
@ -68,76 +75,94 @@ class mysqli
|
|||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string|int'], default: '')]
|
||||
public $affected_rows;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $client_info;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $client_version;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $connect_errno;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $connect_error;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $errno;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $error;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $field_count;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $host_info;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?string'], default: '')]
|
||||
public $info;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
|
||||
public $insert_id;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $server_info;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $server_version;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $sqlstate;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $protocol_version;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $thread_id;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $warning_count;
|
||||
|
||||
/**
|
||||
* @var array A list of errors, each as an associative array containing the errno, error, and sqlstate.
|
||||
* @link https://secure.php.net/manual/en/mysqli.error-list.php
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
|
||||
public $error_list;
|
||||
|
||||
/**
|
||||
|
@ -776,14 +801,17 @@ final class mysqli_warning
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $message;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $sqlstate;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $errno;
|
||||
|
||||
/**
|
||||
|
@ -810,22 +838,27 @@ class mysqli_result implements IteratorAggregate
|
|||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $current_field;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $field_count;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => '?array'], default: '')]
|
||||
public $lengths;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
|
||||
public $num_rows;
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $type;
|
||||
|
||||
/**
|
||||
|
@ -1130,6 +1163,9 @@ class mysqli_result implements IteratorAggregate
|
|||
*/
|
||||
public function fetch_row() {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
public function fetch_column(int $column = null) {}
|
||||
|
||||
/**
|
||||
* Set result pointer to a specified field offset
|
||||
* @link https://php.net/manual/en/mysqli-result.field-seek.php
|
||||
|
@ -1164,42 +1200,52 @@ class mysqli_stmt
|
|||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
|
||||
public $affected_rows;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
|
||||
public $insert_id;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
|
||||
public $num_rows;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $param_count;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $field_count;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $errno;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $error;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
|
||||
public $error_list;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $sqlstate;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $id;
|
||||
|
||||
/**
|
||||
|
@ -1344,7 +1390,7 @@ class mysqli_stmt
|
|||
* @link https://php.net/manual/en/mysqli-stmt.execute.php
|
||||
* @return bool true on success or false on failure.
|
||||
*/
|
||||
public function execute() {}
|
||||
public function execute(#[PhpStormStubsElementAvailable('8.1')] $params = null) {}
|
||||
|
||||
/**
|
||||
* Fetch results from a prepared statement into the bound variables
|
||||
|
@ -1633,7 +1679,7 @@ function mysqli_error(mysqli $mysql): string {}
|
|||
* @param mysqli_stmt $statement
|
||||
* @return bool
|
||||
*/
|
||||
function mysqli_stmt_execute(mysqli_stmt $statement): bool {}
|
||||
function mysqli_stmt_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
|
||||
|
||||
/**
|
||||
* Executes a prepared Query
|
||||
|
@ -1643,7 +1689,7 @@ function mysqli_stmt_execute(mysqli_stmt $statement): bool {}
|
|||
* @return bool
|
||||
*/
|
||||
#[Deprecated(since: '5.3')]
|
||||
function mysqli_execute(mysqli_stmt $statement): bool {}
|
||||
function mysqli_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
|
||||
|
||||
/**
|
||||
* Returns the next field in the result set
|
||||
|
@ -1742,6 +1788,17 @@ function mysqli_fetch_object(mysqli_result $result, string $class = 'stdClass',
|
|||
*/
|
||||
function mysqli_fetch_row(mysqli_result $result): array|false|null {}
|
||||
|
||||
/**
|
||||
* Get a result column as an enumerated array
|
||||
* @link https://php.net/manual/en/mysqli-result.fetch-column.php
|
||||
* @param mysqli_result $result A result set identifier returned by mysqli_query(),
|
||||
* mysqli_store_result() or mysqli_use_result().
|
||||
* @return string|int|float|false|null returns an array of strings that corresponds to the fetched column
|
||||
* or null if there are no more columns in result set.
|
||||
*/
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function mysqli_fetch_column(mysqli_result $result, int $column = null): string|int|float|false|null {}
|
||||
|
||||
/**
|
||||
* Returns the number of columns for the most recent query
|
||||
* @link https://php.net/manual/en/mysqli.field-count.php
|
||||
|
@ -1819,7 +1876,8 @@ function mysqli_get_charset(mysqli $mysql): ?object {}
|
|||
* @param mysqli|null $mysql [optional] A link identifier returned by mysqli_connect() or mysqli_init()
|
||||
* @return string|null A string that represents the MySQL client library version
|
||||
*/
|
||||
function mysqli_get_client_info(?mysqli $mysql): ?string {}
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '?string')]
|
||||
function mysqli_get_client_info(?mysqli $mysql) {}
|
||||
|
||||
/**
|
||||
* Returns the MySQL client version as an integer
|
||||
|
@ -3272,3 +3330,5 @@ define('MYSQLI_TRANS_COR_AND_CHAIN', 1);
|
|||
define('MYSQLI_TRANS_COR_AND_NO_CHAIN', 2);
|
||||
define('MYSQLI_TRANS_COR_RELEASE', 4);
|
||||
define('MYSQLI_TRANS_COR_NO_RELEASE', 8);
|
||||
define('MYSQLI_OPT_LOAD_DATA_LOCAL_DIR', 43);
|
||||
define('MYSQLI_REFRESH_REPLICA', 64);
|
||||
|
|
|
@ -613,7 +613,7 @@ define('PCRE_VERSION_MAJOR', 10);
|
|||
/**
|
||||
* @since 7.3
|
||||
*/
|
||||
define('PCRE_VERSION_MINOR', 35);
|
||||
define('PCRE_VERSION_MINOR', 37);
|
||||
|
||||
/**
|
||||
* @since 7.3
|
||||
|
|
|
@ -2159,6 +2159,10 @@ define('AI_NUMERICSERV', 1024);
|
|||
define('AI_V4MAPPED', 8);
|
||||
define('AI_ALL', 16);
|
||||
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('TCP_DEFER_ACCEPT', 9);
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
const SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
|
||||
const SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
|
||||
const SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
|
||||
|
@ -87,6 +89,68 @@ const SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13 = 1;
|
|||
const SODIUM_CRYPTO_PWHASH_ALG_DEFAULT = 2;
|
||||
const SODIUM_CRYPTO_PWHASH_SALTBYTES = 16;
|
||||
const SODIUM_CRYPTO_PWHASH_STRPREFIX = '$argon2id$';
|
||||
const SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES = 24;
|
||||
const SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES = 32;
|
||||
const SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES = 32;
|
||||
const SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES = 32;
|
||||
const SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES = 32;
|
||||
const SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES = 64;
|
||||
const SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES = 32;
|
||||
const SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES = 64;
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_add(string $p, string $q): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_from_hash(string $s): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_is_valid_point(string $s): bool {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_random(): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_add(string $x, string $y): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_complement(string $s): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_invert(string $s): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_mul(string $x, string $y): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_negate(string $s): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_reduce(string $s): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_sub(string $x, string $y): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_scalar_random(): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_core_ristretto255_sub(string $p, string $q): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_scalarmult_ristretto255(string $n, string $p): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_scalarmult_ristretto255_base(string $n): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_stream_xchacha20(int $length, string $nonce, string $key): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_stream_xchacha20_xor(string $message, string $nonce, string $key): string {}
|
||||
|
||||
#[PhpStormStubsElementAvailable('8.1')]
|
||||
function sodium_crypto_stream_xchacha20_keygen(): string {}
|
||||
|
||||
/**
|
||||
* Can you access AES-256-GCM? This is only available if you have supported
|
||||
|
|
|
@ -137,7 +137,7 @@ define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);
|
|||
/**
|
||||
* @since 7.4
|
||||
*/
|
||||
define('PASSWORD_ARGON2_PROVIDER', 'standard');
|
||||
define('PASSWORD_ARGON2_PROVIDER', 'sodium');
|
||||
|
||||
/**
|
||||
* Returns information about the given hash
|
||||
|
|
|
@ -16,8 +16,11 @@ class __PHP_Incomplete_Class
|
|||
|
||||
class php_user_filter
|
||||
{
|
||||
public $filtername;
|
||||
public $params;
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $filtername;
|
||||
|
||||
#[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')]
|
||||
public $params;
|
||||
|
||||
/**
|
||||
* @link https://php.net/manual/en/php-user-filter.filter.php
|
||||
|
@ -408,7 +411,7 @@ function wordwrap(string $string, int $width = 75, string $break = "\n", bool $c
|
|||
* @return string The converted string.
|
||||
*/
|
||||
#[Pure]
|
||||
function htmlspecialchars(string $string, int $flags = ENT_COMPAT|ENT_HTML401, ?string $encoding = 'UTF-8', bool $double_encode = true): string {}
|
||||
function htmlspecialchars(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding = 'UTF-8', bool $double_encode = true): string {}
|
||||
|
||||
/**
|
||||
* Convert all applicable characters to HTML entities
|
||||
|
@ -454,7 +457,7 @@ function htmlspecialchars(string $string, int $flags = ENT_COMPAT|ENT_HTML401, ?
|
|||
* @return string the encoded string.
|
||||
*/
|
||||
#[Pure]
|
||||
function htmlentities(string $string, int $flags = ENT_COMPAT, ?string $encoding, bool $double_encode = true): string {}
|
||||
function htmlentities(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding, bool $double_encode = true): string {}
|
||||
|
||||
/**
|
||||
* Convert HTML entities to their corresponding characters
|
||||
|
@ -495,7 +498,7 @@ function htmlentities(string $string, int $flags = ENT_COMPAT, ?string $encoding
|
|||
* @return string the decoded string.
|
||||
*/
|
||||
#[Pure]
|
||||
function html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $encoding): string {}
|
||||
function html_entity_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding): string {}
|
||||
|
||||
/**
|
||||
* Convert special HTML entities back to characters
|
||||
|
@ -529,7 +532,7 @@ function html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $en
|
|||
* @return string the decoded string.
|
||||
*/
|
||||
#[Pure]
|
||||
function htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): string {}
|
||||
function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE): string {}
|
||||
|
||||
/**
|
||||
* Returns the translation table used by <function>htmlspecialchars</function> and <function>htmlentities</function>
|
||||
|
@ -705,7 +708,7 @@ function htmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): strin
|
|||
* @return array the translation table as an array.
|
||||
*/
|
||||
#[Pure]
|
||||
function get_html_translation_table(int $table, int $flags = ENT_COMPAT, string $encoding = "UTF-8"): array {}
|
||||
function get_html_translation_table(int $table, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, string $encoding = "UTF-8"): array {}
|
||||
|
||||
/**
|
||||
* Calculate the sha1 hash of a string
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -449,7 +450,7 @@ function ini_get_all(?string $extension, bool $details = true): array|false {}
|
|||
* </p>
|
||||
* @return string|false the old value on success, false on failure.
|
||||
*/
|
||||
function ini_set(string $option, string $value): string|false {}
|
||||
function ini_set(string $option, #[LanguageLevelTypeAware(['8.1' => 'string|int|float|bool|null'], default: 'string')] $value): string|false {}
|
||||
|
||||
/**
|
||||
* Alias:
|
||||
|
@ -460,7 +461,7 @@ function ini_set(string $option, string $value): string|false {}
|
|||
* @param string $value
|
||||
* @return string|false
|
||||
*/
|
||||
function ini_alter(string $option, string $value): string|false {}
|
||||
function ini_alter(string $option, #[LanguageLevelTypeAware(['8.1' => 'string|int|float|bool|null'], default: 'string')] $value): string|false {}
|
||||
|
||||
/**
|
||||
* Restores the value of a configuration option
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -77,7 +79,13 @@ use JetBrains\PhpStorm\Pure;
|
|||
* is returned and a warning raised (this can happen if the system call is
|
||||
* interrupted by an incoming signal).
|
||||
*/
|
||||
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds): int|false {}
|
||||
function stream_select(
|
||||
?array &$read,
|
||||
?array &$write,
|
||||
?array &$except,
|
||||
?int $seconds,
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int|null'], default: 'int')] $microseconds
|
||||
): int|false {}
|
||||
|
||||
/**
|
||||
* Create a stream context
|
||||
|
@ -638,7 +646,14 @@ function fgetcsv($stream, ?int $length = 0, string $separator = ',', string $enc
|
|||
* </p>
|
||||
* @return int|false the length of the written string or false on failure.
|
||||
*/
|
||||
function fputcsv($stream, array $fields, string $separator = ",", string $enclosure = '"', string $escape = "\\"): int|false {}
|
||||
function fputcsv(
|
||||
$stream,
|
||||
array $fields,
|
||||
string $separator = ",",
|
||||
string $enclosure = '"',
|
||||
string $escape = "\\",
|
||||
#[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL
|
||||
): int|false {}
|
||||
|
||||
/**
|
||||
* Portable advisory file locking
|
||||
|
|
|
@ -15,4 +15,26 @@ abstract class BaseStubsTest extends TestCase
|
|||
PhpStormStubsSingleton::getPhpStormStubs();
|
||||
ReflectionStubsSingleton::getReflectionStubs();
|
||||
}
|
||||
|
||||
public static function ifReflectionTypesExistInSignature(array $reflectionTypes, array $typesFromSignature): bool
|
||||
{
|
||||
return count(array_intersect($reflectionTypes, $typesFromSignature)) === count($reflectionTypes);
|
||||
}
|
||||
|
||||
public static function ifReflectionTypesExistInAttributes(array $reflectionTypes, array $typesFromAttribute): bool
|
||||
{
|
||||
return !empty(array_filter(
|
||||
$typesFromAttribute,
|
||||
fn (array $types) => count(array_intersect($reflectionTypes, $types)) == count($reflectionTypes)
|
||||
));
|
||||
}
|
||||
|
||||
public static function getStringRepresentationOfTypeHintsFromAttributes(array $typesFromAttribute): string
|
||||
{
|
||||
$resultString = '';
|
||||
foreach ($typesFromAttribute as $types) {
|
||||
$resultString .= '[' . implode('|', $types) . ']';
|
||||
}
|
||||
return $resultString;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ use JetBrains\PhpStorm\ArrayShape;
|
|||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\AttributeGroup;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
|
@ -74,7 +75,7 @@ abstract class BasePHPElement
|
|||
return $reflectionTypes;
|
||||
}
|
||||
|
||||
protected static function convertParsedTypeToArray(Name|Identifier|NullableType|string|UnionType|null $type): array
|
||||
protected static function convertParsedTypeToArray(Name|Identifier|NullableType|string|UnionType|null|Type $type): array
|
||||
{
|
||||
$types = [];
|
||||
if ($type !== null) {
|
||||
|
@ -82,6 +83,8 @@ abstract class BasePHPElement
|
|||
foreach ($type->types as $type) {
|
||||
array_push($types, self::getTypeNameFromNode($type));
|
||||
}
|
||||
} elseif ($type instanceof Type) {
|
||||
array_push($types, ...explode('|', (string)$type));
|
||||
} else {
|
||||
array_push($types, self::getTypeNameFromNode($type));
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ class PHPClass extends BasePHPClass
|
|||
$newProperty->access = 'public';
|
||||
$newProperty->name = $propertyName;
|
||||
$newProperty->parentName = $this->name;
|
||||
$newProperty->type = '' . $property->getType();
|
||||
$newProperty->typesFromSignature = self::convertParsedTypeToArray($property->getType());;
|
||||
assert(
|
||||
!array_key_exists($propertyName, $this->properties),
|
||||
"Property '$propertyName' is already declared in class '$this->name'"
|
||||
|
|
|
@ -9,6 +9,7 @@ use phpDocumentor\Reflection\DocBlock\Tags\Link;
|
|||
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\See;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Since;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Var_;
|
||||
use PhpParser\Node;
|
||||
use StubTests\Model\Tags\RemovedTag;
|
||||
use StubTests\Parsers\DocFactoryProvider;
|
||||
|
@ -47,6 +48,11 @@ trait PHPDocElement
|
|||
*/
|
||||
public array $paramTags = [];
|
||||
|
||||
/**
|
||||
* @var Var_[]
|
||||
*/
|
||||
public array $varTags = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
|
@ -67,6 +73,7 @@ trait PHPDocElement
|
|||
$this->tagNames[] = $tag->getName();
|
||||
}
|
||||
$this->paramTags = $phpDoc->getTagsByName('param');
|
||||
$this->varTags = $phpDoc->getTagsByName('var');
|
||||
$this->links = $phpDoc->getTagsByName('link');
|
||||
$this->see = $phpDoc->getTagsByName('see');
|
||||
$this->sinceTags = $phpDoc->getTagsByName('since');
|
||||
|
|
|
@ -13,6 +13,8 @@ class PHPParameter extends BasePHPElement
|
|||
public array $typesFromSignature = [];
|
||||
/** @var string[] */
|
||||
public array $typesFromAttribute = [];
|
||||
/** @var string[] */
|
||||
public array $typesFromPhpDoc = [];
|
||||
public bool $is_vararg = false;
|
||||
public bool $is_passed_by_ref = false;
|
||||
public bool $isOptional = false;
|
||||
|
|
|
@ -9,7 +9,14 @@ use stdClass;
|
|||
|
||||
class PHPProperty extends BasePHPElement
|
||||
{
|
||||
public string $type = '';
|
||||
use PHPDocElement;
|
||||
|
||||
/** @var string[] */
|
||||
public array $typesFromSignature = [];
|
||||
/** @var string[] */
|
||||
public array $typesFromAttribute = [];
|
||||
/** @var string[] */
|
||||
public array $typesFromPhpDoc = [];
|
||||
public string $access = '';
|
||||
public bool $is_static = false;
|
||||
|
||||
|
@ -31,13 +38,7 @@ class PHPProperty extends BasePHPElement
|
|||
}
|
||||
$this->access = $access;
|
||||
$this->is_static = $reflectionObject->isStatic();
|
||||
$this->type = '';
|
||||
if ($reflectionObject->hasType()) {
|
||||
$reflectionNamedType = $reflectionObject->getType();
|
||||
if (isset($reflectionNamedType)){
|
||||
$this->type = $reflectionNamedType->getName();
|
||||
}
|
||||
}
|
||||
$this->typesFromSignature = self::getReflectionTypeAsArray($reflectionObject->getType());;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -48,6 +49,7 @@ class PHPProperty extends BasePHPElement
|
|||
public function readObjectFromStubNode($node): static
|
||||
{
|
||||
$this->name = $node->props[0]->name->name;
|
||||
$this->collectTags($node);
|
||||
$this->is_static = $node->isStatic();
|
||||
if ($node->isProtected()) {
|
||||
$access = 'protected';
|
||||
|
@ -58,7 +60,11 @@ class PHPProperty extends BasePHPElement
|
|||
}
|
||||
$this->access = $access;
|
||||
|
||||
$this->type = $node->type->name ?? '';
|
||||
$this->typesFromSignature = self::convertParsedTypeToArray($node->type);
|
||||
$this->typesFromAttribute = self::findTypesFromAttribute($node->attrGroups);
|
||||
foreach ($this->varTags as $varTag) {
|
||||
$this->typesFromPhpDoc = explode('|', (string)$varTag->getType());
|
||||
}
|
||||
|
||||
$parentNode = $node->getAttribute('parent');
|
||||
if ($parentNode !== null){
|
||||
|
|
|
@ -10,7 +10,7 @@ use RuntimeException;
|
|||
|
||||
class PhpVersions implements ArrayAccess, IteratorAggregate
|
||||
{
|
||||
private static array $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0];
|
||||
private static array $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1];
|
||||
|
||||
public static function getLatest()
|
||||
{
|
||||
|
|
|
@ -453,7 +453,7 @@ class StubsTest extends BaseStubsTest
|
|||
static::assertArrayHasKey(
|
||||
$property->name,
|
||||
$stubClass->properties,
|
||||
"Missing property $className::$property->access $property->type $$property->name"
|
||||
"Missing property $className::$property->access " . implode('|', $property->typesFromSignature) . " $$property->name"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -501,11 +501,14 @@ class StubsTest extends BaseStubsTest
|
|||
{
|
||||
$className = $class->name;
|
||||
$stubProperty = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->properties[$property->name];
|
||||
static::assertEquals(
|
||||
$property->type,
|
||||
$stubProperty->type,
|
||||
"Property type doesn't match for property $className::$property->name"
|
||||
);
|
||||
$propertyName = $stubProperty->name;
|
||||
$conditionToCompareWithSignature = self::ifReflectionTypesExistInSignature($property->typesFromSignature, $stubProperty->typesFromSignature);
|
||||
$conditionToCompareWithAttribute = self::ifReflectionTypesExistInAttributes($property->typesFromSignature, $stubProperty->typesFromAttribute);
|
||||
$testCondition = $conditionToCompareWithSignature || $conditionToCompareWithAttribute;
|
||||
self::assertTrue($testCondition, "Property $className::$propertyName has invalid typehint.
|
||||
Reflection property has type " . implode('|', $property->typesFromSignature) . ' but stubs has type ' .
|
||||
implode('|', $stubProperty->typesFromSignature) . ' in signature and attribute has types ' .
|
||||
self::getStringRepresentationOfTypeHintsFromAttributes($stubProperty->typesFromAttribute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,13 +34,13 @@ class StubsTypeHintsTest extends BaseStubsTest
|
|||
);
|
||||
/** @var PHPFunction $stubFunction */
|
||||
$stubFunction = array_pop($allEqualStubFunctions);
|
||||
$conditionToCompareWithSignature = self::ifReflectionTypesExistInSignature($function->returnTypesFromSignature, $stubFunction->returnTypesFromSignature);
|
||||
$conditionToCompareWithAttribute = self::ifReflectionTypesExistInAttributes($function->returnTypesFromSignature, $stubFunction->returnTypesFromAttribute);
|
||||
$conditionToCompareWithSignature = BaseStubsTest::ifReflectionTypesExistInSignature($function->returnTypesFromSignature, $stubFunction->returnTypesFromSignature);
|
||||
$conditionToCompareWithAttribute = BaseStubsTest::ifReflectionTypesExistInAttributes($function->returnTypesFromSignature, $stubFunction->returnTypesFromAttribute);
|
||||
$testCondition = $conditionToCompareWithSignature || $conditionToCompareWithAttribute;
|
||||
self::assertTrue($testCondition, "Function $functionName has invalid return type.
|
||||
Reflection function has return type " . implode('|', $function->returnTypesFromSignature) . ' but stubs has return type ' .
|
||||
implode('|', $stubFunction->returnTypesFromSignature) . ' in signature and attribute has types ' .
|
||||
self::getStringRepresentationOfTypeHintsFromAttributes($stubFunction->returnTypesFromAttribute));
|
||||
BaseStubsTest::getStringRepresentationOfTypeHintsFromAttributes($stubFunction->returnTypesFromAttribute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -343,13 +343,13 @@ class StubsTypeHintsTest extends BaseStubsTest
|
|||
self::convertNullableTypesToUnion($listOfTypes, $unifiedStubsAttributesParameterTypes[$languageVersion]);
|
||||
}
|
||||
}
|
||||
$conditionToCompareWithSignature = self::ifReflectionTypesExistInSignature($unifiedReflectionParameterTypes, $unifiedStubsParameterTypes);
|
||||
$conditionToCompareWithAttribute = self::ifReflectionTypesExistInAttributes($unifiedReflectionParameterTypes, $unifiedStubsAttributesParameterTypes);
|
||||
$conditionToCompareWithSignature = BaseStubsTest::ifReflectionTypesExistInSignature($unifiedReflectionParameterTypes, $unifiedStubsParameterTypes);
|
||||
$conditionToCompareWithAttribute = BaseStubsTest::ifReflectionTypesExistInAttributes($unifiedReflectionParameterTypes, $unifiedStubsAttributesParameterTypes);
|
||||
$testCondition = $conditionToCompareWithSignature || $conditionToCompareWithAttribute;
|
||||
self::assertTrue($testCondition, "Type mismatch $functionName: \$$parameter->name \n
|
||||
Reflection parameter has type '" . implode('|', $unifiedReflectionParameterTypes) .
|
||||
"' but stub parameter has type '" . implode('|', $unifiedStubsParameterTypes) . "' in signature and " .
|
||||
self::getStringRepresentationOfTypeHintsFromAttributes($unifiedStubsAttributesParameterTypes) . ' in attribute');
|
||||
BaseStubsTest::getStringRepresentationOfTypeHintsFromAttributes($unifiedStubsAttributesParameterTypes) . ' in attribute');
|
||||
}
|
||||
|
||||
private static function convertNullableTypesToUnion($typesToProcess, array &$resultArray)
|
||||
|
@ -362,26 +362,4 @@ class StubsTypeHintsTest extends BaseStubsTest
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static function getStringRepresentationOfTypeHintsFromAttributes(array $typesFromAttribute): string
|
||||
{
|
||||
$resultString = '';
|
||||
foreach ($typesFromAttribute as $types) {
|
||||
$resultString .= '[' . implode('|', $types) . ']';
|
||||
}
|
||||
return $resultString;
|
||||
}
|
||||
|
||||
private static function ifReflectionTypesExistInAttributes(array $reflectionTypes, array $typesFromAttribute): bool
|
||||
{
|
||||
return !empty(array_filter(
|
||||
$typesFromAttribute,
|
||||
fn (array $types) => count(array_intersect($reflectionTypes, $types)) == count($reflectionTypes)
|
||||
));
|
||||
}
|
||||
|
||||
private static function ifReflectionTypesExistInSignature(array $reflectionTypes, array $typesFromSignature): bool
|
||||
{
|
||||
return count(array_intersect($reflectionTypes, $typesFromSignature)) === count($reflectionTypes);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
namespace StubTests\TestData\Providers\Stubs;
|
||||
|
||||
use Generator;
|
||||
use StubTests\Model\PHPFunction;
|
||||
use StubTests\TestData\Providers\PhpStormStubsSingleton;
|
||||
|
||||
class StubsTestDataProviders
|
||||
|
@ -23,4 +24,13 @@ class StubsTestDataProviders
|
|||
yield "class $class->sourceFilePath/$class->name" => [$class];
|
||||
}
|
||||
}
|
||||
|
||||
public static function coreFunctionsProvider(): ?Generator
|
||||
{
|
||||
$allFunctions = PhpStormStubsSingleton::getPhpStormStubs()->getFunctions();
|
||||
$coreFunctions = array_filter($allFunctions, fn (PHPFunction $function): bool => $function->stubBelongsToCore === true);
|
||||
foreach ($coreFunctions as $coreFunction) {
|
||||
yield "function $coreFunction->name" => [$coreFunction];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A class for working with PHP tokens, which is an alternative to
|
||||
* the {@see token_get_all()} function.
|
||||
*
|
||||
* @since 8.0
|
||||
*/
|
||||
class PhpToken implements Stringable
|
||||
{
|
||||
/**
|
||||
* One of the T_* constants, or an integer < 256 representing a
|
||||
* single-char token.
|
||||
*/
|
||||
public int $id;
|
||||
|
||||
/**
|
||||
* The textual content of the token.
|
||||
*/
|
||||
public string $text;
|
||||
|
||||
/**
|
||||
* The starting line number (1-based) of the token.
|
||||
*/
|
||||
public int $line;
|
||||
|
||||
/**
|
||||
* The starting position (0-based) in the tokenized string.
|
||||
*/
|
||||
public int $pos;
|
||||
|
||||
/**
|
||||
* @param int $id An integer identifier
|
||||
* @param string $text Textual content
|
||||
* @param int $line Strating line
|
||||
* @param int $pos Straring position (line offset)
|
||||
*/
|
||||
final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) {}
|
||||
|
||||
/**
|
||||
* Get the name of the token.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTokenName() {}
|
||||
|
||||
/**
|
||||
* Same as {@see token_get_all()}, but returning array of {@see PhpToken}
|
||||
* or an instance of a child class.
|
||||
*
|
||||
* @param string $code An a PHP source code
|
||||
* @param int $flags
|
||||
* @return static[]
|
||||
*/
|
||||
public static function tokenize(string $code, int $flags = 0) {}
|
||||
|
||||
/**
|
||||
* Whether the token has the given ID, the given text, or has an ID/text
|
||||
* part of the given array.
|
||||
*
|
||||
* @param int|string|array $kind
|
||||
* @return bool
|
||||
*/
|
||||
public function is($kind) {}
|
||||
|
||||
/**
|
||||
* Whether this token would be ignored by the PHP parser.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isIgnorable() {}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString() {}
|
||||
}
|
|
@ -42,170 +42,172 @@ function token_get_all(string $code, int $flags = 0): array {}
|
|||
function token_name(int $id): string {}
|
||||
|
||||
define('TOKEN_PARSE', 1);
|
||||
define('T_REQUIRE_ONCE', 263);
|
||||
define('T_REQUIRE', 262);
|
||||
define('T_EVAL', 321);
|
||||
define('T_INCLUDE_ONCE', 261);
|
||||
define('T_INCLUDE', 260);
|
||||
define('T_LOGICAL_OR', 264);
|
||||
define('T_LOGICAL_XOR', 265);
|
||||
define('T_LOGICAL_AND', 266);
|
||||
define('T_PRINT', 267);
|
||||
define('T_YIELD', 268);
|
||||
define('T_DOUBLE_ARROW', 269);
|
||||
define('T_YIELD_FROM', 270);
|
||||
define('T_POW_EQUAL', 282);
|
||||
define('T_SR_EQUAL', 281);
|
||||
define('T_SL_EQUAL', 280);
|
||||
define('T_XOR_EQUAL', 279);
|
||||
define('T_OR_EQUAL', 278);
|
||||
define('T_AND_EQUAL', 277);
|
||||
define('T_MOD_EQUAL', 276);
|
||||
define('T_CONCAT_EQUAL', 275);
|
||||
define('T_DIV_EQUAL', 274);
|
||||
define('T_MUL_EQUAL', 273);
|
||||
define('T_MINUS_EQUAL', 272);
|
||||
define('T_PLUS_EQUAL', 271);
|
||||
define('T_REQUIRE_ONCE', 276);
|
||||
define('T_REQUIRE', 275);
|
||||
define('T_EVAL', 274);
|
||||
define('T_INCLUDE_ONCE', 273);
|
||||
define('T_INCLUDE', 272);
|
||||
define('T_LOGICAL_OR', 277);
|
||||
define('T_LOGICAL_XOR', 278);
|
||||
define('T_LOGICAL_AND', 279);
|
||||
define('T_PRINT', 280);
|
||||
define('T_YIELD', 281);
|
||||
define('T_DOUBLE_ARROW', 385);
|
||||
define('T_YIELD_FROM', 282);
|
||||
define('T_POW_EQUAL', 401);
|
||||
define('T_SR_EQUAL', 361);
|
||||
define('T_SL_EQUAL', 360);
|
||||
define('T_XOR_EQUAL', 359);
|
||||
define('T_OR_EQUAL', 358);
|
||||
define('T_AND_EQUAL', 357);
|
||||
define('T_MOD_EQUAL', 356);
|
||||
define('T_CONCAT_EQUAL', 355);
|
||||
define('T_DIV_EQUAL', 354);
|
||||
define('T_MUL_EQUAL', 353);
|
||||
define('T_MINUS_EQUAL', 352);
|
||||
define('T_PLUS_EQUAL', 351);
|
||||
/**
|
||||
* @since 7.4
|
||||
*/
|
||||
define('T_COALESCE_EQUAL', 283);
|
||||
define('T_COALESCE', 284);
|
||||
define('T_BOOLEAN_OR', 285);
|
||||
define('T_BOOLEAN_AND', 286);
|
||||
define('T_SPACESHIP', 291);
|
||||
define('T_IS_NOT_IDENTICAL', 290);
|
||||
define('T_IS_IDENTICAL', 289);
|
||||
define('T_IS_NOT_EQUAL', 288);
|
||||
define('T_IS_EQUAL', 287);
|
||||
define('T_IS_GREATER_OR_EQUAL', 293);
|
||||
define('T_IS_SMALLER_OR_EQUAL', 292);
|
||||
define('T_SR', 295);
|
||||
define('T_SL', 294);
|
||||
define('T_INSTANCEOF', 296);
|
||||
define('T_UNSET_CAST', 303);
|
||||
define('T_BOOL_CAST', 302);
|
||||
define('T_OBJECT_CAST', 301);
|
||||
define('T_ARRAY_CAST', 300);
|
||||
define('T_STRING_CAST', 299);
|
||||
define('T_DOUBLE_CAST', 298);
|
||||
define('T_INT_CAST', 297);
|
||||
define('T_DEC', 385);
|
||||
define('T_INC', 384);
|
||||
define('T_POW', 304);
|
||||
define('T_CLONE', 305);
|
||||
define('T_NEW', 322);
|
||||
define('T_ELSEIF', 307);
|
||||
define('T_ELSE', 308);
|
||||
define('T_ENDIF', 325);
|
||||
define('T_PUBLIC', 360);
|
||||
define('T_PROTECTED', 359);
|
||||
define('T_PRIVATE', 358);
|
||||
define('T_FINAL', 357);
|
||||
define('T_ABSTRACT', 356);
|
||||
define('T_STATIC', 355);
|
||||
define('T_LNUMBER', 309);
|
||||
define('T_DNUMBER', 310);
|
||||
define('T_STRING', 311);
|
||||
define('T_VARIABLE', 315);
|
||||
define('T_INLINE_HTML', 316);
|
||||
define('T_ENCAPSED_AND_WHITESPACE', 317);
|
||||
define('T_CONSTANT_ENCAPSED_STRING', 318);
|
||||
define('T_STRING_VARNAME', 319);
|
||||
define('T_NUM_STRING', 320);
|
||||
define('T_EXIT', 323);
|
||||
define('T_IF', 324);
|
||||
define('T_ECHO', 326);
|
||||
define('T_DO', 327);
|
||||
define('T_WHILE', 328);
|
||||
define('T_ENDWHILE', 329);
|
||||
define('T_FOR', 330);
|
||||
define('T_ENDFOR', 331);
|
||||
define('T_FOREACH', 332);
|
||||
define('T_ENDFOREACH', 333);
|
||||
define('T_DECLARE', 334);
|
||||
define('T_ENDDECLARE', 335);
|
||||
define('T_AS', 336);
|
||||
define('T_SWITCH', 337);
|
||||
define('T_ENDSWITCH', 338);
|
||||
define('T_CASE', 339);
|
||||
define('T_DEFAULT', 340);
|
||||
define('T_MATCH', 341);
|
||||
define('T_BREAK', 342);
|
||||
define('T_CONTINUE', 343);
|
||||
define('T_GOTO', 344);
|
||||
define('T_FUNCTION', 345);
|
||||
define('T_CONST', 347);
|
||||
define('T_RETURN', 348);
|
||||
define('T_TRY', 349);
|
||||
define('T_CATCH', 350);
|
||||
define('T_FINALLY', 351);
|
||||
define('T_THROW', 258);
|
||||
define('T_USE', 352);
|
||||
define('T_INSTEADOF', 353);
|
||||
define('T_GLOBAL', 354);
|
||||
define('T_VAR', 361);
|
||||
define('T_UNSET', 362);
|
||||
define('T_ISSET', 363);
|
||||
define('T_EMPTY', 364);
|
||||
define('T_HALT_COMPILER', 365);
|
||||
define('T_CLASS', 366);
|
||||
define('T_TRAIT', 367);
|
||||
define('T_INTERFACE', 368);
|
||||
define('T_EXTENDS', 369);
|
||||
define('T_IMPLEMENTS', 370);
|
||||
define('T_OBJECT_OPERATOR', 386);
|
||||
define('T_LIST', 372);
|
||||
define('T_ARRAY', 373);
|
||||
define('T_CALLABLE', 374);
|
||||
define('T_LINE', 375);
|
||||
define('T_FILE', 376);
|
||||
define('T_DIR', 377);
|
||||
define('T_CLASS_C', 378);
|
||||
define('T_TRAIT_C', 379);
|
||||
define('T_METHOD_C', 380);
|
||||
define('T_FUNC_C', 381);
|
||||
define('T_COMMENT', 388);
|
||||
define('T_DOC_COMMENT', 389);
|
||||
define('T_OPEN_TAG', 390);
|
||||
define('T_OPEN_TAG_WITH_ECHO', 391);
|
||||
define('T_CLOSE_TAG', 392);
|
||||
define('T_WHITESPACE', 393);
|
||||
define('T_START_HEREDOC', 394);
|
||||
define('T_END_HEREDOC', 395);
|
||||
define('T_DOLLAR_OPEN_CURLY_BRACES', 396);
|
||||
define('T_CURLY_OPEN', 397);
|
||||
define('T_PAAMAYIM_NEKUDOTAYIM', 398);
|
||||
define('T_NAMESPACE', 371);
|
||||
define('T_NS_C', 382);
|
||||
define('T_NS_SEPARATOR', 399);
|
||||
define('T_ELLIPSIS', 400);
|
||||
define('T_DOUBLE_COLON', 398);
|
||||
define('T_COALESCE_EQUAL', 362);
|
||||
define('T_COALESCE', 399);
|
||||
define('T_BOOLEAN_OR', 363);
|
||||
define('T_BOOLEAN_AND', 364);
|
||||
define('T_SPACESHIP', 371);
|
||||
define('T_IS_NOT_IDENTICAL', 368);
|
||||
define('T_IS_IDENTICAL', 367);
|
||||
define('T_IS_NOT_EQUAL', 366);
|
||||
define('T_IS_EQUAL', 365);
|
||||
define('T_IS_GREATER_OR_EQUAL', 370);
|
||||
define('T_IS_SMALLER_OR_EQUAL', 369);
|
||||
define('T_SR', 373);
|
||||
define('T_SL', 372);
|
||||
define('T_INSTANCEOF', 283);
|
||||
define('T_UNSET_CAST', 382);
|
||||
define('T_BOOL_CAST', 381);
|
||||
define('T_OBJECT_CAST', 380);
|
||||
define('T_ARRAY_CAST', 379);
|
||||
define('T_STRING_CAST', 378);
|
||||
define('T_DOUBLE_CAST', 377);
|
||||
define('T_INT_CAST', 376);
|
||||
define('T_DEC', 375);
|
||||
define('T_INC', 374);
|
||||
define('T_POW', 400);
|
||||
define('T_CLONE', 285);
|
||||
define('T_NEW', 284);
|
||||
define('T_ELSEIF', 288);
|
||||
define('T_ELSE', 289);
|
||||
define('T_ENDIF', 290);
|
||||
define('T_PUBLIC', 326);
|
||||
define('T_PROTECTED', 325);
|
||||
define('T_PRIVATE', 324);
|
||||
define('T_FINAL', 323);
|
||||
define('T_ABSTRACT', 322);
|
||||
define('T_STATIC', 321);
|
||||
define('T_LNUMBER', 260);
|
||||
define('T_DNUMBER', 261);
|
||||
define('T_STRING', 262);
|
||||
define('T_VARIABLE', 266);
|
||||
define('T_INLINE_HTML', 267);
|
||||
define('T_ENCAPSED_AND_WHITESPACE', 268);
|
||||
define('T_CONSTANT_ENCAPSED_STRING', 269);
|
||||
define('T_STRING_VARNAME', 270);
|
||||
define('T_NUM_STRING', 271);
|
||||
define('T_EXIT', 286);
|
||||
define('T_IF', 287);
|
||||
define('T_ECHO', 291);
|
||||
define('T_DO', 292);
|
||||
define('T_WHILE', 293);
|
||||
define('T_ENDWHILE', 294);
|
||||
define('T_FOR', 295);
|
||||
define('T_ENDFOR', 296);
|
||||
define('T_FOREACH', 297);
|
||||
define('T_ENDFOREACH', 298);
|
||||
define('T_DECLARE', 299);
|
||||
define('T_ENDDECLARE', 300);
|
||||
define('T_AS', 301);
|
||||
define('T_SWITCH', 302);
|
||||
define('T_ENDSWITCH', 303);
|
||||
define('T_CASE', 304);
|
||||
define('T_DEFAULT', 305);
|
||||
define('T_MATCH', 306);
|
||||
define('T_BREAK', 307);
|
||||
define('T_CONTINUE', 308);
|
||||
define('T_GOTO', 309);
|
||||
define('T_FUNCTION', 310);
|
||||
define('T_CONST', 312);
|
||||
define('T_RETURN', 313);
|
||||
define('T_TRY', 314);
|
||||
define('T_CATCH', 315);
|
||||
define('T_FINALLY', 316);
|
||||
define('T_THROW', 317);
|
||||
define('T_USE', 318);
|
||||
define('T_INSTEADOF', 319);
|
||||
define('T_GLOBAL', 320);
|
||||
define('T_VAR', 327);
|
||||
define('T_UNSET', 328);
|
||||
define('T_ISSET', 329);
|
||||
define('T_EMPTY', 330);
|
||||
define('T_HALT_COMPILER', 331);
|
||||
define('T_CLASS', 332);
|
||||
define('T_TRAIT', 333);
|
||||
define('T_INTERFACE', 334);
|
||||
/**
|
||||
* @since 8.1
|
||||
*/
|
||||
define('T_ENUM', 335);
|
||||
define('T_EXTENDS', 336);
|
||||
define('T_IMPLEMENTS', 337);
|
||||
define('T_OBJECT_OPERATOR', 383);
|
||||
define('T_LIST', 339);
|
||||
define('T_ARRAY', 340);
|
||||
define('T_CALLABLE', 341);
|
||||
define('T_LINE', 342);
|
||||
define('T_FILE', 343);
|
||||
define('T_DIR', 344);
|
||||
define('T_CLASS_C', 345);
|
||||
define('T_TRAIT_C', 346);
|
||||
define('T_METHOD_C', 347);
|
||||
define('T_FUNC_C', 348);
|
||||
define('T_COMMENT', 386);
|
||||
define('T_DOC_COMMENT', 387);
|
||||
define('T_OPEN_TAG', 388);
|
||||
define('T_OPEN_TAG_WITH_ECHO', 389);
|
||||
define('T_CLOSE_TAG', 390);
|
||||
define('T_WHITESPACE', 391);
|
||||
define('T_START_HEREDOC', 392);
|
||||
define('T_END_HEREDOC', 393);
|
||||
define('T_DOLLAR_OPEN_CURLY_BRACES', 394);
|
||||
define('T_CURLY_OPEN', 395);
|
||||
define('T_PAAMAYIM_NEKUDOTAYIM', 396);
|
||||
define('T_NAMESPACE', 338);
|
||||
define('T_NS_C', 349);
|
||||
define('T_NS_SEPARATOR', 397);
|
||||
define('T_ELLIPSIS', 398);
|
||||
define('T_DOUBLE_COLON', 396);
|
||||
/**
|
||||
* @since 7.4
|
||||
*/
|
||||
define('T_FN', 346);
|
||||
define('T_BAD_CHARACTER', 401);
|
||||
define('T_FN', 311);
|
||||
define('T_BAD_CHARACTER', 402);
|
||||
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
define('T_NAME_FULLY_QUALIFIED', 312);
|
||||
define('T_NAME_FULLY_QUALIFIED', 263);
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
define('T_NAME_RELATIVE', 313);
|
||||
define('T_NAME_RELATIVE', 264);
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
define('T_NAME_QUALIFIED', 314);
|
||||
define('T_NAME_QUALIFIED', 265);
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
define('T_ATTRIBUTE', 383);
|
||||
define('T_ATTRIBUTE', 350);
|
||||
/**
|
||||
* @since 8.0
|
||||
*/
|
||||
define('T_NULLSAFE_OBJECT_OPERATOR', 387);
|
||||
|
||||
// End of tokenizer v.0.1
|
||||
define('T_NULLSAFE_OBJECT_OPERATOR', 384);
|
||||
|
|
15
zip/zip.php
15
zip/zip.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of zip v.1.14.0
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
/**
|
||||
* A file archive, compressed with Zip.
|
||||
|
@ -575,25 +576,39 @@ class ZipArchive implements Countable
|
|||
|
||||
/**
|
||||
* Status of the Zip Archive
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $status;
|
||||
/**
|
||||
* System status of the Zip Archive
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $statusSys;
|
||||
/**
|
||||
* Number of files in archive
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $numFiles;
|
||||
/**
|
||||
* File name in the file system
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $filename;
|
||||
/**
|
||||
* Comment for the archive
|
||||
* @var string
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
|
||||
public $comment;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
#[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
|
||||
public $lastId;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue