PHP_Debug
[ class tree: PHP_Debug ] [ index: PHP_Debug ] [ all elements ]

Source for file PHP_Debug_Sources.php

Documentation is available at PHP_Debug_Sources.php

  1. <?php
  2.  
  3. /**
  4.  * Display package source
  5.  * 
  6.  * @package PHP_Debug
  7.  * @filesource
  8.  * 
  9.  * @version    CVS: $Id: PHP_Debug_Sources.php,v 1.1 2008/05/02 14:26:37 c0il Exp $
  10.  */ 
  11.  
  12. include 'PHP/Debug.php';
  13.  
  14. echo '<?xml version="1.0" encoding="UTF-8"?>';
  15. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  16. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">     
  17.   <head>  
  18.     <title>PEAR::PHP_Debug, sources</title>
  19.   </head>
  20.   <body>
  21.   <h1>PHP_Debug, package sources</h1>
  22.   <h2>Sourceforge release : <?php echo PHP_Debug::RELEASE; ?></h2>
  23.   <h2>Pear release : <?php echo PHP_Debug::PEAR_RELEASE; ?></h2>
  24. <?php
  25. // Display source code =========================================================
  26.  
  27. // file
  28. function showSource($dir$file)
  29. {
  30.     $path $dir$file;
  31.     echo '<div>';
  32.     echo '<h1>'$path'</h1>';
  33.     highlight_file($path);
  34.     echo '</div>'"\n";
  35. }
  36.  
  37. // Dir
  38. function parseDir($dir$parent)
  39. {
  40.     $path $parent($dir['name'!= '/' $dir['name']'/' '');
  41.     foreach($dir->file as $file{
  42.         if (in_array($file['role']array('test''php'))) {
  43.             showSource($path$file['name']);
  44.         }
  45.     }    
  46.     foreach($dir->dir as $child{
  47.         parseDir($child$path);
  48.     }
  49.     return;
  50. }
  51.  
  52. $package simplexml_load_file('package.xml');
  53. $dir '';
  54. parseDir($package->contents->dir$dir);
  55. ?>
  56.   </body>
  57. </html>

Documentation generated on Mon, 11 Mar 2019 15:28:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.