ZF-4114: shift private methods to protected ones in Zend_Translate_Adapter_Xliff so that it can be easily extended

Description

Hi,

I was wondering if it could be possible to change all private methods defined in Zend_Translate_Adapter_Xliff into protected ones?

I wanted to create a subclass with small changes to fit my purposes (basically use own defined ids as array keys for $this->_translate instead of source strings), which could have been easily done overloading ->_startElement() method which unfortunately is defined as private.

For now I've copy-pasted the code into a new class and made my changes there, but by doing this it won't benefit further improvements from Zend_Framework updates. It would be really great.

Thanks for the job anyway!

Regards, Remy

Comments

Changing the ID brakes translation.

The adapter classes are not allowed to be extended because of the risk of information loss. This would lead to severe problems with the base class.

The only way is to create a own adapter and use this as base for translations.

If there are problems with the actual implementation please add a issue. If you see enhancements please also add a issue as probably also other adapters may benefit from it.