1 | <?php |
||
8 | abstract class AbstractMessage implements MessageInterface |
||
9 | { |
||
10 | const SCHEMA_LOCATION = 'http://www.six-interbank-clearing.com/de/%s'; |
||
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 | * Builds a DOM document of the message |
||
30 | * |
||
31 | * @return \DOMDocument |
||
32 | */ |
||
33 | 2 | public function asDom() |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 2 | public function asXml() |
|
57 | |||
58 | /** |
||
59 | * Returns the name of the software used to create the message |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | 2 | public function getSoftwareName() |
|
67 | |||
68 | /** |
||
69 | * Returns the version of the software used to create the message |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | 2 | public function getSoftwareVersion() |
|
77 | |||
78 | /** |
||
79 | * Creates a DOM element which contains details about the software used to create the message |
||
80 | * |
||
81 | * @param \DOMDocument $doc |
||
82 | * |
||
83 | * @return \DOMElement |
||
84 | */ |
||
85 | 2 | protected function buildContactDetails(\DOMDocument $doc) |
|
94 | } |
||
95 |