Skip to content

Internals Rendering

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

Rendering internals

Framework Internals · Developer guide

Controller extends View extends Render. Controller stores its root, name, shared array and optional Context. RuntimeControllerAPI assigns packageName and context to direct controllers or appends them to factory configuration.

View::view sets bundle, exposes bundle items as properties, creates a DOM from an initial include of the template, and returns itself. Render reinitializes DOM state, constructs the adapted BladeOne engine for the view root and compiled cache, initializes CSRF token state, sets .awt.php extension, asset dictionary and package name, compiles/runs the template, loads the resulting HTML into DOMDocument, dispatches renderer.ready, and serializes the modified DOM.

Render supports DOMDocument creation and XPath class-based insertion/replacement. insertIntoByClassname validates its DOM and class input more strictly than the other insertion helpers. Bundle keys can overwrite receiver properties, and PHP embedded in a view can execute during the initial include as well as compiled rendering. View catches Throwable and prints a message rather than rethrowing. Render::createDocument dies on caught Exception; not all DOM warnings become exceptions.

The vendored BladeOne class carries upstream MIT attribution and version 4.17.1. Its upstream template language is excluded from exhaustive ownership scope; AWT's modifications document package/asset/resource/CSRF behavior and relevant constructor/cache changes.

Component reference

Clone this wiki locally