Skip to content

Commit bffd864

Browse files
committed
docs: update "What has been changed" in Upgrade Controllers
1 parent c704227 commit bffd864

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

user_guide_src/source/incoming/controllers.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ A Controller is simply a class file that handles a HTTP request. :doc:`URI Routi
1616
Every controller you create should extend ``BaseController`` class.
1717
This class provides several features that are available to all of your controllers.
1818

19+
.. _controller-constructor:
20+
1921
Constructor
2022
***********
2123

user_guide_src/source/installation/upgrade_controllers.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ What has been changed
1515
=====================
1616

1717
- Since namespaces have been added to CodeIgniter 4, the controllers must be changed to support namespaces.
18-
- Controllers don't use constructors any more (to invoke CI 'magic') unless those are part of base controllers you make.
19-
- CI4 provides Request and Response objects for you to work with - more powerful than the CI3-way.
20-
- If you want a base controller (``MY_Controller`` in CI3), make it where you like,
21-
e.g., BaseController extends Controller, and then have your controllers extend it
18+
- The constructor of CI4 Controller does not automatically load core classes into the properties.
19+
- CI4's Controller has a special constructor :ref:`initController() <controller-constructor>`.
20+
- CI4 provides :doc:`Request </incoming/incomingrequest>` and :doc:`Responses </outgoing/response>`
21+
objects for you to work with - more powerful than the CI3-way.
22+
- If you want a base controller (``MY_Controller`` in CI3), use **app/Controllers/BaseController.php**.
2223

2324
Upgrade Guide
2425
=============

0 commit comments

Comments
 (0)