Pluf Framework

Pluf Framework Commit Details


Date:2008-11-05 15:13:13 (16 years 5 months ago)
Author:Loic d'Anterroches
Branch:develop, 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

Tags

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