1 | <?php |
||
25 | class TraitConverter |
||
26 | { |
||
27 | /** @var DocBlockConverter object used to convert DocBlocks into their XML counterpart */ |
||
28 | protected $docBlockConverter; |
||
29 | |||
30 | /** @var MethodConverter object used to convert methods into their XML counterpart */ |
||
31 | protected $methodConverter; |
||
32 | |||
33 | /** @var PropertyConverter object used to convert properties into their XML counterpart */ |
||
34 | protected $propertyConverter; |
||
35 | |||
36 | /** |
||
37 | * Initializes this converter with the DocBlock converter. |
||
38 | */ |
||
39 | 1 | public function __construct( |
|
48 | |||
49 | /** |
||
50 | * Export the given reflected Trait definition to the provided parent element. |
||
51 | * |
||
52 | * This method creates a new child element on the given parent XML element |
||
53 | * and takes the properties of the Reflection argument and sets the |
||
54 | * elements and attributes on the child. |
||
55 | * |
||
56 | * If a child DOMElement is provided then the properties and attributes are |
||
57 | * set on this but the child element is not appended onto the parent. This |
||
58 | * is the responsibility of the invoker. Essentially this means that the |
||
59 | * $parent argument is ignored in this case. |
||
60 | * |
||
61 | * @param \DOMElement $parent Element to augment. |
||
62 | * @param TraitDescriptor $trait Element to export. |
||
63 | * |
||
64 | * @return \DOMElement |
||
65 | */ |
||
66 | 1 | public function convert(\DOMElement $parent, TraitDescriptor $trait) |
|
90 | } |
||
91 |