<?php/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/namespaceSymfony\Component\HttpFoundation\Session\Flash;
useSymfony\Component\HttpFoundation\Session\SessionBagInterface;
/**
* FlashBagInterface.
*
* @author Drak <drak@zikula.org>
*/interfaceFlashBagInterfaceextends SessionBagInterface {
/**
* Adds a flash message for type.
*
* @param string $type
* @param string $message
*/
public functionadd($type, $message);
/**
* Registers a message for a given type.
*
* @param string $type
* @param string $message
*/
public functionset($type, $message);
/**
* Gets flash message for a given type.
*
* @param string $type Message category type.
* @param array $default Default value if $type doee not exist.
*
* @return string
*/
public functionpeek($type, array $default = array());
/**
* Gets all flash messages.
*
* @return array
*/
public functionpeekAll();
/**
* Gets and clears flash from the stack.
*
* @param string $type
* @param array $default Default value if $type doee not exist.
*
* @return string
*/
public functionget($type, array $default = array());
/**
* Gets and clears flashes from the stack.
*
* @return array
*/
public functionall();
/**
* Sets all flash messages.
*/
public functionsetAll(array $messages);
/**
* Has flash messages for a given type?
*
* @param string $type
*
* @return boolean
*/
public functionhas($type);
/**
* Returns a list of all defined types.
*
* @return array
*/
public functionkeys();
}