2 isset( $GLOBALS['_kint_settings'] ) or $GLOBALS['_kint_settings'] = array();
3 $_kintSettings = &$GLOBALS['_kint_settings'];
6 /** @var bool if set to false, kint will become silent, same as Kint::enabled(false) or Kint::$enabled = false */
7 $_kintSettings['enabled'] = true;
11 * @var bool whether to display where kint was called from
13 $_kintSettings['displayCalledFrom'] = true;
17 * @var string format of the link to the source file in trace entries. Use %f for file path, %l for line number.
18 * Defaults to xdebug.file_link_format if not set.
20 * [!] EXAMPLE (works with for phpStorm and RemoteCall Plugin):
22 * $_kintSettings['fileLinkFormat'] = 'http://localhost:8091/?message=%f:%l';
25 $_kintSettings['fileLinkFormat'] = ini_get( 'xdebug.file_link_format' );
29 * @var array base directories of your application that will be displayed instead of the full path. Keys are paths,
30 * values are replacement strings
32 * Defaults to array( $_SERVER['DOCUMENT_ROOT'] => '<ROOT>' )
34 * [!] EXAMPLE (for Kohana framework):
36 * $_kintSettings['appRootDirs'] = array(
37 * APPPATH => 'APPPATH', // make sure the constants are already defined at the time of including this config file
38 * SYSPATH => 'SYSPATH',
39 * MODPATH => 'MODPATH',
40 * DOCROOT => 'DOCROOT',
43 * [!] EXAMPLE #2 (for a semi-universal approach)
45 * $_kintSettings['appRootDirs'] = array(
46 * realpath( __DIR__ . '/../../..' ) => 'ROOT', // go up as many levels as needed in the realpath() param
49 * $_kintSettings['fileLinkFormat'] = 'http://localhost:8091/?message=%f:%l';
52 $_kintSettings['appRootDirs'] = isset( $_SERVER['DOCUMENT_ROOT'] )
53 ? array( $_SERVER['DOCUMENT_ROOT'] => '<ROOT>' )
57 /** @var int max length of string before it is truncated and displayed separately in full. Zero or false to disable */
58 $_kintSettings['maxStrLength'] = 80;
60 /** @var array possible alternative char encodings in order of probability, eg. array('windows-1251') */
61 $_kintSettings['charEncodings'] = array(
63 'Windows-1252', # Western; includes iso-8859-1, replace this with windows-1251 if you have Russian code
66 # all other charsets cannot be differentiated by PHP and/or are not supported by mb_* functions,
67 # I need a better means of detecting the codeset, no idea how though :(
69 // 'iso-8859-13', # Baltic
70 // 'windows-1251', # Cyrillic
71 // 'windows-1250', # Central European
72 // 'shift_jis', # Japanese
73 // 'iso-2022-jp', # Japanese
77 /** @var int max array/object levels to go deep, if zero no limits are applied */
78 $_kintSettings['maxLevels'] = 7;
81 /** @var string name of theme for rich view */
82 $_kintSettings['theme'] = 'original';
85 /** @var bool enable detection when Kint is command line. Formats output with whitespace only; does not HTML-escape it */
86 $_kintSettings['cliDetection'] = true;
88 /** @var bool in addition to above setting, enable detection when Kint is run in *UNIX* command line.
89 * Attempts to add coloring, but if seen as plain text, the color information is visible as gibberish
91 $_kintSettings['cliColors'] = true;
94 unset( $_kintSettings );