diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-10-15 17:29:47 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-10-15 17:29:47 +0100 |
| commit | ee36799720aea83a94dc3d1434d4d8e5621c0d4f (patch) | |
| tree | 55ee96cfaa62d4cb11aa2ac39609e8e1a9126f74 /library/WT/FlashMessages.php | |
| parent | 5434f4dd757c4c354399b52281a0d654870a90b5 (diff) | |
| download | webtrees-ee36799720aea83a94dc3d1434d4d8e5621c0d4f.tar.gz webtrees-ee36799720aea83a94dc3d1434d4d8e5621c0d4f.tar.bz2 webtrees-ee36799720aea83a94dc3d1434d4d8e5621c0d4f.zip | |
PHPDoc
Diffstat (limited to 'library/WT/FlashMessages.php')
| -rw-r--r-- | library/WT/FlashMessages.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/library/WT/FlashMessages.php b/library/WT/FlashMessages.php index 8996864fd8..07a2cc8e4a 100644 --- a/library/WT/FlashMessages.php +++ b/library/WT/FlashMessages.php @@ -20,12 +20,22 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA class WT_FlashMessages { + /** + * Add a new message to the session storage. + * + * @param string $message + */ public static function addMessage($message) { $flash_messenger = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger'); $flash_messenger->addMessage($message); } + /** + * Get the current messages, and remove them from session storage. + * + * @return string[] + */ public static function getMessages() { $flash_messenger = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger'); @@ -40,12 +50,16 @@ class WT_FlashMessages { foreach ($flash_messenger->getCurrentMessages() as $message) { $messages[] = $message; } - $flash_messenger->clearCurrentMessages(); + $flash_messenger->clearCurrentMessages(); return $messages; } - // Most theres will want a simple block of HTML to display + /** + * Most theres will want a simple block of HTML to display + * + * @return string + */ public static function getHtmlMessages() { $html = ''; @@ -59,6 +73,4 @@ class WT_FlashMessages { return $html; } - - } |
