Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • AutoExpireFlashBag
  • FlashBag

Interfaces

  • FlashBagInterface
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: /*
 4:  * This file is part of the Symfony package.
 5:  *
 6:  * (c) Fabien Potencier <[email protected]>
 7:  *
 8:  * For the full copyright and license information, please view the LICENSE
 9:  * file that was distributed with this source code.
10:  */
11: 
12: namespace Symfony\Component\HttpFoundation\Session\Flash;
13: 
14: use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
15: 
16: /**
17:  * FlashBagInterface.
18:  *
19:  * @author Drak <[email protected]>
20:  */
21: interface FlashBagInterface extends SessionBagInterface
22: {
23:     /**
24:      * Adds a flash message for type.
25:      *
26:      * @param string $type
27:      * @param string $message
28:      */
29:     public function add($type, $message);
30: 
31:     /**
32:      * Registers a message for a given type.
33:      *
34:      * @param string       $type
35:      * @param string|array $message
36:      */
37:     public function set($type, $message);
38: 
39:     /**
40:      * Gets flash messages for a given type.
41:      *
42:      * @param string $type    Message category type
43:      * @param array  $default Default value if $type does not exist
44:      *
45:      * @return array
46:      */
47:     public function peek($type, array $default = array());
48: 
49:     /**
50:      * Gets all flash messages.
51:      *
52:      * @return array
53:      */
54:     public function peekAll();
55: 
56:     /**
57:      * Gets and clears flash from the stack.
58:      *
59:      * @param string $type
60:      * @param array  $default Default value if $type does not exist
61:      *
62:      * @return array
63:      */
64:     public function get($type, array $default = array());
65: 
66:     /**
67:      * Gets and clears flashes from the stack.
68:      *
69:      * @return array
70:      */
71:     public function all();
72: 
73:     /**
74:      * Sets all flash messages.
75:      *
76:      * @param array $messages
77:      */
78:     public function setAll(array $messages);
79: 
80:     /**
81:      * Has flash messages for a given type?
82:      *
83:      * @param string $type
84:      *
85:      * @return bool
86:      */
87:     public function has($type);
88: 
89:     /**
90:      * Returns a list of all defined types.
91:      *
92:      * @return array
93:      */
94:     public function keys();
95: }
96: 
Ratchet API documentation generated by ApiGen 2.8.0