Re: [PHP] redeclare classes dynamically

2008-10-22 Thread uaca man
>From your code it looks like $controller will have only the last instance to the controller class, so you can only load the last request and instantiate only one time. Other alternative is to use namespaces but this is only for PHP 5.3 or you can do what everyone else does from the begging of tim

[PHP] redeclare classes dynamically

2008-10-22 Thread viraj
i'm trying to dynamically initialize bunch of classes from different paths but with the same class and file names. while ($register->request->m != 'exit') { $controlFile = './core/' . $register->request->m . '/controller.class.php'; if (is_file($controlFile)) { r