- Since
- 0.5
@license GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ getFileExtension()
Wikimedia\Purtle\RdfWriterFactory::getFileExtension |
( |
| $format | ) |
|
Returns a file extension that correspond to the format.
- Parameters
-
string | $format | a format name, as returned by getSupportedFormats() or getFormatName(). |
- Exceptions
-
InvalidArgumentException | if $format is not a cononical format name |
- Returns
- string
◆ getFormatName()
Wikimedia\Purtle\RdfWriterFactory::getFormatName |
( |
| $format | ) |
|
Returns the canonical format name for $format.
$format may be a file extension, a mime type, or a common or canonical name of the format.
If no format is found for $format, this method returns false.
- Parameters
-
string | $format | the name (file extension, mime type) of the desired format. |
- Returns
- string|false the canonical format name
◆ getMimeTypes()
Wikimedia\Purtle\RdfWriterFactory::getMimeTypes |
( |
| $format | ) |
|
Returns a list of mime types that correspond to the format.
- Parameters
-
string | $format | a format name, as returned by getSupportedFormats() or getFormatName(). |
- Exceptions
-
InvalidArgumentException | if $format is not a cononical format name |
- Returns
- string[]
◆ getSupportedFormats()
Wikimedia\Purtle\RdfWriterFactory::getSupportedFormats |
( |
| ) |
|
Returns a list of canonical format names.
These names for internal use with getMimeTypes() and getFileExtension(), they are not themselves MIME types or file extensions.
- Returns
- string[]
◆ getWriter()
Wikimedia\Purtle\RdfWriterFactory::getWriter |
( |
| $format, |
|
|
BNodeLabeler | $labeler = null ) |
Returns an RdfWriter for the given format name.
- Parameters
-
string | $format | a format name, as returned by getSupportedFormats() or getFormatName(). |
BNodeLabeler | null | $labeler | Optional labeler |
- Exceptions
-
InvalidArgumentException | if $format is not a canonical format name |
- Returns
- RdfWriter the format object, or null if not found.
The documentation for this class was generated from the following file: