$definition_factory
$definition_factory : \phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory
This factory attempts to create a converter given an input and output format and return that.
use phpDocumentor\Plugin\Scrybe\Converter\ConverterFactory;
use phpDocumentor\Plugin\Scrybe\Converter\Format\Format;
$converter_factory = new ConverterFactory();
$converter = $converter_factory->get(
Format::MARKDOWN, Format::HTML
);
$definition_factory : \phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory
$converters : array<mixed,\phpDocumentor\Plugin\Scrybe\Converter\ConverterInterface>
__construct(array<mixed,string> $converters, \phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory|null $definition_factory, \Monolog\Logger $logger)
Constructs a new factory.
A Definition\Factory may optionally be passed to provide an alternate method of creating Definitions or to construct the Definition\Factory with a different Format\Collection to influence the possible options.
array<mixed,string> | $converters | |
\phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory|null | $definition_factory | |
\Monolog\Logger | $logger |
get(string $input_format, string $output_format) : \phpDocumentor\Plugin\Scrybe\Converter\ConverterInterface
Retrieves a new instance of the converter necessary to convert the give input format to the given output format.
string | $input_format | |
string | $output_format |
getSupportedInputFormats(string $given_output_format) : array<mixed,string>
Returns a list of supported input formats for the given output format.
string | $given_output_format | A format definition per the constants in the Format class. |
An array of format definitions per the constantst in the Format class.
setConverters(array<mixed,\phpDocumentor\Plugin\Scrybe\Converter\ConverterInterface> $converters) : void
Sets the converters for this Factory.
array<mixed,\phpDocumentor\Plugin\Scrybe\Converter\ConverterInterface> | $converters |
getDefaultDefinitionFactory() : \phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory
Method used to retrieve the default Definition Factory.
This is used when the user has not provided their own definition factory in the constructor.
setDefinitionFactory(\phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory $definition_factory) : void
Sets the Definition Factory used to retrieve definitions from.
\phpDocumentor\Plugin\Scrybe\Converter\Definition\Factory | $definition_factory |