Factory for "result formats", ie classes implementing QueryResultPrinter.
GNU GPL v2+
- Since
- 2.5 (since 1.9, renamed in 2.5)
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
◆ getCanonicalName()
SMW\QueryPrinterFactory::getCanonicalName |
( |
|
$formatName | ) |
|
Resolves format aliases into their associated canonical format name.
- Since
- 2.5
- Parameters
-
string | $formatName | Format name or alias |
- Returns
- string
- Exceptions
-
◆ getFormats()
SMW\QueryPrinterFactory::getFormats |
( |
| ) |
|
Returns the canonical format names.
- Since
- 2.5
- Returns
- string[]
◆ getPrinter()
SMW\QueryPrinterFactory::getPrinter |
( |
|
$formatName | ) |
|
Returns a new instance of the handling result printer for the provided format.
- Since
- 2.5
- Parameters
-
- Returns
- QueryResultPrinter
- Exceptions
-
ResultFormatNotFoundException | |
◆ hasFormat()
SMW\QueryPrinterFactory::hasFormat |
( |
|
$formatName | ) |
|
Returns if there is a format or format alias with the provided name.
- Since
- 2.5
- Parameters
-
string | $formatName | Format name or alias |
- Returns
- boolean
◆ registerAliases()
SMW\QueryPrinterFactory::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
- 2.5
- Parameters
-
string | $formatName | |
array | $aliases | |
- Exceptions
-
◆ registerFormat()
SMW\QueryPrinterFactory::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
- 2.5
- Parameters
-
string | $formatName | |
string | $class | |
- Exceptions
-
◆ singleton()
static SMW\QueryPrinterFactory::singleton |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: