From b42466419f4b49cf5121f3103f7dd342075458db Mon Sep 17 00:00:00 2001
From: Eric Barnes
<?php
class Blog extends CI_Controller {
- function index()
+ public function index()
{
echo 'Hello World!';
}
- function comments()
+ public function comments()
{
echo 'Look at this!';
}
@@ -187,7 +187,7 @@ class Blog extends CI_Controller {
<?php
class Products extends CI_Controller {
- function shoes($sandals, $id)
+ public function shoes($sandals, $id)
{
echo $sandals;
echo $id;
@@ -220,7 +220,7 @@ specifying any URI segments you'll see your Hello World message by default.
As noted above, the second segment of the URI typically determines which function in the controller gets called. CodeIgniter permits you to override this behavior through the use of the _remap() function:
-function _remap()
+public function _remap()
{
// Some code here...
}
@@ -231,7 +231,7 @@ allowing you to define your own function routing rules.
The overridden function call (typically the second segment of the URI) will be passed as a parameter to the _remap() function:
-function _remap($method)
+public function _remap($method)
{
if ($method == 'some_method')
{
@@ -245,10 +245,10 @@ allowing you to define your own function routing rules.
Any extra segments after the method name are passed into _remap() as an optional second parameter. This array can be used in combination with PHP's call_user_func_array to emulate CodeIgniter's default behavior.
-function _remap($method, $params = array())
+public function _remap($method, $params = array())
{
$method = 'process_'.$method;
- if (method_exists($this, $method)
+ if (method_exists($this, $method))
{
return call_user_func_array(array($this, $method), $params);
}
@@ -270,7 +270,7 @@ be called by the output class instead of echoing the finalized data directly. Th
Here is an example:
-function _output($output)
+public function _output($output)
{
echo $output;
}
@@ -298,7 +298,7 @@ the available methods in the Output Class
underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:
-function _utility()
+private function _utility()
{
// some code
}
@@ -346,7 +346,7 @@ called if the URL contains only the sub-folder. Simply name your default contro
<?php
class Blog extends CI_Controller {
- function __construct()
+ public function __construct()
{
parent::__construct();
// Your own constructor code
--
cgit v1.2.3-24-g4f1b
From f21a4649afaf4726c8b2feb36dcec9e4fbd95661 Mon Sep 17 00:00:00 2001
From: Eric Barnes
Date: Thu, 10 Mar 2011 20:46:05 -0500
Subject: Added location of config for changing logging threshold. Fixes #120
---
user_guide/general/errors.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'user_guide/general')
diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html
index a39304da9..ece80b2fd 100644
--- a/user_guide/general/errors.html
+++ b/user_guide/general/errors.html
@@ -115,7 +115,7 @@ log_message('info', 'The purpose of some variable is to provide some value.');Note: In order for the log file to actually be written, the
- "logs" folder must be writable. In addition, you must set the "threshold" for logging.
+ "logs" folder must be writable. In addition, you must set the "threshold" for logging in application/config/config.php.
You might, for example, only want error messages to be logged, and not the other two types.
If you set it to zero logging will be disabled.
--
cgit v1.2.3-24-g4f1b