PHP Classes

File: testsvgdebug.php

Recommend this page to a friend!
  Classes of Rafael de Pablo   SVG Debug   testsvgdebug.php   Download  
File: testsvgdebug.php
Role: Example script
Content type: text/plain
Description: Test Script
Class: SVG Debug
Generate debug output documents in SVG
Author: By
Last change:
Date: 20 years ago
Size: 1,130 bytes
 

Contents

Class file image Download
<?

include ("svgdebug.php");

class
CSimpleClass
{
    var
$m_nInteger;
    var
$m_strString;
   
    function
CSimpleClass()
    {
       
$this->m_nInteger =0;
       
$this->m_strString ="";
    }
}

// We create a new svg debug object
$svgdebug = new CSVGDebug("C:\\TEMP\\","SIMPLE");
// Begin the test
$svgdebug->Open();

$simpleClass = new CSimpleClass();
// we can debug ourselves
$svgdebug->Debug($svgdebug,"SVGDEBUG");
// only specific information will be show because the method EvalCSVGEngine
// exists in the CSVGDebug class
$svgdebug->Debug($svgdebug->m_SVGEngine,"INITIAL VALUES");
$svgdebug->Debug($simpleClass,"BEGIN FOR");
for (
$i=0;$i<100;$i++)
{
   
$svgdebug->Debug($simpleClass,"NEW ITERATION " .$i);
   
$simpleClass->m_nInteger++;
   
$simpleClass->m_strString .=$simpleClass->m_nInteger;
   
$svgdebug->Debug($simpleClass,"CLOSE ITERATION " .$i);
}
$svgdebug->Debug($simpleClass,"END FOR");

$svgdebug->Debug($svgdebug->m_SVGEngine,"END VALUES");
// Close the test
$svgdebug->Close();

echo
"<p>You can go to $svgdebug->m_strDirectory$svgdebug->m_strTest.1.html to see the debug information...</p>";
?>