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

Public Member Functions

 __construct (array $tokens=[])
 
 getTokens ()
 
 addFromDesciption (Description $description)
 
 setOutputFormat ( $outputFormat)
 
 highlight ( $text, $type=self::HL_BOLD)
 

Public Attributes

const HL_WIKI = 'HL_WIKI'
 
const HL_BOLD = 'HL_BOLD'
 
const HL_SPAN = 'HL_SPAN'
 
const HL_UNDERLINE = 'HL_UNDERLINE'
 

Detailed Description

For a wildcard search, build tokens from the query string, and allow to highlight them in the result set.

GNU GPL v2+

Since
2.5
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\Query\QueryToken::__construct ( array  $tokens = [])
Since
2.5
Parameters
array$tokens

Member Function Documentation

◆ addFromDesciption()

SMW\Query\QueryToken::addFromDesciption ( Description  $description)
Since
2.5
Parameters
Description$description

◆ getTokens()

SMW\Query\QueryToken::getTokens ( )
Since
2.5
Returns
array

◆ highlight()

SMW\Query\QueryToken::highlight (   $text,
  $type = self::HL_BOLD 
)
Since
2.5
Parameters
string$text
type$text
Returns
string

◆ setOutputFormat()

SMW\Query\QueryToken::setOutputFormat (   $outputFormat)

Sets format information (|?Foo#-hl) from a result printer

Since
2.5
Parameters
string$outputFormat

Member Data Documentation

◆ HL_WIKI

const SMW\Query\QueryToken::HL_WIKI = 'HL_WIKI'

Highlighter marker type


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

About | General disclaimer | Privacy policy