TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Utility\DebugUtility Class Reference
Inheritance diagram for TYPO3\CMS\Core\Utility\DebugUtility:
t3lib_utility_Debug

Static Public Member Functions

static debug ($var='', $header='', $group='Debug')
 
static convertVariableToString ($variable)
 
static debugInPopUpWindow ($debugVariable, $header='Debug', $group='Debug')
 
static debugTrail ()
 
static debugRows ($rows, $header='', $returnHTML=FALSE)
 
static ordinalValue ($string, $characters=100)
 
static viewArray ($array_in)
 
static printArray ($array_in)
 

Public Attributes

const DEBUG_TABLE_TEMPLATE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Class to handle debug

Author
Steffen Kamper steff.nosp@m.en@t.nosp@m.ypo3..nosp@m.org

Definition at line 21 of file DebugUtility.php.

Member Function Documentation

◆ convertVariableToString()

static TYPO3\CMS\Core\Utility\DebugUtility::convertVariableToString (   $variable)
static

Converts a variable to a string

Parameters
mixed$variable
Returns
string

Definition at line 104 of file DebugUtility.php.

◆ debug()

static TYPO3\CMS\Core\Utility\DebugUtility::debug (   $var = '',
  $header = '',
  $group = 'Debug' 
)
static

◆ debugInPopUpWindow()

static TYPO3\CMS\Core\Utility\DebugUtility::debugInPopUpWindow (   $debugVariable,
  $header = 'Debug',
  $group = 'Debug' 
)
static

Opens a debug message inside a popup window

Parameters
mixed$debugVariable
string$header
string$group

Definition at line 126 of file DebugUtility.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

◆ debugRows()

static TYPO3\CMS\Core\Utility\DebugUtility::debugRows (   $rows,
  $header = '',
  $returnHTML = FALSE 
)
static

Displays an array as rows in a table. Useful to debug output like an array of database records.

Parameters
mixed$rowsArray of arrays with similar keys
string$headerTable header
boolean$returnHTMLIf TRUE, will return content instead of echo'ing out.
Returns
void Outputs to browser.

Definition at line 196 of file DebugUtility.php.

References TYPO3\CMS\Core\Utility\DebugUtility\debug().

◆ debugTrail()

static TYPO3\CMS\Core\Utility\DebugUtility::debugTrail ( )
static

Displays the "path" of the function call stack in a string, using debug_backtrace

Returns
string

Definition at line 172 of file DebugUtility.php.

References TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Core\Database\DatabaseConnection\explain(), and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ ordinalValue()

static TYPO3\CMS\Core\Utility\DebugUtility::ordinalValue (   $string,
  $characters = 100 
)
static

Returns a string with a list of ascii-values for the first $characters characters in $string

Parameters
string$stringString to show ASCII value for
integer$charactersNumber of characters to show
Returns
string The string with ASCII values in separated by a space char.

Definition at line 246 of file DebugUtility.php.

◆ printArray()

static TYPO3\CMS\Core\Utility\DebugUtility::printArray (   $array_in)
static

Prints an array

Parameters
mixed$array_inArray to print visually (in a table).
Returns
void
See also
viewArray()

Definition at line 317 of file DebugUtility.php.

◆ viewArray()

static TYPO3\CMS\Core\Utility\DebugUtility::viewArray (   $array_in)
static

Returns HTML-code, which is a visual representation of a multidimensional array use ::print_array() in order to print an array Returns FALSE if $array_in is not an array

Parameters
mixed$array_inArray to view
Returns
string HTML output

Definition at line 265 of file DebugUtility.php.

References $result.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getData(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstanceService(), TYPO3\CMS\Core\TimeTracker\TimeTracker\printTSlog(), TYPO3\CMS\IndexedSearch\Controller\IndexedPagesController\showDetailsForPhash(), and TYPO3\CMS\Core\ExtDirect\ExtDirectDebug\toString().

Member Data Documentation

◆ DEBUG_TABLE_TEMPLATE

const TYPO3\CMS\Core\Utility\DebugUtility::DEBUG_TABLE_TEMPLATE
Initial value:
= '
<table class="typo3-debug" border="0" cellpadding="0" cellspacing="0" bgcolor="white" style="border:0px; margin-top:3px; margin-bottom:3px;">
<tr>
<td style="background-color:#bbbbbb; font-family: verdana,arial; font-weight: bold; font-size: 10px;">%s</td>
</tr>
<tr>
<td>
%s
</td>
</tr>
</table>
'

Definition at line 28 of file DebugUtility.php.