-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Summary for ActiveRecord
#308
Comments
Great ideas, especially with naming for relations. I have a question: |
It was discussed that there is confusion between the But it's a good question. Now this looks doubtful due to major changes and needs to be discussed again. Due to the renaming of public methods whose names contain |
Are there any pitfalls here? Rename methods also it looks logically. |
Discussion about renaming |
BaseActiveRecord
class toAbstractActiveRecord
AbstractActiveRecord
class implements onlyActiveRecordInterface
ActiveRecord
class$properties
with magic methods__get()
,__set()
,__isset()
,__unset()
toMagicPropertiesTrait
and use it inActiveRecord
class6. Access to properties values insideAbstractActiveRecord
via$this->$name
onlyActiveQueryInterface
use method with prefixget
and suffixQuery
, e.g.getOrderQuery(): ActiveQueryInterface
instead ofgetOrder(): ActiveQueryInterface
get
, e.g.getOrder(): ActiveRecordInterface|null
getRelation(): ActiveQueryInterface
torelationQuery(): ActiveQueryInterface
relation(string $name): ActiveRecordInterface|null {return $this->related[$name] ?? null;}
The text was updated successfully, but these errors were encountered: