summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r--user_guide_src/source/general/models.rst2
-rw-r--r--user_guide_src/source/general/requirements.rst2
-rw-r--r--user_guide_src/source/general/styleguide.rst16
-rw-r--r--user_guide_src/source/general/views.rst22
4 files changed, 26 insertions, 16 deletions
diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst
index b816f958a..0156b0460 100644
--- a/user_guide_src/source/general/models.rst
+++ b/user_guide_src/source/general/models.rst
@@ -55,7 +55,7 @@ model class might look like::
}
.. note:: The functions in the above example use the :doc:`Active
- Record <../database/active_record>` database functions.
+ Record <../database/query_builder>` database functions.
.. note:: For the sake of simplicity in this example we're using $_POST
directly. This is generally bad practice, and a more common approach
diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst
index 05e87961a..d97b7b4b2 100644
--- a/user_guide_src/source/general/requirements.rst
+++ b/user_guide_src/source/general/requirements.rst
@@ -5,4 +5,4 @@ Server Requirements
- `PHP <http://www.php.net/>`_ version 5.2.4 or newer.
- A Database is required for most web application programming. Current
supported databases are MySQL (5.1+), MySQLi, MS SQL, SQLSRV, Oracle,
- PostgreSQL, SQLite, CUBRID, Interbase, ODBC and PDO.
+ PostgreSQL, SQLite, SQLite3, CUBRID, Interbase, ODBC and PDO.
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index d8bdd0531..925954c03 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()
{
}
@@ -149,7 +149,7 @@ months down the line. There is not a required format for comments, but
the following are recommended.
`DocBlock <http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock>`_
-style comments preceding class and method declarations so they can be
+style comments preceding class, method, and property declarations so they can be
picked up by IDEs::
/**
@@ -168,11 +168,21 @@ picked up by IDEs::
/**
* Encodes string for use in XML
*
- * @access public
* @param string
* @return string
*/
function xml_encode($str)
+
+::
+
+ /**
+ * Data for class manipulation
+ *
+ * @var array
+ */
+ public $data
+
+
Use single line comments within code, leaving a blank line between large
comment blocks and code.
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');