From 20292311636837e120d205e470e41826820feb46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:29:10 +0300 Subject: Change class filenames to Ucfirst --- user_guide_src/source/general/models.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/general/models.rst') diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index a028a9569..c4fd12476 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -84,8 +84,7 @@ Where **Model_name** is the name of your class. Class names **must** have the first letter capitalized with the rest of the name lowercase. 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:: +The file name must match the class name. For example, if this is your class:: class User_model extends CI_Model { @@ -98,7 +97,7 @@ example, if your class is this:: Your file will be this:: - application/models/user_model.php + application/models/User_model.php Loading a Model =============== @@ -111,7 +110,7 @@ the following method:: If your model is located in a sub-directory, include the relative path from your models directory. For example, if you have a model located at -*application/models/blog/queries.php* you'll load it using:: +*application/models/blog/Queries.php* you'll load it using:: $this->load->model('blog/queries'); @@ -181,4 +180,4 @@ database. The following options for connecting are available to you: $config['pconnect'] = FALSE; $config['db_debug'] = TRUE; - $this->load->model('Model_name', '', $config); \ No newline at end of file + $this->load->model('model_name', '', $config); \ No newline at end of file -- cgit v1.2.3-24-g4f1b