PHP Trait Voodoo\Core\View\TView

Afficher le fichier Open project: voodoophp/voodoo

Protected Properties

Свойство Type Description
$assigned
$messages

Méthodes publiques

Méthode Description
assign ( mixed $key, mixed $val = "" ) : Api Assign variable
getAssigned ( ) : Array Get all the assigned vars
getMessage ( string $type ) : Array | null To return the messages saved
getMessages ( ) : Array Return all the messages
hasError ( ) : boolean Check if error exist
setError ( string $message ) : TView Set an error message
setMessage ( string $message, string $type ) : TView To set a message
unassign ( $key ) : Api To unassign variable by key name

Method Details

assign() public méthode

Assign variable
public assign ( mixed $key, mixed $val = "" ) : Api
$key mixed - can be string, dot notation k/v, or array to set data as bulk
$val mixed - can be string, numeric, array
Résultat Api

getAssigned() public méthode

Get all the assigned vars
public getAssigned ( ) : Array
Résultat Array

getMessage() public méthode

To return the messages saved
public getMessage ( string $type ) : Array | null
$type string - message type: error, success
Résultat Array | null | null

getMessages() public méthode

Return all the messages
public getMessages ( ) : Array
Résultat Array

hasError() public méthode

Check if error exist
public hasError ( ) : boolean
Résultat boolean

setError() public méthode

Set an error message
public setError ( string $message ) : TView
$message string
Résultat TView

setMessage() public méthode

To set a message
public setMessage ( string $message, string $type ) : TView
$message string - the message
$type string - The type of message: error, success
Résultat TView

unassign() public méthode

To unassign variable by key name
public unassign ( $key ) : Api
Résultat Api

Property Details

$assigned protected_oe property

protected $assigned

$messages protected_oe property

protected $messages