52 if ($integer ===
'') {
60 if ($this->negative && $integer[0] ===
'-') {
61 $digits = substr($integer, 1);
62 if ($digits ===
'0') {
65 } elseif ($this->positive && $integer[0] ===
'+') {
66 $digits = $integer = substr($integer, 1);
72 if (!ctype_digit($digits)) {
77 if (!$this->zero && $integer == 0) {
80 if (!$this->positive && $integer > 0) {
83 if (!$this->negative && $integer < 0) {
Base class for all validating attribute definitions.
$negative
Whether or not negative values are allowed.
__construct($negative=true, $zero=true, $positive=true)
validate($integer, $config, $context)
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
$positive
Whether or not positive values are allowed.
$zero
Whether or not zero is allowed.