spl_array.stub.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <?php
  2. /** @generate-class-entries */
  3. class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable
  4. {
  5. public function __construct(array|object $array = [], int $flags = 0, string $iteratorClass = ArrayIterator::class) {}
  6. /** @tentative-return-type */
  7. public function offsetExists(mixed $key): bool {}
  8. /** @tentative-return-type */
  9. public function offsetGet(mixed $key): mixed {}
  10. /** @tentative-return-type */
  11. public function offsetSet(mixed $key, mixed $value): void {}
  12. /** @tentative-return-type */
  13. public function offsetUnset(mixed $key): void {}
  14. /** @tentative-return-type */
  15. public function append(mixed $value): void {}
  16. /** @tentative-return-type */
  17. public function getArrayCopy(): array {}
  18. /** @tentative-return-type */
  19. public function count(): int {}
  20. /** @tentative-return-type */
  21. public function getFlags(): int {}
  22. /** @tentative-return-type */
  23. public function setFlags(int $flags): void {}
  24. /** @tentative-return-type */
  25. public function asort(int $flags = SORT_REGULAR): bool {}
  26. /** @tentative-return-type */
  27. public function ksort(int $flags = SORT_REGULAR): bool {}
  28. /** @tentative-return-type */
  29. public function uasort(callable $callback): bool {}
  30. /** @tentative-return-type */
  31. public function uksort(callable $callback): bool {}
  32. /** @tentative-return-type */
  33. public function natsort(): bool {}
  34. /** @tentative-return-type */
  35. public function natcasesort(): bool {}
  36. /** @tentative-return-type */
  37. public function unserialize(string $data): void {}
  38. /** @tentative-return-type */
  39. public function serialize(): string {}
  40. /** @tentative-return-type */
  41. public function __serialize(): array {}
  42. /** @tentative-return-type */
  43. public function __unserialize(array $data): void {}
  44. /** @tentative-return-type */
  45. public function getIterator(): Iterator {}
  46. /** @tentative-return-type */
  47. public function exchangeArray(array|object $array): array {}
  48. /** @tentative-return-type */
  49. public function setIteratorClass(string $iteratorClass): void {}
  50. /** @tentative-return-type */
  51. public function getIteratorClass(): string {}
  52. /** @tentative-return-type */
  53. public function __debugInfo(): array {}
  54. }
  55. class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Countable
  56. {
  57. public function __construct(array|object $array = [], int $flags = 0) {}
  58. /**
  59. * @tentative-return-type
  60. * @implementation-alias ArrayObject::offsetExists
  61. */
  62. public function offsetExists(mixed $key): bool {}
  63. /**
  64. * @tentative-return-type
  65. * @implementation-alias ArrayObject::offsetGet
  66. */
  67. public function offsetGet(mixed $key): mixed {}
  68. /**
  69. * @tentative-return-type
  70. * @implementation-alias ArrayObject::offsetSet
  71. */
  72. public function offsetSet(mixed $key, mixed $value): void {}
  73. /**
  74. * @tentative-return-type
  75. * @implementation-alias ArrayObject::offsetUnset
  76. */
  77. public function offsetUnset(mixed $key): void {}
  78. /**
  79. * @tentative-return-type
  80. * @implementation-alias ArrayObject::append
  81. */
  82. public function append(mixed $value): void {}
  83. /**
  84. * @tentative-return-type
  85. * @implementation-alias ArrayObject::getArrayCopy
  86. */
  87. public function getArrayCopy(): array {}
  88. /**
  89. * @tentative-return-type
  90. * @implementation-alias ArrayObject::count
  91. */
  92. public function count(): int {}
  93. /**
  94. * @tentative-return-type
  95. * @implementation-alias ArrayObject::getFlags
  96. */
  97. public function getFlags(): int {}
  98. /**
  99. * @tentative-return-type
  100. * @implementation-alias ArrayObject::setFlags
  101. */
  102. public function setFlags(int $flags): void {}
  103. /**
  104. * @tentative-return-type
  105. * @implementation-alias ArrayObject::asort
  106. */
  107. public function asort(int $flags = SORT_REGULAR): bool {}
  108. /**
  109. * @tentative-return-type
  110. * @implementation-alias ArrayObject::ksort
  111. */
  112. public function ksort(int $flags = SORT_REGULAR): bool {}
  113. /**
  114. * @tentative-return-type
  115. * @implementation-alias ArrayObject::uasort
  116. */
  117. public function uasort(callable $callback): bool {}
  118. /**
  119. * @tentative-return-type
  120. * @implementation-alias ArrayObject::uksort
  121. */
  122. public function uksort(callable $callback): bool {}
  123. /**
  124. * @tentative-return-type
  125. * @implementation-alias ArrayObject::natsort
  126. */
  127. public function natsort(): bool {}
  128. /**
  129. * @tentative-return-type
  130. * @implementation-alias ArrayObject::natcasesort
  131. */
  132. public function natcasesort(): bool {}
  133. /**
  134. * @tentative-return-type
  135. * @implementation-alias ArrayObject::unserialize
  136. */
  137. public function unserialize(string $data): void {}
  138. /**
  139. * @tentative-return-type
  140. * @implementation-alias ArrayObject::serialize
  141. */
  142. public function serialize(): string {}
  143. /**
  144. * @tentative-return-type
  145. * @implementation-alias ArrayObject::__serialize
  146. */
  147. public function __serialize(): array {}
  148. /**
  149. * @tentative-return-type
  150. * @implementation-alias ArrayObject::__unserialize
  151. */
  152. public function __unserialize(array $data): void {}
  153. /** @tentative-return-type */
  154. public function rewind(): void {}
  155. /** @tentative-return-type */
  156. public function current(): mixed {}
  157. /** @tentative-return-type */
  158. public function key(): string|int|null {}
  159. /** @tentative-return-type */
  160. public function next(): void {}
  161. /** @tentative-return-type */
  162. public function valid(): bool {}
  163. /** @tentative-return-type */
  164. public function seek(int $offset): void {}
  165. /**
  166. * @tentative-return-type
  167. * @implementation-alias ArrayObject::__debugInfo
  168. */
  169. public function __debugInfo(): array {}
  170. }
  171. class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
  172. {
  173. /** @tentative-return-type */
  174. public function hasChildren(): bool {}
  175. /** @tentative-return-type */
  176. public function getChildren(): ?RecursiveArrayIterator {}
  177. }