Welcome Guest, Not a member yet? Register   Sign In
incorporating large scripts into CI
#1

[eluser]surrealillusions[/eluser]
Hi all,

I would like to use a script, but it has a few subfolders itself, and spread over a few files, like config's, includes etc..

How do you use that inside CI as a library?

Thanks.
#2

[eluser]Basketcasesoftware[/eluser]
That's a pretty open ended question there. I mean, what part of your scripts do you plan to use as a library? The CodeIgniter User Guide has a very good section on creating custom library additions. Is this a PHP script? Java? Something entirely different?
#3

[eluser]surrealillusions[/eluser]
Its a PHP script, sorry, forgot to mention that Smile

I've looked at the creating your own libraries in the user guide, but it doesn't seem to mention about multi-file scripts/library classes in there, does it?
#4

[eluser]Basketcasesoftware[/eluser]
Really wouldn't matter. Just create a single library item that is your interface to the library. That's the whole idea behind APIs. They are bridges between code libraries. All you need to do is create a wrapper class that complies with CodeIgniter's custom library requirements. Make sure to create an initializer function. Then add the functions you need to call your library. Is this your own library? With enough info I can write up the class for you. If you want to keep details private you can contact me either by PM or by my business email address basketcasesoftware at gmail dot com.




Theme © iAndrew 2016 - Forum software by © MyBB