checks a given value against the rule contained within the class
boolean
check
(mixed $val)
-
mixed
$val: the value to check against the rule
Redefined in descendants as:
This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
This method follows a modified Singleton pattern
object ValidatorRule
getRule
()
Redefined in descendants as:
-
AlwaysTrueValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
AndValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
ArrayValidatorRuleWithRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
ArrayValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
BooleanValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
ChoiceValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
DoubleValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
ExtendsValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
HasMethodsValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
IntegerRangeValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
IntegerValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
NumericValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
OptionalRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
OrValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
RegexValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
DottedPairValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
CSSColorValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
CSSFontFamilyValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
CSSLengthValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
CSSLengthValidatorRuleWithOptions::getRule()
: Note: this class takes a parameter and may have several instantiations.
-
EmailValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
FieldRequiredValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
ResourceValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
StringValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
NonzeroLengthStringValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
-
TrueValidatorRule::getRule()
: This is a static method to return an already-created instance of a validator rule. There are at most about a hundred unique rule objects in use durring any given execution cycle, but rule objects are instantiated hundreds of thousands of times.
Return a key that can be used to identify this Rule for caching purposes.
If this rule takes no arguments, the class name should be sufficient. otherwise, append the arguments.
This method should only be called by ValidatorRules.
string
getRuleKey
()
Redefined in descendants as: