VuFind API Documentation

MarkdownFactory
in package
implements FactoryInterface

VuFind Markdown Service factory.

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

author

Aleksi Peebles aleksi.peebles@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

FactoryInterface

Table of Contents

$config  : array<string|int, mixed>
Markdown processor configuration
$configKeys  : array<string|int, string>
Array of config keys for extensions classes
$container  : ContainerInterface
Dependency injection container
$defaultExtensions  : array<string|int, string>
Default set of extensions
$extensions  : array<string|int, mixed>
Enabled extensions
__invoke()  : object
Create an object
createConfig()  : array<string|int, mixed>
Create full config for markdown converter
getBaseConfig()  : array<string|int, mixed>
Get Markdown base config.
getConfigForCoreExtension()  : array<string|int, mixed>
Get config for core extension
getConfigForExtension()  : array<string|int, mixed>
Get config for given extension
getEnvironment()  : EnvironmentBuilderInterface
Get Markdown environment.
getExtensionClass()  : string
Get full class name for given extension
sanitizeConfig()  : array<string|int, mixed>
Sanitize some config options

Properties

$config

Markdown processor configuration

protected array<string|int, mixed> $config

$configKeys

Array of config keys for extensions classes

protected static array<string|int, string> $configKeys = ['CommonMarkCore' => 'commonmark', 'DefaultAttributes' => 'default_attributes', 'DisallowedRawHtml' => 'disallowed_raw_html', 'ExternalLink' => 'external_link', 'Footnote' => 'footnote', 'HeadingPermalink' => 'heading_permalink', 'Mention' => 'mentions', 'SmartPunct' => 'smartpunct', 'Table' => 'table', 'TableOfContents' => 'table_of_contents']

$container

Dependency injection container

protected ContainerInterface $container

$defaultExtensions

Default set of extensions

protected static array<string|int, string> $defaultExtensions = ['Autolink', 'DisallowedRawHtml', 'Strikethrough', 'Table', 'TaskList']

$extensions

Enabled extensions

protected array<string|int, mixed> $extensions

Methods

__invoke()

Create an object

public __invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
$container : ContainerInterface

Service manager

$requestedName : string

Service being created

$options : null|array<string|int, mixed> = null

Extra options (optional)

Tags
throws
ServiceNotFoundException

if unable to resolve the service.

throws
ServiceNotCreatedException

if an exception is raised when creating a service.

throws
ContainerExceptionInterface|Throwable

if any other error occurs

Return values
object

createConfig()

Create full config for markdown converter

protected createConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBaseConfig()

Get Markdown base config.

protected getBaseConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConfigForCoreExtension()

Get config for core extension

protected getConfigForCoreExtension() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConfigForExtension()

Get config for given extension

protected getConfigForExtension(string $extension) : array<string|int, mixed>
Parameters
$extension : string

Extension name

Return values
array<string|int, mixed>

getEnvironment()

Get Markdown environment.

protected getEnvironment() : EnvironmentBuilderInterface
Return values
EnvironmentBuilderInterface

getExtensionClass()

Get full class name for given extension

protected getExtensionClass(string $extension) : string
Parameters
$extension : string

Extension name

Return values
string

sanitizeConfig()

Sanitize some config options

protected sanitizeConfig(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
$config : array<string|int, mixed>

Full config

Return values
array<string|int, mixed>

Search results