Jump to content

Class::alternativeContructor()


chiprivers

Recommended Posts

How do I create alternative contractor methods for my class.  Like when you create a DateTime object you can create it using an alternative time passed by a string using DateTime::createFromFormat().

 

I want to have a default constructor method but a couple of extra contractor methods that can be called when the instance is created.

Link to comment
https://forums.phpfreaks.com/topic/263332-classalternativecontructor/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.