forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHooks.php
More file actions
33 lines (28 loc) · 1.06 KB
/
Copy pathHooks.php
File metadata and controls
33 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php namespace Config;
use CodeIgniter\Hooks\Hooks;
/*
* --------------------------------------------------------------------
* Application Hooks
* --------------------------------------------------------------------
* Hooks allow you to tap into the execution of the program without
* modifying or extending core files. This file provides a central
* location to define your hooks, though they can always be added
* at run-time, also, if needed.
*
* You create code that can execute by subscribing to events with
* the 'on()' method. This accepts any form of callable, including
* Closures, that will be executed when the hook is triggered.
*
* Example:
* Hooks::on('create', [$myInstance, 'myMethod']);
*/
/*
* --------------------------------------------------------------------
* Debug Toolbar Listeners.
* --------------------------------------------------------------------
* If you delete, they will no longer be collected.
*/
if (ENVIRONMENT != 'production')
{
Hooks::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
}