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

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