Class IntegerRangeValidatorRule

Description

the IntegerRangeValidatorRule checks a given value to make sure it's integer that falls within a certain range.

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

Located in /harmoni/core/utilities/FieldSetValidator/rules/IntegerRangeValidatorRule.class.php (line 16)

ValidatorRuleInterface
   |
   --IntegerRangeValidatorRule
Variable Summary
integer $_max
integer $_mix
Method Summary
IntegerRangeValidatorRule IntegerRangeValidatorRule (mixed $min, mixed $max)
boolean check (mixed $val)
object ValidatorRule getRule (mixed $min, mixed $max)
string getRuleKey ()
Variables
integer $_max (line 32)

The range max.

  • var: _max
  • access: private
integer $_mix (line 25)

The range min.

  • var: _mix
  • access: private
Methods
Constructor IntegerRangeValidatorRule (line 39)

Initializes the rule

  • access: public
IntegerRangeValidatorRule IntegerRangeValidatorRule (mixed $min, mixed $max)
check (line 51)

Checks a given value to make sure it's an integer.

Checks a given value to make sure it's an integer.

  • return: TRUE, if the value is an integer; FALSE if it is not.
  • access: public
boolean check (mixed $val)
  • mixed $val: The value to check.

Redefinition of:
ValidatorRuleInterface::check()
checks a given value against the rule contained within the class
getRule (line 71)

This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.

This method follows a modified Singleton pattern

  • since: 3/28/05
  • static:
  • access: public
object ValidatorRule getRule (mixed $min, mixed $max)

Redefinition of:
ValidatorRuleInterface::getRule()
This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
getRuleKey (line 98)

Return a key that can be used to identify this Rule for caching purposes.

If this rule takes no arguments, the class name should be sufficient. otherwise, append the arguments.

This method should only be called by ValidatorRules.

  • since: 3/29/05
  • access: protected
string getRuleKey ()

Redefinition of:
ValidatorRuleInterface::getRuleKey()
Return a key that can be used to identify this Rule for caching purposes.

Inherited Methods

Inherited From ValidatorRuleInterface

ValidatorRuleInterface::check()
ValidatorRuleInterface::getRule()
ValidatorRuleInterface::getRuleKey()

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