Jet\Debug

This class is used jointly by ErrorHandler and Profiler.

Momentarily, the class has a simple purpose and that is to hold information about what kind of output is expected. So if it is a classic display of some page, the output should be HTML, or it can be JSON, or XML in case of some API.

Jet tries its best to set the correct mode itself, but of course you can do it according to your needs.

getter / setter meaning
static getOutputIsHTML(): bool

static setOutputIsJSON( bool $output_is_JSON ): void
Expected output to be HTML
static getOutputIsJSON(): bool

static setOutputIsJSON( bool $output_is_JSON ): void
Expected output to be JSON
static getOutputIsXML(): bool
static setOutputIsXML( bool $output_is_XML ): void
Expected output to be XML

WARNING! If all getters return false, it is assumed that this is CLI mode and therefore the output will be pure text.

Previous chapter
ErrorHandler
Next chapter
Jet\Debug_ErrorHandler