ZF-9390: Zend_Log::Factory should use new self()
Description
Hi,
The Zend_Log factory method should use
$log = new self();
instead of
$log = new Zend_Log();
to create the log instance, so it would be possible to extend Zend_Log without extending the factory method.
Comments
Posted by Benoît Durand (intiilapa) on 2010-09-19T04:59:33.000+0000
r22976
Posted by Eric Andre (eandre) on 2011-06-06T20:36:50.000+0000
Nope,
why $log = new Zend_Log(); ?
It should be
$log = new static;
So it ist possible to do something like that;
My_Log extends Zend_Log
public function log(...) {}
With new Zend_Log, there is no chance to extend log()
Posted by Eric Andre (eandre) on 2011-06-06T20:40:01.000+0000
appendix: in this case ther is no need to override factory-method, this is what i meant with no chance...