Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.8. Section 6 - Debug

About this section

Debug functions.

Those functions are used to output debug informations. They are very similar to the debug functions of the core Typo3 class t3lib_div, except in the fact that they may produce a "smarter" output. So it's just a question of tastes.

Those functions are available in any context. You also don't need the instantiate the API class to use them, as they don't need a parent object.

viewArray

Display an array as an HTML table.

This function display an HTML table representing the given array. Each item goes in a row, and keys/values in cols. If the array has sub array, they are processed as well.

This function does the same stuff as the original Typo3 viewArray function, in t3lib_div, except that this one produce a table with some nice CSS syling, which should be useful to differentiate variable type at a glance.

SPECIAL NOTE: This function can be called without the API class instantiated.

Parameters

Parameter:

Default value:

Description:

$array

The array to display.

$indent
0

The indentation level (used for indenting the HTML code).

Return

An HTML representation of the array.

debug

Writes an PHP variable HTML representation.

This function produces an HTML representation of a PHP variable. If the variable is an array, the function tx_apimacmade::viewArray is called. Otherwise, the object is printed.

This function does the same stuff as the original Typo3 debug function, in t3lib_div, except that this one produce a div with some nice CSS syling, which should be useful to differentiate variable type at a glance.

SPECIAL NOTE: This function can be called without the API class instantiated.

Parameters

Parameter:

Default value:

Description:

$variable

The variable to display.

$header
'DEBUG'

The header of the debug zone.

Return

Void.

See also
  1. viewArray