123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- Traits
- -----
- <?php
- trait A {
- public function a() {}
- }
- class B {
- use C;
- use D {
- a as protected b;
- c as d;
- e as private;
- }
- use E, F, G {
- E::a insteadof F, G;
- E::b as protected c;
- E::d as e;
- E::f as private;
- }
- }
- -----
- array(
- 0: Stmt_Trait(
- name: A
- stmts: array(
- 0: Stmt_ClassMethod(
- flags: MODIFIER_PUBLIC (1)
- byRef: false
- name: a
- params: array(
- )
- returnType: null
- stmts: array(
- )
- )
- )
- )
- 1: Stmt_Class(
- flags: 0
- name: B
- extends: null
- implements: array(
- )
- stmts: array(
- 0: Stmt_TraitUse(
- traits: array(
- 0: Name(
- parts: array(
- 0: C
- )
- )
- )
- adaptations: array(
- )
- )
- 1: Stmt_TraitUse(
- traits: array(
- 0: Name(
- parts: array(
- 0: D
- )
- )
- )
- adaptations: array(
- 0: Stmt_TraitUseAdaptation_Alias(
- trait: null
- method: a
- newModifier: MODIFIER_PROTECTED (2)
- newName: b
- )
- 1: Stmt_TraitUseAdaptation_Alias(
- trait: null
- method: c
- newModifier: null
- newName: d
- )
- 2: Stmt_TraitUseAdaptation_Alias(
- trait: null
- method: e
- newModifier: MODIFIER_PRIVATE (4)
- newName: null
- )
- )
- )
- 2: Stmt_TraitUse(
- traits: array(
- 0: Name(
- parts: array(
- 0: E
- )
- )
- 1: Name(
- parts: array(
- 0: F
- )
- )
- 2: Name(
- parts: array(
- 0: G
- )
- )
- )
- adaptations: array(
- 0: Stmt_TraitUseAdaptation_Precedence(
- trait: Name(
- parts: array(
- 0: E
- )
- )
- method: a
- insteadof: array(
- 0: Name(
- parts: array(
- 0: F
- )
- )
- 1: Name(
- parts: array(
- 0: G
- )
- )
- )
- )
- 1: Stmt_TraitUseAdaptation_Alias(
- trait: Name(
- parts: array(
- 0: E
- )
- )
- method: b
- newModifier: MODIFIER_PROTECTED (2)
- newName: c
- )
- 2: Stmt_TraitUseAdaptation_Alias(
- trait: Name(
- parts: array(
- 0: E
- )
- )
- method: d
- newModifier: null
- newName: e
- )
- 3: Stmt_TraitUseAdaptation_Alias(
- trait: Name(
- parts: array(
- 0: E
- )
- )
- method: f
- newModifier: MODIFIER_PRIVATE (4)
- newName: null
- )
- )
- )
- )
- )
- )
|