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.