CodeIgniter Forums
Embedding CodeIgniter into another framework -- CI for a sub-site of the main site - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Embedding CodeIgniter into another framework -- CI for a sub-site of the main site (/showthread.php?tid=17738)



Embedding CodeIgniter into another framework -- CI for a sub-site of the main site - El Forum - 04-14-2009

[eluser]Unknown[/eluser]
Hello there CodeIgniters,

I'm in a similar situation to this thread where I wish to embed CI into another framework (Moodle in this case). I'm developing an extension to Moodle that is built on top of CI, where:
http://my-moodle-site/ is where the primary Moodle site lives.
http://my-moodle-site/my-ci-app/ is where the CI application lives.

The CI app is a "subset", an addition, to the main Moodle site. Moodle is unfortunately not quite as cleanly designed as CI, and this leads to problems when combining both. (E.g. Moodle uses a lot of globals.)

Can I somehow include both CI on the same page as a Moodle page, and somehow isolate it so it won't conflict with Moodle? (Most of you won't know anything about Moodle, so this is really a CI question.) Can I load CI so it's "encapsulated" into its own little namespace somehow?

I read the "Dip into CI" Wiki entry but frankly I don't understand all of it.

Thank you for any pointers!


Embedding CodeIgniter into another framework -- CI for a sub-site of the main site - El Forum - 04-14-2009

[eluser]Unknown[/eluser]
A specific problem I'm running into: different functions have the same name in both Moodle and CI. How could I isolate the CI functions into their own namespace? So they don't conflict with anything else.