Permalink
Browse files

Removing the support for OPL Cache in ClassMapLoader. This will be im…

…plemented as a separate autoloader.
  • Loading branch information...
1 parent 22b6462 commit 74a8ac0d224c4f68a8b4cb33875b68d22626bd6d @zyxist zyxist committed Jun 14, 2011
Showing with 2 additions and 27 deletions.
  1. +2 −27 src/Opl/Autoloader/ClassMapLoader.php
@@ -11,7 +11,6 @@
*/
namespace Opl\Autoloader;
use RuntimeException;
-use Opl\Cache\Cache;
/**
* This autoloader is based on the pre-computed class location
@@ -56,36 +55,12 @@ class ClassMapLoader
*
* @param string $defaultPath The default location path used for newly registered namespaces
* @param string $classMapLocation The class map location on the disk
- * @param Cache $cache The optional memory cache to be used
*/
- public function __construct($defaultPath, $classMapLocation, Cache $cache = null)
+ public function __construct($defaultPath, $classMapLocation)
{
$this->setDefaultPath($defaultPath);
$this->classMapLocation = $classMapLocation;
- if(null !== $cache)
- {
- $this->classMap = $cache->get('classMap');
- if(null === $this->classMap)
- {
- $this->_loadMap();
- $cache->set('classMap', $this->classMap);
- }
- }
- else
- {
- $this->_loadMap();
- }
- } // end __construct();
-
- /**
- * Loads the map from a file.
- *
- * @internal
- * @throws RuntimeException
- */
- protected function _loadMap()
- {
if(!file_exists($this->classMapLocation))
{
throw new RuntimeException('Cannot find a class map under the specified location.');
@@ -96,7 +71,7 @@ protected function _loadMap()
{
throw new RuntimeException('The loaded file does not contain a valid class map.');
}
- } // end _loadMap();
+ } // end __construct();
/**
* Registers a new top-level namespace to match. If no path is specified, the current

0 comments on commit 74a8ac0

Please sign in to comment.