When should I use the factory?
|Posted: Thu, 2007-05-03 18:45|
For a module I was thinking about making (if I find the time) I'm now first trying to find out more about the inner workings of G2 and how I'm supposed to be coding. Right now I am a bit unsure when I should use the facory to get a class for me and when not.
So what I would like to know. When do I use the "newFactoryInstance" methods? It is for example used to get a urlGenerator which is usefull for the rewrite module but it isn't used for example for the translator module. so how do I know if I need to register a class with the factory??
Also I'm wondering when I would use which of the three "newFactoryInstance" functions. What is a "hint" exactly, can't really tell from the comments nor from the database contents...
I hope my questions make sense ;)