1 | <?php |
||
10 | abstract class AbstractMessage implements MessageInterface |
||
11 | { |
||
12 | /** |
||
13 | * Builds the DOM of the actual message |
||
14 | * |
||
15 | * @param \DOMDocument $doc |
||
16 | * |
||
17 | * @return \DOMElement |
||
18 | */ |
||
19 | abstract protected function buildDom(\DOMDocument $doc); |
||
20 | |||
21 | /** |
||
22 | * Gets the name of the schema |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | abstract protected function getSchemaName(); |
||
27 | |||
28 | /** |
||
29 | * Gets the location of the schema |
||
30 | * |
||
31 | * @return string|null The location or null |
||
32 | */ |
||
33 | abstract protected function getSchemaLocation(); |
||
34 | |||
35 | /** |
||
36 | * Builds a DOM document of the message |
||
37 | * |
||
38 | * @return \DOMDocument |
||
39 | */ |
||
40 | 2 | public function asDom() |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 2 | public function asXml() |
|
65 | |||
66 | /** |
||
67 | * Returns the name of the software used to create the message |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 2 | public function getSoftwareName() |
|
75 | |||
76 | /** |
||
77 | * Returns the version of the software used to create the message |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | 2 | public function getSoftwareVersion() |
|
85 | |||
86 | /** |
||
87 | * Creates a DOM element which contains details about the software used to create the message |
||
88 | * |
||
89 | * @param \DOMDocument $doc |
||
90 | * |
||
91 | * @return \DOMElement |
||
92 | */ |
||
93 | 2 | protected function buildContactDetails(\DOMDocument $doc) |
|
102 | } |
||
103 |