1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,107 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-namespace Illuminate\Contracts\Support; |
|
4 |
- |
|
5 |
-interface MessageBag extends Arrayable |
|
6 |
-{ |
|
7 |
- /** |
|
8 |
- * Get the keys present in the message bag. |
|
9 |
- * |
|
10 |
- * @return array |
|
11 |
- */ |
|
12 |
- public function keys(); |
|
13 |
- |
|
14 |
- /** |
|
15 |
- * Add a message to the bag. |
|
16 |
- * |
|
17 |
- * @param string $key |
|
18 |
- * @param string $message |
|
19 |
- * @return $this |
|
20 |
- */ |
|
21 |
- public function add($key, $message); |
|
22 |
- |
|
23 |
- /** |
|
24 |
- * Merge a new array of messages into the bag. |
|
25 |
- * |
|
26 |
- * @param \Illuminate\Contracts\Support\MessageProvider|array $messages |
|
27 |
- * @return $this |
|
28 |
- */ |
|
29 |
- public function merge($messages); |
|
30 |
- |
|
31 |
- /** |
|
32 |
- * Determine if messages exist for a given key. |
|
33 |
- * |
|
34 |
- * @param string|array $key |
|
35 |
- * @return bool |
|
36 |
- */ |
|
37 |
- public function has($key); |
|
38 |
- |
|
39 |
- /** |
|
40 |
- * Get the first message from the bag for a given key. |
|
41 |
- * |
|
42 |
- * @param string|null $key |
|
43 |
- * @param string|null $format |
|
44 |
- * @return string |
|
45 |
- */ |
|
46 |
- public function first($key = null, $format = null); |
|
47 |
- |
|
48 |
- /** |
|
49 |
- * Get all of the messages from the bag for a given key. |
|
50 |
- * |
|
51 |
- * @param string $key |
|
52 |
- * @param string|null $format |
|
53 |
- * @return array |
|
54 |
- */ |
|
55 |
- public function get($key, $format = null); |
|
56 |
- |
|
57 |
- /** |
|
58 |
- * Get all of the messages for every key in the bag. |
|
59 |
- * |
|
60 |
- * @param string|null $format |
|
61 |
- * @return array |
|
62 |
- */ |
|
63 |
- public function all($format = null); |
|
64 |
- |
|
65 |
- /** |
|
66 |
- * Get the raw messages in the container. |
|
67 |
- * |
|
68 |
- * @return array |
|
69 |
- */ |
|
70 |
- public function getMessages(); |
|
71 |
- |
|
72 |
- /** |
|
73 |
- * Get the default message format. |
|
74 |
- * |
|
75 |
- * @return string |
|
76 |
- */ |
|
77 |
- public function getFormat(); |
|
78 |
- |
|
79 |
- /** |
|
80 |
- * Set the default message format. |
|
81 |
- * |
|
82 |
- * @param string $format |
|
83 |
- * @return $this |
|
84 |
- */ |
|
85 |
- public function setFormat($format = ':message'); |
|
86 |
- |
|
87 |
- /** |
|
88 |
- * Determine if the message bag has any messages. |
|
89 |
- * |
|
90 |
- * @return bool |
|
91 |
- */ |
|
92 |
- public function isEmpty(); |
|
93 |
- |
|
94 |
- /** |
|
95 |
- * Determine if the message bag has any messages. |
|
96 |
- * |
|
97 |
- * @return bool |
|
98 |
- */ |
|
99 |
- public function isNotEmpty(); |
|
100 |
- |
|
101 |
- /** |
|
102 |
- * Get the number of messages in the container. |
|
103 |
- * |
|
104 |
- * @return int |
|
105 |
- */ |
|
106 |
- public function count(); |
|
107 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,107 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace Illuminate\Contracts\Support; |
|
4 |
+ |
|
5 |
+interface MessageBag extends Arrayable |
|
6 |
+{ |
|
7 |
+ /** |
|
8 |
+ * Get the keys present in the message bag. |
|
9 |
+ * |
|
10 |
+ * @return array |
|
11 |
+ */ |
|
12 |
+ public function keys(); |
|
13 |
+ |
|
14 |
+ /** |
|
15 |
+ * Add a message to the bag. |
|
16 |
+ * |
|
17 |
+ * @param string $key |
|
18 |
+ * @param string $message |
|
19 |
+ * @return $this |
|
20 |
+ */ |
|
21 |
+ public function add($key, $message); |
|
22 |
+ |
|
23 |
+ /** |
|
24 |
+ * Merge a new array of messages into the bag. |
|
25 |
+ * |
|
26 |
+ * @param \Illuminate\Contracts\Support\MessageProvider|array $messages |
|
27 |
+ * @return $this |
|
28 |
+ */ |
|
29 |
+ public function merge($messages); |
|
30 |
+ |
|
31 |
+ /** |
|
32 |
+ * Determine if messages exist for a given key. |
|
33 |
+ * |
|
34 |
+ * @param string|array $key |
|
35 |
+ * @return bool |
|
36 |
+ */ |
|
37 |
+ public function has($key); |
|
38 |
+ |
|
39 |
+ /** |
|
40 |
+ * Get the first message from the bag for a given key. |
|
41 |
+ * |
|
42 |
+ * @param string|null $key |
|
43 |
+ * @param string|null $format |
|
44 |
+ * @return string |
|
45 |
+ */ |
|
46 |
+ public function first($key = null, $format = null); |
|
47 |
+ |
|
48 |
+ /** |
|
49 |
+ * Get all of the messages from the bag for a given key. |
|
50 |
+ * |
|
51 |
+ * @param string $key |
|
52 |
+ * @param string|null $format |
|
53 |
+ * @return array |
|
54 |
+ */ |
|
55 |
+ public function get($key, $format = null); |
|
56 |
+ |
|
57 |
+ /** |
|
58 |
+ * Get all of the messages for every key in the bag. |
|
59 |
+ * |
|
60 |
+ * @param string|null $format |
|
61 |
+ * @return array |
|
62 |
+ */ |
|
63 |
+ public function all($format = null); |
|
64 |
+ |
|
65 |
+ /** |
|
66 |
+ * Get the raw messages in the container. |
|
67 |
+ * |
|
68 |
+ * @return array |
|
69 |
+ */ |
|
70 |
+ public function getMessages(); |
|
71 |
+ |
|
72 |
+ /** |
|
73 |
+ * Get the default message format. |
|
74 |
+ * |
|
75 |
+ * @return string |
|
76 |
+ */ |
|
77 |
+ public function getFormat(); |
|
78 |
+ |
|
79 |
+ /** |
|
80 |
+ * Set the default message format. |
|
81 |
+ * |
|
82 |
+ * @param string $format |
|
83 |
+ * @return $this |
|
84 |
+ */ |
|
85 |
+ public function setFormat($format = ':message'); |
|
86 |
+ |
|
87 |
+ /** |
|
88 |
+ * Determine if the message bag has any messages. |
|
89 |
+ * |
|
90 |
+ * @return bool |
|
91 |
+ */ |
|
92 |
+ public function isEmpty(); |
|
93 |
+ |
|
94 |
+ /** |
|
95 |
+ * Determine if the message bag has any messages. |
|
96 |
+ * |
|
97 |
+ * @return bool |
|
98 |
+ */ |
|
99 |
+ public function isNotEmpty(); |
|
100 |
+ |
|
101 |
+ /** |
|
102 |
+ * Get the number of messages in the container. |
|
103 |
+ * |
|
104 |
+ * @return int |
|
105 |
+ */ |
|
106 |
+ public function count(); |
|
107 |
+} |