Integrate third party library like unirest.io/php.html |
How to integrate in codeigniter 3
third party library like http://unirest.io/php.html without using composer thank you
Figured this out through experimentation
1) Download the Unirest repo. 2) Copy its src folder into your application/libraries, resulting in Unirest.php and the Unirest folder there. 3) Modify application/libraries/Unirest.php, adding a bogus class to make CI happy Code: <?php
worked great, thank you,
i thought all this files must be inside third_party, i was confused. So any libraries , external, shoud go inside app../libraries/ regards
Unirest could have been bundled as a package too, in which case it would have gone inside application/third_party.
If you write a *library* that wraps an external "package", that would go inside application/libraries. If you write a *package* that wraps an external "package", that would go inside application/third_party. These are two different ways of achieving a similar effect. If the external "package" includes classes, models and views, it would be better as a *package*. Unirest was simple enough that I kept it as a library. |
Welcome Guest, Not a member yet? Register Sign In |