[Wact-cvs] SF.net SVN: wact:[972] trunk/Wact/Loader.inc.php
Status: Pre-Alpha
Brought to you by:
jeffmoore
From: <Jef...@us...> - 2009-05-23 18:36:09
|
Revision: 972 http://wact.svn.sourceforge.net/wact/?rev=972&view=rev Author: JeffMoore Date: 2009-05-23 18:36:04 +0000 (Sat, 23 May 2009) Log Message: ----------- We now expect the case of a class to match the case of its filename. Modified Paths: -------------- trunk/Wact/Loader.inc.php Modified: trunk/Wact/Loader.inc.php =================================================================== --- trunk/Wact/Loader.inc.php 2009-05-23 18:27:40 UTC (rev 971) +++ trunk/Wact/Loader.inc.php 2009-05-23 18:36:04 UTC (rev 972) @@ -40,22 +40,14 @@ * @var string */ protected $extension; - - /** - * Temporary mechanism to convert filenames to lower case as we convert - * to PEAR standards for file naming and autoloading. - */ - protected $convertToLower; /** * @param $namespace Restrict loading to classes with this namespace name. * @param $extension Extension for php class files. - * @param $convertToLower A temporary compatibility mechanism - */ - function __construct($namespace = self::ANY_NAMESPACE, $extension = self::WACT_CLASS_EXTENSION, $convertToLower = TRUE) { +' */ + function __construct($namespace = self::ANY_NAMESPACE, $extension = self::WACT_CLASS_EXTENSION) { $this->namespace = $namespace; $this->extension = $extension; - $this->convertToLower = $convertToLower; } /** @@ -70,10 +62,7 @@ return false; } - $filename = str_replace('_', DIRECTORY_SEPARATOR, - ($this->convertToLower ? strtolower($class) : $class) . - $this->extension); - $filename = str_replace('::', DIRECTORY_SEPARATOR, $filename); + $filename = str_replace('_', DIRECTORY_SEPARATOR, $class . $this->extension); if($fp = @fopen($filename, 'r', true)) { fclose($fp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |