Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

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

Open
Wilt opened this issue Aug 4, 2015 · 1 comment

Comments

@Wilt
Copy link
Contributor

Wilt commented Aug 4, 2015

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.

@Wilt Wilt changed the title EntityExtractor extractEntity method is private and Hal::setEntityExtractor dependency Hal::setEntityExtractor dependency and EntityExtractor extractEntity method is marked private Aug 4, 2015
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-hal; a new issue has been opened at laminas-api-tools/api-tools-hal#18.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants