Inherited by ValueValidator.
static equal |
( |
|
$value, |
|
|
|
$reference, |
|
|
|
$type |
|
) |
| |
|
static |
- Returns
- wheather the first primitive value is equal to the reference primitive value. Php's == operator sees null, false, '' and 0 as equal, but most databases don't. Php's === operater is so strict that automatic type conversion becomes useless. This function should return the same as a case sentitive = on database-stored values. expects a boolean or number
- Parameters
-
mixed | $value | the value to compare |
mixed | $reference | the value to compare to |
static getDecimalPrecision |
( |
|
$maxLength | ) |
|
|
static |
only if type = 'number'.
- Returns
- number of decimals after the decimal separater, or null if none
- Parameters
-
mixed | $maxLength | int or string like '5,2' |
static getDerivedChangeConflictMessage |
( |
| ) |
|
|
static |
getErrorInvalidNumber |
( |
| ) |
|
static getInfiniteBig |
( |
| ) |
|
|
static |
static getInfiniteDate |
( |
| ) |
|
|
static |
static getInfiniteSmall |
( |
| ) |
|
|
static |
static getInfinity |
( |
|
$type | ) |
|
|
static |
static getInternalCharset |
( |
| ) |
|
|
static |
- Returns
- String the character encoding of domain model strings. The naming is to be compatible with http request header "content-type: text/html; charset= " You should override this method on ValueValidator if you want to use a different encoding. If you do: Be aware that the database must support the same encoding. Be aware that length validation needs to be overridden on ValueValidator for multi byte character sets. Be aware that for character sets that can contain illegal characters, like UTF-8, you must extend either Site, StringConverter or ValueValidator to sanitized/validate all incoming characters otherwise your application may be vurnerable to injection (SQL, CSS) and string php's and the database's string functions may not work properly (some of them never work properly with multi byte characters unless you use mbstrings).
static getInternalDateFormat |
( |
| ) |
|
|
static |
- Returns
- string the internal format used in properties, fields and the database
static getInternalDecimalSeparator |
( |
| ) |
|
|
static |
- Returns
- the internal format used in properties, fields and the database internal representation is created without thousends separator
static getInternalTimeFormat |
( |
| ) |
|
|
static |
static getInternalTimestampFormat |
( |
| ) |
|
|
static |
- Returns
- string the internal format used in properties, fields and the database. this is compatible with MySql datetime
getMaxValueFromMaxLength |
( |
| ) |
|
Initialize this from the supplied PropertyDescriptor
- Parameters
-
validate |
( |
|
$value, |
|
|
|
$validateReadOnly = true |
|
) |
| |
- Returns
- string error message if invalid, or null if valid If more types have to be added to the validation this method must be overridden.
- Parameters
-
mixed | $value | to be validated |
boolean | $validateReadOnly | wheather to validate that readOnly propeties are not set |
validate_min_max |
( |
|
$value, |
|
|
|
$minValue, |
|
|
|
$maxValue |
|
) |
| |
validateBoolean |
( |
|
$value | ) |
|
string $value holding date in internal date format. Does not have to be valid for strToTime.
string $value holding time in internal time format. Does not have to be valid for strToTime.
validateTimestamp |
( |
|
$value | ) |
|
string $value holding timestamp in internal timestamp format. Does not have to be valid for strToTime.
$errorInvalidEmail ='invalid email address' |
$errorInvalidType ='invalid type: ' |
$errorNotOfType ='value must be a: ' |
$errorReadOnly ='no changes allowed' |
$errorTooHigh ='too high, max: ' |
$errorTooLong ='too long, max: ' |
$errorTooLow ='too low, min: ' |
$errorTooShort ='too short, min: ' |
The documentation for this class was generated from the following file: