public function createObjectFromData($row) { //Create a new user_model object $blog = new Blog_Model(); //Set the ID on the user model $blog->setId($row->id); //Set the username on the user model $blog->setTitle($row->title); //Set the password on the user model $blog->setContent($row->content); //set the author on the blog model $blog->setAuthor($row->author); //Return the new user object return $blog; }