Description

Zend_Mail_Part currently creates instances wit 'new self(...)', which means even if it's extended it still uses Zend_Mail_Part, because of early binding. '$classname = get_class($this); new $classname(..)' can be used in PHP < 5.3 to avoid the problem.

Comments

One concern: The above suggestion will change the way {{Zend_Mail_Message}} works. It extends {{Zend_Mail_Part}}, and so with the above modification all parts accessed via a {{Zend_Mail_Message}} object will be returned as instances of {{Zend_Mail_Message}} and not {{Zend_Mail_Part}}. Probably not a big deal, but worth noting.

Might it be better to give {{Zend_Mail_Part}} something analogous to {{Zend_Db_Table}}'s {{get/setRowClass}} methods? ie: Allow specifying the part class through the constructor and/or setter method, with the default value being equivalent to 'self'?