From bb0e4c309069f16954875a644f751ea3191e0d73 Mon Sep 17 00:00:00 2001 From: Kevin McBride Date: Wed, 19 Sep 2012 13:40:59 -0700 Subject: [PATCH] Fixed FlashBagInterface phpdoc, clarified UPGRADE docs --- UPGRADE-2.1.md | 3 +-- .../Session/Flash/FlashBagInterface.php | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index e172cf071a..623bc5ca5d 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -1332,8 +1332,7 @@ ### Session - * Flash messages now return an array based on their type. The old method is - still available but is now deprecated. + * Using `get` to retrieve flash messages now returns an array. ##### Retrieving the flash messages from a Twig template diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 9ae5a3dd63..a68dcfddda 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -31,18 +31,18 @@ interface FlashBagInterface extends SessionBagInterface /** * Registers a message for a given type. * - * @param string $type - * @param string $message + * @param string $type + * @param string|array $message */ public function set($type, $message); /** - * Gets flash message for a given type. + * Gets flash messages for a given type. * * @param string $type Message category type. - * @param array $default Default value if $type doee not exist. + * @param array $default Default value if $type does not exist. * - * @return string + * @return array */ public function peek($type, array $default = array()); @@ -57,9 +57,9 @@ interface FlashBagInterface extends SessionBagInterface * Gets and clears flash from the stack. * * @param string $type - * @param array $default Default value if $type doee not exist. + * @param array $default Default value if $type does not exist. * - * @return string + * @return array */ public function get($type, array $default = array());