메소드 |
설명 |
|
__construct ( string $string = '', integer $number = Message::NOTICE, array $params = [], integer $sanitize = Message::SANITIZE_NONE ) |
Constructor |
|
__toString ( ) : string |
magic method: return string representation for this object |
|
addHtml ( string $message, string $separator = ' ' ) : void |
add another html message to be concatenated on displaying |
|
addMessage ( Message $message, string $separator = ' ' ) : void |
add another raw message to be concatenated on displaying |
|
addMessages ( Message[] $messages, string $separator = ' ' ) : void |
add a bunch of messages at once |
|
addMessagesString ( string[] $messages, string $separator = ' ' ) : void |
add a bunch of messages at once |
|
addParam ( mixed $param ) : void |
add string or Message parameter |
|
addParamHtml ( string $param ) : void |
add parameter as raw HTML, usually in conjunction with strings |
|
addText ( string $message, string $separator = ' ' ) : void |
add another raw message to be concatenated on displaying |
|
decodeBB ( string $message ) : string |
decode $message, taking into account our special codes
for formatting |
|
display ( ) : void |
Displays the message in HTML |
|
error ( string $string = '' ) : Message |
get Message of type error |
|
format ( ) : string |
wrapper for sprintf() |
|
getAddedMessages ( ) : array |
return all added messages |
|
getDisplay ( ) : string |
returns HTML code for displaying this message |
|
getHash ( ) : string |
returns unique Message::$hash, if not exists it will be created |
|
getLevel ( ) : string |
returns level of message |
|
getMessage ( ) : string |
returns compiled message |
|
getMessageForAffectedRows ( integer $rows ) : Message |
get Message for number of affected rows |
|
getMessageForDeletedRows ( integer $rows ) : Message |
get Message for number of deleted rows |
|
getMessageForInsertedRows ( integer $rows ) : Message |
get Message for number of inserted rows |
|
getMessageWithIcon ( string $message ) : string |
Returns the message with corresponding image icon |
|
getNumber ( ) : integer |
returns Message::$number |
|
getOnlyMessage ( ) : string |
Returns only message string without image & other HTML. |
|
getParams ( ) : array |
return all parameters |
|
getString ( ) : string |
returns Message::$string |
|
isDisplayed ( boolean $isDisplayed = false ) : boolean |
sets and returns whether the message was displayed or not |
|
isError ( boolean $set = false ) : boolean |
returns whether this message is an error message or not
and optionally makes this message an error message |
|
isNotice ( boolean $set = false ) : boolean |
returns whether this message is a notice message or not
and optionally makes this message a notice message |
|
isSuccess ( boolean $set = false ) : boolean |
returns whether this message is a success message or not
and optionally makes this message a success message |
|
notice ( string $string ) : Message |
get Message of type notice |
|
raw ( string $message, integer $type = Message::NOTICE ) : Message |
get Message with customized content |
|
rawError ( string $message ) : Message |
get Message of type error with custom content |
|
rawNotice ( string $message ) : Message |
get Message of type notice with custom content |
|
rawSuccess ( string $message ) : Message |
get Message of type success with custom content |
|
sanitize ( mixed $message ) : mixed |
Sanitizes $message |
|
setBBCode ( boolean $useBBCode ) : void |
Set whether we should use BB Code when rendering. |
|
setMessage ( string $message, boolean $sanitize = false ) : void |
set raw message (overrides string) |
|
setNumber ( integer $number ) : void |
set message type number |
|
setParams ( array | string $params, boolean $sanitize = false ) : void |
set all params at once, usually used in conjunction with string |
|
setString ( string $string, boolean $sanitize = true ) : void |
set string (does not take effect if raw message is set) |
|
success ( string $string = '' ) : Message |
get Message of type success |
|