iwyg / jitimage

Just In Time image manipulation (GD, Imagick, imagemagick) with integration for laravel 4
MIT License
95 stars 8 forks source link

Non Laravel use #6

Closed designermonkey closed 9 years ago

designermonkey commented 11 years ago

Any documentation on how you would implement this without Laravel? I.e. not having Facades, Events, ServiceProviders etc?

iwyg commented 11 years ago

You'd have to write your own serviceprovider and replace the controller with a controller that fits to your framework. You'll also have to write your own presponse classes as they use Laravel components (but they're only used within the controller).

[EDIT]: Just checked, the cache also uses Illuminate/Filesystem, so if you don't want any Illuminate packages at all you'll have to replace it as well. But that's definitely doable since it's all interface driven.

iwyg commented 11 years ago

just replaced some L4 deps with symphony components that are already there. It's easy actually and you get the picture once you see it. The only "hard dependency" right know is all about response handling. But since it's all modular, it's really easy to replace everything that's not directly involved with the image subject.

designermonkey commented 11 years ago

I will get back to looking at this very soon, I promise.

iwyg commented 11 years ago

no worries. I wouldn't do this if it wasn't fun :)

iwyg commented 10 years ago

@designermonkey I'm planning to outsource the processing library classes for the next major release. This way It's easier to comprehend for cross framework usage (thinking of packages/bundles for symfony, silex, laravel, (and the one I'm working on), etc).

I know that you're involve in the development for the slim framework. So, if you do have any suggestions/questions, don't hesitate to put them on.

Cheers

designermonkey commented 10 years ago

Take a look at how cartalyst/sentry have done the whole serviceprovider setup. It's quite clever.

iwyg commented 10 years ago

Yep, that's my intention. Symfony however would require something quite different.

If you have any suggestions that would help integrating with slim, go for it.

designermonkey commented 10 years ago

Slim's a lot simpler than most with that sort of thing. It just needs to be a Route Middleware, or actually simpler than that!

With the new v3 coming out soon, a route can be passed through to a class and method, or even just a simple function to take the parameters and provide them to the right JIT functions in the package.

I'll have a think about it.