zend_exceptions.stub.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. /** @generate-class-entries */
  3. interface Throwable extends Stringable
  4. {
  5. public function getMessage(): string;
  6. /** @return int */
  7. public function getCode();
  8. public function getFile(): string;
  9. public function getLine(): int;
  10. public function getTrace(): array;
  11. public function getPrevious(): ?Throwable;
  12. public function getTraceAsString(): string;
  13. }
  14. class Exception implements Throwable
  15. {
  16. /**
  17. * Intentionally left untyped for BC reasons
  18. * @var string
  19. */
  20. protected $message = "";
  21. private string $string = "";
  22. /**
  23. * Intentionally left untyped for BC reasons
  24. * @var int
  25. */
  26. protected $code = 0;
  27. protected string $file = "";
  28. protected int $line = 0;
  29. private array $trace = [];
  30. private ?Throwable $previous = null;
  31. private function __clone(): void {}
  32. public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
  33. /** @tentative-return-type */
  34. public function __wakeup(): void {}
  35. final public function getMessage(): string {}
  36. /** @return int */
  37. final public function getCode() {}
  38. final public function getFile(): string {}
  39. final public function getLine(): int {}
  40. final public function getTrace(): array {}
  41. final public function getPrevious(): ?Throwable {}
  42. final public function getTraceAsString(): string {}
  43. public function __toString(): string {}
  44. }
  45. class ErrorException extends Exception
  46. {
  47. protected int $severity = E_ERROR;
  48. public function __construct(
  49. string $message = "",
  50. int $code = 0,
  51. int $severity = E_ERROR,
  52. ?string $filename = null,
  53. ?int $line = null,
  54. ?Throwable $previous = null
  55. ) {}
  56. final public function getSeverity(): int {}
  57. }
  58. class Error implements Throwable
  59. {
  60. /**
  61. * Intentionally left untyped for BC reasons
  62. * @var string
  63. */
  64. protected $message = "";
  65. private string $string = "";
  66. /**
  67. * Intentionally left untyped for BC reasons
  68. * @var int
  69. */
  70. protected $code = 0;
  71. protected string $file = "";
  72. protected int $line;
  73. private array $trace = [];
  74. private ?Throwable $previous = null;
  75. /** @implementation-alias Exception::__clone */
  76. private function __clone(): void {}
  77. /** @implementation-alias Exception::__construct */
  78. public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
  79. /**
  80. * @tentative-return-type
  81. * @implementation-alias Exception::__wakeup
  82. */
  83. public function __wakeup(): void {}
  84. /** @implementation-alias Exception::getMessage */
  85. final public function getMessage(): string {}
  86. /**
  87. * @return int
  88. * @implementation-alias Exception::getCode
  89. */
  90. final public function getCode() {}
  91. /** @implementation-alias Exception::getFile */
  92. final public function getFile(): string {}
  93. /** @implementation-alias Exception::getLine */
  94. final public function getLine(): int {}
  95. /** @implementation-alias Exception::getTrace */
  96. final public function getTrace(): array {}
  97. /** @implementation-alias Exception::getPrevious */
  98. final public function getPrevious(): ?Throwable {}
  99. /** @implementation-alias Exception::getTraceAsString */
  100. final public function getTraceAsString(): string {}
  101. /** @implementation-alias Exception::__toString */
  102. public function __toString(): string {}
  103. }
  104. class CompileError extends Error
  105. {
  106. }
  107. class ParseError extends CompileError
  108. {
  109. }
  110. class TypeError extends Error
  111. {
  112. }
  113. class ArgumentCountError extends TypeError
  114. {
  115. }
  116. class ValueError extends Error
  117. {
  118. }
  119. class ArithmeticError extends Error
  120. {
  121. }
  122. class DivisionByZeroError extends ArithmeticError
  123. {
  124. }
  125. class UnhandledMatchError extends Error
  126. {
  127. }