ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Public Member Functions | |
__construct () | |
Constructor. More... | |
getData ( $key=null) | |
Get data. More... | |
setData () | |
Set data. More... | |
appendData (array $data) | |
Append data to existing View data. More... | |
getTemplatesDirectory () | |
Get templates directory. More... | |
setTemplatesDirectory ( $dir) | |
Set templates directory. More... | |
display ( $template) | |
Display template. More... | |
render ( $template) | |
Render template. More... | |
Protected Attributes | |
$data = array() | |
$templatesDirectory | |
Slim_View::__construct | ( | ) |
Slim_View::appendData | ( | array | $data | ) |
Slim_View::display | ( | $template | ) |
Display template.
This method echoes the rendered template to the current output buffer
string | $template | Path to template file relative to templates directoy |
Definition at line 143 of file View.php.
References render().
Slim_View::getData | ( | $key = null | ) |
Get data.
string | $key |
Definition at line 72 of file View.php.
References $data.
Slim_View::getTemplatesDirectory | ( | ) |
Get templates directory.
Definition at line 121 of file View.php.
References $templatesDirectory.
Referenced by render().
Slim_View::render | ( | $template | ) |
Render template.
string | $template | Path to template file relative to templates directory |
RuntimeException | If template does not exist |
Definition at line 153 of file View.php.
References getTemplatesDirectory().
Referenced by display().
Slim_View::setData | ( | ) |
Set data.
This method is overloaded to accept two different method signatures. You may use this to set a specific key with a specfic value, or you may use this to set all data to a specific array.
USAGE:
View::setData('color', 'red'); View::setData(array('color' => 'red', 'number' => 1));
string|array | |
mixed | Optional. Only use if first argument is a string. |
InvalidArgumentException | If incorrect method signature |
Definition at line 97 of file View.php.
Slim_View::setTemplatesDirectory | ( | $dir | ) |
|
protected |
Definition at line 51 of file View.php.
Referenced by appendData(), and getData().
|
protected |
Definition at line 56 of file View.php.
Referenced by getTemplatesDirectory().