WACT_VALIDATION
[ class tree: WACT_VALIDATION ] [ index: WACT_VALIDATION ] [ all elements ]

Class: ErrorList

Source Location: /framework/validation/errorlist.inc.php

http://wact.sourceforge.net/index.php/Iterator

http://wact.sourceforge.net/index.php/ErrorList

Class Overview


Container for errors implementing the Iterator iterface

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

Container for errors implementing the Iterator iterface
access:  public
see:  http://wact.sourceforge.net/index.php/Iterator
see:  http://wact.sourceforge.net/index.php/ErrorList
todo:  documention - check that ErrObj is ErrorMessageCode

Class Variables


$currentError =

The current ErrorMessage from the array
access:  private
Type:   ErrorMessage

$errors = array()

Full list of ErrorMessage objects
access:  private
Type:   array

$fieldRestriction =

The fields that should be returned by the ErrorList
access:  private
Type:   array

$first = TRUE

Switch for when at start of iteration
access:  private
Type:   boolean

Class Methods


method addError

Add an error code to the error list.

void addError( mixed $Group, mixed $Id, [mixed $FieldList = NULL], [mixed $Values = NULL])

API Tags:

access:  public

method addErrorMessage

Add an error message to the error list.

void addErrorMessage( mixed $Message, [mixed $FieldList = NULL])

API Tags:

access:  public

method ensureErrorMessageDictionary

Ensures that an error message dictionary is available, creating a default dictionary if one is not set

void ensureErrorMessageDictionary( )

API Tags:

access:  public
see:  ErrorMessageDictionary

method ensureFieldNameDictionary

Ensures that an error message dictionary is available, creating a default dictionary if one is not set

void ensureFieldNameDictionary( )

API Tags:

access:  public
see:  ErrorMessageDictionary

method get



void get( mixed $name)

method getError

Returns the current ValidationError

ValidationError &getError( )

API Tags:

access:  public

method getMessage

Gets an error message from the current ValidationError object

string getMessage( string 0)

API Tags:

return:  error message
access:  public

Parameters:

string   0   name of error

method next

Iterator method

boolean next( )

API Tags:

return:  TRUE is more errors
access:  public

method removeRestrictions



void removeRestrictions( )

method reset

Iterator method

void reset( )

API Tags:

access:  public

method restrictFields

Fields which errors should be applied to ???

void restrictFields( array $fieldRestriction)

API Tags:

access:  public

Parameters:

array   $fieldRestriction   list of fields

method setErrorMessageDictionary

Set the ErrorMessageDictionary

void setErrorMessageDictionary( ErrorMessageDictionary &$Dictionary)

API Tags:

access:  public
see:  ErrorMessageDictionary

Parameters:

ErrorMessageDictionary   &$Dictionary  

method setFieldNameDictionary

Set the FieldNameDictionary

void setFieldNameDictionary( FieldNameDictionary &$Dictionary)

API Tags:

access:  public
see:  FieldNameDictionary

Parameters:

FieldNameDictionary   &$Dictionary  
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:46:11 -0800 by phpDocumentor 1.2.3