• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help understanding external libraries in CI

I have been working with an this standalone api library for a product called InfusionSoft for a while.

It consists of a folder for the php libraries: xmlrpc-2.0

A isdk.php which at the top includes the xmlrpc: include("xmlrpc-2.0/lib/xmlrpc.inc");

and it establishes the iSDK class which defines the functions I use like sending data or updating contact information.

public function addContact($XX) {... }
public function updateCon(XX {... }

And Then my main program test.php which at the top includes the iSDK.php and creates an object of that class to preform the action required by the user.

include 'isdk.php';
$myApp = new iSDK;

$myApp->addContact("James", "555-555-5555");

I am totally lost on how to bring this into CodeIgniter.

I am assuming that I would make the isdk.php a controller but where do I put the xmlrpc-2.0 and how do I link it into the isdk controller ?

Which I would give the isdk controller a name like "contacts" since it holds the contact functions

If you make sure isdk follows the CI rules for libraries, you can load and use it like any other library:

[eluser]Daniel Cronin[/eluser]

Infusionsoft iSDK is using an old php xml rpc library which will not work with CodeIgniter.

You can not replace it with CodeIgniter's XML_RPC library because it does not support SSL.

All you have to do is download the latest version here... http://phpxmlrpc.sourceforge.net/ and copy over the old files in the iSDK.

Then you should be able to load it like any other library as WanWizard said.

Best regards,

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.