Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\Query\QueryComparator Class Reference

Public Member Functions

 __construct ( $comparatorList, $strictComparators)
 
 getComparatorStrings ()
 
 getComparatorFromString ( $string, $defaultComparator=SMW_CMP_EQ)
 
 containsComparator ( $value, $comparator=SMW_CMP_EQ)
 
 extractComparatorFromString (&$value)
 
 getStringForComparator ( $comparator)
 

Static Public Member Functions

static getInstance ()
 
static clear ()
 

Detailed Description

GNU GPL v2+

Since
1.5.3
Author
mwjames
Jeroen De Dauw

Constructor & Destructor Documentation

◆ __construct()

SMW\Query\QueryComparator::__construct (   $comparatorList,
  $strictComparators 
)
Since
2.3
Parameters
string$comparatorList
boolean$strictComparators

Member Function Documentation

◆ clear()

static SMW\Query\QueryComparator::clear ( )
static
Since
2.3

◆ containsComparator()

SMW\Query\QueryComparator::containsComparator (   $value,
  $comparator = SMW_CMP_EQ 
)
Since
2.5
Parameters
string$value
integer$comparator
Returns
boolean

◆ extractComparatorFromString()

SMW\Query\QueryComparator::extractComparatorFromString ( $value)

Extract possible comparators from a value and alter it to consist only of the remaining effective value string (without the comparator).

Since
2.4
Parameters
$value
Returns
integer

◆ getComparatorFromString()

SMW\Query\QueryComparator::getComparatorFromString (   $string,
  $defaultComparator = SMW_CMP_EQ 
)

Gets the SMW_CMP_ for a string comparator, falling back to the $defaultComparator when none is found.

Since
1.5.3
Parameters
string$string
integer$defaultComparatorItem of the SMW_CMP_ enum
Returns
integer Item of the SMW_CMP_ enum

◆ getComparatorStrings()

SMW\Query\QueryComparator::getComparatorStrings ( )

Gets an array with all supported comparator strings. The string for SMW_CMP_EQ, which is an empty string, is not in this list.

Since
1.5.3
Returns
array

◆ getInstance()

static SMW\Query\QueryComparator::getInstance ( )
static
Since
2.3
Returns
self

◆ getStringForComparator()

SMW\Query\QueryComparator::getStringForComparator (   $comparator)

Gets the comparator string for a comparator.

Since
1.5.3
Parameters
$comparator
Returns
string

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy