Show
Ignore:
Timestamp:
06/06/06 20:37:36 (6 years ago)
Author:
john
Message:

added add_error() to AM

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_mailer.php

    r216 r217  
    398398     
    399399    /** 
     400     *  Add or overwrite description of an error to the list of errors 
     401     *  @param string $error Error message text 
     402     *  @param string $key Key to associate with the error (in the 
     403     *    simple case, column name).  If omitted, numeric keys will be 
     404     *    assigned starting with 0.  If specified and the key already 
     405     *    exists in $errors, the old error message will be overwritten 
     406     *    with the value of $error. 
     407     *  @uses $errors 
     408     */ 
     409    function add_error($error, $key = null) { 
     410        if(!is_null($key)) {  
     411            $this->errors[$key] = $error; 
     412        } else { 
     413            $this->errors[] = $error; 
     414        } 
     415    } 
     416     
     417    /** 
    400418     *  Return description of non-fatal errors 
    401419     *