@@ 36-73 (lines=38) @@ | ||
33 | * |
|
34 | * @author Julien Fastré <[email protected]> |
|
35 | */ |
|
36 | class Id extends AbstractElement |
|
37 | { |
|
38 | /** |
|
39 | * |
|
40 | * @var InstanceIdentifier |
|
41 | */ |
|
42 | protected $identifier; |
|
43 | ||
44 | ||
45 | public function __construct(InstanceIdentifier $identifier) |
|
46 | { |
|
47 | $this->setIdentifier($identifier); |
|
48 | } |
|
49 | ||
50 | ||
51 | public function getIdentifier() |
|
52 | { |
|
53 | return $this->identifier; |
|
54 | } |
|
55 | ||
56 | public function setIdentifier(InstanceIdentifier $identifier) |
|
57 | { |
|
58 | $this->identifier = $identifier; |
|
59 | ||
60 | return $this; |
|
61 | } |
|
62 | ||
63 | protected function getElementTag() |
|
64 | { |
|
65 | return 'id'; |
|
66 | } |
|
67 | ||
68 | public function toDOMElement(\DOMDocument $doc) |
|
69 | { |
|
70 | return $this->createElement($doc, array('identifier')); |
|
71 | } |
|
72 | } |
|
73 |
@@ 36-76 (lines=41) @@ | ||
33 | * |
|
34 | * @author Julien Fastré <[email protected]> |
|
35 | */ |
|
36 | class TypeId extends AbstractElement |
|
37 | { |
|
38 | /** |
|
39 | * |
|
40 | * @var InstanceIdentifier |
|
41 | */ |
|
42 | protected $identifier; |
|
43 | ||
44 | public function __construct(InstanceIdentifier $identifier) |
|
45 | { |
|
46 | $this->setIdentifier($identifier); |
|
47 | } |
|
48 | ||
49 | public function getIdentifier() |
|
50 | { |
|
51 | return $this->identifier; |
|
52 | } |
|
53 | ||
54 | public function setIdentifier(InstanceIdentifier $identifier) |
|
55 | { |
|
56 | $this->identifier = $identifier; |
|
57 | return $this; |
|
58 | } |
|
59 | ||
60 | /** |
|
61 | * {@overrideDoc} |
|
62 | * |
|
63 | * @param \DOMDocument $doc |
|
64 | * @return type |
|
65 | */ |
|
66 | public function toDOMElement(\DOMDocument $doc) |
|
67 | { |
|
68 | return $this->createElement($doc, array('identifier')); |
|
69 | } |
|
70 | ||
71 | protected function getElementTag() |
|
72 | { |
|
73 | return 'typeId'; |
|
74 | } |
|
75 | } |
|
76 |