 FlashBag   class FlashBag implements FlashBagInterface, IteratorAggregate   FlashBag flash message container. \IteratorAggregate implementation is deprecated and will be removed in 3.0.  Methods      __construct(string $storageKey = '_sf2_flashes')   
   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(string $type, array $default = array()) Gets and clears flash from the stack.  
   array   all() Gets and clears flashes from the stack.  
     set(string $type, $messages) Registers a message for a given type.  
     setAll(array $messages) Sets all flash messages.  
   bool   has(string $type) Has flash messages for a given type?  
   array   keys() Returns a list of all defined types.  
   string   getStorageKey() Gets the storage key for this bag.  
   mixed   clear() Clears out data from bag.  
   ArrayIterator   getIterator() deprecated Returns an iterator for flashes.  
  Details                        
    __construct(string $storageKey = '_sf2_flashes')
          Parameters   string $storageKey The key used to store flashes in the session                         string
    getName()
          Gets this bag's name. Return Value   string                          
    setName($name)
          Parameters    $name                          
    initialize(array $flashes)
          Initializes the Bag. Parameters   array $flashes                          
    add(string $type, string $message)
          Adds a flash message for type. Parameters   string $type    string $message                          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                          array
    peekAll()
          Gets all flash messages. Return Value   array                          array
    get(string $type, array $default = array())
          Gets and clears flash from the stack. Parameters   string $type    array $default Default value if $type does not exist   Return Value   array                          array
    all()
          Gets and clears flashes from the stack. Return Value   array                          
    set(string $type, $messages)
          Registers a message for a given type. Parameters   string $type     $messages                          
    setAll(array $messages)
          Sets all flash messages. Parameters   array $messages                          bool
    has(string $type)
          Has flash messages for a given type? Parameters   string $type    Return Value   bool                          array
    keys()
          Returns a list of all defined types. Return Value   array                          string
    getStorageKey()
          Gets the storage key for this bag. Return Value   string                          mixed
    clear()
          Clears out data from bag. Return Value   mixed Whatever data was contained    ArrayIterator
    getIterator()
        deprecated   deprecated 
 since version 2.4, to be removed in 3.0.  Returns an iterator for flashes. Return Value   ArrayIterator An \ArrayIterator instance   

    
{'path': 'public/docs/symfony~2.7/symfony/component/httpfoundation/session/flash/flashbag.html', 'source': 'DevDocs.IO'}