-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add get/set support for DIContainerTrait::setDefaults() #245
Conversation
236fe52
to
aae0b02
Compare
fc1ba36
to
fc0e208
Compare
Not sure about this. |
I am "for" it and was even proposing it in the chat some time ago. |
e1aa2c9
to
ada20a4
Compare
ada20a4
to
5bf9d5d
Compare
33e9087
to
79a7963
Compare
we can implement it using 2pass approach, ie.
@abbadon1334 does this address your comment? @DarkSide666 @georgehristov wdyt, any better idea? |
another option might be to use property anotations for getter/setter method names, but looks like quite a lot horsepower for the current state of this project now |
f652977
to
1b890e2
Compare
src/DiContainerTrait.php
Outdated
$isMissing = true; | ||
|
||
try { | ||
$origValue = $this->{$name} ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will still not work if null...
1b890e2
to
d319364
Compare
d319364
to
d4304aa
Compare
d4304aa
to
e85b785
Compare
e1b8e2e
to
7cd9e76
Compare
a3e0eec
to
7ac2e7e
Compare
7ac2e7e
to
739bb7a
Compare
739bb7a
to
b4998f9
Compare
closing in favor of https://wiki.php.net/rfc/property-hooks |
fixes #206 , needed for #227
done, but need tests
maybe even add/remove with syntax like
class.adds = ['x', 'y'],
...