Skip to content

Internals View Interfaces IView

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

view\interfaces\IView

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/view/interfaces/IView.php · Snapshot 8411f4287706.

A View stores the template name and bundle, initially includes the view file, then compiles the Blade template on render(). Controllers inherit this behavior.

Imports and dependencies

use redirect\Redirect;
use view\View;

IView

Declaration and architectural role

interface IView

Source description (behavioral corrections are recorded in Known discrepancies):

Interface IView

Defines the contract for view classes. Classes implementing this interface should provide a method for handling the default view logic, the index action.

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
index public function index(): View|Redirect

index

Source line 25

public function index(): View|Redirect;

Handles the index action of the view.

This method should return an instance of the View class or a Redirect.

@return View|Redirect The View instance to be rendered or a Redirect instance to another location.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Related types

Clone this wiki locally