ToHtml

Extends \phpDocumentor\Plugin\Scrybe\Converter\BaseConverter Implements \phpDocumentor\Plugin\Scrybe\Converter\ToHtmlInterface

Class used to convert one or more RestructuredText documents to their HTML representation.

This class uses a two-phase process to interpret and parse the RestructuredText documents, namely Discovery and Creation.

see

for a detailed description of the process.

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) 
inherited

Adds the assets of the template to the Assets manager.

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

Configures and initializes the subcomponents specific to this converter.

configure() : void
inherited

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
inherited

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
inherited 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
inherited 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
inherited

Returns the definition for this Converter.

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

Returns the filename used for the output path.

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

Arguments

$file

\phpDocumentor\Fileset\File

Response

string

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

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

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
inherited

Returns the logger for this converter.

getLogger() : \Monolog\Logger
inherited

Response

\Monolog\Logger

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

getOption(string $name) : string|null
inherited

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
inherited

Sets the relative path to the root of the generated contents.

setDestinationRoot(string $destination) : void

Basically this method takes the depth of the given destination and replaces it with .. unless the destination directory name is ..

see \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\$options

for where the 'root' variable is set.

Arguments

$destination

string

The destination path relative to the target folder.

Set a logger for this converter.

setLogger(\Monolog\Logger $logger) : void
inherited

Arguments

$logger

\Monolog\Logger

Sets an option with the given name.

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

Arguments

$name

string

$value

string

Properties

definition

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

options

options : array<mixed,string>
inherited
var

Type(s)

array<mixed,string>

fileset

fileset : \phpDocumentor\Fileset\Collection
inherited
var

Type(s)

\phpDocumentor\Fileset\Collection

assets

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

toc

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

glossary

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

logger

logger : \Monolog\Logger
inherited
var

Type(s)

\Monolog\Logger