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?
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 methodEnum::byValue($value)
which doesn't allow an already instantiated enumerator as argument. -> So for consistency the methodEnum::get($valueOrInstance)
doesn't really follow this naming but calling it something likebyValueOrInstance
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?