Skip to content

Commit 652bb44

Browse files
authored
Merge pull request #8076 from kenjis/docs-fix-event-points-v2
docs: fix event points descriptions
2 parents 15b2ea4 + f0f5713 commit 652bb44

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

user_guide_src/source/changelogs/v4.4.3.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Deprecations
2424
Bugs Fixed
2525
**********
2626

27+
- **UserGuide:** Fixed the descriptions for ``pre_system`` and ``post_system``
28+
in :ref:`event-points`.
29+
2730
See the repo's
2831
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
2932
for a complete list of bugs fixed.

user_guide_src/source/extending/events.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,19 @@ You can stop simulation by passing false:
8282

8383
.. literalinclude:: events/008.php
8484

85+
.. _event-points:
86+
8587
Event Points
8688
============
8789

8890
The following is a list of available event points within the CodeIgniter core code:
8991

90-
* **pre_system** Called very early during system execution. Only the benchmark and events class have been loaded at this point. No routing or other processes have happened.
92+
* **pre_system** Called early during system execution. The URI, Request, and
93+
Response have been instantiated, but page cache checking, routing, and execution
94+
of "before" controller filters have not yet occurred.
9195
* **post_controller_constructor** Called immediately after your controller is instantiated, but prior to any method calls happening.
92-
* **post_system** Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.
96+
* **post_system** Called right before the final rendered page is sent to the browser,
97+
at the end of system execution, after the execution of "after" controller filters.
9398
* **email** Called after an email sent successfully from ``CodeIgniter\Email\Email``. Receives an array of the ``Email`` class's properties as a parameter.
9499
* **DBQuery** Called after a database query whether successful or not. Receives the ``Query`` object.
95100
* **migrate** Called after a successful migration call to ``latest()`` or ``regress()``. Receives the current properties of ``MigrationRunner`` as well as the name of the method.

user_guide_src/source/installation/upgrade_4xx.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ Hooks
153153
- Instead of CI3's ``$hook['post_controller_constructor']`` you now use
154154
``Events::on('post_controller_constructor', ['MyClass', 'MyFunction']);``, with the namespace ``CodeIgniter\Events\Events;``.
155155
- Events are always enabled, and are available globally.
156+
- The hook point ``pre_controller`` and ``post_controller`` have been removed.
157+
Use :doc:`../incoming/filters` instead.
158+
- The hook point ``display_override`` and ``cache_override`` have been removed.
159+
Because the base methods have been removed.
160+
- The hook point ``post_system`` has moved just before sending the final rendered
161+
page.
156162

157163
Extending the Framework
158164
=======================

0 commit comments

Comments
 (0)