
Provides session-based messaging for page-to-page communication
1.0.0b7 | Fixed a small PHPDoc error 3/15/10 |
---|---|
1.0.0b6 | Updated class to use new fSession API 10/23/09 |
1.0.0b5 | Made the $recipient parameter optional for all methods 7/8/09 |
1.0.0b4 | Added support for '*' and arrays of names to check() 6/2/09 |
1.0.0b3 | Updated class to use new fSession API 5/8/09 |
1.0.0b2 | Changed show() to accept more than one message name, or * for all messages 1/12/09 |
1.0.0b | The initial implementation 3/5/08 |
Checks to see if a message exists of the name specified for the recipient specified
boolean check( string $name, string $recipient=NULL )
string | $name | The name or array of names of the message(s) to check for, or '*' to check for any |
string | $recipient | The intended recipient |
If a message of the name and recipient specified exists
Creates a message that is stored in the session and retrieved by another page
void create( string $name, string $recipient, string $message )
void create( string $name, string $message )
string | $name | A name for the message |
string | $recipient | The intended recipient - this may be ommitted |
string | $message | The message to send |
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Resets the data of the class
void reset( )
Retrieves and removes a message from the session
string retrieve( string $name, string $recipient=NULL )
string | $name | The name of the message to retrieve |
string | $recipient | The intended recipient |
The message contents
Retrieves a message, removes it from the session and prints it - will not print if no content
The message will be printed in a p tag if it does not contain any block level HTML, otherwise it will be printed in a div tag.
boolean show( mixed $name, string $recipient=NULL, string $css_class=NULL )
mixed | $name | The name or array of names of the message(s) to show, or '*' to show all |
string | $recipient | The intended recipient |
string | $css_class | Overrides using the $name as the CSS class when displaying the message - only used if a single $name is specified |
If one or more messages was shown