Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. trait A
  2. {
  3. function __get($name)
  4. {
  5. }
  6. }
  7.  
  8. trait B
  9. {
  10. function __get($name)
  11. {
  12. }
  13. }
  14.  
  15. trait C
  16. {
  17. function __get($name)
  18. {
  19. }
  20. }
  21.  
  22. class C
  23. {
  24. use A, B, C;
  25.  
  26. function __get($name)
  27. {
  28. // it may also have magic method
  29. }
  30. }
  31.  
  32. class D
  33. {
  34. use A, B, C {
  35. A::__get as private __getA;
  36. B::__get as private __getB;
  37. C::__get as private __getC;
  38. }
  39.  
  40. function __get($name)
  41. {
  42. $this->__getA($name);
  43. $this->__getB($name);
  44. $this->__getC($name);
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement