[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/devel/krumo/ -> README (source)

   1  =============================================================================
   2  
   3                                 Krumo
   4                              version 0.1a
   5  
   6  =============================================================================
   7  
   8  You probably got this package from...
   9  http://www.sourceforge.net/projects/krumo/
  10  
  11  If there is no licence agreement with this package please download
  12  a version from the location above. You must read and accept that
  13  licence to use this software. The file is titled simply LICENSE.
  14  
  15  OVERVIEW
  16  ------------------------------------------------------------------------------
  17  To put it simply, Krumo is a replacement for print_r() and var_dump(). By 
  18  definition Krumo is a debugging tool (PHP4/PHP5), which displays structured 
  19  information about any PHP variable.
  20  
  21  A lot of developers use print_r() and var_dump() in the means of debugging 
  22  tools. Although they were intended to present human readble information about a 
  23  variable, we can all agree that in general they are not. Krumo is an 
  24  alternative: it does the same job, but it presents the information beautified 
  25  using CSS and DHTML. 
  26  
  27  EXAMPLES
  28  ------------------------------------------------------------------------------
  29  Here's a basic example, which will return a report on the array variable passed 
  30  as argument to it:
  31  
  32   krumo(array('a1'=> 'A1', 3, 'red'));
  33  
  34  You can dump simultaneously more then one variable - here's another example:
  35  
  36   krumo($_SERVER, $_REQUEST);
  37  
  38  You probably saw from the examples above that some of the nodes are expandable, 
  39  so if you want to inspect the nested information, click on them and they will 
  40  expand; if you do not need that information shown simply click again on it to 
  41  collapse it. Here's an example to test this:
  42  
  43   $x1->x2->x3->x4->x5->x6->x7->x8->x9 = 'X10';
  44   krumo($x1);
  45  
  46  The krumo() is the only standalone function from the package, and this is 
  47  because basic dumps about variables (like print_r() or var_dump()) are the most 
  48  common tasks such functionality is used for. The rest of the functionality can 
  49  be called using static calls to the Krumo class. Here are several more examples:
  50  
  51   // print a debug backgrace

  52   krumo::backtrace();
  53  
  54   // print all the included(or required) files

  55   krumo::includes();
  56   
  57   // print all the included functions

  58   krumo::functions();
  59   
  60   // print all the declared classes

  61   krumo::classes();
  62   
  63   // print all the defined constants

  64   krumo::defines();
  65  
  66   ... and so on, etc.
  67  
  68  A full PHPDocumenter API documentation exists both in this package and at the 
  69  project's website.
  70  
  71  INSTALL
  72  ------------------------------------------------------------------------------
  73  Read the INSTALL file.
  74  
  75  DOCUMENTATION
  76  ------------------------------------------------------------------------------
  77  As I said, a full PHPDocumenter API documentation can be found both in this
  78  package and at the project's website.
  79  
  80  SKINS
  81  ------------------------------------------------------------------------------
  82  There are several skins pre-installed with this package, but if you wish you can 
  83  create skins of your own. The skins are simply CSS files that are prepended to 
  84  the result that Krumo prints. If you want to use images in your CSS (for 
  85  background, list-style, etc), you have to put "%URL%" in front of the image URL 
  86  in order hook it up to the skin folder and make the image web-accessible.
  87  
  88  Here's an example:
  89  
  90   ul.krumo-first {background: url(%url%bg.gif);}
  91  
  92  TODO
  93  ------------------------------------------------------------------------------
  94  You can find the list of stuff that is going to be added to this project in the 
  95  TODO file from this very package.
  96  
  97  CONTRIBUTION
  98  -----------------------------------------------------------------------------
  99  If you download and use and possibly even extend this tool, please let us know. 
 100  Any feedback, even bad, is always welcome and your suggestions are going to be 
 101  considered for our next release. Please use our SourceForge page for that:
 102   
 103   http://www.sourceforge.net/projects/krumo/


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7