Add get/set support for DIContainerTrait::setDefaults()#245
Closed
Add get/set support for DIContainerTrait::setDefaults()#245
Conversation
236fe52 to
aae0b02
Compare
fc1ba36 to
fc0e208
Compare
Member
|
Not sure about this. |
Collaborator
|
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
Member
Author
we can implement it using 2pass approach, ie.
@abbadon1334 does this address your comment? @DarkSide666 @georgehristov wdyt, any better idea? |
Member
Author
|
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
mvorisek
commented
Aug 27, 2020
src/DiContainerTrait.php
Outdated
| $isMissing = true; | ||
|
|
||
| try { | ||
| $origValue = $this->{$name} ?? null; |
Member
Author
There was a problem hiding this comment.
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
Member
Author
|
closing in favor of https://wiki.php.net/rfc/property-hooks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #206 , needed for #227
done, but need tests
maybe even add/remove with syntax like
class.adds = ['x', 'y'],...