Dotclear


Ignore:
Timestamp:
06/04/11 14:20:04 (14 years ago)
Author:
sacha <digimag@…>
Branch:
default
Message:

Improved code documentation

File:
1 edited

Legend:

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

    r270 r334  
    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*  
     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. 
    2121*/ 
    2222class dcError 
    2323{ 
    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"; 
    2832      
    2933     /** 
    30      Object constructor. 
     34     * Object constructor. 
    3135     */ 
    3236     public function __construct() 
     
    3741      
    3842     /** 
    39      Object string representation. Returns errors stack. 
    40       
    41      @return   <b>string</b> 
     43     * Object string representation. Returns errors stack. 
     44     *  
     45     * @return string 
    4246     */ 
    4347     public function __toString() 
     
    5458      
    5559     /** 
    56      Adds an error to stack. 
    57       
    58      @param    msg       <b>string</b>       Error message 
     60     * Adds an error to stack. 
     61     *  
     62     * @param string     $msg           Error message 
    5963     */ 
    6064     public function add($msg) 
     
    6569      
    6670     /** 
    67      Returns the value of <var>flag</var> property. 
    68       
    69      @return   <b>boolean</b> True if errors stack is not empty 
     71     * Returns the value of <var>flag</var> property. True if errors stack is not empty 
     72     *  
     73     * @return boolean 
    7074     */ 
    7175     public function flag() 
     
    7579      
    7680     /** 
    77      Resets errors stack. 
     81     * Resets errors stack. 
    7882     */ 
    7983     public function reset() 
     
    8488      
    8589     /** 
    86      Returns <var>errors</var> property. 
    87       
    88      @return   <b>array</b> 
     90     * Returns <var>errors</var> property. 
     91     *  
     92     * @return array 
    8993     */ 
    9094     public function getErrors() 
     
    9498      
    9599     /** 
    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 
     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 
    100104     */ 
    101105     public function setHTMLFormat($list,$item) 
     
    106110      
    107111     /** 
    108      Returns errors stack as HTML. 
    109       
    110      @return   <b>string</b> 
     112     * Returns errors stack as HTML. 
     113     *  
     114     * @return string 
    111115     */ 
    112116     public function toHTML() 
Note: See TracChangeset for help on using the changeset viewer.

Sites map