Process_Manager
in package
Class Process_Manager
Table of Contents
- $postprocessors : array<string|int, Postprocessor>
- List of postprocessors
- $preprocessors : array<string|int, Preprocessor>
- List of preprocessors
- __construct() : mixed
- Process_Manager constructor.
- postprocess() : string
- Method to postprocess the content
- preprocess() : array<string|int, mixed>
- Method to preprocess blocks
- register_postprocessor() : void
- Register postprocessor
- register_preprocessor() : void
- Register preprocessor
Properties
$postprocessors
List of postprocessors
private
array<string|int, Postprocessor>
$postprocessors
= array()
$preprocessors
List of preprocessors
private
array<string|int, Preprocessor>
$preprocessors
= array()
Methods
__construct()
Process_Manager constructor.
public
__construct(Cleanup_Preprocessor $cleanup_preprocessor, Blocks_Width_Preprocessor $blocks_width_preprocessor, Typography_Preprocessor $typography_preprocessor, Spacing_Preprocessor $spacing_preprocessor, Highlighting_Postprocessor $highlighting_postprocessor, Variables_Postprocessor $variables_postprocessor) : mixed
Parameters
- $cleanup_preprocessor : Cleanup_Preprocessor
-
Cleanup preprocessor.
- $blocks_width_preprocessor : Blocks_Width_Preprocessor
-
Blocks width preprocessor.
- $typography_preprocessor : Typography_Preprocessor
-
Typography preprocessor.
- $spacing_preprocessor : Spacing_Preprocessor
-
Spacing preprocessor.
- $highlighting_postprocessor : Highlighting_Postprocessor
-
Highlighting postprocessor.
- $variables_postprocessor : Variables_Postprocessor
-
Variables postprocessor.
Return values
mixed —postprocess()
Method to postprocess the content
public
postprocess(string $html) : string
Parameters
- $html : string
-
HTML content.
Return values
string —preprocess()
Method to preprocess blocks
public
preprocess(array<string|int, mixed> $parsed_blocks, array{contentSize: string, wideSize?: string, allowEditing?: bool, allowCustomContentAndWideSize?: bool} $layout, array{spacing: array{padding: array{bottom: string, left: string, right: string, top: string}, blockGap: string}} $styles) : array<string|int, mixed>
Parameters
- $parsed_blocks : array<string|int, mixed>
-
Parsed blocks.
- $layout : array{contentSize: string, wideSize?: string, allowEditing?: bool, allowCustomContentAndWideSize?: bool}
-
Layout.
- $styles : array{spacing: array{padding: array{bottom: string, left: string, right: string, top: string}, blockGap: string}}
-
Styles.
Return values
array<string|int, mixed> —register_postprocessor()
Register postprocessor
public
register_postprocessor(Postprocessor $postprocessor) : void
Parameters
- $postprocessor : Postprocessor
-
Postprocessor.
Return values
void —register_preprocessor()
Register preprocessor
public
register_preprocessor(Preprocessor $preprocessor) : void
Parameters
- $preprocessor : Preprocessor
-
Preprocessor.