xref: /php-src/ext/spl/spl_dllist.stub.php (revision f0757100)
1<?php
2
3/** @generate-class-entries */
4
5class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable
6{
7    /** @cvalue SPL_DLLIST_IT_LIFO */
8    public const int IT_MODE_LIFO = UNKNOWN;
9    /** @cvalue SPL_DLLIST_IT_FIFO */
10    public const int IT_MODE_FIFO = UNKNOWN;
11    /** @cvalue SPL_DLLIST_IT_DELETE */
12    public const int IT_MODE_DELETE = UNKNOWN;
13    /** @cvalue SPL_DLLIST_IT_KEEP */
14    public const int IT_MODE_KEEP = UNKNOWN;
15
16    /** @tentative-return-type */
17    public function add(int $index, mixed $value): void {}
18
19    /** @tentative-return-type */
20    public function pop(): mixed {}
21
22    /** @tentative-return-type */
23    public function shift(): mixed {}
24
25    /** @tentative-return-type */
26    public function push(mixed $value): void {}
27
28    /** @tentative-return-type */
29    public function unshift(mixed $value): void {}
30
31    /** @tentative-return-type */
32    public function top(): mixed {}
33
34    /** @tentative-return-type */
35    public function bottom(): mixed {}
36
37    /** @tentative-return-type */
38    public function __debugInfo(): array {}
39
40    /** @tentative-return-type */
41    public function count(): int {}
42
43    /** @tentative-return-type */
44    public function isEmpty(): bool {}
45
46    /** @tentative-return-type */
47    public function setIteratorMode(int $mode): int {}
48
49    /** @tentative-return-type */
50    public function getIteratorMode(): int {}
51
52    /**
53     * @param int $index
54     * @tentative-return-type
55     */
56    public function offsetExists($index): bool {}
57
58    /**
59     * @param int $index
60     * @tentative-return-type
61     */
62    public function offsetGet($index): mixed {}
63
64    /**
65     * @param int|null $index
66     * @tentative-return-type
67     */
68    public function offsetSet($index, mixed $value): void {}
69
70    /**
71     * @param int $index
72     * @tentative-return-type
73     */
74    public function offsetUnset($index): void {}
75
76    /** @tentative-return-type */
77    public function rewind(): void {}
78
79    /** @tentative-return-type */
80    public function current(): mixed {}
81
82    /** @tentative-return-type */
83    public function key(): int {}
84
85    /** @tentative-return-type */
86    public function prev(): void {}
87
88    /** @tentative-return-type */
89    public function next(): void {}
90
91    /** @tentative-return-type */
92    public function valid(): bool {}
93
94    /** @tentative-return-type */
95    public function unserialize(string $data): void {}
96
97    /** @tentative-return-type */
98    public function serialize(): string {}
99
100    /** @tentative-return-type */
101    public function __serialize(): array {}
102
103    /** @tentative-return-type */
104    public function __unserialize(array $data): void {}
105}
106
107class SplQueue extends SplDoublyLinkedList
108{
109    /**
110     * @tentative-return-type
111     * @implementation-alias SplDoublyLinkedList::push
112     */
113    public function enqueue(mixed $value): void {}
114
115    /**
116     * @tentative-return-type
117     * @implementation-alias SplDoublyLinkedList::shift
118     */
119    public function dequeue(): mixed {}
120}
121
122class SplStack extends SplDoublyLinkedList
123{
124}
125