Closed janfolwarczny closed 7 years ago
Hi!
here is a little change of LeanMapper. With this change m:enum(SomeClass::*) can be used instead of only m:enum(SomeClass::SOME_*).
m:enum(SomeClass::*)
m:enum(SomeClass::SOME_*)
It is very useful when you have Enum classes like this one:
class WhenEnum { const NEVER = 'never'; const ONCE = 'once'; const EACH_TIME = 'eachTime'; }
So the entity could look like this:
/** * @property int $id * @property string $when m:enum(WhenEnum::*) */ class MyEntity extends \LeanMapper\Entity { }
What do you think about that? It'll be great for me if it could be merged.
I'm looking forward to your answer!
Thanks, Jan
It seems like a good idea to me. :)
@castamir Merge?
@JanFolwarczny Thx!
@Tharos @castamir Thanks! :)
Hi!
here is a little change of LeanMapper. With this change
m:enum(SomeClass::*)
can be used instead of onlym:enum(SomeClass::SOME_*)
.It is very useful when you have Enum classes like this one:
So the entity could look like this:
What do you think about that? It'll be great for me if it could be merged.
I'm looking forward to your answer!
Thanks, Jan