Factory methods?

Topics: Developer Forum
Feb 22, 2010 at 4:56 PM

Maybe this is a difference of ideology, but it would be nice to have factory methods for at least some of the main classes(PHPExcel, PHPExcel_Worksheet, etc...) to allow for chaining methods.


public static function factory(){
   $class = __CLASS__;

   return new $class;


Mar 19, 2010 at 4:02 AM

Perhaps a good idea for class PHPExcel. Not so sure about other classes?


Mar 19, 2010 at 8:04 AM

I think this is only useful for PHPExcel class, others support chaining already?