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 {
}
/**
* Interface to create an external Iterator.
* @link http://php.net/manual/en/class.iteratoraggregate.php
*
2019-05-06 22:38:08 +02:00
* @template-covariant TKey
* @template-covariant TValue
2017-02-11 01:10:13 +01:00
*
2019-01-10 22:59:44 +01:00
* @template-extends Traversable<TKey, TValue>
2017-02-11 01:10:13 +01:00
*/
interface IteratorAggregate extends Traversable {
/**
* Retrieve an external iterator
* @link http://php.net/manual/en/iteratoraggregate.getiterator.php
2019-12-01 15:53:48 +01:00
*
* @return Traversable<TKey, TValue> An instance of an object implementing Iterator or Traversable
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function getIterator();
}
/**
* Interface for external iterators or objects that can be iterated
* themselves internally.
* @link http://php.net/manual/en/class.iterator.php
*
2019-05-06 22:38:08 +02:00
* @template-covariant TKey
* @template-covariant TValue
2017-02-11 01:10:13 +01:00
*
2019-01-10 22:59:44 +01:00
* @template-extends Traversable<TKey, TValue>
2017-02-11 01:10:13 +01:00
*/
interface Iterator extends Traversable {
/**
* Return the current element
* @link http://php.net/manual/en/iterator.current.php
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @return TValue Can return any type.
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function current();
/**
* Move forward to next element
* @link http://php.net/manual/en/iterator.next.php
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @return void Any returned value is ignored.
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function next();
/**
* Return the key of the current element
* @link http://php.net/manual/en/iterator.key.php
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @return TKey scalar on success, or null on failure.
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function key();
/**
* Checks if current position is valid
* @link http://php.net/manual/en/iterator.valid.php
2019-12-01 15:53:48 +01:00
*
2017-05-25 04:07:49 +02:00
* @return bool The return value will be casted to boolean and then evaluated.
2019-12-01 15:53:48 +01:00
* Returns true on success or false on failure.
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function valid();
/**
* Rewind the Iterator to the first element
* @link http://php.net/manual/en/iterator.rewind.php
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @return void Any returned value is ignored.
2019-12-01 15:53:48 +01:00
*
2017-02-11 01:10:13 +01:00
* @since 5.0.0
*/
public function rewind();
}
2020-01-24 14:58:52 +01:00
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-extends Iterator<TKey, TValue>
*/
interface OuterIterator extends Iterator {
/**
* @return Iterator<TKey, TValue>
*/
2020-01-24 15:10:42 +01:00
public function getInnerIterator();
2020-01-24 14:58:52 +01:00
}
/**
* @template-covariant TKey
* @template-covariant TValue
2020-04-26 22:59:03 +02:00
* @template TIterator as Traversable<TKey, TValue>
2020-01-24 14:58:52 +01:00
*
2020-01-24 15:10:42 +01:00
* @template-implements OuterIterator<TKey, TValue>
2020-04-26 22:59:03 +02:00
*
* @mixin TIterator
2020-01-24 14:58:52 +01:00
*/
class IteratorIterator implements OuterIterator {
2020-01-24 15:18:31 +01:00
/**
2020-04-26 22:59:03 +02:00
* @param TIterator $iterator
2020-01-24 15:18:31 +01:00
*/
public function __construct(Traversable $iterator) {}
2020-01-24 14:58:52 +01:00
/**
2020-04-26 22:59:03 +02:00
* @return TIterator
2020-01-24 14:58:52 +01:00
*/
2020-01-24 15:10:42 +01:00
public function getInnerIterator() {}
2020-01-24 14:58:52 +01:00
/**
* Return the current element
* @link http://php.net/manual/en/iterator.current.php
*
* @return TValue Can return any type.
*
* @since 5.0.0
*/
public function current() {}
/**
* Move forward to next element
* @link http://php.net/manual/en/iterator.next.php
*
* @return void Any returned value is ignored.
*
* @since 5.0.0
*/
public function next() {}
/**
* Return the key of the current element
* @link http://php.net/manual/en/iterator.key.php
*
* @return TKey scalar on success, or null on failure.
*
* @since 5.0.0
*/
public function key() {}
/**
* @return bool The return value will be casted to boolean and then evaluated.
* Returns true on success or false on failure.
*
* @since 5.0.0
*/
public function valid() {}
/**
* Rewind the Iterator to the first element
* @link http://php.net/manual/en/iterator.rewind.php
*
* @return void Any returned value is ignored.
*
* @since 5.0.0
*/
public function rewind() {}
}
2020-04-26 22:59:03 +02:00
/**
* @template TIterator as RecursiveIterator|IteratorAggregate
* @mixin TIterator
*/
class RecursiveIteratorIterator implements OuterIterator {
/**
* @param TIterator $iterator
* @param int $mode
* @param int $flags
*
* @return void
*/
public function __construct($iterator, $mode = 0, $flags = 0) {}
}
2020-01-24 15:10:42 +01:00
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-extends IteratorIterator<TKey, TValue>
*/
class FilterIterator extends IteratorIterator {
2020-02-07 18:32:37 +01:00
/** @return bool */
public abstract function accept () {}
2020-01-24 15:10:42 +01:00
}
2020-10-13 17:35:49 +02:00
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-implements OuterIterator<TKey, TValue>
* @template-implements ArrayAccess<TKey, TValue>
*
* @template-extends IteratorIterator<TKey, TValue>
*/
class CachingIterator extends IteratorIterator implements OuterIterator , ArrayAccess , Countable {
/**
* @param Iterator<TKey, TValue> $iterator
*/
2020-10-30 22:37:16 +01:00
public function __construct(Iterator $iterator, int $flags = self::CALL_TOSTRING) {}
2020-10-13 17:35:49 +02:00
/** @return bool */
public function hasNext () {}
/**
* @return TValue Can return any type.
*/
public function current() {}
/**
* @return TKey scalar on success, or null on failure.
*/
public function key() {}
}
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-implements OuterIterator<TKey, TValue>
*
* @template-extends IteratorIterator<TKey, TValue>
*/
class InfiniteIterator extends IteratorIterator implements OuterIterator {
/**
* @param Iterator<TKey, TValue> $iterator
*/
2020-10-30 22:37:16 +01:00
public function __construct(Iterator $iterator) {}
2020-10-13 17:35:49 +02:00
/**
* @return TValue Can return any type.
*/
public function current() {}
/**
* @return TKey scalar on success, or null on failure.
*/
public function key() {}
}
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-implements OuterIterator<TKey, TValue>
*
* @template-extends IteratorIterator<TKey, TValue>
*/
2020-10-30 22:37:16 +01:00
class LimitIterator extends IteratorIterator implements OuterIterator {
2020-10-13 17:35:49 +02:00
/**
* @param Iterator<TKey, TValue> $iterator
*/
2020-10-30 22:37:16 +01:00
public function __construct(Iterator $iterator, int $offset = 0, int $count = -1) {}
2020-10-13 17:35:49 +02:00
/**
* @return TValue Can return any type.
*/
public function current() {}
/**
* @return TKey scalar on success, or null on failure.
*/
public function key() {}
}
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-implements OuterIterator<TKey, TValue>
*
* @template-extends FilterIterator<TKey, TValue>
*/
2020-10-30 22:37:16 +01:00
class CallbackFilterIterator extends FilterIterator implements OuterIterator {
2020-10-13 17:35:49 +02:00
/**
* @param Iterator<TKey, TValue> $iterator
* @param callable(TValue, TKey, Iterator<TKey, TValue>): bool $callback
*/
2020-10-30 22:37:16 +01:00
public function __construct(Iterator $iterator, callable $callback) {}
2020-10-13 17:35:49 +02:00
/**
* @return TValue Can return any type.
*/
public function current() {}
/**
* @return TKey scalar on success, or null on failure.
*/
public function key() {}
}
/**
* @template-covariant TKey
* @template-covariant TValue
*
* @template-extends IteratorIterator<TKey, TValue>
*/
2020-10-30 22:37:16 +01:00
class NoRewindIterator extends IteratorIterator {
2020-10-13 17:35:49 +02:00
/**
* @param Iterator<TKey, TValue> $iterator
*/
2020-10-30 22:37:16 +01:00
public function __construct(Iterator $iterator) {}
2020-10-13 17:35:49 +02:00
/**
* @return TValue Can return any type.
*/
public function current() {}
/**
* @return TKey scalar on success, or null on failure.
*/
public function key() {}
}
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 {
/**
* @return TValue Can return any type.
*/
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
* @return TValue Can return any type.
*/
2018-05-28 23:26:43 +02:00
public function send($value) {}
2020-03-22 00:08:47 +01:00
/**
* @return TValue Can return any type.
*/
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
*
* @param TKey $offset The offset to assign the value to.
* @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
2019-01-26 22:58:49 +01:00
/**
* The Seekable iterator.
* @link https://php.net/manual/en/class.seekableiterator.php
2019-12-01 15:53:48 +01:00
*
2019-05-06 22:38:08 +02:00
* @template-covariant TKey
* @template-covariant TValue
2019-01-28 03:00:27 +01:00
* @template-extends Iterator<TKey, TValue>
2019-01-26 22:58:49 +01:00
*/
interface SeekableIterator extends Iterator {
/**
* Seeks to a position
* @link https://php.net/manual/en/seekableiterator.seek.php
2019-12-01 15:53:48 +01:00
*
* @param int $position The position to seek to.
2019-01-26 22:58:49 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-26 22:58:49 +01:00
* @since 5.1.0
*/
public function seek($position);
}
2018-02-01 05:27:25 +01:00
/**
* This iterator allows to unset and modify values and keys while iterating
* over Arrays and Objects.
* @link http://php.net/manual/en/class.arrayiterator.php
*
2019-01-11 14:54:10 +01:00
* @template TKey as array-key
2018-02-01 05:27:25 +01:00
* @template TValue
2019-01-26 22:58:49 +01:00
* @template-implements SeekableIterator<TKey, TValue>
* @template-implements ArrayAccess<TKey, TValue>
2018-02-01 05:27:25 +01:00
*/
class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable {
const STD_PROP_LIST = 1;
const ARRAY_AS_PROPS = 2;
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Construct an ArrayIterator
* @link http://php.net/manual/en/arrayiterator.construct.php
2019-12-01 15:53:48 +01:00
*
2019-01-26 22:58:49 +01:00
* @param array<TKey, TValue> $array The array or object to be iterated on.
2018-02-01 05:27:25 +01:00
* @param int $flags Flags to control the behaviour of the ArrayObject object.
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @see ArrayObject::setFlags()
* @since 5.0.0
*/
public function __construct($array = array(), $flags = 0) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Check if offset exists
* @link http://php.net/manual/en/arrayiterator.offsetexists.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The offset being checked.
2018-02-01 05:27:25 +01:00
* @return bool true if the offset exists, otherwise false
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function offsetExists($index) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Get value for an offset
* @link http://php.net/manual/en/arrayiterator.offsetget.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The offset to get the value from.
* @return TValue The value at offset index.
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function offsetGet($index) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Set value for an offset
* @link http://php.net/manual/en/arrayiterator.offsetset.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The index to set for.
* @param TValue $newval The new value to store at the index.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function offsetSet($index, $newval) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Unset value for an offset
* @link http://php.net/manual/en/arrayiterator.offsetunset.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The offset to unset.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function offsetUnset($index) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Append an element
* @link http://php.net/manual/en/arrayiterator.append.php
2019-12-01 15:53:48 +01:00
*
* @param TValue $value The value to append.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function append($value) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Get array copy
* @link http://php.net/manual/en/arrayiterator.getarraycopy.php
2019-12-01 15:53:48 +01:00
*
2019-02-08 00:47:50 +01:00
* @return array<TKey, TValue> A copy of the array, or array of public properties
2019-12-01 15:53:48 +01:00
* if ArrayIterator refers to an object.
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function getArrayCopy() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Count elements
* @link http://php.net/manual/en/arrayiterator.count.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return int The number of elements or public properties in the associated
2019-12-01 15:53:48 +01:00
* array or object, respectively.
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function count() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Get flags
* @link http://php.net/manual/en/arrayiterator.getflags.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return string The current flags.
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.1.0
*/
public function getFlags() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Set behaviour flags
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* A bitmask as follows:
* 0 = Properties of the object have their normal functionality
* when accessed as list (var_dump, foreach, etc.).
* 1 = Array indices can be accessed as properties in read/write.
2019-12-01 15:53:48 +01:00
*
* @link http://php.net/manual/en/arrayiterator.setflags.php
*
* @param string $flags bitmask
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.1.0
*/
public function setFlags($flags) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Sort array by values
* @link http://php.net/manual/en/arrayiterator.asort.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function asort() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Sort array by keys
* @link http://php.net/manual/en/arrayiterator.ksort.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function ksort() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* User defined sort
* @link http://php.net/manual/en/arrayiterator.uasort.php
2019-12-01 15:53:48 +01:00
*
* @param callable(TValue,TValue):int $cmp_function The compare function used for the sort.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function uasort($cmp_function) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* User defined sort
* @link http://php.net/manual/en/arrayiterator.uksort.php
2019-12-01 15:53:48 +01:00
*
* @param callable(TKey,TKey):int $cmp_function The compare function used for the sort.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function uksort($cmp_function) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Sort an array naturally
* @link http://php.net/manual/en/arrayiterator.natsort.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function natsort() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Sort an array naturally, case insensitive
* @link http://php.net/manual/en/arrayiterator.natcasesort.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.2.0
*/
public function natcasesort() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Unserialize
* @link http://php.net/manual/en/arrayiterator.unserialize.php
2019-12-01 15:53:48 +01:00
*
* @param string $serialized The serialized ArrayIterator object to be unserialized.
* @return void
*
2018-02-01 05:27:25 +01:00
* @since 5.3.0
*/
public function unserialize($serialized) { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Serialize
* @link http://php.net/manual/en/arrayiterator.serialize.php
2019-12-01 15:53:48 +01:00
*
* @return string The serialized ArrayIterator
*
2018-02-01 05:27:25 +01:00
* @since 5.3.0
*/
public function serialize() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Rewind array back to the start
* @link http://php.net/manual/en/arrayiterator.rewind.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function rewind() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Return current array entry
* @link http://php.net/manual/en/arrayiterator.current.php
2019-12-01 15:53:48 +01:00
*
* @return TValue The current array entry.
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function current() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Return current array key
* @link http://php.net/manual/en/arrayiterator.key.php
2019-12-01 15:53:48 +01:00
*
2020-04-11 14:12:28 +02:00
* @return TKey The current array key.
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function key() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Move to next entry
* @link http://php.net/manual/en/arrayiterator.next.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function next() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Check whether array contains more entries
* @link http://php.net/manual/en/arrayiterator.valid.php
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @return bool
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function valid() { }
2019-12-01 15:53:48 +01:00
2018-02-01 05:27:25 +01:00
/**
* Seek to position
* @link http://php.net/manual/en/arrayiterator.seek.php
2019-12-01 15:53:48 +01:00
*
* @param int $position The position to seek to.
2018-02-01 05:27:25 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2018-02-01 05:27:25 +01:00
* @since 5.0.0
*/
public function seek($position) { }
}
2018-05-28 23:26:43 +02:00
2019-01-26 22:58:49 +01:00
/**
* The DOMElement class
* @link http://php.net/manual/en/class.domelement.php
*/
class DOMDocument extends DOMNode {
/**
* @return DOMNodeList<DOMElement>
*/
2019-12-01 15:53:48 +01:00
public function getElementsByTagName($name) {}
2019-01-26 22:58:49 +01:00
/**
* @return DOMNodeList<DOMElement>
*/
2019-12-01 15:53:48 +01:00
public function getElementsByTagNameNS($namespaceURI, $localName) {}
2019-01-26 22:58:49 +01:00
}
2018-07-06 05:02:09 +02:00
/**
* The DOMElement class
* @link http://php.net/manual/en/class.domelement.php
*/
class DOMElement extends DOMNode {
2019-12-01 15:53:48 +01:00
public function __construct(string $name, string $value = '', string $namespaceURI = '') {}
2019-03-01 06:09:22 +01:00
2018-07-06 05:02:09 +02:00
/**
* @return DOMNodeList<DOMElement>
*/
2019-12-01 15:53:48 +01:00
public function getElementsByTagName($name) {}
2018-07-06 05:02:09 +02:00
/**
* @return DOMNodeList<DOMElement>
*/
2019-12-01 15:53:48 +01:00
public function getElementsByTagNameNS($namespaceURI, $localName) {}
2018-07-06 05:02:09 +02:00
}
/**
2019-05-06 22:38:08 +02:00
* @template-covariant TNode as DOMNode
2019-01-26 22:58:49 +01:00
* @template-implements Traversable<int, TNode>
2018-07-06 05:02:09 +02:00
*/
class DOMNodeList implements Traversable, Countable {
/**
2019-12-01 15:53:48 +01:00
* The number of nodes in the list. The range of valid child node indices is 0 to length - 1 inclusive.
*
2018-07-06 05:02:09 +02:00
* @var int
2019-12-01 15:53:48 +01:00
*
2018-07-06 05:02:09 +02:00
* @since 5.0
* @link http://php.net/manual/en/class.domnodelist.php#domnodelist.props.length
*/
public $length;
/**
2019-12-01 15:53:48 +01:00
* @param int $index
2018-07-06 05:02:09 +02:00
* @return TNode|null
2020-01-30 05:53:47 +01:00
* @psalm-ignore-nullable-return
2018-07-06 05:02:09 +02:00
*/
2019-12-01 15:53:48 +01:00
public function item($index) {}
2018-07-06 05:02:09 +02:00
}
2019-01-28 18:27:04 +01:00
2020-01-29 14:39:07 +01:00
/**
* @template-covariant TNode as DOMNode
* @template-implements Traversable<string, TNode>
*/
class DOMNamedNodeMap implements Traversable, Countable {
/**
* @var int
*/
public $length;
/**
* @return TNode|null
*/
public function getNamedItem(string $name): ?DOMNode {}
/**
* @return TNode|null
*/
public function getNamedItemNS(string $namespaceURI, string $localName): ?DOMNode {}
/**
* @return TNode|null
2020-01-30 05:53:47 +01:00
* @psalm-ignore-nullable-return
2020-01-29 14:39:07 +01:00
*/
public function item(int $index): ?DOMNode {}
}
2019-01-28 18:27:04 +01:00
/**
* The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.
* @link https://php.net/manual/en/class.spldoublylinkedlist.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @template TKey
* @template TValue
* @template-implements Iterator<TKey, TValue>
2020-10-30 22:37:16 +01:00
* @template-implements ArrayAccess<TKey, TValue>
2019-01-28 18:27:04 +01:00
*/
class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable
{
2019-01-28 23:09:23 +01:00
public function __construct() {}
2019-01-28 18:27:04 +01:00
/**
* Add/insert a new value at the specified index
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @param TKey $index The index where the new value is to be inserted.
* @param TValue $newval The new value for the index.
* @return void
2019-12-01 15:53:48 +01:00
*
* @link https://php.net/spldoublylinkedlist.add
2019-01-28 18:27:04 +01:00
* @since 5.5.0
*/
public function add($index, $newval) {}
/**
* Pops a node from the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.pop.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The value of the popped node.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function pop() {}
2019-01-28 18:27:04 +01:00
/**
* Shifts a node from the beginning of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.shift.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The value of the shifted node.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function shift() {}
2019-01-28 18:27:04 +01:00
/**
* Pushes an element at the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.push.php
2019-12-01 15:53:48 +01:00
*
* @param TValue $value The value to push.
2019-01-28 18:27:04 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function push($value) {}
2019-01-28 18:27:04 +01:00
/**
* Prepends the doubly linked list with an element
* @link https://php.net/manual/en/spldoublylinkedlist.unshift.php
2019-12-01 15:53:48 +01:00
*
* @param TValue $value The value to unshift.
2019-01-28 18:27:04 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function unshift($value) {}
2019-01-28 18:27:04 +01:00
/**
* Peeks at the node from the end of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.top.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The value of the last node.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function top() {}
2019-01-28 18:27:04 +01:00
/**
* Peeks at the node from the beginning of the doubly linked list
* @link https://php.net/manual/en/spldoublylinkedlist.bottom.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The value of the first node.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function bottom() {}
2019-01-28 18:27:04 +01:00
/**
* Counts the number of elements in the doubly linked list.
* @link https://php.net/manual/en/spldoublylinkedlist.count.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return int the number of elements in the doubly linked list.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function count() {}
2019-01-28 18:27:04 +01:00
/**
* Checks whether the doubly linked list is empty.
* @link https://php.net/manual/en/spldoublylinkedlist.isempty.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return bool whether the doubly linked list is empty.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function isEmpty() {}
2019-01-28 18:27:04 +01:00
/**
* Returns whether the requested $index exists
* @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The index being checked.
* @return bool true if the requested index exists, otherwise false
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetExists($index) {}
2019-01-28 18:27:04 +01:00
/**
* Returns the value at the specified $index
* @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The index with the value.
* @return TValue The value at the specified index.
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetGet($index) {}
2019-01-28 18:27:04 +01:00
/**
* Sets the value at the specified $index to $newval
* @link https://php.net/manual/en/spldoublylinkedlist.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.
2019-01-28 18:27:04 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetSet($index, $newval) {}
2019-01-28 18:27:04 +01:00
/**
* Unsets the value at the specified $index
* @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php
2019-12-01 15:53:48 +01:00
*
* @param TKey $index The index being unset.
2019-01-28 18:27:04 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetUnset($index) {}
2019-01-28 18:27:04 +01:00
/**
* Return current array entry
* @link https://php.net/manual/en/spldoublylinkedlist.current.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The current node value.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function current() {}
2019-01-28 18:27:04 +01:00
/**
* Return current node index
* @link https://php.net/manual/en/spldoublylinkedlist.key.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TKey The current node index.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function key() {}
2019-01-28 18:27:04 +01:00
}
2020-09-29 17:27:12 +02:00
/**
2020-10-30 22:37:16 +01:00
* The SplFixedArray class provides the main functionalities of array.
* The main differences between a SplFixedArray and a normal PHP array is that
* the SplFixedArray is of fixed length and allows only integers within the range as indexes.
2020-09-29 17:27:12 +02:00
* The advantage is that it uses less memory than a standard array.
*
* @link https://php.net/manual/en/class.splfixedarray.php
*
* @template TValue
* @template-implements ArrayAccess<int, TValue>
* @template-implements Iterator<int, TValue>
*/
class SplFixedArray implements Iterator, ArrayAccess, Countable {
/**
* Constructs a new fixed array
*
2020-10-30 22:37:16 +01:00
* Initializes a fixed array with a number of NULL values equal to size.
2020-09-29 17:27:12 +02:00
* @link https://php.net/manual/en/splfixedarray.construct.php
*
* @param int $size The size of the fixed array. This expects a number between 0 and PHP_INT_MAX.
* @since 5.3.0
*/
public function __construct(int $size = 0) {}
/**
* Import a PHP array in a new SplFixedArray instance
* @link https://php.net/manual/en/splfixedarray.fromarray.php
*
* @template TInValue
* @param array<int, TInValue> $array The array to import
* @param bool $save_indexes [optional] Try to save the numeric indexes used in the original array.
2020-10-30 22:37:16 +01:00
*
2020-09-29 17:27:12 +02:00
* @return SplFixedArray<TInValue> Instance of SplFixedArray containing the array content
* @since 5.3.0
*/
public static function fromArray(array $array, bool $save_indexes = true): SplFixedArray {}
/**
* Returns a PHP array from the fixed array
* @link https://php.net/manual/en/splfixedarray.toarray.php
*
* @return array<int, TValue>
* @since 5.3.0
*/
public function toArray(): array {}
/**
* Returns the size of the array.
* @link https://php.net/manual/en/splfixedarray.getsize.php
*
* @return int The size of the array
* @see SplFixedArray::count()
*
* @since 5.3.0
*/
public function getSize(): int {}
/**
* Returns the size of the array.
* @link https://php.net/manual/en/splfixedarray.count.php
*
* @return int The size of the array
*
* @since 5.3.0
*/
public function count(): int {}
/**
* Rewind the iterator back to the start
* @link https://php.net/manual/en/splfixedarray.rewind.php
*
* @return void
*
* @since 5.3.0
*/
public function rewind(): void {}
/**
* Check whether the array contains more elements
* @link https://php.net/manual/en/splfixedarray.valid.php
*
* @return bool true if the array contains any more elements, false otherwise.
*
* @since 5.3.0
*/
public function valid(): bool {}
/**
* Returns current array index
* @link https://php.net/manual/en/splfixedarray.key.php
*
* @return int The current array index
*
* @since 5.3.0
*/
public function key(): int {}
/**
* Returns the current array entry
* @link https://php.net/manual/en/splfixedarray.current.php
*
* @return TValue The current element value
*
* @since 5.3.0
*/
public function current() {}
/**
* Move to the next entry
* @link https://php.net/manual/en/splfixedarray.next.php
*
* @return void
*
* @since 5.3.0
*/
public function next(): void {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Returns whether the specified index exists
* @link https://php.net/manual/en/splfixedarray.offsetexists.php
*
* @param int $index The index being checked.
* @return bool true if the requested index exists, and false otherwise.
*
* @since 5.3.0
*/
public function offsetExists(int $index): bool {}
/**
* Sets a new value at a specified index
* @link https://php.net/manual/en/splfixedarray.offsetset.php
*
* @param int $index The index being sent.
* @param TValue $newval The new value for the index
* @return void
*
* @since 5.3.0
*/
public function offsetSet(int $index, $newval): void {}
/**
* Unsets the value at the specified $index
* @link https://php.net/manual/en/splfixedarray.offsetunset.php
*
* @param int $index The index being unset
* @return void
*
* @since 5.3.0
*/
public function offsetUnset(int $index): void {}
/**
* Returns the value at the specified index
* @link https://php.net/manual/en/splfixedarray.offsetget.php
*
* @param int $index The index with the value
* @return TValue The value at the specified index
*
* @since 5.3.0
*/
public function offsetGet(int $index) {}
}
/**
* The SplStack class provides the main functionalities of a stack implemented using a doubly linked list.
* @link https://php.net/manual/en/class.splstack.php
*
* @template TValue
* @template-extends SplDoublyLinkedList<int, TValue>
*/
class SplStack extends SplDoublyLinkedList {
}
2019-01-28 18:27:04 +01:00
/**
* The SplQueue class provides the main functionalities of a queue implemented using a doubly linked list.
* @link https://php.net/manual/en/class.splqueue.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @template TValue
* @template-extends SplDoublyLinkedList<int, TValue>
*/
class SplQueue extends SplDoublyLinkedList {
/**
* Adds an element to the queue.
* @link https://php.net/manual/en/splqueue.enqueue.php
2019-12-01 15:53:48 +01:00
*
* @param TValue $value The value to enqueue.
2019-01-28 18:27:04 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function enqueue($value) {}
2019-01-28 18:27:04 +01:00
/**
* Dequeues a node from the queue
* @link https://php.net/manual/en/splqueue.dequeue.php
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @return TValue The value of the dequeued node.
2019-12-01 15:53:48 +01:00
*
2019-01-28 18:27:04 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function dequeue() {}
2019-01-28 18:27:04 +01:00
}
2019-01-30 19:03:22 +01:00
2020-09-29 17:27:12 +02:00
/**
* The SplHeap class provides the main functionalities of a Heap.
* @link https://php.net/manual/en/class.splheap.php
*
* @template TValue
* @template-implements Iterator<int, TValue>
*/
class SplHeap implements Iterator, Countable {
public function __construct() {}
/**
* Compare elements in order to place them correctly in the heap while sifting up
* @link https://php.net/manual/en/splheap.compare.php
*
* @param TValue $value1 The value of the first node being compared.
* @param TValue $value2 The value of the second node being compared.
2020-10-30 22:37:16 +01:00
* @return int Positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
protected abstract function compare($value1, $value2): int {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Counts the number of elements in the heap
* @link https://php.net/manual/en/splheap.count.php
*
2020-10-30 22:37:16 +01:00
* @return int The number of elements in the heap.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
public function count(): int {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Get the current datastructure node.
* @link https://php.net/manual/en/splheap.current.php
*
* @return TValue The current node value
*
* @since 5.3.0
*/
public function current() {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Extracts a node from top of the heap and sift up
* @link https://php.net/manual/en/splheap.extract.php
*
* @return TValue The current node value
*
* @since 5.3.0
*/
public function extract() {}
/**
* Inserts an element in the heap by sifting it up
* @link https://php.net/manual/en/splheap.insert.php
*
* @param TValue $value The value to insert.
* @return void
*
* @since 5.3.0
*/
public function insert($value): void {}
/**
* Tells if the heap is in a corrupted state
* @link https://php.net/manual/en/splheap.isCorrupted.php
*
* @return bool true if the heap is corrupted, false otherwise.
*
* @since 7.0.0
*/
public function isCorrupted(): bool {}
/**
* Checks whether the heap is empty
* @link https://php.net/manual/en/splheap.isEmpty.php
*
* @return bool Whether the heap is empty
*
* @since 5.3.0
*/
public function isEmpty(): bool {}
/**
2020-10-30 22:37:16 +01:00
* Return current node index
2020-09-29 17:27:12 +02:00
* @link https://php.net/manual/en/splheap.key.php
*
* @return int The current node index
*
* @since 5.3.0
*/
public function key() {}
/**
2020-10-30 22:37:16 +01:00
* Move to the next node. This will delete the top node of the heap.
2020-09-29 17:27:12 +02:00
* @link https://php.net/manual/en/splheap.next.php
*
* @return void
*
* @since 5.3.0
*/
public function next(): void {}
/**
* Recover from the corrupted state and allow further actions on the heap
* @link https://php.net/manual/en/splheap.recoverFromCorruption.php
*
* @return void
*
* @since 5.3.0
*/
public function recoverFromCorruption(): void {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Rewind iterator back to the start (no-op)
* @link https://php.net/manual/en/splheap.rewind.php
*
* @return void
*
* @since 5.3.0
*/
public function rewind(): void {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Peeks at the node from the top of the heap
* @link https://php.net/manual/en/splheap.top.php
*
* @return TValue The value of the node on the top.
*
* @since 5.3.0
*/
public function top() {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Check whether the heap contains any more nodes
* @link https://php.net/manual/en/splheap.valid.php
*
2020-10-30 22:37:16 +01:00
* @return bool Returns true if the heap contains any more nodes, false otherwise.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
public function valid(): bool {}
}
/**
* The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top.
* @link https://php.net/manual/en/class.splmaxheap.php
*
* @template TValue
* @template-extends SplHeap<TValue>
*/
class SplMaxHeap extends SplHeap {
}
/**
* The SplMinHeap class provides the main functionalities of a heap, keeping the maximum on the top.
* @link https://php.net/manual/en/class.splminheap.php
*
* @template TValue
* @template-extends SplHeap<TValue>
*/
class SplMinHeap extends SplHeap {
}
/**
* The SplPriorityQueue class provides the main functionalities of a prioritized queue, implemented using a max heap.
* @link https://php.net/manual/en/class.splpriorityqueue.php
*
* @template TPriority
2020-10-15 02:01:25 +02:00
* @template TValue
2020-09-29 17:27:12 +02:00
* @template-implements Iterator<int, TValue>
*/
class SplPriorityQueue implements Iterator, Countable {
/**
* Extract the data
*/
const EXTR_DATA = 0x00000001;
/**
* Extract the priority
*/
const EXTR_PRIORITY = 0x00000002;
/**
* Extract an array containing both
*/
const EXTR_BOTH = 0x00000003;
public function __construct() {}
/**
* Compare priorities in order to place them correctly in the queue while sifting up
* @link https://php.net/manual/en/splpriorityqueue.compare.php
*
* @param TValue $priority1 The priority of the first node being compared.
* @param TValue $priority2 The priority of the second node being compared.
2020-10-30 22:37:16 +01:00
* @return int Positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
public function compare($priority1, $priority2): int {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Counts the number of elements in the queue
* @link https://php.net/manual/en/splpriorityqueue.count.php
*
2020-10-30 22:37:16 +01:00
* @return int The number of elements in the queue.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
public function count(): int {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Get the current datastructure node.
* @link https://php.net/manual/en/splpriorityqueue.current.php
*
* @return TValue The current node value
*
* @since 5.3.0
*/
public function current() {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Extracts a node from top of the queue and sift up
* @link https://php.net/manual/en/splpriorityqueue.extract.php
*
* @return TValue The current node value
*
* @since 5.3.0
*/
public function extract() {}
/**
* Get the flags of extraction
* @link https://php.net/manual/en/splpriorityqueue.getextractflags.php
*
* @return SplPriorityQueue::EXTR_* Returns the current extraction mode
*
* @see SplPriorityQueue::setExtractFlags
*
* @since 5.3.0
*/
public function getExtractFlags(): int {}
/**
* Inserts an element in the queue by sifting it up
* @link https://php.net/manual/en/splpriorityqueue.insert.php
*
* @param TValue $value The value to insert.
* @param TPriority $priority The associated priority.
* @return true
*
* @since 5.3.0
*/
public function insert($value, $priority): bool {}
/**
* Tells if the queue is in a corrupted state
* @link https://php.net/manual/en/splpriorityqueue.isCorrupted.php
*
* @return bool true if the queue is corrupted, false otherwise.
*
* @since 7.0.0
*/
public function isCorrupted(): bool {}
/**
* Checks whether the queue is empty
* @link https://php.net/manual/en/splpriorityqueue.isEmpty.php
*
* @return bool Whether the queue is empty
*
* @since 5.3.0
*/
public function isEmpty(): bool {}
/**
2020-10-30 22:37:16 +01:00
* Return current node index
2020-09-29 17:27:12 +02:00
* @link https://php.net/manual/en/splpriorityqueue.key.php
*
* @return int The current node index
*
* @since 5.3.0
*/
public function key() {}
/**
* Move to the next node.
* @link https://php.net/manual/en/splpriorityqueue.next.php
*
* @return void
*
* @since 5.3.0
*/
public function next(): void {}
/**
* Recover from the corrupted state and allow further actions on the queue
* @link https://php.net/manual/en/splpriorityqueue.recoverFromCorruption.php
*
* @return void
*
* @since 5.3.0
*/
public function recoverFromCorruption(): void {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Rewind iterator back to the start (no-op)
* @link https://php.net/manual/en/splpriorityqueue.rewind.php
*
* @return void
*
* @since 5.3.0
*/
public function rewind(): void {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Sets the mode of extraction
* @link https://php.net/manual/en/splpriorityqueue.setextractflags.php
*
2020-10-30 22:37:16 +01:00
* @param SplPriorityQueue::EXTR_* $flags Defines what is extracted by SplPriorityQueue::current(), SplPriorityQueue::top() and SplPriorityQueue::extract().
2020-09-29 17:27:12 +02:00
*
* @return void
*
* @since 5.3.0
*/
public function setExtractFlags(int $flags): void {}
/**
* Peeks at the node from the top of the queue
* @link https://php.net/manual/en/splpriorityqueue.top.php
*
* @return TValue The value of the node on the top.
*
* @since 5.3.0
*/
public function top() {}
2020-10-30 22:37:16 +01:00
2020-09-29 17:27:12 +02:00
/**
* Check whether the queue contains any more nodes
* @link https://php.net/manual/en/splpriorityqueue.valid.php
*
2020-10-30 22:37:16 +01:00
* @return bool Returns true if the queue contains any more nodes, false otherwise.
2020-09-29 17:27:12 +02:00
*
* @since 5.3.0
*/
public function valid(): bool {}
}
2019-01-30 19:03:22 +01:00
/**
* The SplObjectStorage class provides a map from objects to data or, by
* ignoring data, an object set. This dual purpose can be useful in many
* cases involving the need to uniquely identify objects.
* @link https://php.net/manual/en/class.splobjectstorage.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @template TObject as object
* @template TArrayValue
2019-01-30 19:48:05 +01:00
* @template-implements ArrayAccess<TObject, TArrayValue>
* @template-implements Iterator<int, TObject>
2019-01-30 19:03:22 +01:00
*/
class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess {
public function __construct() {}
/**
* Adds an object in the storage
* @link https://php.net/manual/en/splobjectstorage.attach.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to add.
* @param TArrayValue|null $data [optional] The data to associate with the object.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function attach($object, $data = null) {}
2019-01-30 19:03:22 +01:00
/**
* Removes an object from the storage
* @link https://php.net/manual/en/splobjectstorage.detach.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to remove.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function detach($object) {}
2019-01-30 19:03:22 +01:00
/**
* Checks if the storage contains a specific object
* @link https://php.net/manual/en/splobjectstorage.contains.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to look for.
2019-01-30 19:03:22 +01:00
* @return bool true if the object is in the storage, false otherwise.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function contains($object) {}
2019-01-30 19:03:22 +01:00
/**
* Adds all objects from another storage
* @link https://php.net/manual/en/splobjectstorage.addall.php
2019-12-01 15:53:48 +01:00
*
* @param SplObjectStorage<TObject, TArrayValue> $storage The storage you want to import.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function addAll($storage) {}
2019-01-30 19:03:22 +01:00
/**
* Removes objects contained in another storage from the current storage
* @link https://php.net/manual/en/splobjectstorage.removeall.php
2019-12-01 15:53:48 +01:00
*
* @param SplObjectStorage<TObject, TArrayValue> $storage The storage containing the elements to remove.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function removeAll($storage) {}
2019-01-30 19:03:22 +01:00
/**
* Removes all objects except for those contained in another storage from the current storage
* @link https://php.net/manual/en/splobjectstorage.removeallexcept.php
2019-12-01 15:53:48 +01:00
*
* @param SplObjectStorage<TObject, TArrayValue> $storage The storage containing the elements to retain in the current storage.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.6
*/
2019-12-01 15:53:48 +01:00
public function removeAllExcept($storage) {}
2019-01-30 19:03:22 +01:00
/**
* Returns the data associated with the current iterator entry
* @link https://php.net/manual/en/splobjectstorage.getinfo.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:48:05 +01:00
* @return TArrayValue The data associated with the current iterator position.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function getInfo() {}
2019-01-30 19:03:22 +01:00
/**
* Sets the data associated with the current iterator entry
* @link https://php.net/manual/en/splobjectstorage.setinfo.php
2019-12-01 15:53:48 +01:00
*
* @param TArrayValue $data The data to associate with the current iterator entry.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function setInfo($data) {}
2019-01-30 19:03:22 +01:00
/**
* Returns the number of objects in the storage
* @link https://php.net/manual/en/splobjectstorage.count.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return int The number of objects in the storage.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function count() {}
2019-01-30 19:03:22 +01:00
/**
* Rewind the iterator to the first storage element
* @link https://php.net/manual/en/splobjectstorage.rewind.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function rewind() {}
2019-01-30 19:03:22 +01:00
/**
* Returns if the current iterator entry is valid
* @link https://php.net/manual/en/splobjectstorage.valid.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return bool true if the iterator entry is valid, false otherwise.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function valid() {}
2019-01-30 19:03:22 +01:00
/**
* Returns the index at which the iterator currently is
* @link https://php.net/manual/en/splobjectstorage.key.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return int The index corresponding to the position of the iterator.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function key() {}
2019-01-30 19:03:22 +01:00
/**
* Returns the current storage entry
* @link https://php.net/manual/en/splobjectstorage.current.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return TObject The object at the current iterator position.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function current() {}
2019-01-30 19:03:22 +01:00
/**
* Move to the next entry
* @link https://php.net/manual/en/splobjectstorage.next.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.1.0
*/
2019-12-01 15:53:48 +01:00
public function next() {}
2019-01-30 19:03:22 +01:00
/**
* Unserializes a storage from its string representation
* @link https://php.net/manual/en/splobjectstorage.unserialize.php
2019-12-01 15:53:48 +01:00
*
* @param string $serialized The serialized representation of a storage.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.2.2
*/
2019-12-01 15:53:48 +01:00
public function unserialize($serialized) {}
2019-01-30 19:03:22 +01:00
/**
* Serializes the storage
* @link https://php.net/manual/en/splobjectstorage.serialize.php
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @return string A string representing the storage.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.2.2
*/
2019-12-01 15:53:48 +01:00
public function serialize() {}
2019-01-30 19:03:22 +01:00
/**
* Checks whether an object exists in the storage
* @link https://php.net/manual/en/splobjectstorage.offsetexists.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to look for.
* @return bool true if the object exists in the storage, and false otherwise.
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetExists($object) {}
2019-01-30 19:03:22 +01:00
/**
* Associates data to an object in the storage
* @link https://php.net/manual/en/splobjectstorage.offsetset.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to associate data with.
* @param TArrayValue|null $data [optional] The data to associate with the object.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
2019-12-01 15:53:48 +01:00
*/
public function offsetSet($object, $data = null) {}
2019-01-30 19:03:22 +01:00
/**
* Removes an object from the storage
* @link https://php.net/manual/en/splobjectstorage.offsetunset.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to remove.
2019-01-30 19:03:22 +01:00
* @return void
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetUnset($object) {}
2019-01-30 19:03:22 +01:00
/**
* Returns the data associated with an <type>object</type>
* @link https://php.net/manual/en/splobjectstorage.offsetget.php
2019-12-01 15:53:48 +01:00
*
* @param TObject $object The object to look for.
2019-01-30 19:48:05 +01:00
* @return TArrayValue The data previously associated with the object in the storage.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.3.0
*/
2019-12-01 15:53:48 +01:00
public function offsetGet($object) {}
2019-01-30 19:03:22 +01:00
/**
* Calculate a unique identifier for the contained objects
* @link https://php.net/manual/en/splobjectstorage.gethash.php
2019-12-01 15:53:48 +01:00
*
* @param object $object object whose identifier is to be calculated.
2019-01-30 19:03:22 +01:00
* @return string A string with the calculated identifier.
2019-12-01 15:53:48 +01:00
*
2019-01-30 19:03:22 +01:00
* @since 5.4.0
2019-12-01 15:53:48 +01:00
*/
2019-01-30 19:03:22 +01:00
public function getHash($object) {}
}
2019-02-09 00:15:37 +01:00
/**
2019-05-06 22:38:08 +02:00
* @template-covariant T as object
2019-02-11 02:57:22 +01:00
*
* @property-read class-string<T> $name
*/
2019-02-09 00:15:37 +01:00
class ReflectionClass implements Reflector {
/**
2019-12-01 15:53:48 +01:00
* @var class-string<T>
*/
2019-02-11 02:57:22 +01:00
public $name;
2019-02-09 00:15:37 +01:00
/**
2019-12-01 15:53:48 +01:00
* @param T|class-string<T>|trait-string $argument
*/
2019-02-09 00:15:37 +01:00
public function __construct($argument) {}
2019-02-09 01:48:19 +01:00
/**
2019-12-01 15:53:48 +01:00
* @return class-string<T>
*/
public function getName(): string;
2019-02-09 01:48:19 +01:00
/**
2019-12-01 15:53:48 +01:00
* @param mixed ...$args
*
* @return T
*/
public function newInstance(...$args): object {}
2019-02-09 01:48:19 +01:00
/**
2019-12-01 15:53:48 +01:00
* @param array<int, mixed> $args
*
* @return T
*/
public function newInstanceArgs(array $args): object {}
2019-02-09 01:48:19 +01:00
/**
2019-12-01 15:53:48 +01:00
* @return T
*/
public function newInstanceWithoutConstructor(): object;
2019-12-30 16:48:50 +01:00
/**
* @return ?array<string>
* @psalm-ignore-nullable-return
*/
public function getTraitNames(): array {}
2020-10-30 22:37:16 +01:00
/**
* @since 8.0
* @template TClass as object
* @param class-string<TClass>|null $name
* @return array<ReflectionAttribute<TClass>>
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
}
2020-11-05 15:29:20 +01:00
class ReflectionFunction implements Reflector
2020-10-30 22:37:16 +01:00
{
/**
* @since 8.0
* @template TClass as object
* @param class-string<TClass>|null $name
* @return array<ReflectionAttribute<TClass>>
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
}
2020-11-05 15:29:20 +01:00
class ReflectionProperty implements Reflector
2020-10-30 22:37:16 +01:00
{
/**
* @since 8.0
* @template TClass as object
* @param class-string<TClass>|null $name
* @return array<ReflectionAttribute<TClass>>
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
}
2020-11-05 15:29:20 +01:00
class ReflectionMethod implements Reflector
2020-10-30 22:37:16 +01:00
{
/**
* @since 8.0
* @template TClass as object
* @param class-string<TClass>|null $name
* @return array<ReflectionAttribute<TClass>>
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
}
class ReflectionClassConstant
{
/**
* @since 8.0
* @template TClass as object
* @param class-string<TClass>|null $name
* @return array<ReflectionAttribute<TClass>>
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
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
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>
*/
public static function create(object $referent): WeakReference;
/** @return ?T */
public function get(): ?object;
}