I realize that the constructor does not have to be named 'new' but I was going with the generalization (which I wasn't explicit about) that they would be using the same constructor as the base class. On further thought, since this test should always succeed if they were inheriting from the base class, your correction is better. My code really really doesn't test what I thought it was going to. He might consider checking $objectName->isa('My::Baseclass') to at least verify that at least the new class is inherited from the base class that he hopes it is. This is just to make debugging easier by catching errors sooner rather than later.
Remember: This was a quick and dirty hack to try and get an basic answer for the question.
In reply to RE: RE: RE: RE: RE: Re: Factory Pattern for Class Heirarchy
by johannz
in thread Factory Pattern for Class Heirarchy
by dcorbin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |