- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.error.php
r334 r270 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 /** @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"; 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 32 28 33 29 /** 34 *Object constructor.30 Object constructor. 35 31 */ 36 32 public function __construct() … … 41 37 42 38 /** 43 *Object string representation. Returns errors stack.44 *45 * @return string39 Object string representation. Returns errors stack. 40 41 @return <b>string</b> 46 42 */ 47 43 public function __toString() … … 58 54 59 55 /** 60 *Adds an error to stack.61 *62 * @param string $msgError message56 Adds an error to stack. 57 58 @param msg <b>string</b> Error message 63 59 */ 64 60 public function add($msg) … … 69 65 70 66 /** 71 * Returns the value of <var>flag</var> property. True if errors stack is not empty72 *73 * @return boolean67 Returns the value of <var>flag</var> property. 68 69 @return <b>boolean</b> True if errors stack is not empty 74 70 */ 75 71 public function flag() … … 79 75 80 76 /** 81 *Resets errors stack.77 Resets errors stack. 82 78 */ 83 79 public function reset() … … 88 84 89 85 /** 90 *Returns <var>errors</var> property.91 *92 * @return array86 Returns <var>errors</var> property. 87 88 @return <b>array</b> 93 89 */ 94 90 public function getErrors() … … 98 94 99 95 /** 100 *Sets <var>list</var> and <var>item</var> properties.101 *102 * @param string $listHTML errors list pattern103 * @param string $itemHTML error item pattern96 Sets <var>list</var> and <var>item</var> properties. 97 98 @param list <b>string</b> HTML errors list pattern 99 @param item <b>string</b> HTML error item pattern 104 100 */ 105 101 public function setHTMLFormat($list,$item) … … 110 106 111 107 /** 112 *Returns errors stack as HTML.113 *114 * @return string108 Returns errors stack as HTML. 109 110 @return <b>string</b> 115 111 */ 116 112 public function toHTML()
Note: See TracChangeset
for help on using the changeset viewer.