Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix. Toolbar init view Error #2490

Merged
merged 4 commits into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Events extends BaseCollector
*/
public function __construct()
{
$this->viewer = Services::renderer(null, true);
$this->viewer = Services::renderer();
}

//--------------------------------------------------------------------
Expand Down
22 changes: 12 additions & 10 deletions user_guide_src/source/testing/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ Choosing What to Show

CodeIgniter ships with several Collectors that, as the name implies, collect data to display on the toolbar. You
can easily make your own to customize the toolbar. To determine which collectors are shown, again head over to
the App configuration file::

public $toolbarCollectors = [
'CodeIgniter\Debug\Toolbar\Collectors\Timers',
'CodeIgniter\Debug\Toolbar\Collectors\Database',
'CodeIgniter\Debug\Toolbar\Collectors\Logs',
'CodeIgniter\Debug\Toolbar\Collectors\Views',
'CodeIgniter\Debug\Toolbar\Collectors\Cache',
'CodeIgniter\Debug\Toolbar\Collectors\Files',
'CodeIgniter\Debug\Toolbar\Collectors\Routes',
the **app/Config/Toolbar.php** configuration file::

public $collectors = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have the ::class part.

or '\CodeIgniter\Debug\Toolbar\Collectors\Timers::class' should be changed to \CodeIgniter\Debug\Toolbar\Collectors\Timers::class

Copy link
Contributor Author

@nyufeng nyufeng Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. you are right.

'\CodeIgniter\Debug\Toolbar\Collectors\Timers::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Database::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Logs::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Views::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Cache::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Files::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Routes::class',
'\CodeIgniter\Debug\Toolbar\Collectors\Events::class',
];

Comment out any collectors that you do not want to show. Add custom Collectors here by providing the fully-qualified
Expand All @@ -100,6 +101,7 @@ The Collectors that ship with CodeIgniter are:
* **Cache** Will display information about cache hits and misses, and execution times.
* **Files** displays a list of all files that have been loaded during this request.
* **Routes** displays information about the current route and all routes defined in the system.
* **Events** displays a list of all events that have been loaded during this request.

Setting Benchmark Points
========================
Expand Down