thephpleague / glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.
http://glide.thephpleague.com
MIT License
2.55k stars 198 forks source link

Codeigniter Responses #299

Closed web1989 closed 3 years ago

web1989 commented 3 years ago

Hello Response to Codeigniter doesn't have it on the list, would anyone have a solution? https://glide.thephpleague.com/1.0/config/responses/

thanks :)

Lustmored commented 3 years ago

To be honest writing ResponseFactory for glide is extremely easy. You might as well create one in your project - just implement ResponseFactoryInterface.

For inspiration take a look at PSR-7 one that is bundled with Glide and don't hesitate to ask for help. I don't know CodeIgniter so cannot help you more but show direction :)

tgalopin commented 3 years ago

As @Lustmored said, it should be quite straightforward to create a ResponseFactory. I'm not in favor of adding too many response formats in the core library, because creating its own is mostly about copy-pasting and adapting https://github.com/thephpleague/glide/blob/master/src/Responses/PsrResponseFactory.php.

If you wish to provide a factory as an open-source package, I'd be happy to link it in the doc though.