1: <?php
2: /**
3: * A base 64 encoded blob of binary.
4: *
5: * @package Elgg.Core
6: * @subpackage XMLRPC
7: */
8: class XMLRPCBase64Parameter extends XMLRPCParameter {
9: /**
10: * Construct a base64 encoded block
11: *
12: * @param string $blob Unencoded binary blob
13: */
14: function __construct($blob) {
15: parent::__construct();
16:
17: $this->value = base64_encode($blob);
18: }
19:
20: /**
21: * Convert to string
22: *
23: * @return string
24: */
25: function __toString() {
26: return "<value><base64>{$value}</base64></value>";
27: }
28: }
29: