API15

Difference between revisions of "JDocumentError/renderBacktrace"

From Joomla! Documentation

< API15:JDocumentError
(New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JDocument...)
 
m (removing red link to edit, no existant pages)
Line 1: Line 1:
 
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JDocumentError/renderBacktrace|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JDocumentError/renderBacktrace}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 60: Line 59:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JDocumentError/renderBacktrace|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JDocumentError/renderBacktrace}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 75: Line 74:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Revision as of 09:05, 12 May 2013

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

renderBacktrace()


Defined in[edit]

libraries/joomla/document/error/error.php

Importing[edit]

jimport( 'joomla.document.error.error' );

Source Body[edit]

function renderBacktrace()
{
        $contents       = null;
        $backtrace      = $this->_error->getTrace();
        if( is_array( $backtrace ) )
        {
                ob_start();
                $j      =       1;
                echo    '<table border="0" cellpadding="0" cellspacing="0" class="Table">';
                echo    '       <tr>';
                echo    '               <td colspan="3" align="left" class="TD"><strong>Call stack</strong></td>';
                echo    '       </tr>';
                echo    '       <tr>';
                echo    '               <td class="TD"><strong>#</strong></td>';
                echo    '               <td class="TD"><strong>Function</strong></td>';
                echo    '               <td class="TD"><strong>Location</strong></td>';
                echo    '       </tr>';
                for( $i = count( $backtrace )-1; $i >= 0 ; $i-- )
                {
                        echo    '       <tr>';
                        echo    '               <td class="TD">'.$j.'</td>';
                        if( isset( $backtrace[$i]['class'] ) ) {
                                echo    '       <td class="TD">'.$backtrace[$i]['class'].$backtrace[$i]['type'].$backtrace[$i]['function'].'()</td>';
                        } else {
                                echo    '       <td class="TD">'.$backtrace[$i]['function'].'()</td>';
                        }
                        if( isset( $backtrace[$i]['file'] ) ) {
                                echo    '               <td class="TD">'.$backtrace[$i]['file'].':'.$backtrace[$i]['line'].'</td>';
                        } else {
                                echo    '               <td class="TD">&nbsp;</td>';
                        }
                        echo    '       </tr>';
                        $j++;
                }
                echo    '</table>';
                $contents = ob_get_contents();
                ob_end_clean();
        }
        return $contents;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />