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