Свойство | Тип | Описание | |
---|---|---|---|
$data | array | Model data | |
$output | string | View output string | |
$templateFile | string | View template file | |
$templateString | string | View template string |
Метод | Описание | |
---|---|---|
__construct ( string $template = null, array $data = null ) : |
Constructor | |
__get ( string $name ) : mixed | Get method to return the value of data[$name]. | |
__isset ( string $name ) : boolean | Return the isset value of data[$name]. | |
__set ( string $name, mixed $value ) : mixed | Set method to set the property to the value of data[$name]. | |
__toString ( ) : string | Return rendered view as string | |
__unset ( string $name ) : void | Unset data[$name]. | |
factory ( string $template = null, array $data = null ) : |
Create a Pop\Mvc\View object | |
get ( string $key ) : mixed | Get model data | |
getData ( ) : array | Get all model data | |
getTemplate ( ) : string | Get view template | |
getTemplateFile ( ) : string | Get view template file | |
getTemplateString ( ) : string | Get view template string | |
merge ( array $data ) : |
Merge new model data | |
render ( boolean $ret = false ) : mixed | Render the view. | |
set ( string $name, mixed $value ) : |
Set model data | |
setData ( array $data = [] ) : |
Set all model data | |
setTemplate ( string $template ) : |
Set view template with auto-detect | |
setTemplateFile ( string $template ) : |
Set view template file | |
setTemplateString ( string $template ) : |
Set view template string |
Метод | Описание | |
---|---|---|
renderTemplateFile ( ) : void | Render view template file | |
renderTemplateString ( ) : void | Render view template string |
public __construct ( string $template = null, array $data = null ) : |
||
$template | string | |
$data | array | |
Результат |
public __toString ( ) : string | ||
Результат | string |
public getTemplateFile ( ) : string | ||
Результат | string |
public getTemplateString ( ) : string | ||
Результат | string |
protected renderTemplateFile ( ) : void | ||
Результат | void |
protected renderTemplateString ( ) : void | ||
Результат | void |
public setTemplate ( string $template ) : |
||
$template | string | |
Результат |
public setTemplateFile ( string $template ) : |
||
$template | string | |
Результат |
public setTemplateString ( string $template ) : |
||
$template | string | |
Результат |
protected string $templateFile | ||
Результат | string |
protected string $templateString | ||
Результат | string |