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.
I tried to add some custom logic to an
EntityExtractor
. First I thought of making a custom class implementing theZend\Stdlib\Extractor\ExtractionInterface
, but since theHal::setEntityExtractor
method is dependent onEntityExtractor
I was unable to set my custom class. Would it not be enough to check forExtractionInterface
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 theextractEntity
method since the method is markedprivate
. Would it be possible to make it to aprotected
method so it becomes possible to redefine the method in my custom (extended) class.Originally posted by @Wilt at https://github.com/zfcampus/zf-hal/issues/116