Hello.
Most of my methods are used for multiple purposes. So far I have passed a variable named $choice to each method that is dynamic. $choice could e.g. contain view_day or view_month. I then have a switch or if statement that does something according to the value of choice. This was fine in the beginning - however it is starting to give me problems. Because it is difficult to track variables when they pass throw more methods! Can I set a local method variable before the method is being called? Like this: set $this->class_b->method1()->status to view_day. When I call method1 later, it should still have that variable! I know that I probably could create a session var for each dynamic method, but that does not feel right. It would be to messy with public variables. Any ideas? Maybe another design approach?
Best regards.
Asbjørn Morell.