5
use CodeIgniter\Config\BaseConfig;
6
use CodeIgniter\Debug\Toolbar\Collectors\Database;
7
use CodeIgniter\Debug\Toolbar\Collectors\Events;
8
use CodeIgniter\Debug\Toolbar\Collectors\Files;
9
use CodeIgniter\Debug\Toolbar\Collectors\Logs;
10
use CodeIgniter\Debug\Toolbar\Collectors\Routes;
11
use CodeIgniter\Debug\Toolbar\Collectors\Timers;
12
use CodeIgniter\Debug\Toolbar\Collectors\Views;
15
* --------------------------------------------------------------------------
17
* --------------------------------------------------------------------------
19
* The Debug Toolbar provides a way to see information about the performance
20
* and state of your application during that page display. By default it will
21
* NOT be displayed under production environments, and will only display if
22
* `CI_DEBUG` is true, since if it's not, there's not much to display anyway.
24
class Toolbar extends BaseConfig
27
* --------------------------------------------------------------------------
29
* --------------------------------------------------------------------------
31
* List of toolbar collectors that will be called when Debug Toolbar
32
* fires up and collects data from.
34
* @var list<class-string>
36
public array $collectors = [
41
// \CodeIgniter\Debug\Toolbar\Collectors\Cache::class,
48
* --------------------------------------------------------------------------
50
* --------------------------------------------------------------------------
52
* If set to false var data from the views will not be collected. Useful to
53
* avoid high memory usage when there are lots of data passed to the view.
55
public bool $collectVarData = true;
58
* --------------------------------------------------------------------------
60
* --------------------------------------------------------------------------
62
* `$maxHistory` sets a limit on the number of past requests that are stored,
63
* helping to conserve file space used to store them. You can set it to
64
* 0 (zero) to not have any history stored, or -1 for unlimited history.
66
public int $maxHistory = 20;
69
* --------------------------------------------------------------------------
71
* --------------------------------------------------------------------------
73
* The full path to the the views that are used by the toolbar.
74
* This MUST have a trailing slash.
76
public string $viewsPath = SYSTEMPATH . 'Debug/Toolbar/Views/';
79
* --------------------------------------------------------------------------
81
* --------------------------------------------------------------------------
83
* If the Database Collector is enabled, it will log every query that the
84
* the system generates so they can be displayed on the toolbar's timeline
85
* and in the query log. This can lead to memory issues in some instances
86
* with hundreds of queries.
88
* `$maxQueries` defines the maximum amount of queries that will be stored.
90
public int $maxQueries = 100;
93
* --------------------------------------------------------------------------
95
* --------------------------------------------------------------------------
97
* Contains an array of directories that will be watched for changes and
98
* used to determine if the hot-reload feature should reload the page or not.
99
* We restrict the values to keep performance as high as possible.
101
* NOTE: The ROOTPATH will be prepended to all values.
105
public array $watchedDirectories = [
110
* --------------------------------------------------------------------------
111
* Watched File Extensions
112
* --------------------------------------------------------------------------
114
* Contains an array of file extensions that will be watched for changes and
115
* used to determine if the hot-reload feature should reload the page or not.
119
public array $watchedExtensions = [
120
'php', 'css', 'js', 'html', 'svg', 'json', 'env',