Constructor
new ParserRegistry(parsersopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
parsers |
Array.<ContentParser> |
<optional> |
initialized list with valid parser instances. |
- Source:
Methods
get(type) → {ContentParser}
Getter for parser of given type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | of the parser for get. |
- Source:
Returns:
if parser of requested type is found or
null
otherwise.
- Type
- ContentParser
initLogger()
Initializes a console logger.
- Source:
register(parser)
Register provided ContentParser
under given key as returned by
parser.getSupportedType()
.
If the type of the provided parser is already registered, then this method
will override the registered parser with the provided instance.
Parameters:
Name | Type | Description |
---|---|---|
parser |
ContentParser | implementation wrapper. |
- Source: