diff options
author | admin <devnull@localhost> | 2006-10-21 21:44:22 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-21 21:44:22 +0200 |
commit | e334c472fb4be44feec3a73402fc4a2b062cbfc0 (patch) | |
tree | 553f17d67e7ef652016ec85b2a576bb2210f0ff8 /user_guide/general/controllers.html | |
parent | bd6bee75dd26ade1c8d9cfd104bb913065797c59 (diff) |
Diffstat (limited to 'user_guide/general/controllers.html')
-rw-r--r-- | user_guide/general/controllers.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index f83cab89f..fd6a4bdf0 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -12,7 +12,7 @@ <script type="text/javascript" src="../nav/moo.fx.js"></script>
<script type="text/javascript">
window.onload = function() {
- myHeight = new fx.Height('nav', {duration: 400});
+ myHeight = new fx.Height('nav', {duration: 400});
myHeight.hide();
}
</script>
@@ -137,14 +137,14 @@ class <var>blog</var> extends Controller {<br /> }<br />
?></code>
-<p>Also, always make sure your controller <dfn>extends</dfn> the parent controller class so that it can inherit all its functions.</p>
+<p>Also, always make sure your controller <dfn>extends</dfn> the parent controller class so that it can inherit all its functions.</p>
<a name="functions"></a>
<h2>Functions</h2>
-<p>In the above example the function name is <dfn>index()</dfn>. The "index" function is always loaded by default if the
+<p>In the above example the function name is <dfn>index()</dfn>. The "index" function is always loaded by default if the
<strong>second segment</strong> of the URI is empty. Another way to show your "Hello World" message would be this:</p>
<code>www.your-site.com/index.php/<var>blog</var>/<samp>index</samp>/</code>
@@ -208,8 +208,8 @@ passed to your function will be the re-routed ones.</p> <a name="default"></a>
<h2>Defining a Default Controller</h2>
-<p>Code Igniter can be told to load a default controller when a URI is not present,
-as will be the case when only your site root URL is requested. To specify a default controller, open
+<p>Code Igniter can be told to load a default controller when a URI is not present,
+as will be the case when only your site root URL is requested. To specify a default controller, open
your <dfn>application/config/routes.php</dfn> file and set this variable:</p>
<code>$route['default_controller'] = '<var>Blog</var>';</code>
@@ -230,8 +230,8 @@ Code Igniter permits you to override this behavior through the use of the <kbd>_ // Some code here...<br />
}</code>
-<p class="important"><strong>Important:</strong> If your controller contains a function named <kbd>_remap()</kbd>, it will <strong>always</strong>
-get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called,
+<p class="important"><strong>Important:</strong> If your controller contains a function named <kbd>_remap()</kbd>, it will <strong>always</strong>
+get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called,
allowing you to define your own function routing rules.</p>
<p>The overridden function call (typically the second segment of the URI) will be passed as a parameter the <kbd>_remap()</kbd> function:</p>
@@ -256,11 +256,11 @@ allowing you to define your own function routing rules.</p> <h2>Processing Output</h2>
<p>Code Igniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this can be found in the
-<a href="views.html">Views</a> and <a href="../libraries/output.html">Output class</a> pages. In some cases, however, you might want to
-post-process the finalized data in some way and send it to the browser yourself. Code Igniter permits you to
+<a href="views.html">Views</a> and <a href="../libraries/output.html">Output class</a> pages. In some cases, however, you might want to
+post-process the finalized data in some way and send it to the browser yourself. Code Igniter permits you to
add a function named <dfn>_output()</dfn> to your controller that will receive the finalized output data.
-<p><strong>Important:</strong> If your controller contains a function named <kbd>_output()</kbd>, it will <strong>always</strong>
+<p><strong>Important:</strong> If your controller contains a function named <kbd>_output()</kbd>, it will <strong>always</strong>
be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.</p>
<p>Here is an example:</p>
@@ -364,7 +364,7 @@ Constructors can't return a value, but they can do some default work.</p> <a name="reserved"></a>
<h2>Reserved Function Names</h2>
-<p>Since your controller classes will extend the main application controller you
+<p>Since your controller classes will extend the main application controller you
must be careful not to name your functions identically to the ones used by that class, otherwise your local functions
will override them. The following
is a list of reserved names. Do not name your controller functions any of these:</p>
|