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