PHP Interface rcrowe\Hippy\Message\MessageInterface

Datei anzeigen Open project: rcrowe/hippy Interface Usage Examples

Public Methods

Method Description
__construct ( boolean $notify = false, string $background_color = 'yellow' ) Get a new instance of message.
getBackgroundColor ( ) : string Get the background color.
getMessage ( ) : string Get the message.
getMessageFormat ( ) : string Get which format the message is in.
getNotification ( ) : boolean Will this message generate a notification.
removeNotification ( ) : void Set that the message will not generate a notification.
setBackgroundColor ( $color ) : void Set the background color
setHtml ( string $html ) : void Set the message as HTML.
setNotification ( ) : void Set that the message will generate a notification.
setText ( string $text ) : void Set the message as plain text.

Method Details

__construct() public method

Get a new instance of message.
public __construct ( boolean $notify = false, string $background_color = 'yellow' )
$notify boolean Should this message create a notification.
$background_color string Background color of message.

getBackgroundColor() public method

Get the background color.
public getBackgroundColor ( ) : string
return string

getMessage() public method

Get the message.
public getMessage ( ) : string
return string

getMessageFormat() public method

Get which format the message is in.
public getMessageFormat ( ) : string
return string

getNotification() public method

Will this message generate a notification.
public getNotification ( ) : boolean
return boolean

removeNotification() public method

Set that the message will not generate a notification.
public removeNotification ( ) : void
return void

setBackgroundColor() public method

Set the background color
public setBackgroundColor ( $color ) : void
return void

setHtml() public method

Set the message as HTML.
public setHtml ( string $html ) : void
$html string
return void

setNotification() public method

Set that the message will generate a notification.
public setNotification ( ) : void
return void

setText() public method

Set the message as plain text.
public setText ( string $text ) : void
$text string
return void