Inherits Doctrine_Validator_Driver.
Definition at line 33 of file Unsigned.php.
| Doctrine_Validator_Driver::__get |
( |
|
$arg | ) |
|
|
inherited |
__get an alias for getOption
- Parameters
-
Definition at line 48 of file Driver.php.
{
if (isset($this->args[$arg])) {
return $this->args[$arg];
}
return null;
}
| Doctrine_Validator_Driver::__isset |
( |
|
$arg | ) |
|
|
inherited |
__isset
- Parameters
-
Definition at line 61 of file Driver.php.
{
return isset($this->args[$arg]);
}
| Doctrine_Validator_Driver::__set |
( |
|
$arg, |
|
|
|
$value |
|
) |
| |
|
inherited |
sets given value to an argument
- Parameters
-
| $arg | the name of the option to be changed |
| $value | the value of the option |
- Returns
- Doctrine_Validator_Driver this object
Definition at line 73 of file Driver.php.
{
$this->args[$arg] = $value;
return $this;
}
| Doctrine_Validator_Driver::getArg |
( |
|
$arg | ) |
|
|
inherited |
returns the value of an argument
- Parameters
-
| $arg | the name of the option to retrieve |
- Returns
- mixed the value of the option
Definition at line 86 of file Driver.php.
{
if ( ! isset($this->args[$arg])) {
}
return $this->args[$arg];
}
| Doctrine_Validator_Driver::getArgs |
( |
| ) |
|
|
inherited |
returns all args and their associated values
- Returns
- array all args as an associative array
Definition at line 114 of file Driver.php.
| Doctrine_Validator_Driver::setArg |
( |
|
$arg, |
|
|
|
$value |
|
) |
| |
|
inherited |
sets given value to an argument
- Parameters
-
| $arg | the name of the option to be changed |
| $value | the value of the option |
- Returns
- Doctrine_Validator_Driver this object
Definition at line 102 of file Driver.php.
{
$this->args[$arg] = $value;
return $this;
}
| Doctrine_Validator_Unsigned::validate |
( |
|
$value | ) |
|
checks if given value is a valid unsigned integer or float
valid values: null, '', 5, '5', 5.9, '5.9' invalid values: -5, '-5', 'five', -5.9, '-5.9', '5.5.5'
- Parameters
-
- Returns
- boolean
Definition at line 44 of file Unsigned.php.
{
if (is_null($value) || $value == '') {
return true;
}
if (preg_match('/[^0-9\-\.]/', $value)) {
return false;
}
if ((double) $value >= 0)
{
return true;
}
return false;
}
The documentation for this class was generated from the following file: