If I have class with two methods, that do different things, but class properties are not changed each time I call these methods, is that class a good candidate to be a singleton ?
For example:
class Foo {
public function doFirst($params);
public function doSecond();
}
If I call doFirst() method in my controller, and doSecond() in my view. Does it make sense for this class to be a singleton ? What I am thinking is this: if I do not change the class properties ( the class state ), then I do not need two instances of it. Is this correct way of thinking ? Also, singleton classes can be configured only once, right ? So if I configure my class once and then call 2 of its methods, it can be a singleton. But if I need to reconfigure the class before calling second method it can not be singleton ?
I hope that you understand my question, because I am so confused and do not know how to ask it better.