I would like to use properties to install my objects with my DIC:
< Code> PropertiesTuscantEner {secure $ c; Public function __ composition (container $ c) {$ this- & gt; C = $ c; }} Class Myclass {Use TUscityear; // Optional Public Function __ Composition (Class Inheritium Container $ c) {TUscTyre :: __ Construct ($ C); // MyClass __construct stuff}}So my questions are:
- Is TUCE CONTAINER :: __ Construction ($ c); Will work?
- If not, then it asks: __ Construction ($ c); Will you move? (I think this will not happen)
- The attribute is: myOverridedMethod (); Is there a good way to call non-static override method?
- Do you think I should use the "like" keyword? (I think this is a bad idea)
- Is "Tueccentainer" a good name I intend to do?
All comments are welcome, thanks. >
I will post some tests and results.
I have found some trivial solutions:
attribute TUscityear { Protected $ c; Public function __ composition (container $ c) {$ this- & gt; Set Continent ($ c); } Secure Function Set Container (Container $ c) {$ this- & gt; C = $ c; }} Class Myclass {Use TUscityear; // Optional Public Function __ Composition (Class Inheritiform Container $ c) {$ this- & gt; Set Container ($ c);
- No
- No
- No
- Open < / Ol>
All comments are still welcome
No comments:
Post a Comment