summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-26 21:22:37 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-26 21:22:37 +0200
commitd8e1ac7c7fed6310669480fc5be58dff3a479cf5 (patch)
tree344886354bbefd12b72db52ee962c27f67dbb3e8 /user_guide_src/source/general
parent5bc7a2393187a25f832f18552dbdb8defb23e9d1 (diff)
Fix some examples in the user guide
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r--user_guide_src/source/general/styleguide.rst2
-rw-r--r--user_guide_src/source/general/views.rst22
2 files changed, 12 insertions, 12 deletions
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index c97f23817..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()
{
}
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');