namespaced.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. namespace mindplay\test\traits;
  3. trait AnotherSimpleTrait
  4. {
  5. /**
  6. * @note('another-simple-trait')
  7. */
  8. protected $sampleFromAnotherTrait = 'test';
  9. /**
  10. * @Note('another-simple-trait')
  11. */
  12. public function runFromAnotherTrait()
  13. {
  14. }
  15. }
  16. trait AliasBaseTrait
  17. {
  18. /**
  19. * @Note('alias-base-trait')
  20. */
  21. public function run()
  22. {
  23. }
  24. }
  25. trait AliasTrait
  26. {
  27. use \mindplay\test\traits\AliasBaseTrait {
  28. \mindplay\test\traits\AliasBaseTrait::run as baseTraitRun;
  29. }
  30. /**
  31. * @Note('alias-trait')
  32. */
  33. public function run()
  34. {
  35. }
  36. }
  37. trait InsteadofBaseTraitA
  38. {
  39. /**
  40. * @Note('insteadof-base-trait-a')
  41. */
  42. public function baseTrait()
  43. {
  44. }
  45. }
  46. trait InsteadofBaseTraitB
  47. {
  48. /**
  49. * @Note('insteadof-base-trait-b')
  50. */
  51. public function baseTrait()
  52. {
  53. }
  54. }
  55. trait InsteadofTraitA
  56. {
  57. use InsteadofBaseTraitA, InsteadofBaseTraitB {
  58. InsteadofBaseTraitA::baseTrait insteadof InsteadofBaseTraitB;
  59. }
  60. /**
  61. * @Note('insteadof-trait-a')
  62. */
  63. public function trate()
  64. {
  65. }
  66. }
  67. trait InsteadofTraitB
  68. {
  69. use InsteadofBaseTraitA, InsteadofBaseTraitB {
  70. InsteadofBaseTraitB::baseTrait insteadof InsteadofBaseTraitA;
  71. }
  72. /**
  73. * @Note('insteadof-trait-b')
  74. */
  75. public function trate()
  76. {
  77. }
  78. }