Welcome Guest, Not a member yet? Register   Sign In
How should I handle classes and files on which a Library depends?

I'm considering writing CI Library wrappers for some non-CI specific libraries. However, I do not know where I should place the dependencies. In Cake, there was a concept of a Vendors directory where outside code could be placed. Is there something for CodeIgniter that I simply missed?

For instance, say I want to create a CI Library to wrap some AWS S3 software that is implemented as several class files. Where should I place those class files and how should I require them from within my CI Library in such a way that it would be easy for the person using the Library to install everything in their system?

I usually create a folder 'third_party' inside the application folder.

Including is done via CI's constant APPPATH, (defined in index.php).

So there is no standardized/supported way to handle this?

I'll look into tomcode's solution as an option.

No, there's nothing standardized. As long as You stick with the CI constants APPPATH and BASEPATH Your additions should play nice with any CI installation.

Theme © iAndrew 2016 - Forum software by © MyBB