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

Plug-in support / call only specified providers (proposal) #24

Open
Koricz opened this issue Jul 19, 2015 · 0 comments
Open

Plug-in support / call only specified providers (proposal) #24

Koricz opened this issue Jul 19, 2015 · 0 comments

Comments

@Koricz
Copy link

Koricz commented Jul 19, 2015

Hi,

I will in near future make a local QR code image generator and don't want make It as separate add-on but as a plug-in to nette-webimages which I already using.

It can't be done now in handy way because Providers are called one by one.

All what is needed, I think, is to add some property e.g. $types to Generator with some default $type for current providers (eg. 'image') and extend Iprovider interface with e.g. getType() which is a small BC break.

Generator will then call only specified providers by given type.

Plug-in should work with same n:src macro and like any other image provider with new (optional) $type parameter what providers(s) should be call.

It can be done now by passing and additional argument to n:src macro, but the all providers must be altered to check that parameter and then do something...

This change should be also handy if I want to call only some providers on given image.

What do you think?

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

1 participant