diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-28 13:44:35 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-28 13:44:35 +0200 |
commit | 26c708514e3ca04a1c373efd166b5c17c31e3796 (patch) | |
tree | 8c2241630f236733da08770bcbcf9d17461a0f78 /user_guide_src/source/general | |
parent | ed1aa21dcd5312b2884f140be8c0d2ee94379423 (diff) | |
parent | 8f50b6b36cb743be8b70809279e501c20b8e38e2 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-db-driver
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r-- | user_guide_src/source/general/styleguide.rst | 3 | ||||
-rw-r--r-- | user_guide_src/source/general/views.rst | 22 |
2 files changed, 12 insertions, 13 deletions
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index d8bdd0531..2b91d1cc0 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -94,7 +94,7 @@ overly long and verbose names. class Super_class { - function __construct() + public function __construct() { } @@ -168,7 +168,6 @@ picked up by IDEs:: /** * Encodes string for use in XML * - * @access public * @param string * @return string */ diff --git a/user_guide_src/source/general/views.rst b/user_guide_src/source/general/views.rst index dc65f6c4f..9b7c9daaa 100644 --- a/user_guide_src/source/general/views.rst +++ b/user_guide_src/source/general/views.rst @@ -49,7 +49,7 @@ replace the echo statement with the view loading function:: <?php class Blog extends CI_Controller { - function index() + public function index() { $this->load->view('blogview'); } @@ -74,14 +74,14 @@ might look something like this:: class Page extends CI_Controller { - function index() - { - $data['page_title'] = 'Your title'; - $this->load->view('header'); - $this->load->view('menu'); - $this->load->view('content', $data); - $this->load->view('footer'); - } + public function index() + { + $data['page_title'] = 'Your title'; + $this->load->view('header'); + $this->load->view('menu'); + $this->load->view('content', $data); + $this->load->view('footer'); + } } ?> @@ -126,7 +126,7 @@ Let's try it with your controller file. Open it add this code:: <?php class Blog extends CI_Controller { - function index() + public function index() { $data['title'] = "My Real Title"; $data['heading'] = "My Real Heading"; @@ -164,7 +164,7 @@ Here's a simple example. Add this to your controller:: <?php class Blog extends CI_Controller { - function index() + public function index() { $data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands'); |