DateObjectError クラス

(PHP 8 >= 8.3.0)

はじめに

日付/時刻に関するクラスが、正しく初期化されていない場合にスローされます。

日付/時刻に関するクラスには final が指定されていないので、継承可能です。 親クラスのコンストラクタがコールされない場合、このエラーがスローされます。 これは常に、プログラミング時の誤りです。

クラス概要

classDateObjectErrorextendsDateError {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicError::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicError::getCode(): int
finalpublicError::getFile(): string
finalpublicError::getLine(): int
finalpublicError::getTrace(): array
}
To Top