- I created two plugins in the CakePHP, and both of them have the same named model, e.g, plugin1.mod and plugin2.mod.
- In the two models, defined the same named method, e.g, mymethod.
- Now, I have a controller in my main program. Then, use ClassRegistry::init to initialize plugin1 and can call plugin1.mod without problem.
Problem:
When I use ClassRegistry::init to initialize plugin2 and call the plugin2.mod, it is calling plugin1.mod! Can somebody tell me what wrong here is?
Thank you.
in 2.0 this is not possible (anymore).
class paths are cached (inside App class) and therefore can use a class name only once.
You need to use different class names.