2019-10-15 20:30:23 +08:00
|
|
|
<?php
|
|
|
|
|
2021-02-13 06:33:09 +08:00
|
|
|
/** @generate-class-entries */
|
2020-04-26 05:10:07 +08:00
|
|
|
|
2019-10-15 20:30:23 +08:00
|
|
|
interface Traversable {}
|
|
|
|
|
|
|
|
interface IteratorAggregate extends Traversable
|
|
|
|
{
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function getIterator(): Traversable;
|
2019-10-15 20:30:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Iterator extends Traversable
|
|
|
|
{
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function current(): mixed;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function next(): void;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function key(): mixed;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function valid(): bool;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function rewind(): void;
|
2019-10-15 20:30:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface ArrayAccess
|
|
|
|
{
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function offsetExists(mixed $offset): bool;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2020-07-29 05:00:44 +08:00
|
|
|
/**
|
|
|
|
* Actually this should be return by ref but atm cannot be.
|
2021-07-19 19:44:20 +08:00
|
|
|
* @tentative-return-type
|
2020-07-29 05:00:44 +08:00
|
|
|
*/
|
2021-07-19 19:44:20 +08:00
|
|
|
public function offsetGet(mixed $offset): mixed;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function offsetSet(mixed $offset, mixed $value): void;
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function offsetUnset(mixed $offset): void;
|
2019-10-15 20:30:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Serializable
|
|
|
|
{
|
2021-01-27 20:54:15 +08:00
|
|
|
/** @return string|null */
|
2020-04-11 16:23:51 +08:00
|
|
|
public function serialize();
|
2019-10-15 20:30:23 +08:00
|
|
|
|
2020-04-03 22:49:11 +08:00
|
|
|
/** @return void */
|
2020-10-06 20:58:45 +08:00
|
|
|
public function unserialize(string $data);
|
2019-10-15 20:30:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Countable
|
|
|
|
{
|
2021-07-19 19:44:20 +08:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function count(): int;
|
2019-10-15 20:30:23 +08:00
|
|
|
}
|
2020-01-14 00:06:26 +08:00
|
|
|
|
|
|
|
interface Stringable
|
|
|
|
{
|
2020-04-11 16:23:51 +08:00
|
|
|
public function __toString(): string;
|
2020-01-14 00:06:26 +08:00
|
|
|
}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-20 18:36:20 +08:00
|
|
|
/**
|
|
|
|
* @not-serializable
|
|
|
|
*/
|
2020-02-26 23:42:49 +08:00
|
|
|
final class InternalIterator implements Iterator
|
|
|
|
{
|
2021-07-19 19:44:20 +08:00
|
|
|
private function __construct() {}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
public function current(): mixed {}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
public function key(): mixed {}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
public function next(): void {}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
public function valid(): bool {}
|
2020-02-26 23:42:49 +08:00
|
|
|
|
2021-07-19 19:44:20 +08:00
|
|
|
public function rewind(): void {}
|
2020-02-26 23:42:49 +08:00
|
|
|
}
|