MessageStack using session
| From: | Ondřej Bouda | Date: | Fri, 10 Feb 2006 19:34:34 +0000 |
| Subject: | MessageStack using session | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-41288@lists.php.net to get a copy of this message | ||
Hi,
I've made quite useful class for reporting some information to visitors, such as "Mail was sent" or "Found errors in your text file". The difference between any existing packages in PEAR (if I didn't overlook) is that it passes messages by session, so, with output buffering, messages can be triggered even after any output and showed in a proper place. The current usage is (assuming session and output buffering are on):
$MESSAGE_STACK = new MessageStack;
...
new Message('Found errors',MSG_ERROR);
...
$MESSAGE_STACK->out();
...
new Message('This will be shown on the next page',MSG_INFO);
Is it useful for PEAR? If so, should I try to propose it as a single class (after some fixes) or rather extend an existing package?
Regards,
Ondrej Bouda