• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Memory.php

00001 <?php
00022 require_once 'Zend/Memory/Manager.php';
00023 
00025 require_once 'Zend/Memory/Value.php';
00026 
00028 require_once 'Zend/Memory/Container.php';
00029 
00031 require_once 'Zend/Cache.php';
00032 
00039 class Zend_Memory
00040 {
00049     public static function factory($backend, $backendOptions = array())
00050     {
00051         if (strcasecmp($backend, 'none') == 0) {
00052             return new Zend_Memory_Manager();
00053         }
00054 
00055         // because lowercase will fail
00056         $backend = @ucfirst(strtolower($backend));
00057 
00058         if (!in_array($backend, Zend_Cache::$availableBackends)) {
00059             require_once 'Zend/Memory/Exception.php';
00060             throw new Zend_Memory_Exception("Incorrect backend ($backend)");
00061         }
00062 
00063         $backendClass = 'Zend_Cache_Backend_' . $backend;
00064 
00065         // For perfs reasons, we do not use the Zend_Loader::loadClass() method
00066         // (security controls are explicit)
00067         require_once str_replace('_', DIRECTORY_SEPARATOR, $backendClass) . '.php';
00068 
00069         $backendObject = new $backendClass($backendOptions);
00070 
00071         return new Zend_Memory_Manager($backendObject);
00072     }
00073 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2