BaseConverter

Implements \phpDocumentor\Plugin\Scrybe\Converter\ConverterInterface

package

Default

Methods

Initializes this converter and sets the definition.

__construct(\phpDocumentor\Plugin\Scrybe\Converter\Definition\Definition $definition, \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Assets $assets, \phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents $tableOfContents, \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Glossary $glossary) 

Adds the assets of the template to the Assets manager.

addTemplateAssets(\phpDocumentor\Plugin\Scrybe\Template\TemplateInterface $template) : void

Configures and initializes the subcomponents specific to this converter.

configure() : void

Converts the given $source using the formats that belong to this converter.

convert(\phpDocumentor\Fileset\Collection $source, \phpDocumentor\Plugin\Scrybe\Template\TemplateInterface $template) : array<mixed,string>|null

This method will return null unless the 'scrybe://result' is used.

Arguments

$source

\phpDocumentor\Fileset\Collection

Collection of input files.

$template

\phpDocumentor\Plugin\Scrybe\Template\TemplateInterface

Template used to decorate the output with.

Response

array<mixed,string>|null

Converts the input files into one or more output files in the intended format.

create(\phpDocumentor\Plugin\Scrybe\Template\TemplateInterface $template) : array<mixed,string>|null
abstract

This method reads the files, converts them into the correct format and returns the contents of the conversion.

The template is used to decorate the individual files and can be obtained using the \phpDocumentor\Plugin\Scrybe\Template\Factory class.

see \phpDocumentor\Plugin\Scrybe\Converter\manual://extending#build_cycle

for more information regarding the build process.

Arguments

Response

array<mixed,string>|null

The contents of the resulting file(s) or null if the files are written directly to file.

Discovers the data that is spanning all files.

discover() : void
abstract

This method tries to find any data that needs to be collected before the actual creation and substitution phase begins.

Examples of data that needs to be collected during an initial phase is a table of contents, list of document titles for references, assets and more.

see \phpDocumentor\Plugin\Scrybe\Converter\manual://extending#build_cycle

for more information regarding the build process.

Returns the AssetManager that keep track of which assets are used.

getAssets() : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Assets

Returns the definition for this Converter.

getDefinition() : \phpDocumentor\Plugin\Scrybe\Converter\Definition\Definition

Returns the filename used for the output path.

getDestinationFilename(\phpDocumentor\Fileset\File $file) : string

Arguments

$file

\phpDocumentor\Fileset\File

Response

string

Returns the filename relative to the Project Root of the fileset.

getDestinationFilenameRelativeToProjectRoot(\phpDocumentor\Fileset\File $file) : string

Arguments

$file

\phpDocumentor\Fileset\File

Response

string

Returns the glossary object that keeps track of all the glossary terms that have been provided.

getGlossary() : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Glossary

Returns the logger for this converter.

getLogger() : \Monolog\Logger

Response

\Monolog\Logger

Returns the option with the given name or null if the option does not exist.

getOption(string $name) : string|null

Arguments

$name

string

Response

string|null

Returns the table of contents object that keeps track of all headings and their titles.

getTableOfContents() : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents

Set a logger for this converter.

setLogger(\Monolog\Logger $logger) : void

Arguments

$logger

\Monolog\Logger

Sets an option with the given name.

setOption(string $name, string $value) : void

Arguments

$name

string

$value

string

Properties

definition

definition : \phpDocumentor\Plugin\Scrybe\Converter\Definition\Definition

options

options : array<mixed,string>
var

Type(s)

array<mixed,string>

fileset

fileset : \phpDocumentor\Fileset\Collection
var

Type(s)

\phpDocumentor\Fileset\Collection

assets

assets : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Assets

toc

toc : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\TableOfContents

glossary

glossary : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Glossary

logger

logger : \Monolog\Logger
var

Type(s)

\Monolog\Logger