The Message class lets you set "flash" messages from one part of your application so they can be viewed in another.

package Owl
author Dave Widmer

 Methods

Creates a new Message instance.

__construct(string $type, mixed $message) 

Parameters

$type

string

Type of message

$message

mixed

Message to display, either string or array

Sets an error message.

error(mixed $message) 

Parameters

$message

mixed

String/Array for the message(s)

Gets the current message.

get() : mixed

Returns

mixedThe currently stored message or false

Sets a notice.

notice(mixed $message) 

Parameters

$message

mixed

String/Array for the message(s)

Sets a flash message.

set(string $type, mixed $message) 

Parameters

$type

string

Type of message

$message

mixed

Array/String for the message

Set the session class used within this class.

setSession(Session $session) 

Parameters

$session

\Owl\Session

Sets a success message.

success(mixed $message) 

Parameters

$message

mixed

String/Array for the message(s)

Sets a warning message.

warn(mixed $message) 

Parameters

$message

mixed

String/Array for the message(s)

 Properties

 

The message to display.

$message : mixed

 

The type of message.

$type : string

 

The object to use to to save the session data.

$session : \Owl\Session