PHP Static Properties - Reset to Default Values

I am using an using a class statically, meaning we are not instantiating the object, but using it in Singleton design. How do I reset the properties to their default values since it's not instantiated?
LVL 2
laurin1Asked:
Who is Participating?
 
Shahzad Fateh AliConnect With a Mentor Web Solutions Architect & Technical Project Manager- VentureDive (Pvt) LtdCommented:
Hi,

As static classes do not have constructors nor they can be initialized, so you will need to explicitly call a function that will reset the values of the class.

For reference,
http://wiki.php.net/rfc/static-classes
0
 
Shahzad Fateh AliWeb Solutions Architect & Technical Project Manager- VentureDive (Pvt) LtdCommented:
Hi,

I have object on this request, because the answer provide by myself was according to question asked. And if "laurin1" says that there was no answer then its wrong. Deleting of the question after 5 days of my answer seems the person has gotten the write answer and wants to save the points.

I hope that my object will be considered.


0
 
laurin1Author Commented:
You did not give an answer in my opinion, but told me there was not answer to my question. I already knew what you responded with, and was looking for a better solution. I belive there is probably one out there, and with so few responses, I am not convinced that I am incorrect in that assumption.

If more people weighed in on this, I would not have have asked for a delete. I don't need or want to "save" points, but again, I don't think points should be awarded for stating the obvious.

I appreciate your interaction, but I still would like the question deleted.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.