Changeset 334:5bd2d3b4244f for inc/core/class.dc.error.php
- Timestamp:
- 06/04/11 14:20:04 (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.error.php
r270 r334 13 13 14 14 /** 15 @ingroup DC_CORE16 @brief Error class17 18 dcError is a very simple error class, with a stack. Call dcError::add to19 add an error in stack. In administration area, errors are automatically20 displayed.15 * @ingroup DC_CORE 16 * @brief Error class 17 * 18 * dcError is a very simple error class, with a stack. Call dcError::add to 19 * add an error in stack. In administration area, errors are automatically 20 * displayed. 21 21 */ 22 22 class dcError 23 23 { 24 protected $errors = array(); ///< <b>array</b> Errors stack 25 protected $flag = false; ///< <b>boolean</b> True if stack is not empty 26 protected $html_list = "<ul>\n%s</ul>\n"; ///< <b>string</b> HTML errors list pattern 27 protected $html_item = "<li>%s</li>\n"; ///< <b>string</b> HTML error item pattern 24 /** @var array Errors stack */ 25 protected $errors = array(); 26 /** @var boolean True if stack is not empty */ 27 protected $flag = false; 28 /** @var string HTML errors list pattern */ 29 protected $html_list = "<ul>\n%s</ul>\n"; 30 /** @var string HTML error item pattern */ 31 protected $html_item = "<li>%s</li>\n"; 28 32 29 33 /** 30 Object constructor.34 * Object constructor. 31 35 */ 32 36 public function __construct() … … 37 41 38 42 /** 39 Object string representation. Returns errors stack.40 41 @return <b>string</b>43 * Object string representation. Returns errors stack. 44 * 45 * @return string 42 46 */ 43 47 public function __toString() … … 54 58 55 59 /** 56 Adds an error to stack.57 58 @param msg <b>string</b>Error message60 * Adds an error to stack. 61 * 62 * @param string $msg Error message 59 63 */ 60 64 public function add($msg) … … 65 69 66 70 /** 67 Returns the value of <var>flag</var> property.68 69 @return <b>boolean</b> True if errors stack is not empty71 * Returns the value of <var>flag</var> property. True if errors stack is not empty 72 * 73 * @return boolean 70 74 */ 71 75 public function flag() … … 75 79 76 80 /** 77 Resets errors stack.81 * Resets errors stack. 78 82 */ 79 83 public function reset() … … 84 88 85 89 /** 86 Returns <var>errors</var> property.87 88 @return <b>array</b>90 * Returns <var>errors</var> property. 91 * 92 * @return array 89 93 */ 90 94 public function getErrors() … … 94 98 95 99 /** 96 Sets <var>list</var> and <var>item</var> properties.97 98 @param list <b>string</b>HTML errors list pattern99 @param item <b>string</b>HTML error item pattern100 * Sets <var>list</var> and <var>item</var> properties. 101 * 102 * @param string $list HTML errors list pattern 103 * @param string $item HTML error item pattern 100 104 */ 101 105 public function setHTMLFormat($list,$item) … … 106 110 107 111 /** 108 Returns errors stack as HTML.109 110 @return <b>string</b>112 * Returns errors stack as HTML. 113 * 114 * @return string 111 115 */ 112 116 public function toHTML()
Note: See TracChangeset
for help on using the changeset viewer.