Get all supported extensions
A new public method getSupportedFileExtensions that returns the collected extensions of all parsers.
This would make it easier to scan directories only for supported file types.
Edit: If that's too specific, a getSupportedFileParsers would be fine too :)
I'm happy to implement either, just looking for feedback first.
I think a getSupportedFileParsers() would be ideal, since we could check if those classes exist.
Only the parsers themselves should have to figure out if they can currently support a file extension.
My suggestion:
- Add
isInstalledtoFileParserInterfaceor alternatively add a new optional interfaceInstallable. -
Configcan now avoid using parsers that are not currently useable like the YAML parser.
What do you think? The interface would be more backwards compatible I guess, but then you have to check for it each time if it's not part of FileParserInterface.