Code Igniter: Active Record and Private Class Variables

October 6th, 2007

In the Code Igniter Models documentation it details the Active Record insert, which builds the insert around your class variables, allowing you to do this:

$this->title = $_POST[’title’];
$this->content = $_POST[’content’];
$this->date = time();
$this->db->insert(’entries’, $this);

However there’s a bug: it doesn’t distinguish against private class variables, leaving you with errors like this:

error, no fields […]

Code Igniter: Model Constructor Arguments?

October 1st, 2007

After a month of use, I’m still a big fan of Code Igniter; it’s a lightweight PHP framework that hasn’t got in my way, which is a big factor regarding how long things last. I particular like its flexibility regarding handling URLs, as it doesn’t force you to use its default segment-based approach, providing direct […]

XSL Textarea Collapse Problem

April 3rd, 2007

Using the PHP XSL functions I’ve been implementing a custom form markup language that decouples awkward form validation code from web forms. However I ran across a problem regarding text areas and the XML output method. Put simply, if the output method of your XSL Template is set to XML and you have a blank […]