Documentation

LiteralBase
in package
implements RuleInterface

Base rule class wich defines literals (case sensitive or case insensitive)

Tags
author

gdever

Interfaces, Classes and Traits

RuleInterface
Common interface for all rules

Table of Contents

$literal  : string
Literal
__construct()  : mixed
Constructor
getLiteral()  : string
Method returns literal
compare()  : bool
Method compares two strings.

Properties

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

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

Search results