Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access levels of fields in generated classes #49

Closed
shehi opened this issue Oct 28, 2019 · 4 comments
Closed

Access levels of fields in generated classes #49

shehi opened this issue Oct 28, 2019 · 4 comments
Assignees

Comments

@shehi
Copy link

shehi commented Oct 28, 2019

This generator creates "private" fields for classes generated. Would it be possible to switch this to "protected", as it is impossible to extend the generated classes otherwise? Thanks.

@dcarbone
Copy link
Owner

Hmm, would it not be possible to use the getters & setters? I don’t mind the switch, but I’m curious what the need is. Mind posting an example of what you’d like to do?

@shehi
Copy link
Author

shehi commented Oct 28, 2019

Of course. My use case is implementing FHIR concepts as Entities in Doctrine/Symfony, and in many cases, Symfony spits at you when it sees private fields in its Doctrine entities. Having them as "protected" solves a lot of problems.I want to extend existing classes generated by you and create my entities. Thanks.

@dcarbone dcarbone self-assigned this Oct 28, 2019
dcarbone added a commit that referenced this issue Oct 28, 2019
…her than private, and type documentation blocks with "@" symbols are escaped
@dcarbone
Copy link
Owner

@shehi: i've updated the classes to use protected instead of private and pushed the changes to master of php-fhir-generated.

If things look good, i'll create a v1.0.3 release to address this and #50.

@shehi
Copy link
Author

shehi commented Oct 29, 2019

Looks good. Thanks.

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

No branches or pull requests

2 participants