summaryrefslogtreecommitdiffstats
path: root/user_guide/general/models.html
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-10 22:41:23 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-10 22:41:23 +0100
commite79d41a0de8a21db83fdb6b3e25ae65c9923c46d (patch)
tree6eddba47a27b9ee5d7a53315aaaaa7bf86df856c /user_guide/general/models.html
parent00921a54feb7fde4444401ab93d77780c6c3bb96 (diff)
Userguide tweaks to show proper PHP 5 examples and removing the compat helper from the menu.
Diffstat (limited to 'user_guide/general/models.html')
-rw-r--r--user_guide/general/models.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/user_guide/general/models.html b/user_guide/general/models.html
index 35ab08d20..466996648 100644
--- a/user_guide/general/models.html
+++ b/user_guide/general/models.html
@@ -83,10 +83,10 @@ class&nbsp;Blogmodel&nbsp;extends&nbsp;CI_Model&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;var $content = '';<br />
&nbsp;&nbsp;&nbsp;&nbsp;var $date&nbsp;&nbsp;&nbsp; = '';<br />
<br />
-&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;Blogmodel()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;__construct()<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Call the Model constructor<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::CI_Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::__construct();<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;get_last_ten_entries()<br />
@@ -128,9 +128,9 @@ want this type of organization.</p>
<code>
class&nbsp;<var>Model_name</var>&nbsp;extends&nbsp;CI_Model&nbsp;{<br />
<br />
-&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>Model_name</var>()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>__construct</var>()<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::CI_Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::__construct();<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code>
@@ -142,9 +142,9 @@ Make sure your class extends the base Model class.</p>
<code>
class&nbsp;<var>User_model</var>&nbsp;extends&nbsp;CI_Model&nbsp;{<br />
<br />
-&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>User_model</var>()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>__construct</var>()<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::CI_Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::__construct();<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code>