API Documentation (v0.9.0-alpha)

Avolutions\View\View

contains any representation of the application. This allows the separation from the application logic. It can also contain variable content that will be passed by a ViewModel.

Methods

Method Visibility Description
__construct() public Creates a new View object that contains the content of the view file and the data of the passed ViewModel.
__toString() public Outputs the content of the loaded view file together with the passed ViewModel data.

Method Details

__construct()

Creates a new View object that contains the content of the view file and the data of the passed ViewModel.

public __construct(Application $Application[, string|null $viewname = null ][, ViewModel|null $ViewModel = null ]) : mixed
Parameters

Application $Application
Application instance.

string|null $viewname (optional)
The name of the View file.

ViewModel|null $ViewModel (optional)
$ViewModel The ViewModel object that will be passed to the View.

__toString()

Outputs the content of the loaded view file together with the passed ViewModel data.

public __toString() : string
Return values
string Outputs the content of the loaded view file together with the passed ViewModel data.