mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Update User Guide
This commit is contained in:
parent
bbc70cc095
commit
86ae0616c6
@ -329,7 +329,9 @@
|
||||
</div>
|
||||
<section id="what-is-a-controller">
|
||||
<h2><a class="toc-backref" href="#id1">What is a Controller?</a><a class="headerlink" href="#what-is-a-controller" title="Permalink to this headline"></a></h2>
|
||||
<p>A Controller is simply a class file that handles a HTTP request. <a class="reference internal" href="routing.html"><span class="doc">URI Routing</span></a> associates a URI with a controller.</p>
|
||||
<p>A Controller is simply a class file that handles a HTTP request.
|
||||
<a class="reference internal" href="routing.html"><span class="doc">URI Routing</span></a> associates a URI with a controller. It returns a
|
||||
view string or <code class="docutils literal notranslate"><span class="pre">Response</span></code> object.</p>
|
||||
<p>Every controller you create should extend <code class="docutils literal notranslate"><span class="pre">BaseController</span></code> class.
|
||||
This class provides several features that are available to all of your controllers.</p>
|
||||
</section>
|
||||
|
@ -313,6 +313,8 @@
|
||||
<li><p>CI4 provides <a class="reference internal" href="../incoming/incomingrequest.html"><span class="doc">Request</span></a> and <a class="reference internal" href="../outgoing/response.html"><span class="doc">Responses</span></a>
|
||||
objects for you to work with - more powerful than the CI3-way.</p></li>
|
||||
<li><p>If you want a base controller (<code class="docutils literal notranslate"><span class="pre">MY_Controller</span></code> in CI3), use <strong>app/Controllers/BaseController.php</strong>.</p></li>
|
||||
<li><p>Calling <code class="docutils literal notranslate"><span class="pre">echo</span></code> within Controllers, as in CI3, is still supported, but
|
||||
it is recommended that a string or Response object be returned from Controllers.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="upgrade-guide">
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user