PHP code example of tobento / app-profiler

1. Go to this page and download the library: Download tobento/app-profiler library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tobento / app-profiler example snippets


use Tobento\App\AppFactory;

// Create the app
$app = (new AppFactory())->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots:
$app->boot(\Tobento\App\Profiler\Boot\Profiler::class);
// ...

// Run the app:
$app->run();

'collectors' => [
    \Tobento\App\Profiler\Collector\Boots::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Events::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Jobs::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Logs::class,
    
    // or
    \Tobento\App\Profiler\Collector\Logs::class => [
        // specify the logger names not to collect messages from:
        'exceptLoggers' => ['null'],
    ],
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Middleware::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\RequestResponse::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Routes::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Session::class,
    
    // or:
    \Tobento\App\Profiler\Collector\Session::class => [
        // specify the data you wont't to hide:
        'hiddens' => [
            '_session_flash_once',
            '_session_flash.old',
        ],
    ],
],

'collectors' => [
    \Tobento\App\Profiler\Collector\StorageQueries::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\Translation::class,
],

'collectors' => [
    \Tobento\App\Profiler\Collector\View::class,
    
    // or you may configure only the data to collect:
    \Tobento\App\Profiler\Collector\View::class => [
        'collectViews' => true,
        'collectAssets' => false,
    ],
],
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php
app/config/profiler.php