Class ArgumentValidator

Description

An ArgumentValidator performs validation of function arguments.

An ArgumentValidator performs validation of function arguments. The validator makes use of a specified ValidatorRule object. In addition, if validation fails, a new fatal error is added to the default ErrorHandler.

  • version: $Id: ArgumentValidator.class.php,v 1.12 2007/09/04 20:25:54 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/utilities/ArgumentValidator.class.php (line 20)


	
			
Method Summary
boolean validate (ref $argument, ref $rule, [optional $isFatal = true])
Methods
validate (line 36)

Validates a single argument.

Validates a single argument. Uses a specified ValidatorRule object for validation.

  • return: If validation is successful, returns TRUE. If validation fails and $isFatal is FALSE, returns FALSE. If $isFatal is TRUE, then if validation fails, the script would halt and nothing would ever be returned.
  • static:
  • access: public
boolean validate (ref $argument, ref $rule, [optional $isFatal = true])
  • ref $argument: mixed $argument The argument to be validated.
  • ref $rule: object ValidatorRule $rule The rule to use for validation.
  • optional $isFatal: boolean $isFatal If TRUE, upon validation failure, a fatal error will be thrown. Default: FALSE.

Documentation generated on Wed, 19 Sep 2007 10:21:30 -0400 by phpDocumentor 1.3.0RC3