[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TCompareValidator.php (sommaire)

TCompareValidator class file

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TCompareValidator.php 1397 2006-09-07 07:55:53Z wei $
Poids: 266 lignes (9 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

TCompareValidator:: (14 méthodes):
  getClientClassName()
  getDataType()
  setDataType()
  getControlToCompare()
  setControlToCompare()
  getValueToCompare()
  setValueToCompare()
  getOperator()
  setOperator()
  setDateFormat()
  getDateFormat()
  evaluateIsValid()
  getComparisonValues()
  getClientScriptOptions()

TValidationCompareOperator:: (0 méthodes):


Classe: TCompareValidator  - X-Ref

TCompareValidator class

TCompareValidator compares the value entered by the user into an input
control with the value entered into another input control or a constant value.
To compare the associated input control with another input control,
set the {@link setControlToCompare ControlToCompare} property to the ID path
of the control to compare with. To compare the associated input control with
a constant value, specify the constant value to compare with by setting the
{@link setValueToCompare ValueToCompare} property.

The {@link setDataType DataType} property is used to specify the data type
of both comparison values. Both values are automatically converted to this data
type before the comparison operation is performed. The following value types are supported:
- <b>Integer</b> A 32-bit signed integer data type.
- <b>Float</b> A double-precision floating point number data type.
- <b>Date</b> A date data type. The format can be specified by the
{@link setDateFormat DateFormat} property
- <b>String</b> A string data type.

Use the {@link setOperator Operator} property to specify the type of comparison
to perform. Valid operators include Equal, NotEqual, GreaterThan, GreaterThanEqual,
LessThan and LessThanEqual.

getClientClassName()   X-Ref
Gets the name of the javascript class responsible for performing validation for this control.
This method overrides the parent implementation.

return: string the javascript class name

getDataType()   X-Ref

return: TValidationDataType the data type that the values being compared are converted to before the comparison is made. Defaults to TValidationDataType::String.

setDataType($value)   X-Ref
Sets the data type that the values being
compared are converted to before the comparison is made.

param: TValidationDataType the data type

getControlToCompare()   X-Ref

return: string the input component to compare with the input control being validated.

setControlToCompare($value)   X-Ref
Sets the input component to compare with the input control being validated.

param: string the ID path of the component to compare with

getValueToCompare()   X-Ref

return: string the constant value to compare with the value entered by the user into the input component being validated.

setValueToCompare($value)   X-Ref
Sets the constant value to compare with the value entered by the user into the input component being validated.

param: string the constant value

getOperator()   X-Ref

return: TValidationCompareOperator the comparison operation to perform. Defaults to TValidationCompareOperator::Equal.

setOperator($value)   X-Ref
Sets the comparison operation to perform

param: TValidationCompareOperator the comparison operation

setDateFormat($value)   X-Ref
Sets the date format for a date validation

param: string the date format value

getDateFormat()   X-Ref

return: string the date validation date format if any

evaluateIsValid()   X-Ref
This method overrides the parent's implementation.
The validation succeeds if the input data compares successfully.
The validation always succeeds if ControlToValidate is not specified
or the input data is empty.

return: boolean whether the validation succeeds

getComparisonValues($value1, $value2)   X-Ref
Parse the pair of values into the appropriate value type.

param: string value one
param: string second value
return: array appropriate type of the value pair, array($value1, $value2);

getClientScriptOptions()   X-Ref
Returns an array of javascript validator options.

return: array javascript validator options.

Classe: TValidationCompareOperator  - X-Ref

TValidationCompareOperator class.
TValidationCompareOperator defines the enumerable type for the comparison operations
that {@link TCompareValidator} can perform validation with.

The following enumerable values are defined:
- Equal
- NotEqual
- GreaterThan
- GreaterThanEqual
- LessThan
- LessThanEqual



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7