CaseSensitiveLiteralBase
extends LiteralBase
in package
Base rule class wich defines literals (case sensitive or case insensitive)
Tags
Table of Contents
- $literal : string
- Literal
- __construct() : mixed
- Constructor
- getLiteral() : string
- Method returns literal
- validate() : StringIterator
- {@inheritdoc}
- compare() : bool
- Method compares two strings.
Properties
$literal
Literal
private
string
$literal
= ''
Methods
__construct()
Constructor
public
__construct(string $literal) : mixed
Parameters
- $literal : string
-
the defined literal
Return values
mixed —getLiteral()
Method returns literal
public
getLiteral() : string
Return values
string —literal
validate()
{@inheritdoc}
public
validate(StringIterator $iterator, bool &$ruleWasApplied) : StringIterator
Parameters
- $iterator : StringIterator
- $ruleWasApplied : bool
Tags
Return values
StringIterator —compare()
Method compares two strings.
protected
abstract compare(string $str1, string $str2) : bool
Must be overriden in the derived classes
Parameters
- $str1 : string
-
the first string to compare
- $str2 : string
-
the second string to compare
Return values
bool —true if the strings are equal