PHP Class Potsky\LaravelLocalizationHelpers\Factory\MessageBag

Inheritance: implements Potsky\LaravelLocalizationHelpers\Factory\MessageBagInterface
Afficher le fichier Open project: potsky/laravel-localization-helpers Class Usage Examples

Méthodes publiques

Méthode Description
deleteMessages ( ) Clean the bag by removing all messages
getMessage ( array $message ) : mixed Get the message text
getMessageType ( array $message ) : mixed Get the message type of a message get by getMessages
getMessages ( ) : array Get all messages as an array
hasMessages ( ) : boolean Tell whether or not this bag has pending messages
writeComment ( string $s ) : void Add a comment message
writeError ( string $s ) : void Add an error message
writeInfo ( string $s ) : void Add an info message
writeLine ( string $s ) : void Add a simple message
writeQuestion ( string $s ) : void Add a question message

Méthodes protégées

Méthode Description
cleanMessage ( string $m ) : string Trim and remove all XML tags

Method Details

cleanMessage() protected méthode

Trim and remove all XML tags
protected cleanMessage ( string $m ) : string
$m string the message to clean
Résultat string

deleteMessages() public méthode

Clean the bag by removing all messages
public deleteMessages ( )

getMessage() public méthode

Get the message text
public getMessage ( array $message ) : mixed
$message array
Résultat mixed

getMessageType() public méthode

Get the message type of a message get by getMessages
public getMessageType ( array $message ) : mixed
$message array
Résultat mixed

getMessages() public méthode

Use getMessageType and getMessage to parse a message
public getMessages ( ) : array
Résultat array

hasMessages() public méthode

Tell whether or not this bag has pending messages
public hasMessages ( ) : boolean
Résultat boolean

writeComment() public méthode

Add a comment message
public writeComment ( string $s ) : void
$s string the message to display
Résultat void

writeError() public méthode

Add an error message
public writeError ( string $s ) : void
$s string the message to display
Résultat void

writeInfo() public méthode

Add an info message
public writeInfo ( string $s ) : void
$s string the message to display
Résultat void

writeLine() public méthode

Add a simple message
public writeLine ( string $s ) : void
$s string the message to display
Résultat void

writeQuestion() public méthode

Add a question message
public writeQuestion ( string $s ) : void
$s string the message to display
Résultat void