Skip to content

Commit

Permalink
Add custom namespace or framework start string to config file
Browse files Browse the repository at this point in the history
  • Loading branch information
corretge committed Jun 3, 2011
1 parent b046ecf commit 24aad62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion trace.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
$ownTraces = explode(PHP_EOL, $ownTraces);

define('XDEBUG_TRACE_GUI_MEMORY_TRIGGER', '0.3');
define('XDEBUG_TRACE_GUI_TIME_TRIGGER', '0.03');
define('XDEBUG_TRACE_GUI_TIME_TRIGGER', '0.03');

define('XDEBUG_TRACE_GUI_CUSTOM_NAMESPACE', 'Corretge\\');
6 changes: 4 additions & 2 deletions trace.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* retrieve the xdebug.trace_format ini set.
*/
$xdebug_trace_format = ini_get('xdebug.trace_format');
$XDEBUG_TRACE_GUI_CUSTOM_NAMESPACE_LEN = strlen(XDEBUG_TRACE_GUI_CUSTOM_NAMESPACE);

$traceFile = $config['directory'] . '/' . $_GET ['file'];

Expand Down Expand Up @@ -99,7 +100,8 @@
switch ($xdebug_trace_format)
{
/**
* xdebug.trace_format = 1
* xdebug.trace_format = 1 Computerized
* @link http://www.xdebug.org/docs/all_settings#trace_format
*/
case 1:
$data = explode("\t", $line);
Expand Down Expand Up @@ -253,7 +255,7 @@
/**
* And all Corretge namespace classes and methods
*/
elseif (substr($trace['function'], 0 , 9) == 'Corretge\\')
elseif (substr($trace['function'], 0 , $XDEBUG_TRACE_GUI_CUSTOM_NAMESPACE_LEN) == XDEBUG_TRACE_GUI_CUSTOM_NAMESPACE)
{
$userFunction = 'Corretge';
}
Expand Down

0 comments on commit 24aad62

Please sign in to comment.