API documentation :: Docs For Class arbitModelValidatorBase
Packages:Interfaces:
Classes:
|
Core::Model::arbitModelValidatorBaseClass arbitModelValidatorBaseAbstract base class for stackable property validators, to be used in model classes. Abstract base class for stackable property validators, to be used in model classes. The static method create() for validator construction allows direct dereferencing of the configured validor, so that it may be used like the following example shows to validate an array where the values match the defined regular expression.
Descendants
Method Summary
Methodscreate
static void
create(
)
Create validator. Create validator. Create a validator object and configure it with the parameters passed to this method. We use a static method for this instead of the common constructor, because calls to constructors do not work with direct dereferencing, which would make the usage of the validator classes more complex. You may pass any number of parameters to the create method, they will all passed through to the configure method of the called validator. For the exact parameters check the documentation of the configure method of the respective validator. configure
void
configure(
)
Configure validator Method to configure the validator, if it requires configuration at all. Configure validator Method to configure the validator, if it requires configuration at all. Redefined in descendants as:
validate
mixed
validate(
string
$name
, mixed
$value
, string
$expectation
)
Validate value Validates the given input. validation constraints and throws a arbitPropertyValidationException exception otherwise. Validate value Validates the given input. Returns the input, when it matches the validation constraints and throws a arbitPropertyValidationException exception otherwise. The name and expectation paramters are used to generate a better user error message. The name should be the name of the property, and the expectation should be a string somehow describing what kind of content was expected from validation. Parameters:
Exceptions:
Redefined in descendants as:
Documentation generated on Mon, 05 Apr 2010 14:01:38 +0200 by phpDocumentor 1.4.3
|