Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.error.php

    r334 r270  
    1313 
    1414/** 
    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. 
     15@ingroup DC_CORE 
     16@brief Error class 
     17 
     18dcError is a very simple error class, with a stack. Call dcError::add to 
     19add an error in stack. In administration area, errors are automatically 
     20displayed. 
    2121*/ 
    2222class dcError 
    2323{ 
    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 
    3228      
    3329     /** 
    34      * Object constructor. 
     30     Object constructor. 
    3531     */ 
    3632     public function __construct() 
     
    4137      
    4238     /** 
    43      * Object string representation. Returns errors stack. 
    44      *  
    45      * @return string 
     39     Object string representation. Returns errors stack. 
     40      
     41     @return   <b>string</b> 
    4642     */ 
    4743     public function __toString() 
     
    5854      
    5955     /** 
    60      * Adds an error to stack. 
    61      *  
    62      * @param string     $msg           Error message 
     56     Adds an error to stack. 
     57      
     58     @param    msg       <b>string</b>       Error message 
    6359     */ 
    6460     public function add($msg) 
     
    6965      
    7066     /** 
    71      * Returns the value of <var>flag</var> property. True if errors stack is not empty 
    72      *  
    73      * @return boolean 
     67     Returns the value of <var>flag</var> property. 
     68      
     69     @return   <b>boolean</b> True if errors stack is not empty 
    7470     */ 
    7571     public function flag() 
     
    7975      
    8076     /** 
    81      * Resets errors stack. 
     77     Resets errors stack. 
    8278     */ 
    8379     public function reset() 
     
    8884      
    8985     /** 
    90      * Returns <var>errors</var> property. 
    91      *  
    92      * @return array 
     86     Returns <var>errors</var> property. 
     87      
     88     @return   <b>array</b> 
    9389     */ 
    9490     public function getErrors() 
     
    9894      
    9995     /** 
    100      * 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 
     96     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 
    104100     */ 
    105101     public function setHTMLFormat($list,$item) 
     
    110106      
    111107     /** 
    112      * Returns errors stack as HTML. 
    113      *  
    114      * @return string 
     108     Returns errors stack as HTML. 
     109      
     110     @return   <b>string</b> 
    115111     */ 
    116112     public function toHTML() 
Note: See TracChangeset for help on using the changeset viewer.

Sites map