View
in package
Table of Contents
Properties
- $htmlContent : string
Methods
- add() : self
- Adds content to the view.
- clear() : void
- Clears the view.
- get() : string
- render() : self
- Renders the view.
- set() : self
- Sets the content of the view.
Properties
$htmlContent
private
string
$htmlContent
= ''
Methods
add()
Adds content to the view.
public
add(string $content) : self
Parameters
- $content : string
-
The content to be added.
Return values
self —Returns an instance of the View class.
clear()
Clears the view.
public
clear() : void
This method clears the view by removing all the content and resetting any internal state.
get()
public
get() : string
Return values
stringrender()
Renders the view.
public
render() : self
This method is responsible for rendering the view and displaying it to the user. It should be called after setting all the necessary data for the view.
Return values
selfset()
Sets the content of the view.
public
set(string $content) : self
Parameters
- $content : string
-
The content to set.
Return values
self —Returns the current instance of the View class.