-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Simple property mapper for ActiveRecord. #28
Comments
How would that look like in queries? Would real field name be used or an alias that we have defined? |
This improvement only affects magical properties. When working with properties through functions, we continue to work with real names. For example, we have a /**
* @property int $createAt
*/ we can access the property like this: $time = $model->getAttribute('create_at');
$time = $model->createAt;
$time = $model->create_at; The editor will prompt us |
While it looks better, it's not convenient when you have |
|
|
In any case, it is not difficult, and I have no doubt that many will like it. This can also be made optional. |
Alright. Having an option to generate these is fine. |
It would be great if the generated ActiveRecord had a property mapper. That is,
create_at
was mapped tocreateAt
.For example like this:
@property
will be appropriate.The text was updated successfully, but these errors were encountered: