Blame view

src/vendor/1.2.5/Phalcon/Flash.php 2.24 KB
1ea3b987   Administrator   maby first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
  <?php 
  
  namespace Phalcon {
  
  	/**
  	 * Phalcon\Flash
  	 *
  	 * Shows HTML notifications related to different circumstances. Classes can be stylized using CSS
  	 *
  	 *<code>
  	 * $flash->success("The record was successfully deleted");
  	 * $flash->error("Cannot open the file");
  	 *</code>
  	 */
  	
  	abstract class Flash {
  
  		protected $_cssClasses;
  
  		protected $_implicitFlush;
  
  		protected $_automaticHtml;
  
  		/**
  		 * \Phalcon\Flash constructor
  		 *
  		 * @param array $cssClasses
  		 */
  		public function __construct($cssClasses=null){ }
  
  
  		/**
  		 * Set whether the output must be implictly flushed to the output or returned as string
  		 *
  		 * @param boolean $implicitFlush
  		 * @return \Phalcon\FlashInterface
  		 */
  		public function setImplicitFlush($implicitFlush){ }
  
  
  		/**
  		 * Set if the output must be implictily formatted with HTML
  		 *
  		 * @param boolean $automaticHtml
  		 * @return \Phalcon\FlashInterface
  		 */
  		public function setAutomaticHtml($automaticHtml){ }
  
  
  		/**
  		 * Set an array with CSS classes to format the messages
  		 *
  		 * @param array $cssClasses
  		 * @return \Phalcon\FlashInterface
  		 */
  		public function setCssClasses($cssClasses){ }
  
  
  		/**
  		 * Shows a HTML error message
  		 *
  		 *<code>
  		 * $flash->error('This is an error');
  		 *</code>
  		 *
  		 * @param string $message
  		 * @return string
  		 */
  		public function error($message){ }
  
  
  		/**
  		 * Shows a HTML notice/information message
  		 *
  		 *<code>
  		 * $flash->notice('This is an information');
  		 *</code>
  		 *
  		 * @param string $message
  		 * @return string
  		 */
  		public function notice($message){ }
  
  
  		/**
  		 * Shows a HTML success message
  		 *
  		 *<code>
  		 * $flash->success('The process was finished successfully');
  		 *</code>
  		 *
  		 * @param string $message
  		 * @return string
  		 */
  		public function success($message){ }
  
  
  		/**
  		 * Shows a HTML warning message
  		 *
  		 *<code>
  		 * $flash->warning('Hey, this is important');
  		 *</code>
  		 *
  		 * @param string $message
  		 * @return string
  		 */
  		public function warning($message){ }
  
  
  		/**
  		 * Outputs a message formatting it with HTML
  		 *
  		 *<code>
  		 * $flash->outputMessage('error', $message);
  		 *</code>
  		 *
  		 * @param string $type
  		 * @param string $message
  		 */
  		public function outputMessage($type, $message){ }
  
  	}
  }