Monday 15 April 2013

php - Call to an overrided trait method -


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:

  1. Is TUCE CONTAINER :: __ Construction ($ c); Will work?
  2. If not, then it asks: __ Construction ($ c); Will you move? (I think this will not happen)
  3. The attribute is: myOverridedMethod (); Is there a good way to call non-static override method?
  4. Do you think I should use the "like" keyword? (I think this is a bad idea)
  5. 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);  
  6. No
  7. No
  8. No
  9. Open < / Ol>

    All comments are still welcome

No comments:

Post a Comment