PyContentTransformerBuilder
class PyContentTransformerBuilder(content_transformer_builder)
Bases: object
Default IContentTransformerBuilder implementation.
- Parameters: content_transformer_builder (IContentTransformerBuilder)
__init__(content_transformer_builder)
Default init.
Args: : content_transformer_builder: An object with methods to build IContentTransformer”/
Returns: None.
- Parameters: content_transformer_builder (IContentTransformerBuilder)
- Return type: None
Methods
__init__ (content_transformer_builder) |
Default init. |
---|---|
add (input_0[, input_1, is_xml]) |
Adds an object or function to execute transformers. |
build () |
Builds an immutable collection from the currently added transformers. |
by_content_type () |
Gets the currently registered hook factories by their content types. |
clear () |
Removes all currently registered transformers. |
add(input_0, input_1=None, is_xml=False)
Adds an object or function to execute transformers.
Args:
: input_0: Either:
: 1. The transformer type to execute, or
2. The content type for a callback function
input_1: Either:
: 1. The callback function to execute, or
2. None
is_xml: True if the given callback function is an xml transformer callback, otherwise false.
Returns: : The same mapping builder object for fluent API calls.
- Parameters:
- input_0 (type)
- input_1 (Callable | None)
- is_xml (bool)
- Return type: Self
build()
Builds an immutable collection from the currently added transformers.
Returns: : The created collection.
- Return type: Self
by_content_type()
Gets the currently registered hook factories by their content types.
Returns: : The hook factories by their content types.
clear()
Removes all currently registered transformers.
Returns: : The same transformer builder object for fluent API calls.
- Return type: Self