25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.5KB

  1. <?php
  2. namespace Config;
  3. use CodeIgniter\Config\BaseConfig;
  4. use CodeIgniter\Debug\Toolbar\Collectors\Database;
  5. use CodeIgniter\Debug\Toolbar\Collectors\Events;
  6. use CodeIgniter\Debug\Toolbar\Collectors\Files;
  7. use CodeIgniter\Debug\Toolbar\Collectors\Logs;
  8. use CodeIgniter\Debug\Toolbar\Collectors\Routes;
  9. use CodeIgniter\Debug\Toolbar\Collectors\Timers;
  10. use CodeIgniter\Debug\Toolbar\Collectors\Views;
  11. /**
  12. * --------------------------------------------------------------------------
  13. * Debug Toolbar
  14. * --------------------------------------------------------------------------
  15. *
  16. * The Debug Toolbar provides a way to see information about the performance
  17. * and state of your application during that page display. By default it will
  18. * NOT be displayed under production environments, and will only display if
  19. * `CI_DEBUG` is true, since if it's not, there's not much to display anyway.
  20. */
  21. class Toolbar extends BaseConfig
  22. {
  23. /**
  24. * --------------------------------------------------------------------------
  25. * Toolbar Collectors
  26. * --------------------------------------------------------------------------
  27. *
  28. * List of toolbar collectors that will be called when Debug Toolbar
  29. * fires up and collects data from.
  30. *
  31. * @var string[]
  32. */
  33. public $collectors = [
  34. Timers::class,
  35. Database::class,
  36. Logs::class,
  37. Views::class,
  38. // \CodeIgniter\Debug\Toolbar\Collectors\Cache::class,
  39. Files::class,
  40. Routes::class,
  41. Events::class,
  42. \Myth\Auth\Collectors\Auth::class,
  43. ];
  44. /**
  45. * --------------------------------------------------------------------------
  46. * Collect Var Data
  47. * --------------------------------------------------------------------------
  48. *
  49. * If set to false var data from the views will not be colleted. Usefull to
  50. * avoid high memory usage when there are lots of data passed to the view.
  51. *
  52. * @var bool
  53. */
  54. public $collectVarData = true;
  55. /**
  56. * --------------------------------------------------------------------------
  57. * Max History
  58. * --------------------------------------------------------------------------
  59. *
  60. * `$maxHistory` sets a limit on the number of past requests that are stored,
  61. * helping to conserve file space used to store them. You can set it to
  62. * 0 (zero) to not have any history stored, or -1 for unlimited history.
  63. *
  64. * @var int
  65. */
  66. public $maxHistory = 20;
  67. /**
  68. * --------------------------------------------------------------------------
  69. * Toolbar Views Path
  70. * --------------------------------------------------------------------------
  71. *
  72. * The full path to the the views that are used by the toolbar.
  73. * This MUST have a trailing slash.
  74. *
  75. * @var string
  76. */
  77. public $viewsPath = SYSTEMPATH . 'Debug/Toolbar/Views/';
  78. /**
  79. * --------------------------------------------------------------------------
  80. * Max Queries
  81. * --------------------------------------------------------------------------
  82. *
  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.
  87. *
  88. * `$maxQueries` defines the maximum amount of queries that will be stored.
  89. *
  90. * @var int
  91. */
  92. public $maxQueries = 100;
  93. }