Following on from a previous question by jasmad...
I am in the process of migrating an application from CodeIgniter to Phalcon, and I'm looking with eagle eyes (puh intended) at the models, which to me seem the easiest place to start (as well as having the biggest performance improvement for my project).
Are there any kind of tutorials/guides to migrating models from CodeIgniter to Phalcon knocking about? I've got a shedload of queries that look like:
$this->db->select("a.*")
->from("tableA a")
->some
->other
->conditions;
$this->b_model->join($this->db, "a.idB")
and b_model might have a fn like this:
function join (&$db, $col) {
$db->join("tableB b", $col . " = b.id", "left");
->select ("b.*");
}
Those are much simplified versions I've just typed up for conciseness, but hopefully it'll give an idea what I'm trying to achieve.
Just as a note, I don't want to use the in-built Phalcon relationship doodahs for reasons that are longwinded and will detract from the focus of the post. I just want to change those queries in to a PHQL query builder thing, also utilising some existing libraries & helpers that the CodeIgniter models use.
Anyway, yeah, is there some kind of guide for folk wanting to migrate? I don't mind writing up my experiences if there isn't, but it's always nice to have a guiding hand from someone who's done it before ... :)