SlaxWeb Framework
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
SlaxWeb\Output\Handler\View Class Reference
Inheritance diagram for SlaxWeb\Output\Handler\View:
Inheritance graph
[legend]
Collaboration diagram for SlaxWeb\Output\Handler\View:
Collaboration graph
[legend]

Public Member Functions

 add (AppView $view)
 
 addData (array $data, string $type="all")
 
 render ()
 
- Public Member Functions inherited from SlaxWeb\Output\AbstractHandler
 render ()
 
 getContentType ()
 
 getStatusCode ()
 

Protected Attributes

 $container = []
 
 $viewData
 
 $contentType = "text/html"
 
- Protected Attributes inherited from SlaxWeb\Output\AbstractHandler
 $contentType = ""
 
 $statusCode = 200
 

Member Function Documentation

SlaxWeb\Output\Handler\View::add ( AppView  $view)

Add View

Adds a View instance to the Views container and returns an instance of itself.

Parameters
\SlaxWeb\View\Base$viewView instance
Returns
self
SlaxWeb\Output\Handler\View::addData ( array  $data,
string  $type = "all" 
)

Add view data

Adds an array of data to the internal view data container. The second parameter, $type, defines if the data received will be used for a specific View, or all views. The $type needs to be set to the full class name of a view in order to be recognized as view data for that specific view. If the second parameters is omitted or value "all" is used, then data will be used for all views.

Parameters
array$dataView data
string$typeView data type
Returns
self
SlaxWeb\Output\Handler\View::render ( )

Member Data Documentation

SlaxWeb\Output\Handler\View::$viewData
protected
Initial value:
= [
"all" => []
]

The documentation for this class was generated from the following file: