| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 10 /** 11 * class lmbMessageBox. 12 * 13 * @package web_app 14 * @version $Id: lmbMessageBox.class.php 5945 2007-06-06 08:31:43Z pachanga $ 15 */ 16 class lmbMessageBox 17 { 18 const ERRORS = 1; 19 const MESSAGES = 2; 20 21 protected $messages = array(); 22 23 function __construct() 24 { 25 $this->reset(); 26 } 27 28 function reset() 29 { 30 $this->messages = array(self :: ERRORS => array(), 31 self :: MESSAGES => array()); 32 } 33 34 function resetMessages() 35 { 36 $this->messages[self :: MESSAGES] = array(); 37 } 38 39 function resetErrors() 40 { 41 $this->messages[self :: ERRORS] = array(); 42 } 43 44 function addError($error) 45 { 46 $this->messages[self :: ERRORS][] = $error; 47 } 48 49 function addMessage($message) 50 { 51 $this->messages[self :: MESSAGES][] = $message; 52 } 53 54 function getErrors() 55 { 56 return $this->messages[self :: ERRORS]; 57 } 58 59 function getMessages() 60 { 61 return $this->messages[self :: MESSAGES]; 62 } 63 64 function hasErrors() 65 { 66 return sizeof($this->messages[self :: ERRORS]) > 0; 67 } 68 69 function hasMessages() 70 { 71 return sizeof($this->messages[self :: MESSAGES]) > 0; 72 } 73 } 74 75 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Oct 14 04:47:40 2008 | Cross-referenced by PHPXref 0.7 |