Zend_Loader-Classmap_Generator.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.loader.classmap-generator">
  4. <title>The Class Map Generator utility: bin/classmap_generator.php</title>
  5. <sect2 id="zend.loader.classmap-generator.intro">
  6. <title>Overview</title>
  7. <para>
  8. The script <filename>bin/classmap_generator.php</filename> can be used to generate class
  9. map files for use with <link linkend="zend.loader.class-map-autoloader">the
  10. ClassMapAutoloader</link>.
  11. </para>
  12. <para>
  13. Internally, it consumes both <link linkend="zend.console.getopt">Zend_Console_Getopt</link> (for parsing command-line
  14. options) and <link linkend="zend.file.class-file-locater">Zend_File_ClassFileLocater</link> for
  15. recursively finding all PHP class files in a given tree.
  16. </para>
  17. </sect2>
  18. <sect2 id="zend.loader.classmap-generator.quick-start">
  19. <title>Quick Start</title>
  20. <para>
  21. You may run the script over any directory containing source code. By default, it will
  22. look in the current directory, and will write the script to
  23. <filename>autoload_classmap.php</filename> in the directory you specify.
  24. </para>
  25. <programlisting language="sh"><![CDATA[
  26. php classmap_generator.php Some/Directory/
  27. ]]></programlisting>
  28. </sect2>
  29. <sect2 id="zend.loader.classmap-generator.options">
  30. <title>Configuration Options</title>
  31. <variablelist>
  32. <title>Class Map Generator Options</title>
  33. <varlistentry>
  34. <term>--help or -h</term>
  35. <listitem>
  36. <para>
  37. Returns the usage message. If any other options are provided, they will be
  38. ignored.
  39. </para>
  40. </listitem>
  41. </varlistentry>
  42. <varlistentry>
  43. <term>--library or -l</term>
  44. <listitem>
  45. <para>
  46. Expects a single argument, a string specifying the library directory to
  47. parse. If this option is not specified, it will assume the current working
  48. directory.
  49. </para>
  50. </listitem>
  51. </varlistentry>
  52. <varlistentry>
  53. <term>--output or -o</term>
  54. <listitem>
  55. <para>
  56. Where to write the autoload class map file. If not provided, assumes
  57. "autoload_classmap.php" in the library directory.
  58. </para>
  59. </listitem>
  60. </varlistentry>
  61. <varlistentry>
  62. <term>--overwrite or -w</term>
  63. <listitem>
  64. <para>
  65. If an autoload class map file already exists with the name as specified via
  66. the <varname>--output</varname> option, you can overwrite it by specifying
  67. this flag. Otherwise, the script will not write the class map and return a
  68. warning.
  69. </para>
  70. </listitem>
  71. </varlistentry>
  72. </variablelist>
  73. </sect2>
  74. </sect1>