What you're describing is often called a "Factory Method", though typically it'll be named something other than "new".
Consider renaming the "constructor", so that an invocation reads something like $s = Sentence->from_string("This is a test."); or maybe $s = Sentence->classify("This is a test."); Update: Technically, a factor method is an instance method that can be overridden. Using a class method for this is similar, but this might be closer to a Factory Function, or maybe a Builder pattern.
In reply to Re: Base class constructor that blesses into subclass
by dws
in thread Base class constructor that blesses into subclass
by mp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |