PHP Class Pop\Mvc\View

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$data array Model data
$output string View output string
$templateFile string View template file
$templateString string View template string

Méthodes publiques

Méthode Description
__construct ( string $template = null, array $data = null ) : View 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 ) : View 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 ) : View Merge new model data
render ( boolean $ret = false ) : mixed Render the view.
set ( string $name, mixed $value ) : View Set model data
setData ( array $data = [] ) : View Set all model data
setTemplate ( string $template ) : View Set view template with auto-detect
setTemplateFile ( string $template ) : View Set view template file
setTemplateString ( string $template ) : View Set view template string

Méthodes protégées

Méthode Description
renderTemplateFile ( ) : void Render view template file
renderTemplateString ( ) : void Render view template string

Method Details

__construct() public méthode

Instantiate the view object.
public __construct ( string $template = null, array $data = null ) : View
$template string
$data array
Résultat View

__get() public méthode

Get method to return the value of data[$name].
public __get ( string $name ) : mixed
$name string
Résultat mixed

__isset() public méthode

Return the isset value of data[$name].
public __isset ( string $name ) : boolean
$name string
Résultat boolean

__set() public méthode

Set method to set the property to the value of data[$name].
public __set ( string $name, mixed $value ) : mixed
$name string
$value mixed
Résultat mixed

__toString() public méthode

Return rendered view as string
public __toString ( ) : string
Résultat string

__unset() public méthode

Unset data[$name].
public __unset ( string $name ) : void
$name string
Résultat void

factory() public static méthode

Create a Pop\Mvc\View object
public static factory ( string $template = null, array $data = null ) : View
$template string
$data array
Résultat View

get() public méthode

Get model data
public get ( string $key ) : mixed
$key string
Résultat mixed

getData() public méthode

Get all model data
public getData ( ) : array
Résultat array

getTemplate() public méthode

Get view template
public getTemplate ( ) : string
Résultat string

getTemplateFile() public méthode

Get view template file
public getTemplateFile ( ) : string
Résultat string

getTemplateString() public méthode

Get view template string
public getTemplateString ( ) : string
Résultat string

merge() public méthode

Merge new model data
public merge ( array $data ) : View
$data array
Résultat View

render() public méthode

Render the view.
public render ( boolean $ret = false ) : mixed
$ret boolean
Résultat mixed

renderTemplateFile() protected méthode

Render view template file
protected renderTemplateFile ( ) : void
Résultat void

renderTemplateString() protected méthode

Render view template string
protected renderTemplateString ( ) : void
Résultat void

set() public méthode

Set model data
public set ( string $name, mixed $value ) : View
$name string
$value mixed
Résultat View

setData() public méthode

Set all model data
public setData ( array $data = [] ) : View
$data array
Résultat View

setTemplate() public méthode

Set view template with auto-detect
public setTemplate ( string $template ) : View
$template string
Résultat View

setTemplateFile() public méthode

Set view template file
public setTemplateFile ( string $template ) : View
$template string
Résultat View

setTemplateString() public méthode

Set view template string
public setTemplateString ( string $template ) : View
$template string
Résultat View

Property Details

$data protected_oe property

Model data
protected array $data
Résultat array

$output protected_oe property

View output string
protected string $output
Résultat string

$templateFile protected_oe property

View template file
protected string $templateFile
Résultat string

$templateString protected_oe property

View template string
protected string $templateString
Résultat string