protected function addError($error){

        $this->valid = false;

        if($error instanceof Exception){
            $this->errors[] = array(
                'file' => $error->getFile(),
                'line' => $error->getLine(),
                'message' => "[".get_class($error)."] ".$error->getMessage()
            );
        }elseif($error instanceof LibXMLError){
            $this->errors[] = array(
                'file' => $error->file,
                'line' => $error->line,
                'message' => "[".get_class($error)."] ".$error->message
            );
        }elseif(is_string($error)){
            $this->errors[] = array(
                'message' => $error
            );
        }
    }
protected function addError($error){

        $this->valid = false;

        if($error instanceof Exception){
            $this->errors[] = array(
                'file' => $error->getFile(),
                'line' => $error->getLine(),
                'message' => "[".get_class($error)."] ".$error->getMessage()
            );
        }elseif($error instanceof LibXMLError){
            $this->errors[] = array(
                'file' => $error->file,
                'line' => $error->line,
                'message' => "[".get_class($error)."] ".$error->message
            );
        }elseif(is_string($error)){
            $this->errors[] = array(
                'message' => $error
            );
        }
    }
protected function addError ( $ error ) { $ this -> valid = false ; if ( $ error instanceof Exception ) { $ this -> errors [ ] = array ( 'file' => $ error -> getFile ( ) , 'line' => $ error -> getLine ( ) , 'message' => "[" . get_class ( $ error ) . "] " . $ error -> getMessage ( ) ) ; } elseif ( $ error instanceof LibXMLError ) { $ this -> errors [ ] = array ( 'file' => $ error -> file , 'line' => $ error -> line , 'message' => "[" . get_class ( $ error ) . "] " . $ error -> message ) ; } elseif ( is_string ( $ error ) ) { $ this -> errors [ ] = array ( 'message' => $ error ) ; } }
Short description of method addError

@access protected
@author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
@param  mixed error
@return mixed
Short description of method addError