Skip to content

Commit

Permalink
Merge pull request #8961 from obozdag/patch-17
Browse files Browse the repository at this point in the history
docs: Small typos in extending/events.rst
  • Loading branch information
kenjis authored Jun 12, 2024
2 parents cf0e87d + c647c47 commit a13f54d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user_guide_src/source/extending/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Events
#####################################

CodeIgniter's Events feature provides a means to tap into and modify the inner workings of the framework without hacking
core files. When CodeIgniter runs it follows a specific execution process. There may be instances, however, when you'd
core files. When CodeIgniter runs, it follows a specific execution process. There may be instances, however, when you'd
like to cause some action to take place at a particular stage in the execution process. For example, you might want to run
a script right before your controllers get loaded, or right after, or you might want to trigger one of your own scripts
in some other location.

Events work on a *publish/subscribe* pattern, where an event, is triggered at some point during the script execution.
Events work on a *publish/subscribe* pattern, where an event is triggered at some point during the script execution.
Other scripts can "subscribe" to that event by registering with the Events class to let it know they want to perform an
action when that event is triggered.

Expand All @@ -24,7 +24,7 @@ Defining an Event
=================

Most events are defined within the **app/Config/Events.php** file. You can subscribe an action to an event with
the ``Events`` class' ``on()`` method. The first parameter is the name of the event to subscribe to. The second parameter is
the ``Events`` class's ``on()`` method. The first parameter is the name of the event to subscribe to. The second parameter is
a callable that will be run when that event is triggered:

.. literalinclude:: events/001.php
Expand Down

0 comments on commit a13f54d

Please sign in to comment.