I have a strange problem. I have a static method that loads classes (load_library) when it comes to a particular class It loads, it gives me a fatal error "can not recapture the class", but checking that if it is present before using the load_ library method to load the class, it says that the class not available. The If I call load_library, then it says that the class is not actually used later after some lines stranger still, if I have my registered class This is a complex problem involving many complex files, so posting this code is difficult, but can anyone be aware of this problem? My load_library method: My call to the load_library method: My registered autolode method: actual error Message: Fatal Error: Class can not rearrange lev_base_test on /some/path/application/libraries/lev_unit_tester/lev_base_test.php on line 5 try it load_library method works elsewhere without such errors.
autoload Instead of function, everything works perfectly, even if it does not check the
autoload function directory that class I is trying to load.
public static function load_library ($ name) {if (! Class_exists ($ name)} {if (file_exists ('application / library /' . $ Name. '.php')) {Include ('App / Library /' $ name '.php'); } Else {trigger_error ('Requested non-existent library ('. $. ').', E_USER_ERROR); }}}
lev :: load_library ('lev_unit_tester / lev_base_test');
public static function autoloader ($ name) {if (class_exists ($ name) is returned); If (file_exists ('app / library /' $ name. '.php')) {insert ('app / library /'. $ Name '.php'); I'm trying to load that square (this is where the error occurs):
abstract class lev_base_test {}
class if (class_exists ($ square, wrong)). .}
Comments
Post a Comment