FlashBagInterface

interface FlashBagInterface implements SessionBagInterface FlashBagInterface. Methods string getName() Gets this bag's name. from SessionBagInterface initialize(array $array) Initializes the Bag. from SessionBagInterface string getStorageKey() Gets the storage key for this bag. from SessionBagInterface mixed clear() Clears out data from bag. from SessionBagInterface add(string $type, string $message) Adds a flash message for type. set(string $type, string|array $mess

FlashBag::setName()

setName($name) Parameters $name

FlashBag::initialize()

initialize(array $flashes) Initializes the Bag. Parameters array $flashes

FlashBag::getName()

string getName() Gets this bag's name. Return Value string

FlashBag::keys()

array keys() Returns a list of all defined types. Return Value array

FlashBag::clear()

mixed clear() Clears out data from bag. Return Value mixed Whatever data was contained

FlashBag::peek()

array peek(string $type, array $default = array()) Gets flash messages for a given type. Parameters string $type Message category type array $default Default value if $type does not exist Return Value array

FlashBag::getStorageKey()

string getStorageKey() Gets the storage key for this bag. Return Value string

FlashBag::has()

bool has(string $type) Has flash messages for a given type? Parameters string $type Return Value bool

FlashBag

class FlashBag implements FlashBagInterface FlashBag flash message container. Methods __construct(string $storageKey = '_sf2_flashes') Constructor. string getName() Gets this bag's name. setName($name) initialize(array $flashes) Initializes the Bag. add(string $type, string $message) Adds a flash message for type. array peek(string $type, array $default = array()) Gets flash messages for a given type. array peekAll() Gets all flash messages. array get(