pluf2

pluf2 Commit Details


Date:2008-11-05 15:13:13 (16 years 1 month ago)
Author:Loic d'Anterroches
Branch:master
Commit:b8379bfae171cc1eb94f51ca68e24f342f3e0e35
Parents: 08f59e962277b712f4624b23230f2f8d8da1d8e2
Message:Better handling of the class not found.

It will even be ready for PHP 5.3 using __callstatic.
Changes:

File differences

src/Pluf.php
299299
300300
301301
302
303
304
305
306
302
303
304
305
306
307
308
309
310
307311
308312
309313
try {
Pluf::loadClass($class_name);
} catch (Exception $e) {
return eval ('class '.$class_name.' {' .
' function '.$class_name.'() {' .
' throw new Exception("Class not found: '.$class_name.'");' .
' }' .
'}');
eval("class $class_name {
function __construct() {
throw new Exception('Class $class_name not found');
}
static function __callstatic(\$m, \$args) {
throw new Exception('Class $class_name not found');
}
}");
}
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05899s using 13 queries.