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=array())
 
 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

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

Member Function Documentation

SMW\Query\QueryToken::addFromDesciption ( Description  $description)
Since
2.5
Parameters
Description$description
SMW\Query\QueryToken::getTokens ( )
Since
2.5
Returns
array
SMW\Query\QueryToken::highlight (   $text,
  $type = self::HL_BOLD 
)
Since
2.5
Parameters
string$text
type$text
Returns
string
SMW\Query\QueryToken::setOutputFormat (   $outputFormat)

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

Since
2.5
Parameters
string$outputFormat

Member Data Documentation

const SMW\Query\QueryToken::HL_BOLD = 'HL_BOLD'
const SMW\Query\QueryToken::HL_SPAN = 'HL_SPAN'
const SMW\Query\QueryToken::HL_UNDERLINE = 'HL_UNDERLINE'
const SMW\Query\QueryToken::HL_WIKI = 'HL_WIKI'

Highlighter marker type


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