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

Zend_App: Renamed CacheManager resource to remove capitals within name - fixes ZF-8601

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

+ 10 - 10
documentation/manual/en/module_specs/Zend_Application-AvailableResources-CacheManager.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
 <sect2 id="zend.application.available-resources.cachemanager">
-    <title>Zend_Application_Resource_CacheManager</title>
+    <title>Zend_Application_Resource_Cachemanager</title>
 
     <para>
-        <classname>Zend_Application_Resource_CacheManager</classname> may be
+        <classname>Zend_Application_Resource_Cachemanager</classname> may be
         utilised to configure a set of <classname>Zend_Cache</classname> option
         bundles for use when lazy loading caches using
         <classname>Zend_Cache_Manager</classname>
@@ -16,23 +16,23 @@
     </para>
 
     <example id="zend.application.available-resources.cachemanager.configExample">
-        <title>Sample Cache Manager resource configuration</title>
+        <title>Sample Cachemanager resource configuration</title>
 
         <para>
             Below is a sample <acronym>INI</acronym> file showing how
             <classname>Zend_Cache_Manager</classname> may be configured. The format
-            is the CacheManager resource prefix (resources.cacheManager) followed
+            is the Cachemanager resource prefix (resources.cachemanager) followed
             be the name to assign to an option cache template/bundle (e.g.
-            resources.cacheManager.database) and finally followed by a typical
+            resources.cachemanager.database) and finally followed by a typical
             <classname>Zend_Cache</classname> option.
         </para>
 
         <programlisting language="ini"><![CDATA[
-resources.cacheManager.database.frontend.name = Core
-resources.cacheManager.database.frontend.options.lifetime = 7200
-resources.cacheManager.database.frontend.options.automatic_serialization = true
-resources.cacheManager.database.backend.name = File
-resources.cacheManager.database.backend.options.cache_dir = "/path/to/cache"
+resources.cachemanager.database.frontend.name = Core
+resources.cachemanager.database.frontend.options.lifetime = 7200
+resources.cachemanager.database.frontend.options.automatic_serialization = true
+resources.cachemanager.database.backend.name = File
+resources.cachemanager.database.backend.options.cache_dir = "/path/to/cache"
 ]]></programlisting>
 
         <para>

+ 2 - 2
documentation/manual/en/module_specs/Zend_Cache-Cache_Manager.xml

@@ -10,7 +10,7 @@
         options in advance (such as from a bootstrap) so that accessing a cache
         object requires minimum setup within the application source code, the
         <classname>Zend_Cache_Manager</classname> class was written. This class
-        is accompanied by <classname>Zend_Application_Resource_CacheManager</classname>
+        is accompanied by <classname>Zend_Application_Resource_Cachemanager</classname>
         ensuring bootstrap configuration is available and
         <classname>Zend_Controller_Action_Helper_Cache</classname> to allow simple
         cache access and instantiation from controllers and other helpers.
@@ -178,7 +178,7 @@ $databaseCache = $manager->getCache('database');
 
     <para>
         To assist in making the Cache Manager more useful, it is accompanied by
-        <classname>Zend_Application_Resource_CacheManager</classname> and also
+        <classname>Zend_Application_Resource_Cachemanager</classname> and also
         the <classname>Zend_Controller_Action_Helper_Cache</classname> Action
         Helper. Both of these are described in their relevant areas of the
         Reference Guide.

+ 1 - 1
library/Zend/Application/Resource/CacheManager.php → library/Zend/Application/Resource/Cachemanager.php

@@ -31,7 +31,7 @@ require_once 'Zend/Application/Resource/ResourceAbstract.php';
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Application_Resource_CacheManager extends Zend_Application_Resource_ResourceAbstract
+class Zend_Application_Resource_Cachemanager extends Zend_Application_Resource_ResourceAbstract
 {
     /**
      * @var Zend_Cache_Manager

+ 9 - 9
tests/Zend/Application/Resource/CacheManagerTest.php

@@ -40,9 +40,9 @@ require_once 'Zend/Loader/Autoloader.php';
 require_once 'Zend/Controller/Front.php';
 
 /**
- * Zend_Application_Resource_CacheManager
+ * Zend_Application_Resource_Cachemanager
  */
-require_once 'Zend/Application/Resource/CacheManager.php';
+require_once 'Zend/Application/Resource/Cachemanager.php';
 
 /**
  * @category   Zend
@@ -100,22 +100,22 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
     public function testInitializationCreatesCacheManagerInstance()
     {
 
-        $resource = new Zend_Application_Resource_CacheManager(array());
+        $resource = new Zend_Application_Resource_Cachemanager(array());
         $resource->init();
-        $this->assertTrue($resource->getCacheManager() instanceof Zend_Cache_Manager);
+        $this->assertTrue($resource->getCachemanager() instanceof Zend_Cache_Manager);
     }
 
     public function testInitializationPushesCacheManagerToBootstrapWhenPresent()
     {
-        $resource = new Zend_Application_Resource_CacheManager(array());
+        $resource = new Zend_Application_Resource_Cachemanager(array());
         $resource->setBootstrap($this->bootstrap);
         $resource->init();
-        $this->assertSame($resource->getCacheManager(), $this->bootstrap->cacheManager);
+        $this->assertSame($resource->getCachemanager(), $this->bootstrap->cacheManager);
     }
 
     public function testShouldReturnCacheManagerWhenComplete()
     {
-        $resource = new Zend_Application_Resource_CacheManager(array());
+        $resource = new Zend_Application_Resource_Cachemanager(array());
         $manager = $resource->init();
         $this->assertTrue($manager instanceof Zend_Cache_Manager);
     }
@@ -131,7 +131,7 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
                 )
             )
         );
-        $resource = new Zend_Application_Resource_CacheManager($options);
+        $resource = new Zend_Application_Resource_Cachemanager($options);
         $manager = $resource->init();
         $cacheTemplate = $manager->getCacheTemplate('page');
         $this->assertEquals('/foo', $cacheTemplate['backend']['options']['cache_dir']);
@@ -148,7 +148,7 @@ class Zend_Application_Resource_CacheManagerTest extends PHPUnit_Framework_TestC
                 )
             )
         );
-        $resource = new Zend_Application_Resource_CacheManager($options);
+        $resource = new Zend_Application_Resource_Cachemanager($options);
         $manager = $resource->init();
         $cacheTemplate = $manager->getCacheTemplate('foo');
         $this->assertSame($options['foo'], $cacheTemplate);