summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/views.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-26 21:49:09 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-26 21:49:09 +0200
commit3ea6b1fd8fb0492d84c4879e039d11713c9f39a5 (patch)
tree4d6dc4dea352630ab843104b365c44eda0e8526b /user_guide_src/source/general/views.rst
parent160a4e5628aba8b5e35da784ec87037e133c1f05 (diff)
parente92df33e7dda139ee46bddca31aebb4cd5d452fd (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-dh-date-range
Diffstat (limited to 'user_guide_src/source/general/views.rst')
-rw-r--r--user_guide_src/source/general/views.rst22
1 files changed, 11 insertions, 11 deletions
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');