]> granicus.if.org Git - php/commitdiff
factory-generated classes have lowercase subclass names by our (newly
authorChuck Hagenbuch <chagenbu@php.net>
Thu, 22 Feb 2001 16:01:14 +0000 (16:01 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Thu, 22 Feb 2001 16:01:14 +0000 (16:01 +0000)
revised) standards.

pear/Mail.php
pear/Makefile.in

index 83622c71d2b452ba1cb45c5edc24c261f69f50e2..807568edf7f754a9fdef37be8b0d303898bfc16d 100644 (file)
@@ -35,15 +35,9 @@ class Mail extends PEAR {
      */
     function factory($driver, $params = array())
     {
+       $driver = strtolower($driver);
         if (@include_once 'Mail/' . $driver . '.php') {
             $class = 'Mail_' . $driver;
-        } elseif (@include_once 'Mail/' . strtoupper($driver) . '.php') {
-            $class = 'Mail_' . strtoupper($driver);
-        } elseif (@include_once 'Mail/' . ucfirst($driver) . '.php') {
-            $class = 'Mail_' . ucfirst($driver);
-        }
-        
-        if (isset($class)) {
             return new $class($params);
         } else {
             return new PEAR_Error('Unable to find class for driver ' . $driver);
index 89faa3fe103e0f843368f282afdebcaa6333c7f4..f2c9464061a937da3b65d16af4aa3e9084771240 100644 (file)
@@ -69,8 +69,8 @@ PEAR_FILES = \
        Log/syslog.php \
        Mail.php \
        Mail/RFC822.php \
-       Mail/Sendmail.php \
-       Mail/SMTP.php \
+       Mail/sendmail.php \
+       Mail/smtp.php \
        Math/Fraction.php \
        Math/Util.php \
        Net/Curl.php \