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