OneOrMoreOrNothing
extends OneOrMoreBase
in package
Rule wich allows the defined set of characters or nothing Empty strings are allowed
Tags
Table of Contents
- $charSet : string
- Charset
- __construct() : mixed
- Constructor
- validate() : StringIterator
- {@inheritdoc}
- getCharSet() : string
- Method returns char set
Properties
$charSet
Charset
private
string
$charSet
= ''
Methods
__construct()
Constructor
public
__construct(string $charSet) : mixed
Parameters
- $charSet : string
-
the defined character set
Return values
mixed —validate()
{@inheritdoc}
public
validate(StringIterator $iterator, bool &$ruleWasApplied) : StringIterator
Parameters
- $iterator : StringIterator
- $ruleWasApplied : bool
Tags
Return values
StringIterator —getCharSet()
Method returns char set
protected
getCharSet() : string
Return values
string —char set