We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Is possible to use Phalcon as a library inside an existing CodeIgniter application

Hi, I have been very impressed with the performance offered by Phalcon, I know Phalcon has its own MVC engine, but I already have applications in production using Codeigniter, but would like to use Phalcon as a library, for example using the MVC of CodeIgniter with ORM of Phalcon.

How can I do that? someone has done ?

Greetings.



51.1k

It's simple like this:

Install phalcon, and in CI just make use use of \Phalcon\Mvc\Model. So, instead of :

class Blogmodel extends CI_Model 
{
    var $title   = '';
    var $content = '';
    var $date    = '';
}

use

class Blogmodel extends \Phalcon\Mvc\Model 
{
    var $title   = '';
    var $content = '';
    var $date    = '';
}


745

Awesome, Thanks Calin.