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

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

Member Function Documentation

static SMW\Query\QueryComparator::clear ( )
static
Since
2.3
SMW\Query\QueryComparator::containsComparator (   $value,
  $comparator = SMW_CMP_EQ 
)
Since
2.5
Parameters
string$value
integer$comparator
Returns
boolean
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
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
SMW\Query\QueryComparator::getComparatorStrings ( )

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

Since
1.5.3
Returns
array
static SMW\Query\QueryComparator::getInstance ( )
static
Since
2.3
Returns
self
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: