PHP Class ManaPHP\Mvc\View\Flash

Inheritance: extends ManaPHP\Component, implements ManaPHP\Mvc\View\FlashInterface, implements ManaPHP\Mvc\View\Flash\AdapterInterface
Show file Open project: manaphp/manaphp Class Usage Examples

Protected Properties

Property Type Description
$_cssClasses array

Public Methods

Method Description
__construct ( array $cssClasses = [] ) \ManaPHP\Flash constructor
error ( string $message ) : void Shows a HTML error message
notice ( string $message ) : void Shows a HTML notice/information message
output ( boolean $remove = true ) : void Prints the messages in the session flasher
success ( string $message ) : void Shows a HTML success message
warning ( string $message ) : void Shows a HTML warning message

Method Details

__construct() public method

\ManaPHP\Flash constructor
public __construct ( array $cssClasses = [] )
$cssClasses array

error() public method

$flash->error('This is an error');
public error ( string $message ) : void
$message string
return void

notice() public method

$flash->notice('This is an information');
public notice ( string $message ) : void
$message string
return void

output() public method

Prints the messages in the session flasher
public output ( boolean $remove = true ) : void
$remove boolean
return void

success() public method

$flash->success('The process was finished successfully');
public success ( string $message ) : void
$message string
return void

warning() public method

$flash->warning('Hey, this is important');
public warning ( string $message ) : void
$message string
return void

Property Details

$_cssClasses protected property

protected array $_cssClasses
return array