Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory Class Reference

This class assembles parser pipelines from parser stages. More...

Public Member Functions

 __construct (Env $env)
 
 parse (string $src)
 
 selectiveDOMUpdate (SelectiveUpdateData $selparData, array $options=[])
 
 getPipeline (string $type, array $options=[])
 Get a pipeline of a given type.
 
 returnPipeline (ParserPipeline $pipe)
 Callback called by a pipeline at the end of its processing.
 

Static Public Member Functions

static procNamesToProcs (array $procNames)
 

Public Attributes

const NESTED_PIPELINE_DOM_TRANSFORMS
 
const FULL_PARSE_GLOBAL_DOM_TRANSFORMS
 
const FULL_PARSE_EMBEDDED_DOC_DOM_TRANSFORMS
 
const SELECTIVE_UPDATE_FRAGMENT_GLOBAL_DOM_TRANSFORMS
 
const SELECTIVE_UPDATE_GLOBAL_DOM_TRANSFORMS
 

Detailed Description

This class assembles parser pipelines from parser stages.

Member Function Documentation

◆ getPipeline()

Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::getPipeline ( string $type,
array $options = [] )

Get a pipeline of a given type.

Pipelines are cached as they are frequently created.

Parameters
string$type
array$optionsThese also determine the key under which the pipeline is cached for reuse.
Returns
ParserPipeline

◆ returnPipeline()

Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::returnPipeline ( ParserPipeline $pipe)

Callback called by a pipeline at the end of its processing.

Returns the pipeline to the cache.

Parameters
ParserPipeline$pipe

◆ selectiveDOMUpdate()

Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::selectiveDOMUpdate ( SelectiveUpdateData $selparData,
array $options = [] )
Parameters
SelectiveUpdateData$selparData
array$optionsOptions for selective DOM update
  • mode: (string) One of "template", "section", "generic" For now, defaults to 'template', if absent

Member Data Documentation

◆ FULL_PARSE_EMBEDDED_DOC_DOM_TRANSFORMS

const Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::FULL_PARSE_EMBEDDED_DOC_DOM_TRANSFORMS
Initial value:
= [
'fixups+dedupe-styles', 'strip-metas',
'displayspace+linkclasses',
'cleanup',
'embedded-docs',
]

◆ FULL_PARSE_GLOBAL_DOM_TRANSFORMS

const Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::FULL_PARSE_GLOBAL_DOM_TRANSFORMS
Initial value:
= [
'extpp',
'fixups+dedupe-styles', 'linter', 'strip-metas',
'lang-converter', 'redlinks', 'displayspace+linkclasses',
'heading-ids',
'sections', 'convertoffsets', 'cleanup',
'embedded-docs',
'saveDP', 'addmetadata'
]

◆ NESTED_PIPELINE_DOM_TRANSFORMS

const Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::NESTED_PIPELINE_DOM_TRANSFORMS
Initial value:
= [
'fostered', 'process-fixups', 'normalize', 'pwrap',
'media', 'migrate-metas', 'migrate-nls', 'dsr', 'tplwrap',
'ann-ids', 'annwrap', 'linkneighbours+dom-unpack'
]

◆ SELECTIVE_UPDATE_FRAGMENT_GLOBAL_DOM_TRANSFORMS

const Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::SELECTIVE_UPDATE_FRAGMENT_GLOBAL_DOM_TRANSFORMS
Initial value:
= [
'extpp',
'fixups', 'strip-metas', 'redlinks', 'displayspace+linkclasses',
'gen-anchors', 'convertoffsets', 'cleanup',
'addmetadata'
]

◆ SELECTIVE_UPDATE_GLOBAL_DOM_TRANSFORMS

const Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory::SELECTIVE_UPDATE_GLOBAL_DOM_TRANSFORMS
Initial value:
= [
'update-template', 'linter', 'lang-converter',
'heading-ids', 'sections', 'saveDP'
]

The documentation for this class was generated from the following file: