Skip to content

Conversation

@marc-mabe
Copy link
Owner

This is just for consistency to differ the methods of getting something out of an enumeration/set/enumerator using get*() with the methods for accessing an enumerator (Enum::by*()).

The method Enum::get($valueOrInstance) still exists but I added the method Enum::byValue($value) which doesn't allow an already instantiated enumerator as argument.
-> So for consistency the method Enum::get($valueOrInstance) doesn't really follow this naming but calling it something like byValueOrInstance sounds stange to me and also this is a widely used method that I wouldn't like to rename.

@prolic Do you think this makes sense even with the given BC later on removing deprecated methods?

Copy link
Collaborator

@prolic prolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@marc-mabe marc-mabe removed the question label Dec 6, 2016
@marc-mabe marc-mabe merged commit f713988 into master Dec 6, 2016
@marc-mabe marc-mabe added this to the 2.3.0 milestone Dec 7, 2016
@marc-mabe marc-mabe deleted the enum_get_by branch December 7, 2016 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants