diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-05-04 15:09:59 +0200 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-05-04 15:09:59 +0200 |
commit | 3cea24db036342df2985a1256909b9a17c4075ab (patch) | |
tree | e7f31664785229e88ebb96f7a99c0dd7974bd3a3 /autoload.php | |
parent | 54c6d5bf2044684c0289453515d2bed42091dd5a (diff) | |
download | php-smpp-3cea24db036342df2985a1256909b9a17c4075ab.zip php-smpp-3cea24db036342df2985a1256909b9a17c4075ab.tar.gz php-smpp-3cea24db036342df2985a1256909b9a17c4075ab.tar.bz2 |
Removed namespaces from protocol and transport components
Diffstat (limited to 'autoload.php')
-rw-r--r-- | autoload.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/autoload.php b/autoload.php deleted file mode 100644 index ac9a6e2..0000000 --- a/autoload.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -function __autoload($name) -{ - $parts = explode('\\',$name); - - // Figure out where to load files from - $baseDir = strtolower($parts[0]); - - // Construct path to where we expect file to be, using each subnamespace as a directory - $subnamespaces = array_slice($parts,1,-1); - $subnamespaceString = !empty($subnamespaces) ? (strtolower(implode(DIRECTORY_SEPARATOR,$subnamespaces)).DIRECTORY_SEPARATOR) : ''; - $className = end($parts); - $pathName = $baseDir . DIRECTORY_SEPARATOR . $subnamespaceString; - - // Try three common extensions .class.php, .interface.php and .php - if (file_exists($pathName.strtolower($className).'.class.php')) { - require_once($pathName.strtolower($className).'.class.php'); - } else if (file_exists($pathName.strtolower($className).'.interface.php')) { // also try .interface.php - require_once($pathName.strtolower($className).'.class.php'); - } else if (file_exists($pathName.strtolower($className).'.php')) { // also try .php - require_once($pathName.strtolower($className).'.php'); - } else { - return; - } - - return; // finally give up -}
\ No newline at end of file |