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

Public Member Functions

 __construct (Language $language=null)
 
 setLanguage (Language $language)
 
 setLanguageFromContext (IContextSource $context)
 
 formatNumberToText ($number, $useForSpecialNumbers=false)
 
 listToCommaSeparatedText (array $list)
 
 prevNextToText (Title $title, $limit, $offset, array $query, $isAtTheEnd)
 
 getMessage ($key)
 

Detailed Description

Convenience class to build language dependant messages and special text components and decrease depdencency on the Language object with SMW's code base

GNU GPL v2+

Since
2.1
Author
mwjames

Constructor & Destructor Documentation

SMW\MediaWiki\MessageBuilder::__construct ( Language  $language = null)
Since
2.1
Parameters
Language | null$language

Member Function Documentation

SMW\MediaWiki\MessageBuilder::formatNumberToText (   $number,
  $useForSpecialNumbers = false 
)
Since
2.1
Parameters
mixed$number
boolean$useForSpecialNumbersset to true for numbers like dates
Returns
string
SMW\MediaWiki\MessageBuilder::getMessage (   $key)
Since
2.1
Parameters
string$key
Returns
Message
SMW\MediaWiki\MessageBuilder::listToCommaSeparatedText ( array  $list)
Since
2.1
Parameters
array$list
Returns
string
SMW\MediaWiki\MessageBuilder::prevNextToText ( Title  $title,
  $limit,
  $offset,
array  $query,
  $isAtTheEnd 
)
Since
2.1
Parameters
Title$title
SMW\MediaWiki\MessageBuilder::setLanguage ( Language  $language)
Since
2.1
Parameters
Language$language
Returns
MessageBuilder
SMW\MediaWiki\MessageBuilder::setLanguageFromContext ( IContextSource  $context)
Since
2.1
Parameters
IContextSource$context
Returns
MessageBuilder

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