Welcome Guest, Not a member yet? Register   Sign In
Using Code Igniter libraries outside of codeigniter
#1

[eluser]Unknown[/eluser]
Hi everyone, i'm new to the CI forums but i've been using CI for close to a year. I recently worked on a project where I couldn't use CI. Its a pretty small registration system. However, I needed to paginate some results so I had to search the web for some pagination scripts. The ones i've seen are sort of unsatisfactory so i'm looking to adapt codeigniter's libraries for my project. My question is how can i use codeigniter's libraries outside codeigniter? i'd like to use the pagination library and maybe the validation library in a small project i'm developing with redbeans. Any suggestions will be appreciated...
#2

[eluser]john_j[/eluser]
you may try this (though I haven't used it) - https://github.com/philsturgeon/codeigniter-restserver

or, i think you can use php curl and call the url(CI controller/view) that you need.
#3

[eluser]Unknown[/eluser]
Thanks but I am not looking for a whole new API or mini framework...What I want is simple...I have a little web design project done with a lot of object oriented PHP...I'd like to use only one or two libraries from codeignter framework and nothing else...how do i achieve that?
#4

[eluser]DarkManX[/eluser]
Dont think you can do in general. there may be some libraries working just by themselves but if a library using part of the CI you will be forced to rewrite the code.
#5

[eluser]Aken[/eluser]
It will depend on the library. The pagination library has very little ties to CI inside of it. Copy the code, and find the parts that reference the CI object, and what you need to do to replace them. Shouldn't take very long at all.

Other libraries depend on CI and would be very complicated to port out of it.




Theme © iAndrew 2016 - Forum software by © MyBB