2
0
Просмотр исходного кода

update Zend_Loader_ClassMapAutoloader to create autoload_classmap.php files and update docs so that we don't imply that we are shipping a classmap with ZF1

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24817 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 лет назад
Родитель
Сommit
e188cb694c

+ 3 - 3
bin/classmap_generator.php

@@ -27,7 +27,7 @@
  * --library|-l [ <string> ]    Library to parse; if none provided, assumes 
  * --library|-l [ <string> ]    Library to parse; if none provided, assumes 
  *                              current directory
  *                              current directory
  * --output|-o [ <string> ]     Where to write autoload file; if not provided, 
  * --output|-o [ <string> ]     Where to write autoload file; if not provided, 
- *                              assumes ".classmap.php" in library directory
+ *                              assumes "autoload_classmap.php" in library directory
  * --overwrite|-w               Whether or not to overwrite existing autoload 
  * --overwrite|-w               Whether or not to overwrite existing autoload 
  *                              file
  *                              file
  */
  */
@@ -55,7 +55,7 @@ $loader->register();
 $rules = array(
 $rules = array(
     'help|h'        => 'Get usage message',
     'help|h'        => 'Get usage message',
     'library|l-s'   => 'Library to parse; if none provided, assumes current directory',
     'library|l-s'   => 'Library to parse; if none provided, assumes current directory',
-    'output|o-s'    => 'Where to write autoload file; if not provided, assumes ".classmap.php" in library directory',
+    'output|o-s'    => 'Where to write autoload file; if not provided, assumes "autoload_classmap.php" in library directory',
     'overwrite|w'   => 'Whether or not to overwrite existing autoload file',
     'overwrite|w'   => 'Whether or not to overwrite existing autoload file',
 );
 );
 
 
@@ -87,7 +87,7 @@ if (isset($opts->l)) {
 }
 }
 
 
 $usingStdout = false;
 $usingStdout = false;
-$output = $path . DIRECTORY_SEPARATOR . '.classmap.php';
+$output = $path . DIRECTORY_SEPARATOR . 'autoload_classmap.php';
 if (isset($opts->o)) {
 if (isset($opts->o)) {
     $output = $opts->o;
     $output = $opts->o;
     if ('-' == $output) {
     if ('-' == $output) {

+ 4 - 4
documentation/manual/en/module_specs/Zend_Loader-AutoloaderFactory.xml

@@ -31,8 +31,8 @@
         <programlisting language="php"><![CDATA[
         <programlisting language="php"><![CDATA[
 $config = array(
 $config = array(
     'Zend_Loader_ClassMapAutoloader' => array(
     'Zend_Loader_ClassMapAutoloader' => array(
-        'application' => APPLICATION_PATH . '/.classmap.php',
-        'zf'          => APPLICATION_PATH . '/../library/Zend/.classmap.php',
+        'application' => APPLICATION_PATH . '/autoload_classmap.php',
+        'zf'          => APPLICATION_PATH . '/../library/Zend/autoload_classmap.php',
     ),
     ),
     'Zend_Loader_StandardAutoloader' => array(
     'Zend_Loader_StandardAutoloader' => array(
         'namespaces' => array(
         'namespaces' => array(
@@ -48,8 +48,8 @@ $config = array(
         </para>
         </para>
 
 
         <programlisting xml:lang="ini"><![CDATA[
         <programlisting xml:lang="ini"><![CDATA[
-Zend_Loader_ClassMapAutoloader.application = APPLICATION_PATH "/.classmap.php"
-Zend_Loader_ClassMapAutoloader.zf          = APPLICATION_PATH "/../library/Zend/.classmap.php"
+Zend_Loader_ClassMapAutoloader.application = APPLICATION_PATH "/autoload_classmap.php"
+Zend_Loader_ClassMapAutoloader.zf          = APPLICATION_PATH "/../library/Zend/autoload_classmap.php"
 Zend_Loader_StandardAutoloader.namespaces.Phly\Mustache = APPLICATION_PATH "/../library/Phly/Mustache"
 Zend_Loader_StandardAutoloader.namespaces.Phly\Mustache = APPLICATION_PATH "/../library/Phly/Mustache"
 Zend_Loader_StandardAutoloader.namespaces.Doctrine       = APPLICATION_PATH "/../library/Doctrine"
 Zend_Loader_StandardAutoloader.namespaces.Doctrine       = APPLICATION_PATH "/../library/Doctrine"
 ]]></programlisting>
 ]]></programlisting>

+ 7 - 14
documentation/manual/en/module_specs/Zend_Loader-ClassMapAutoloader.xml

@@ -16,14 +16,7 @@
 
 
         <para>
         <para>
             In order to use the <classname>ClassMapAutoloader</classname>, you first need class
             In order to use the <classname>ClassMapAutoloader</classname>, you first need class
-            maps. Zend Framework ships with a class map per component or, if you grabbed the entire
-            ZF distribution, a class map for the entire Zend Framework. These maps are typically in
-            a file named <filename>.classmap.php</filename> within either the "Zend" directory, or
-            an individual component's source directory.
-        </para>
-
-        <para>
-            Zend Framework also provides a tool for generating these class maps; you can find it in
+            maps. Zend Framework also provides a tool for generating these class maps; you can find it in
             <filename>bin/classmap_generator.php</filename> of the distribution. Full documentation
             <filename>bin/classmap_generator.php</filename> of the distribution. Full documentation
             of this too is provided in <xref linkend="zend.loader.classmap-generator"/>.
             of this too is provided in <xref linkend="zend.loader.classmap-generator"/>.
         </para>
         </para>
@@ -42,7 +35,7 @@ php classmap_generator.php Some/Directory/
 ]]></programlisting>
 ]]></programlisting>
 
 
         <para>
         <para>
-            This will create a file named <filename>Some/Directory/.classmap.php</filename>, which
+            This will create a file named <filename>Some/Directory/autoload_classmap.php</filename>, which
             is a PHP file returning an associative array that represents the class map.
             is a PHP file returning an associative array that represents the class map.
         </para>
         </para>
 
 
@@ -59,7 +52,7 @@ require_once 'Zend/Loader/ClassMapAutoloader.php';
 $loader = new Zend_Loader_ClassMapAutoloader();
 $loader = new Zend_Loader_ClassMapAutoloader();
 
 
 // Register the class map:
 // Register the class map:
-$loader->registerAutoloadMap('Some/Directory/.classmap.php');
+$loader->registerAutoloadMap('Some/Directory/autoload_classmap.php');
 
 
 // Register with spl_autoload:
 // Register with spl_autoload:
 $loader->register();
 $loader->register();
@@ -97,8 +90,8 @@ $loader->register();
                     <programlisting language="php"><![CDATA[
                     <programlisting language="php"><![CDATA[
 // Configuration defining both a file-based class map, and an array map
 // Configuration defining both a file-based class map, and an array map
 $config = array(
 $config = array(
-    __DIR__ . '/library/.classmap.php', // file-based class map
-    array(                              // array class map
+    __DIR__ . '/library/autoload_classmap.php', // file-based class map
+    array(                                      // array class map
         'Application_Bootstrap' => __DIR__ . '/application/Bootstrap.php',
         'Application_Bootstrap' => __DIR__ . '/application/Bootstrap.php',
         'Test_Bootstrap'        => __DIR__ . '/tests/Bootstrap.php',
         'Test_Bootstrap'        => __DIR__ . '/tests/Bootstrap.php',
     ),
     ),
@@ -309,7 +302,7 @@ $config = array(
             <programlisting language="php"><![CDATA[
             <programlisting language="php"><![CDATA[
 // Configuration defining both a file-based class map, and an array map
 // Configuration defining both a file-based class map, and an array map
 $config = array(
 $config = array(
-APPLICATION_PATH . '/../library/.classmap.php', // file-based class map
+APPLICATION_PATH . '/../library/autoload_classmap.php', // file-based class map
     array(                              // array class map
     array(                              // array class map
         'Application_Bootstrap' => APPLICATION_PATH . '/Bootstrap.php',
         'Application_Bootstrap' => APPLICATION_PATH . '/Bootstrap.php',
         'Test_Bootstrap'        => APPLICATION_PATH . '/../tests/Bootstrap.php',
         'Test_Bootstrap'        => APPLICATION_PATH . '/../tests/Bootstrap.php',
@@ -322,7 +315,7 @@ APPLICATION_PATH . '/../library/.classmap.php', // file-based class map
             </para>
             </para>
 
 
             <programlisting language="ini"><![CDATA[
             <programlisting language="ini"><![CDATA[
-classmap.library = APPLICATION_PATH "/../library/.classmap.php"
+classmap.library = APPLICATION_PATH "/../library/autoload_classmap.php"
 classmap.resources.Application_Bootstrap = APPLICATION_PATH "/Bootstrap.php"
 classmap.resources.Application_Bootstrap = APPLICATION_PATH "/Bootstrap.php"
 classmap.resources.Test_Bootstrap = APPLICATION_PATH "/../tests/Bootstrap.php"
 classmap.resources.Test_Bootstrap = APPLICATION_PATH "/../tests/Bootstrap.php"
 ]]></programlisting>
 ]]></programlisting>

+ 2 - 2
documentation/manual/en/module_specs/Zend_Loader-Classmap_Generator.xml

@@ -25,7 +25,7 @@
         <para>
         <para>
             You may run the script over any directory containing source code. By default, it will
             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
             look in the current directory, and will write the script to
-            <filename>.classmap.php</filename> in the directory you specify.
+            <filename>autoload_classmap.php</filename> in the directory you specify.
         </para>
         </para>
 
 
         <programlisting language="sh"><![CDATA[
         <programlisting language="sh"><![CDATA[
@@ -69,7 +69,7 @@ php classmap_generator.php Some/Directory/
                 <listitem>
                 <listitem>
                     <para>
                     <para>
                         Where to write the autoload class map file. If not provided, assumes
                         Where to write the autoload class map file. If not provided, assumes
-                        ".classmap.php" in the library directory.
+                        "autoload_classmap.php" in the library directory.
                     </para>
                     </para>
                 </listitem>
                 </listitem>
             </varlistentry>
             </varlistentry>