I edited my post at the end of page 4 to notify that the TS2 Framework ( Absurd ) also use spl autoload.
Here the methods of autoload in Absurd TS2
Code:
/**
* Initialises Absurdcoding.org Framework
*
* @return void
*/
public static function init()
{
self::$libpath = dirname(__FILE__) . '/';
self::$extension = '.php';
spl_autoload_register(array(__CLASS__, 'autoload'));
}
/**
* Autoloads a class with given name
*
* @param string $class
* @throws Absurd_Exception
* @return void
*/
public static function autoload($class)
{
if (!class_exists($class) && !interface_exists($class)) {
if (!preg_match('/^[A-Za-z0-9_]+$/', $class)) {
throw new Absurd_Exception("Class $class contains invalid characters", 0x01);
} else {
$file = self::$libpath . str_replace('_', '/', $class) . self::$extension;
if (!$fp = @fopen($file, 'r', true)) {
throw new Absurd_Exception("Class file $file was not found", 0x02);
} else {
@fclose($fp);
include_once($file);
if (!class_exists($class) && !interface_exists($class)) {
throw new Absurd_Exception("Class $class was not found in the expected place", 0x03);
}
}
}
}
}
Seems that's the TS2 autoload whitch is used in TS3 ... Cant we reset ? =/
Thanks for help.... This prob is really annoying..
Mail: menthe.alow a t g m a i l d o t c o m