__construct()
getMessage()
getName()
setMessage()
validate()
_init()
_isNoUserValue()
$_message
$_name
FormagicRule abstract superclass
| category | Formagic |
|---|---|
| package | Rule |
| author | Florian Sonnenburg |
| copyright | Copyright (c) 2007-2009 Florian Sonnenburg |
| version | $Id: Abstract.php 169 2012-05-06 20:16:16Z meweasle $ |
__construct(array $arguments)
The default error message that is displayed if the rule is violated can be overwritten by $errorMessage.
| see | \self::_init() |
|---|
arrayThe rule options.
getMessage() : string
stringMessage stringgetName() : string
stringThe rule namesetMessage(mixed $message) : \Formagic_Rule_Abstract
Usually a rule will have one error message string that is used if the validation fails. If neccessary, Formagic_Rule_Abstract::_errorMessage can hold other variables, eg. an array of error messages for different outcomes of the validation process.
Implements a fluent interface pattern.
| see | \Formagic_Rule_Abstract::__construct() |
|---|
mixedThe error message value.
\Formagic_Rule_Abstract$this object.validate(string $value) : boolean
Subclasses have to implement their behavior here.
stringThe value to be validated.
booleanThe rule check result_init(array $arguments) : void
arrayArray of arguments passed to __construct()
_isNoUserValue(\$value $value) : boolean
The value 0 (zero) for example could be something the user entered willingly and would be skipped from rule checks when using empty().
\$valuemixed Value to be checked
boolean$_name : string