PHP code example of kilbiller / debug_kit

1. Go to this page and download the library: Download kilbiller/debug_kit 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/ */

    

kilbiller / debug_kit example snippets


    CakePlugin::load('DebugKit');

class AppController extends Controller {
         public $components = array('DebugKit.Toolbar');
}

public $components = array(
    'DebugKit.Toolbar' => array(/* array of settings */)
);

public $components = array('DebugKit.Toolbar' => array(
    'panels' => array('MyCustom', 'timer'=>false)
    )
);

public $components = array(
        'DebugKit.Toolbar' => array('panels' => array('MyCustom', 'timer' => false))
);

public $components = array(
        'DebugKit.Toolbar' => array('history' => 10)
);

public $components = array(
    'DebugKit.Toolbar' => array('autoRun' => false)
);


App::uses('DebugPanel', 'DebugKit.Lib');

/**
 * My Custom Panel
 */
class MyCustomPanel extends DebugPanel {
        ...
}

class MyCustomPanel extends DebugPanel {
        public $javascript = array(
                '/my_plugin/js/custom_panel.js'
        );
}

startup(Controller $controller)

beforeRender(Controller $controller)

/**
 * beforeRender callback - grabs request params
 *
 * @return array
 */
 public function beforeRender(Controller $controller) {
     return $controller->params;
 }

class MyCustomPanel extends DebugPanel {
    public $plugin = 'MyPlugin';
        ...
}

public $components = array('DebugKit.Toolbar' => array(
    'panels' => array('MyPlugin.MyCustom')
));

public $components = array('DebugKit.Toolbar' => array(
        'cache' => array('engine' => 'Memcache', 'servers' => array('127.0.0.1:11211'))
        )
);