AttributeRegexTrait
This is the 'regex' attribute trait.
This trait has been created to share common code between form elements classes, in this case the declaration of the 'regex' attribute and its set/get methods.
Tags
Table of Contents
$regex | : string | |
---|---|---|
getRegex() | This method returns the current regex of the 'regex' attribute. | : string |
setRegex() | This method sets the 'regex' attribute with the given regex and returns self. | : self |
Properties
$regex
protected
string
$regex
= ''
Methods
getRegex()
This method returns the current regex of the 'regex' attribute.
public
getRegex() : string
Return values
string —setRegex()
This method sets the 'regex' attribute with the given regex and returns self.
public
setRegex(string $regex) : self
Parameters
- $regex : string