From 85f8951c3c3dd1df84e3acfcd116df4eabd943e6 Mon Sep 17 00:00:00 2001 From: Jonathan Lamim Date: Thu, 30 Jan 2020 17:15:07 -0300 Subject: [PATCH] Adding Events information in the 'Upgrading from 3.x to 4.x' section --- user_guide_src/source/installation/upgrade_4xx.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user_guide_src/source/installation/upgrade_4xx.rst b/user_guide_src/source/installation/upgrade_4xx.rst index 875ec3ce91b1..58240a600a0d 100644 --- a/user_guide_src/source/installation/upgrade_4xx.rst +++ b/user_guide_src/source/installation/upgrade_4xx.rst @@ -102,6 +102,14 @@ subforum for an up-to-date list! - Helpers are pretty much the same as before, though some have been simplified +**Events** + +- Hooks have been replaced by Events +- Instead of CI3's ``$hook['post_controller_constructor']`` you now use + ``Events::on('post_controller_constructor', ['MyClass', 'MyFunction']);``, + with the namespace ``CodeIgniter\Events\Events;`` +- Events are always enabled, and are available globally + **Extending the framework** - You don't need a ``core`` folder to hold ``MY_...`` framework