[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/data/validator/rules/ -> iprangerule.class.php (sommaire)

(pas de description)

Poids: 88 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

IpRangeRule:: (4 méthodes):
  IpRangeRule()
  setRange()
  getRange()
  validate()


Classe: IpRangeRule  - X-Ref

\ingroup Validator_Rules

This rule returns true if the given IP address is within a certain range. Use the constructor
or the setRange() method for setting the right range. The range should be given in a submask format,
so for example 1.2.3.4 would be within the range 1.2.3.255

It will set the error flag ERROR_RULE_IP_NOT_IN_RANGE error if the address is not in the
given range.
IpRangeRule($range)   X-Ref
Initializes the rule with the given range

param: range The range.

setRange($range)   X-Ref
Sets a different range than the one given in the constructor

param: range the new range

getRange()   X-Ref
Returns the current range being used for the calculations

return: A string representing the range

validate($value)   X-Ref
Returns true if the address is within the given range or false otherwise. It will
also set the error ERROR_RULE_IP_NOT_IN_RANGE

param: value The IP address to validate
return: True if within range or false otherwise



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics