|
|
(19 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| This article desrcibes the class ''I2CE_Validate''.
| | #REDIRECT [[Class: I2CE_Validate (4.1.7)]] |
| *Location: Part of the module [[iHRIS Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
| |
| *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/lib/I2CE_Validate.php lib/I2CE_Validate.php]
| |
| ==Variables==
| |
| ===$false===
| |
| *Type: static protected $false
| |
| | |
| ===$true===
| |
| *Type: static protected $true
| |
| | |
| ===$BaseChar===
| |
| *Type: static protected $BaseChar
| |
| | |
| ===$Ideographic===
| |
| *Type: static protected $Ideographic
| |
| | |
| ===$Letter===
| |
| *Type: static protected $Letter
| |
| | |
| ===$Digit===
| |
| *Type: static protected $Digit
| |
| | |
| ===$CombiningChar===
| |
| *Type: static protected $CombiningChar
| |
| | |
| ===$Extender===
| |
| *Type: static protected $Extender
| |
| | |
| ===$NameChar===
| |
| *Type: static protected $NameChar
| |
| | |
| ===$Name===
| |
| *Type: static protected $Name
| |
| | |
| ===$tokenRegexps===
| |
| *Type: static protected $tokenRegexps
| |
| | |
| ==Methods==
| |
| ===checkCurrency()===
| |
| Checks to make sure currency is valid.
| |
| | |
| This method checks to make sure a number is valid for currency. It can have a decimal
| |
| or comma with 2 digits past.
| |
| *Signature: static public function checkCurrency($data)
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| Parameters:
| |
| * number $data
| |
| ===checkDate()===
| |
| Checks to make sure a date is valid
| |
| *Signature: static public function checkDate($data)
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| Parameters:
| |
| * [[Class: I2CE_Date | I2CE_Date]] $data
| |
| ===checkEmail()===
| |
| *Signature: static public function checkEmail($email)
| |
| Parameters:
| |
| *$email
| |
| ===checkNumber()===
| |
| Checks to make sure a number is valid
| |
| | |
| This method checks to make sure the number is a number and optionally
| |
| that it is greater than a specific value.
| |
| *Signature: static public function checkNumber($data,$min_value)
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| Parameters:
| |
| * number $data
| |
| * number $min_value
| |
| **Default Value: false
| |
| ===checkString()===
| |
| Checks to make sure a string isn't blank.
| |
| *Signature: static public function checkString($data)
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| Parameters:
| |
| * [http://www.php.net/manual/en/language.types.string.php string ] $data
| |
| ===checkVersion()===
| |
| Checks to see if the versions meet the demans given by the operator.
| |
| Opeartors are '<','lessthan','>','greaterthan','=','equal','equals','exactly','<=','atmost','>=','atleast'
| |
| *Signature: static public function checkVersion($vers1,$operator,$vers2)
| |
| *Returns: true on sucess. false on failure
| |
| Parameters:
| |
| *$vers1
| |
| *$operator
| |
| *$vers2
| |
| ===convertToBoolean()===
| |
| Converts a string such as true/false/yes/no/1/0 to boolean value (stored as either the string '0' or '1')
| |
| *Signature: static public function convertToBoolean($string,$asBool)
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] string or null if it is not recognized
| |
| Parameters:
| |
| * [http://www.php.net/manual/en/language.types.string.php string ] $string<br/>;
| |
| * [http://www.php.net/manual/en/language.types.boolean.php boolean ] $asBool<br/>Defaults to false. If true returns true/false otherwise returns 1/0. I know ... this is confusing.
| |
| **Default Value: false
| |
| ===isNmToken()===
| |
| *Signature: static public function isNmToken($val)
| |
| Parameters:
| |
| *$val
| |
| ===isTokenDigit()===
| |
| *Signature: static public function isTokenDigit($val)
| |
| Parameters:
| |
| *$val
| |
| ===isTokenLetter()===
| |
| *Signature: static public function isTokenLetter($val)
| |
| Parameters:
| |
| *$val
| |
| ===isTokenName()===
| |
| *Signature: static public function isTokenName($val)
| |
| Parameters:
| |
| *$val
| |
| ===setupTokenRegexps()===
| |
| *Signature: protected function setupTokenRegexps()
| |
| ===stripCurrency()===
| |
| Remove any invalid characters that can't be part of a valid currency value.
| |
| *Signature: static public function stripCurrency($data)
| |
| *Returns: number
| |
| Parameters:
| |
| * [http://www.php.net/manual/en/language.types.string.php string ] $data
| |
| | |
| | |
| [[Category:Class Documentation]]
| |