enable set visibilty of class fields in EntityGenerator#253
Merged
beberlei merged 5 commits intodoctrine:masterfrom Jan 28, 2012
mrmkrs:protectedfields
Merged
enable set visibilty of class fields in EntityGenerator#253beberlei merged 5 commits intodoctrine:masterfrom mrmkrs:protectedfields
beberlei merged 5 commits intodoctrine:masterfrom
mrmkrs:protectedfields
Conversation
Member
There was a problem hiding this comment.
wrong indentation. it should use 4 spaces, not tabs
tabs -> spaces added class constants updated phpdoc
Contributor
Author
|
I've removed whitespace and converted tabs to spaces. Added the class constant. |
fix typo
Contributor
Author
|
fixed the issues! |
Member
There was a problem hiding this comment.
you should use the class constants here, and you should use a strict comparison (!==)
use class constants
Contributor
Author
|
done! |
Member
There was a problem hiding this comment.
should be self:: instead of EntityGenerator::
Contributor
Author
|
replaced EntityGenerator:: with self:: |
beberlei
added a commit
that referenced
this pull request
Jan 28, 2012
enable set visibilty of class fields in EntityGenerator
Member
|
@stefantalen please use the mailing list to ask questions, and not the issue tracker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit makes it possible to set the field visibility to private or protected of the generated entities (generated with EntityGenerator).
For example: One can then generate a "DefaultUser" class with protected fields, and subclass it. (Class User extends DefaultUser). That way you can regenerate the entities with Doctrine over and over again without interfering with additional developer code.
Also, some project codingstandards say "protected over private" so all entities should have protected fields so they can always be extended.
See: groups.google.com/group/doctrine-user/browse_thread/thread/77609f754ddea7de/051cfdbdf2cfaa03