Skip to content

Commit

Permalink
Define correct method visibility in the hello world tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
HighwayofLife authored and BRMatt committed Oct 1, 2010
1 parent c655f97 commit a09e8d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guide/tutorials.helloworld.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Create the file `application/classes/controller/hello.php` in your application f

Class Controller_Hello extends Controller
{
function action_index()
public function action_index()
{
echo 'hello, world!';
}
Expand All @@ -29,7 +29,7 @@ Lets see what's going on here:
: This line declares our controller, each controller class has to be prefixed with `Controller_` and an underscore delimited path to the folder the controller is in (see [Conventions and styles](about.conventions) for more info). Each controller should also extend the base `Controller` class which provides a standard structure for controllers.


`function action_index()`
`public function action_index()`
: This defines the "index" action of our controller. Kohana will attempt to call this action if the user hasn't specified an action. (See [Routes, URLs and Links](tutorials.urls))

`echo 'hello, world!';`
Expand All @@ -55,7 +55,7 @@ Lets change our original controller slightly:
{
public $template = 'site';

function action_index()
public function action_index()
{
$this->template->message = 'hello, world!';
}
Expand Down

0 comments on commit a09e8d3

Please sign in to comment.