Bladeren bron

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 jaren geleden
bovenliggende
commit
e188cb694c

+ 3 - 3
bin/classmap_generator.php

@@ -27,7 +27,7 @@
  * --library|-l [ <string> ]    Library to parse; if none provided, assumes 
  *                              current directory
  * --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 
  *                              file
  */
@@ -55,7 +55,7 @@ $loader->register();
 $rules = array(
     'help|h'        => 'Get usage message',
     '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',
 );
 
@@ -87,7 +87,7 @@ if (isset($opts->l)) {
 }
 
 $usingStdout = false;
-$output = $path . DIRECTORY_SEPARATOR . '.classmap.php';
+$output = $path . DIRECTORY_SEPARATOR . 'autoload_classmap.php';
 if (isset($opts->o)) {
     $output = $opts->o;
     if ('-' == $output) {

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

@@ -31,8 +31,8 @@
         <programlisting language="php"><![CDATA[
 $config = 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(
         'namespaces' => array(
@@ -48,8 +48,8 @@ $config = array(
         </para>
 
         <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.Doctrine       = APPLICATION_PATH "/../library/Doctrine"
 ]]></programlisting>

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

@@ -16,14 +16,7 @@
 
         <para>
             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
             of this too is provided in <xref linkend="zend.loader.classmap-generator"/>.
         </para>
@@ -42,7 +35,7 @@ php classmap_generator.php Some/Directory/
 ]]></programlisting>
 
         <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.
         </para>
 
@@ -59,7 +52,7 @@ require_once 'Zend/Loader/ClassMapAutoloader.php';
 $loader = new Zend_Loader_ClassMapAutoloader();
 
 // Register the class map:
-$loader->registerAutoloadMap('Some/Directory/.classmap.php');
+$loader->registerAutoloadMap('Some/Directory/autoload_classmap.php');
 
 // Register with spl_autoload:
 $loader->register();
@@ -97,8 +90,8 @@ $loader->register();
                     <programlisting language="php"><![CDATA[
 // Configuration defining both a file-based class map, and an array map
 $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',
         'Test_Bootstrap'        => __DIR__ . '/tests/Bootstrap.php',
     ),
@@ -309,7 +302,7 @@ $config = array(
             <programlisting language="php"><![CDATA[
 // Configuration defining both a file-based class map, and an array map
 $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
         'Application_Bootstrap' => APPLICATION_PATH . '/Bootstrap.php',
         'Test_Bootstrap'        => APPLICATION_PATH . '/../tests/Bootstrap.php',
@@ -322,7 +315,7 @@ APPLICATION_PATH . '/../library/.classmap.php', // file-based class map
             </para>
 
             <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.Test_Bootstrap = APPLICATION_PATH "/../tests/Bootstrap.php"
 ]]></programlisting>

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

@@ -25,7 +25,7 @@
         <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>.classmap.php</filename> in the directory you specify.
+            <filename>autoload_classmap.php</filename> in the directory you specify.
         </para>
 
         <programlisting language="sh"><![CDATA[
@@ -69,7 +69,7 @@ php classmap_generator.php Some/Directory/
                 <listitem>
                     <para>
                         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>
                 </listitem>
             </varlistentry>