Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all supported extensions #65

Open
nochso opened this issue Jan 17, 2016 · 2 comments
Open

Get all supported extensions #65

nochso opened this issue Jan 17, 2016 · 2 comments

Comments

@nochso
Copy link

nochso commented Jan 17, 2016

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.

@hassankhan
Copy link
Owner

I think a getSupportedFileParsers() would be ideal, since we could check if those classes exist.

@nochso
Copy link
Author

nochso commented Jan 24, 2016

Only the parsers themselves should have to figure out if they can currently support a file extension.

My suggestion:

  • Add isInstalled to FileParserInterface or alternatively add a new optional interface Installable.
  • Config can 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants