API / Minn\Runtime / DieInput

DieInput final class

Minn\Runtime\DieInput · public/minn/src/Minn/Runtime/DieInput.php · 34 lines

wp_die's message, title and arguments made whole, as the die handlers read them on the reference (probes functions-remaining, functions-formatting-doubts): an error's first message is the message and every other one, each with its code's data, an additional error; the first error's status is the response unless the caller names one, and of its data only wp_die's own arguments carry over; the caller's code wins over the error's. A missing response is 500, a missing title the translated "WordPress › Error", a missing code wp_die, and the charset the site's unless the caller names one, in its usual spelling.

Constants and properties

privateDEFAULTS = array ( 'response' => 0, 'code' => '', 'exit' => true, 'back_link' => false, 'link_url' => '', 'link_text' => '', 'text_direction' => 'ltr', 'charset' => 'utf-8', 'additional_errors' => array ( ), )

Public

staticprocess(mixed $message, ?array $errors, mixed $title, mixed $args, string $siteCharset, Closure $charset): array#

The message, title and arguments.

$errorslist<array{code: int|string, message: string, data: mixed}>|nullthe error's messages in order, or null for a plain message
$charsetClosure(string): stringa charset's usual spelling
@return array{0: mixed, 1: mixed, 2: array<string, mixed>}