Issues

ZF-9390: Zend_Log::Factory should use new self()

Issue Type: Bug Created: 2010-03-10T07:20:21.000+0000 Last Updated: 2011-06-06T20:40:01.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Mickael Marchal (mickaelmarchal) Assignee: Benoît Durand (intiilapa) Tags: - Zend_Log

Related issues: Attachments:

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...

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts