Instead of having a getter and a setter for each column I want to update from the Model I would like to use __get and __set in my Model but it doesnt work.
here's an example:
class Video extends CI_Model {
  private $video_id = null;
  private $title;
  private $url;
  private $thumb;
  private $width;
  private $height;
 public function __set($name, $value){
    if(!$this->video_id) return false;
    if(property_exists($this, $name))
    {
       $data = array(
          $name      => trim($this->security->xss_clean($value)),
      'updated'  => date('Y-m-d H:i:s'),
      );
      if($this->db->update('users', $data, array('video_id' => (int)$this->video_id)))
      {
          return $this->db->affected_rows();
      }
      else
      {
      return $this->db->_error_message();
      }
    }
 }
}
then from my Controller I do:
$this->video->width(780);
which produces:
<b>Fatal error</b>:  Call to undefined method Video::width() in <b>/home/crazy/public_html/dev/application/controllers/admin.php</b> on line <b>169</b><br />
 
     
    