2019-10-15 12:30:23 +00:00
|
|
|
<?php
|
|
|
|
|
2021-02-09 12:34:25 +00:00
|
|
|
/** @generate-class-entries */
|
2020-04-25 21:10:07 +00:00
|
|
|
|
2022-07-12 08:35:03 +00:00
|
|
|
require "zend_constants.stub.php";
|
|
|
|
|
2020-01-13 16:06:26 +00:00
|
|
|
interface Throwable extends Stringable
|
2019-10-15 12:30:23 +00:00
|
|
|
{
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getMessage(): string;
|
2019-10-15 12:30:23 +00:00
|
|
|
|
|
|
|
/** @return int */
|
2022-05-25 11:22:55 +00:00
|
|
|
public function getCode(); // TODO add proper type (i.e. int|string)
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getFile(): string;
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getLine(): int;
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getTrace(): array;
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getPrevious(): ?Throwable;
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-05-28 12:19:47 +00:00
|
|
|
public function getTraceAsString(): string;
|
2019-10-15 12:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Exception implements Throwable
|
|
|
|
{
|
2021-09-08 14:05:10 +00:00
|
|
|
/**
|
|
|
|
* Intentionally left untyped for BC reasons
|
|
|
|
* @var string
|
|
|
|
*/
|
2021-01-26 10:50:36 +00:00
|
|
|
protected $message = "";
|
2021-04-20 20:13:44 +00:00
|
|
|
private string $string = "";
|
2021-09-08 14:05:10 +00:00
|
|
|
/**
|
|
|
|
* Intentionally left untyped for BC reasons
|
|
|
|
* @var int
|
|
|
|
*/
|
2022-05-25 11:22:55 +00:00
|
|
|
protected $code = 0; // TODO add proper type (i.e. int|string)
|
2021-04-20 20:13:44 +00:00
|
|
|
protected string $file = "";
|
|
|
|
protected int $line = 0;
|
2021-01-26 10:50:36 +00:00
|
|
|
private array $trace = [];
|
|
|
|
private ?Throwable $previous = null;
|
|
|
|
|
2021-04-21 08:08:25 +00:00
|
|
|
private function __clone(): void {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-09-19 12:13:42 +00:00
|
|
|
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2021-07-19 11:44:20 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function __wakeup(): void {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getMessage(): string {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
|
|
|
/** @return int */
|
2022-05-25 11:22:55 +00:00
|
|
|
final public function getCode() {} // TODO add proper type (i.e. int|string)
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getFile(): string {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getLine(): int {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getTrace(): array {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getPrevious(): ?Throwable {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getTraceAsString(): string {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-11 08:23:51 +00:00
|
|
|
public function __toString(): string {}
|
2019-10-15 12:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class ErrorException extends Exception
|
|
|
|
{
|
2021-04-20 20:13:44 +00:00
|
|
|
protected int $severity = E_ERROR;
|
2021-01-26 10:50:36 +00:00
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
string $message = "",
|
|
|
|
int $code = 0,
|
|
|
|
int $severity = E_ERROR,
|
|
|
|
?string $filename = null,
|
|
|
|
?int $line = null,
|
|
|
|
?Throwable $previous = null
|
|
|
|
) {}
|
2019-10-15 12:30:23 +00:00
|
|
|
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getSeverity(): int {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Error implements Throwable
|
|
|
|
{
|
2021-09-08 14:05:10 +00:00
|
|
|
/**
|
|
|
|
* Intentionally left untyped for BC reasons
|
|
|
|
* @var string
|
|
|
|
*/
|
2021-01-26 10:50:36 +00:00
|
|
|
protected $message = "";
|
2021-04-20 20:13:44 +00:00
|
|
|
private string $string = "";
|
2021-09-08 14:05:10 +00:00
|
|
|
/**
|
|
|
|
* Intentionally left untyped for BC reasons
|
|
|
|
* @var int
|
|
|
|
*/
|
2022-05-25 11:22:55 +00:00
|
|
|
protected $code = 0; // TODO add proper type (i.e. int|string)
|
2021-04-20 20:13:44 +00:00
|
|
|
protected string $file = "";
|
|
|
|
protected int $line;
|
2021-01-26 10:50:36 +00:00
|
|
|
private array $trace = [];
|
|
|
|
private ?Throwable $previous = null;
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::__clone */
|
2021-04-21 08:08:25 +00:00
|
|
|
private function __clone(): void {}
|
2020-04-25 21:10:07 +00:00
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::__construct */
|
2020-09-19 12:13:42 +00:00
|
|
|
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
|
2020-04-25 21:10:07 +00:00
|
|
|
|
2020-10-23 12:09:23 +00:00
|
|
|
/**
|
2021-07-19 11:44:20 +00:00
|
|
|
* @tentative-return-type
|
2020-10-23 12:09:23 +00:00
|
|
|
* @implementation-alias Exception::__wakeup
|
|
|
|
*/
|
2021-07-19 11:44:20 +00:00
|
|
|
public function __wakeup(): void {}
|
2020-04-25 21:10:07 +00:00
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getMessage */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getMessage(): string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
2020-09-19 18:13:08 +00:00
|
|
|
* @implementation-alias Exception::getCode
|
2020-04-25 21:10:07 +00:00
|
|
|
*/
|
|
|
|
final public function getCode() {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getFile */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getFile(): string {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getLine */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getLine(): int {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getTrace */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getTrace(): array {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getPrevious */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getPrevious(): ?Throwable {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::getTraceAsString */
|
2020-04-25 21:10:07 +00:00
|
|
|
final public function getTraceAsString(): string {}
|
|
|
|
|
2020-09-19 18:13:08 +00:00
|
|
|
/** @implementation-alias Exception::__toString */
|
2020-04-25 21:10:07 +00:00
|
|
|
public function __toString(): string {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class CompileError extends Error
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class ParseError extends CompileError
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class TypeError extends Error
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class ArgumentCountError extends TypeError
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class ValueError extends Error
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class ArithmeticError extends Error
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class DivisionByZeroError extends ArithmeticError
|
|
|
|
{
|
2019-10-15 12:30:23 +00:00
|
|
|
}
|
2021-01-26 10:50:36 +00:00
|
|
|
|
|
|
|
class UnhandledMatchError extends Error
|
|
|
|
{
|
|
|
|
}
|
2023-06-17 20:26:21 +00:00
|
|
|
|
|
|
|
class RequestParseBodyException extends Exception
|
|
|
|
{
|
|
|
|
}
|