\phpDocumentor\Plugin\Scrybe\Converter\FormatFormat

Defines a conversion format in Scrybe.

Summary

Methods
Properties
Constants
__construct()
setName()
getName()
setMimeType()
getMimeType()
setExtensions()
getExtensions()
convertFilename()
No public properties found
MARKDOWN
JSON
RST
HTML
LATEX
PDF
DOCBOOK
No protected methods found
$name
$mime_type
$extensions
N/A
No private methods found
No private properties found
N/A

Constants

MARKDOWN

MARKDOWN

JSON

JSON

RST

RST

HTML

HTML

LATEX

LATEX

PDF

PDF

DOCBOOK

DOCBOOK

Properties

$name

$name : string

Type

string — the name for this format, usually any of the constants in this class

$mime_type

$mime_type : string

Type

string — the mime-type used for this format, i.e. application/json

$extensions

$extensions : array<mixed,string>

Type

array<mixed,string> — a series of file extensions that are commonly associated with this type of file

Methods

__construct()

__construct(string  $name, string  $mime_type, string|array<mixed,string>  $extensions) 

Initializes a new format.

Parameters

string $name
string $mime_type
string|array<mixed,string> $extensions

setName()

setName(string  $name) : void

Sets the name for this format.

The names of built-in formats are defined as class constants of this class.

Parameters

string $name

getName()

getName() : string

Returns the name for this format.

Returns

string

setMimeType()

setMimeType(string  $mime_type) : void

Sets the mime type commonly associated with files of this format.

Parameters

string $mime_type

getMimeType()

getMimeType() : string

Returns the Mime type commonly associated with files of this format.

Returns

string

setExtensions()

setExtensions(array<mixed,string>  $extensions) : void

Sets the file extensions commonly associated with files of this format.

Parameters

array<mixed,string> $extensions

getExtensions()

getExtensions() : array<mixed,string>

Returns the file extensions commonly associated with files of this format.

Returns

array<mixed,string>

convertFilename()

convertFilename(string  $filename) : string

Converts the given filename to be math this format.

Parameters

string $filename

Returns

string