SoapFormat.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
15 
16 /**
17  * SoapFormat realizes the SOAP request/response format. Nodes are serialized
18  * into an array (the nusoap library creates the XML)
19  *
20  * @author ingo herwig <ingo@wemove.com>
21  */
23 
24  protected $_serializer = null;
25 
26  /**
27  * Constructor
28  * @param $serializer NodeSerializer instance
29  */
30  public function __construct(NodeSerializer $serializer) {
31  $this->_serializer = $serializer;
32  }
33 
34  /**
35  * @see Format::getMimeType()
36  */
37  public function getMimeType() {
38  return 'application/soap+xml';
39  }
40 
41  /**
42  * Set the NodeSerializer instance to use
43  * @param $serializer NodeSerializer
44  */
45  public function setSerializer(NodeSerializer $serializer) {
46  $this->_serializer = $serializer;
47  }
48 
49  /**
50  * @see HierarchicalFormat::isSerializedNode()
51  */
52  protected function isSerializedNode($value) {
53  return $this->_serializer->isSerializedNode($value);
54  }
55 
56  /**
57  * @see HierarchicalFormat::serializeNode()
58  */
59  protected function serializeNode($value) {
60  $node = $this->_serializer->serializeNode($value);
61  return $node;
62  }
63 
64  /**
65  * @see HierarchicalFormat::deserializeNode()
66  */
67  protected function deserializeNode($value) {
68  $result = $this->_serializer->deserializeNode($value);
69  return $result;
70  }
71 }
72 ?>
NodeSerializer implementations are used to serialize Nodes into an array representation or deserializ...
setSerializer(NodeSerializer $serializer)
Set the NodeSerializer instance to use.
Definition: SoapFormat.php:45
SoapFormat realizes the SOAP request/response format.
Definition: SoapFormat.php:22
HierarchicalFormat maybe used as base class for formats that are able to represent hierarchical data ...
__construct(NodeSerializer $serializer)
Constructor.
Definition: SoapFormat.php:30