BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMW\FormatFactory Class Reference

Public Member Functions

 registerFormat ($formatName, $class)
 
 registerAliases ($formatName, array $aliases)
 
 getFormats ()
 
 hasFormat ($formatName)
 
 getPrinter ($formatName)
 
 getCanonicalName ($formatName)
 

Static Public Member Functions

static singleton ()
 

Protected Member Functions

 getPrinterClass ($formatName)
 

Protected Attributes

 $formats = array()
 
 $aliases = array()
 

Detailed Description

Factory for "result formats", ie classes implementing QueryResultPrinter.

Since
1.9

GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

SMW\FormatFactory::getCanonicalName (   $formatName)

Resolves format aliases into their associated canonical format name.

Since
1.9
Parameters
string$formatNameFormat name or alias
Returns
string
Exceptions
MWException
SMW\FormatFactory::getFormats ( )

Returns the canonical format names.

Since
1.9
Returns
array of string
SMW\FormatFactory::getPrinter (   $formatName)

Returns a new instance of the handling result printer for the provided format.

Since
1.9
Parameters
string$formatName
Returns
QueryResultPrinter
SMW\FormatFactory::getPrinterClass (   $formatName)
protected

Returns the QueryResultPrinter implementing class that is the printer for the provided format.

Since
1.9
Parameters
string$formatNameFormat name or alias
Returns
string
Exceptions
MWException
SMW\FormatFactory::hasFormat (   $formatName)

Returns if there is a format or format alias with the provided name.

Since
1.9
Parameters
string$formatNameFormat name or alias
Returns
boolean
SMW\FormatFactory::registerAliases (   $formatName,
array  $aliases 
)

Registers the provided format aliases. If an aliases is already registered, it will be overridden with the newly provided data.

Since
1.9
Parameters
string$formatName
array$aliases
Exceptions
MWException
SMW\FormatFactory::registerFormat (   $formatName,
  $class 
)

Registers a format. If there is a format already with the provided name, it will be overridden with the newly provided data.

Since
1.9
Parameters
string$formatName
string$class
Exceptions
MWException
static SMW\FormatFactory::singleton ( )
static

Returns an instance of the factory.

Since
1.9
Returns
FormatFactory

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