zfcampus / zf-hal

BSD 3-Clause "New" or "Revised" License
30 stars 49 forks source link

Hal::setEntityExtractor dependency and EntityExtractor extractEntity method is marked private #116

Open Wilt opened 9 years ago

Wilt commented 9 years ago

I tried to add some custom logic to an EntityExtractor. First I thought of making a custom class implementing the Zend\Stdlib\Extractor\ExtractionInterface, but since the Hal::setEntityExtractor method is dependent on EntityExtractor I was unable to set my custom class. Would it not be enough to check for ExtractionInterface in the setter method?

Then when I moved to extending the existing ZF\Hal\Extractor\EntityExtractor class it turned out to be impossible to overwrite the extractEntity method since the method is marked private. Would it be possible to make it to a protected method so it becomes possible to redefine the method in my custom (extended) class.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas-api-tools/api-tools-hal; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-hal/issues/18.