From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/general/models.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'user_guide/general/models.html') diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 3f1c1e224..18e575892 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -12,7 +12,7 @@ @@ -78,7 +78,7 @@ Models

What is a Model?

-

Models are PHP classes that are designed to work with information in your database. For example, let's say +

Models are PHP classes that are designed to work with information in your database. For example, let's say you use Code Igniter to manage a blog. You might have a model class that contains functions to insert, update, and retrieve your blog data. Here is an example of what such a model class might look like:

@@ -127,7 +127,7 @@ class Blogmodel extends Model {

Anatomy of a Model

-

Model classes are stored in your application/models/ folder. They can be nested within sub-folders if you +

Model classes are stored in your application/models/ folder. They can be nested within sub-folders if you want this type of organization.

The basic prototype for a model class is this:

@@ -142,7 +142,7 @@ class Model_name extends Model {
    }
} -

Where Model_name is the name of your class. Class names must be capitalized. +

Where Model_name is the name of your class. Class names must be capitalized. Make sure your class extends the base Model class.

The file name will be a lower case version of your class name. For example, if your class is this:

@@ -217,13 +217,13 @@ class Blog_controller extends Controller {