Welcome Guest, Not a member yet? Register   Sign In
creating model vs creating library, composer and vendor folder
#1

I'm converting an old custom class that makes use of a mostly-abandoned php-opencloud SDK from rackspace. The original instructions were to add some use statements and then require one file:
Code:
use OpenCloud\ObjectStore\ObjectStoreBase;
use OpenCloud\ObjectStore\ObjectStoreCDN;
// get the rackspace/OpenCloud library
require_once "opencloud/lib/php-opencloud.php"; // where should I put this file?
Then you could start using the library.

I'm wondering how to best make use of this library in my CodeIgniter project. I've noticed that many SDKs (paypal, authorize.net, others) are using Composer these days so I'm guessing I might want to install a more recent version of the SDK but I've noticed that no one has committed any changes to that SDK in a year and I've also been told by Rackspace that there is no active development on any V2 version. I'd appreciate any advice folks may have on using these apparently abandoned SDKs.

More importantly, assuming I get the right library installed, where does it go? Do I put it in a subdir of the application/libraries folder? Seems like I'd need to write my own custom library class so $this->load->library("MyClass") has something to instantiate. Or should I create a Model class that just starts off with those use and require statements above?

Any assistance would be much appreciated.
Reply


Messages In This Thread
creating model vs creating library, composer and vendor folder - by sneakyimp - 03-13-2017, 08:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB