Variable class name, static method
Posted: Mon Jul 20, 2009 8:39 pm
I apologize if the title is not exactly accurate, but my head just goes nuts when I try to think how would I name what I want to do, as a programmer, its always easier with code:
The classes I want to load are all singleton. I know it may be easier to implement something like a Registry but I want to do it this way (plus, I dont have that many different class names, so maybe it's not worth it)
Thanks for the help
Code: Select all
$dataMapper = self::DATAMAPPER_PREFIX . "_something";
$this->setMapper($dataMapper::getInstance()); //this line gives error
Thanks for the help