2017-02-11 01:10:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface to detect if a class is traversable using &foreach;.
|
|
|
|
* @link http://php.net/manual/en/class.traversable.php
|
|
|
|
*
|
2019-05-06 22:38:08 +02:00
|
|
|
* @template-covariant TKey
|
|
|
|
* @template-covariant TValue
|
2017-02-11 01:10:13 +01:00
|
|
|
*/
|
|
|
|
interface Traversable {
|
|
|
|
}
|
|
|
|
|
2018-05-28 23:26:43 +02:00
|
|
|
/**
|
2019-11-30 07:02:51 +01:00
|
|
|
* @template-covariant TKey
|
2019-11-30 07:27:27 +01:00
|
|
|
* @template-covariant TValue
|
2019-11-30 07:11:50 +01:00
|
|
|
* @template TSend
|
2019-11-30 07:02:51 +01:00
|
|
|
* @template-covariant TReturn
|
2018-05-28 23:26:43 +02:00
|
|
|
*
|
2019-01-10 22:59:44 +01:00
|
|
|
* @template-implements Traversable<TKey, TValue>
|
2018-05-28 23:26:43 +02:00
|
|
|
*/
|
|
|
|
class Generator implements Traversable {
|
|
|
|
/**
|
2021-04-06 17:28:39 +02:00
|
|
|
* @psalm-ignore-nullable-return
|
|
|
|
* @return ?TValue Can return any type.
|
2018-05-28 23:26:43 +02:00
|
|
|
*/
|
|
|
|
public function current() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return void Any returned value is ignored.
|
|
|
|
*/
|
|
|
|
public function next() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return TKey scalar on success, or null on failure.
|
|
|
|
*/
|
|
|
|
public function key() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return bool The return value will be casted to boolean and then evaluated.
|
|
|
|
*/
|
|
|
|
public function valid() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return void Any returned value is ignored.
|
|
|
|
*/
|
|
|
|
public function rewind() {}
|
|
|
|
|
2018-07-13 23:34:44 +02:00
|
|
|
/**
|
|
|
|
* @return TReturn Can return any type.
|
|
|
|
*/
|
2018-05-28 23:26:43 +02:00
|
|
|
public function getReturn() {}
|
|
|
|
|
2018-07-13 23:34:44 +02:00
|
|
|
/**
|
|
|
|
* @param TSend $value
|
2021-04-06 17:28:39 +02:00
|
|
|
* @psalm-ignore-nullable-return
|
|
|
|
* @return ?TValue Can return any type.
|
2018-07-13 23:34:44 +02:00
|
|
|
*/
|
2018-05-28 23:26:43 +02:00
|
|
|
public function send($value) {}
|
|
|
|
|
2020-03-22 00:08:47 +01:00
|
|
|
/**
|
2021-04-06 17:28:39 +02:00
|
|
|
* @psalm-ignore-nullable-return
|
|
|
|
* @return ?TValue Can return any type.
|
2020-03-22 00:08:47 +01:00
|
|
|
*/
|
2019-08-26 06:25:17 +02:00
|
|
|
public function throw(Throwable $exception) {}
|
2018-05-28 23:26:43 +02:00
|
|
|
}
|
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Interface to provide accessing objects as arrays.
|
|
|
|
* @link http://php.net/manual/en/class.arrayaccess.php
|
|
|
|
*
|
|
|
|
* @template TKey
|
|
|
|
* @template TValue
|
|
|
|
*/
|
|
|
|
interface ArrayAccess {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether a offset exists
|
|
|
|
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $offset An offset to check for.
|
2017-05-25 04:07:49 +02:00
|
|
|
* @return bool true on success or false on failure.
|
2019-12-01 15:53:48 +01:00
|
|
|
* The return value will be casted to boolean if non-boolean was returned.
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetExists($offset);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Offset to retrieve
|
|
|
|
* @link http://php.net/manual/en/arrayaccess.offsetget.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $offset The offset to retrieve.
|
2019-02-04 23:27:08 +01:00
|
|
|
* @return TValue|null Can return all value types.
|
|
|
|
* @psalm-ignore-nullable-return
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetGet($offset);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Offset to set
|
|
|
|
* @link http://php.net/manual/en/arrayaccess.offsetset.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2022-03-06 13:16:59 +01:00
|
|
|
* @param TKey|null $offset The offset to assign the value to.
|
2019-12-01 15:53:48 +01:00
|
|
|
* @param TValue $value The value to set.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetSet($offset, $value);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Offset to unset
|
|
|
|
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $offset The offset to unset.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetUnset($offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class allows objects to work as arrays.
|
|
|
|
* @link http://php.net/manual/en/class.arrayobject.php
|
|
|
|
*
|
|
|
|
* @template TKey
|
|
|
|
* @template TValue
|
2019-01-26 22:58:49 +01:00
|
|
|
* @template-implements IteratorAggregate<TKey, TValue>
|
|
|
|
* @template-implements ArrayAccess<TKey, TValue>
|
2017-02-11 01:10:13 +01:00
|
|
|
*/
|
2019-01-26 22:58:49 +01:00
|
|
|
class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable {
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).
|
|
|
|
*/
|
|
|
|
const STD_PROP_LIST = 1;
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Entries can be accessed as properties (read and write).
|
|
|
|
*/
|
|
|
|
const ARRAY_AS_PROPS = 2;
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Construct a new array object
|
|
|
|
* @link http://php.net/manual/en/arrayobject.construct.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2018-02-22 17:20:03 +01:00
|
|
|
* @param array<TKey, TValue>|object $input The input parameter accepts an array or an Object.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @param int $flags Flags to control the behaviour of the ArrayObject object.
|
|
|
|
* @param string $iterator_class Specify the class that will be used for iteration of the ArrayObject object. ArrayIterator is the default class used.
|
2019-12-01 15:53:48 +01:00
|
|
|
* @psalm-param class-string<ArrayIterator<TKey,TValue>>|class-string<ArrayObject<TKey,TValue>> $iterator_class
|
2017-02-11 01:10:13 +01:00
|
|
|
*
|
2019-12-01 15:53:48 +01:00
|
|
|
* @since 5.0.0
|
2017-02-11 01:10:13 +01:00
|
|
|
*/
|
|
|
|
public function __construct($input = null, $flags = 0, $iterator_class = "ArrayIterator") { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Returns whether the requested index exists
|
|
|
|
* @link http://php.net/manual/en/arrayobject.offsetexists.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $index The index being checked.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return bool true if the requested index exists, otherwise false
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetExists($index) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Returns the value at the specified index
|
|
|
|
* @link http://php.net/manual/en/arrayobject.offsetget.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $index The index with the value.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return TValue The value at the specified index or false.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetGet($index) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sets the value at the specified index to newval
|
|
|
|
* @link http://php.net/manual/en/arrayobject.offsetset.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $index The index being set.
|
|
|
|
* @param TValue $newval The new value for the index.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetSet($index, $newval) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Unsets the value at the specified index
|
|
|
|
* @link http://php.net/manual/en/arrayobject.offsetunset.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TKey $index The index being unset.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function offsetUnset($index) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Appends the value
|
|
|
|
* @link http://php.net/manual/en/arrayobject.append.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param TValue $value The value being appended.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function append($value) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Creates a copy of the ArrayObject.
|
|
|
|
* @link http://php.net/manual/en/arrayobject.getarraycopy.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @return array<TKey, TValue> a copy of the array. When the ArrayObject refers to an object
|
|
|
|
* an array of the public properties of that object will be returned.
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function getArrayCopy() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Get the number of public properties in the ArrayObject
|
2019-12-01 15:53:48 +01:00
|
|
|
* When the ArrayObject is constructed from an array all properties are public.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @link http://php.net/manual/en/arrayobject.count.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return int The number of public properties in the ArrayObject.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function count() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Gets the behavior flags.
|
|
|
|
* @link http://php.net/manual/en/arrayobject.getflags.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return int the behavior flags of the ArrayObject.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
public function getFlags() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sets the behavior flags.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* It takes on either a bitmask, or named constants. Using named
|
|
|
|
* constants is strongly encouraged to ensure compatibility for future
|
|
|
|
* versions.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* The available behavior flags are listed below. The actual
|
|
|
|
* meanings of these flags are described in the
|
|
|
|
* predefined constants.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* <table>
|
|
|
|
* ArrayObject behavior flags
|
|
|
|
* <tr valign="top">
|
|
|
|
* <td>value</td>
|
|
|
|
* <td>constant</td>
|
|
|
|
* </tr>
|
|
|
|
* <tr valign="top">
|
|
|
|
* <td>1</td>
|
|
|
|
* <td>
|
|
|
|
* ArrayObject::STD_PROP_LIST
|
|
|
|
* </td>
|
|
|
|
* </tr>
|
|
|
|
* <tr valign="top">
|
|
|
|
* <td>2</td>
|
|
|
|
* <td>
|
|
|
|
* ArrayObject::ARRAY_AS_PROPS
|
|
|
|
* </td>
|
|
|
|
* </tr>
|
|
|
|
* </table>
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @link http://php.net/manual/en/arrayobject.setflags.php
|
|
|
|
*
|
|
|
|
* @param int $flags The new ArrayObject behavior.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
public function setFlags($flags) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort the entries by value
|
|
|
|
* @link http://php.net/manual/en/arrayobject.asort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function asort() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort the entries by key
|
|
|
|
* @link http://php.net/manual/en/arrayobject.ksort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function ksort() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort the entries with a user-defined comparison function and maintain key association
|
|
|
|
* @link http://php.net/manual/en/arrayobject.uasort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* Function <i>cmp_function</i> should accept two
|
|
|
|
* parameters which will be filled by pairs of entries.
|
|
|
|
* The comparison function must return an integer less than, equal
|
|
|
|
* to, or greater than zero if the first argument is considered to
|
|
|
|
* be respectively less than, equal to, or greater than the
|
|
|
|
* second.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param callable(TValue, TValue):int $cmp_function
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function uasort($cmp_function) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort the entries by keys using a user-defined comparison function
|
|
|
|
* @link http://php.net/manual/en/arrayobject.uksort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* Function <i>cmp_function</i> should accept two
|
|
|
|
* parameters which will be filled by pairs of entry keys.
|
|
|
|
* The comparison function must return an integer less than, equal
|
|
|
|
* to, or greater than zero if the first argument is considered to
|
|
|
|
* be respectively less than, equal to, or greater than the
|
|
|
|
* second.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param callable(TKey, TKey):int $cmp_function The callable comparison function.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function uksort($cmp_function) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort entries using a "natural order" algorithm
|
|
|
|
* @link http://php.net/manual/en/arrayobject.natsort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function natsort() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sort an array using a case insensitive "natural order" algorithm
|
|
|
|
* @link http://php.net/manual/en/arrayobject.natcasesort.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.2.0
|
|
|
|
*/
|
|
|
|
public function natcasesort() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Unserialize an ArrayObject
|
|
|
|
* @link http://php.net/manual/en/arrayobject.unserialize.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param string $serialized The serialized ArrayObject
|
|
|
|
* @return void The unserialized ArrayObject
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.3.0
|
|
|
|
*/
|
|
|
|
public function unserialize($serialized) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Serialize an ArrayObject
|
|
|
|
* @link http://php.net/manual/en/arrayobject.serialize.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @return string The serialized representation of the ArrayObject.
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.3.0
|
|
|
|
*/
|
|
|
|
public function serialize() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Create a new iterator from an ArrayObject instance
|
|
|
|
* @link http://php.net/manual/en/arrayobject.getiterator.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @return ArrayIterator<TKey, TValue> An iterator from an ArrayObject.
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.0.0
|
|
|
|
*/
|
|
|
|
public function getIterator() { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Exchange the array for another one.
|
|
|
|
* @link http://php.net/manual/en/arrayobject.exchangearray.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param mixed $input The new array or object to exchange with the current array.
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return array the old array.
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
public function exchangeArray($input) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Sets the iterator classname for the ArrayObject.
|
|
|
|
* @link http://php.net/manual/en/arrayobject.setiteratorclass.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
|
|
|
* @param string $iterator_class The classname of the array iterator to use when iterating over this object.
|
|
|
|
* @psalm-param class-string<ArrayIterator<TKey,TValue>>|class-string<ArrayObject<TKey,TValue>> $iterator_class
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
public function setIteratorClass($iterator_class) { }
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2017-02-11 01:10:13 +01:00
|
|
|
/**
|
|
|
|
* Gets the iterator classname for the ArrayObject.
|
|
|
|
* @link http://php.net/manual/en/arrayobject.getiteratorclass.php
|
2019-12-01 15:53:48 +01:00
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @return string the iterator class name that is used to iterate over this object.
|
2019-12-01 15:53:48 +01:00
|
|
|
* @psalm-return class-string<ArrayIterator<TKey,TValue>>|class-string<ArrayObject<TKey,TValue>>
|
|
|
|
*
|
2017-02-11 01:10:13 +01:00
|
|
|
* @since 5.1.0
|
|
|
|
*/
|
|
|
|
public function getIteratorClass() { }
|
|
|
|
}
|
2018-02-01 05:27:25 +01:00
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
interface Serializable {
|
2019-01-30 19:03:22 +01:00
|
|
|
/**
|
2021-09-16 13:07:32 +02:00
|
|
|
* @return null|string
|
2019-12-01 15:53:48 +01:00
|
|
|
*/
|
2021-03-06 22:05:14 +01:00
|
|
|
public function serialize();
|
2019-01-30 19:03:22 +01:00
|
|
|
|
|
|
|
/**
|
2021-09-06 06:33:53 +02:00
|
|
|
* @param string $data
|
2019-01-30 19:03:22 +01:00
|
|
|
* @return void
|
2019-12-01 15:53:48 +01:00
|
|
|
*/
|
2021-09-06 06:33:53 +02:00
|
|
|
public function unserialize($data);
|
2019-02-09 00:15:37 +01:00
|
|
|
}
|
2019-11-29 07:21:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @template-covariant T as object
|
|
|
|
* @psalm-immutable
|
|
|
|
*/
|
|
|
|
final class WeakReference
|
|
|
|
{
|
|
|
|
// always fail
|
2021-03-06 22:05:14 +01:00
|
|
|
public function __construct() {}
|
2019-12-01 15:53:48 +01:00
|
|
|
|
2019-11-29 07:21:38 +01:00
|
|
|
/**
|
|
|
|
* @template TIn as object
|
|
|
|
* @param TIn $referent
|
|
|
|
* @return WeakReference<TIn>
|
|
|
|
*/
|
2021-03-06 22:05:14 +01:00
|
|
|
public static function create(object $referent): WeakReference {}
|
2019-11-29 07:21:38 +01:00
|
|
|
|
|
|
|
/** @return ?T */
|
2021-03-06 22:05:14 +01:00
|
|
|
public function get(): ?object {}
|
2020-12-08 17:24:15 +01:00
|
|
|
}
|
2021-03-03 04:25:19 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @template TKey of object
|
|
|
|
* @template TVal of mixed
|
|
|
|
* @implements ArrayAccess<TKey, TVal>
|
|
|
|
* @implements IteratorAggregate<TKey,TVal>
|
|
|
|
* @implements Traversable<TKey,TVal>
|
|
|
|
*
|
|
|
|
* @since 8.0.0
|
|
|
|
*/
|
|
|
|
final class WeakMap implements ArrayAccess, Countable, IteratorAggregate, Traversable
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param TKey $offset
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function offsetExists($offset) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param TKey $offset
|
|
|
|
* @return TVal|null
|
|
|
|
* @psalm-ignore-nullable-return
|
|
|
|
*/
|
|
|
|
public function offsetGet($offset) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param TKey $offset
|
|
|
|
* @param TVal $value
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function offsetSet($offset, $value) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param TKey $offset
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function offsetUnset($offset) {}
|
|
|
|
}
|
2021-11-09 19:52:29 +01:00
|
|
|
|
|
|
|
|
2022-08-24 21:31:02 +02:00
|
|
|
#[Attribute(Attribute::TARGET_METHOD)]
|
2021-11-09 19:52:29 +01:00
|
|
|
final class ReturnTypeWillChange
|
|
|
|
{
|
|
|
|
public function __construct() {}
|
|
|
|
}
|
2022-08-22 16:44:55 +02:00
|
|
|
|
2022-08-24 21:31:02 +02:00
|
|
|
#[Attribute(Attribute::TARGET_PARAMETER)]
|
2022-08-22 16:44:55 +02:00
|
|
|
final class SensitiveParameter
|
|
|
|
{
|
|
|
|
public function __construct() {}
|
|
|
|
}
|
|
|
|
|
2022-08-24 21:31:02 +02:00
|
|
|
#[Attribute(Attribute::TARGET_CLASS)]
|
2022-08-22 16:44:55 +02:00
|
|
|
final class AllowDynamicProperties
|
|
|
|
{
|
|
|
|
public function __construct() {}
|
|
|
|
}
|