aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCBase64Parameter.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
committerSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
commit9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch)
tree87377f7b889efc639935508556beb9baf010e821 /engine/classes/XMLRPCBase64Parameter.php
parent24690ed95198c093e6fbb91a94b5d0544c740f89 (diff)
downloadelgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz
elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'engine/classes/XMLRPCBase64Parameter.php')
-rw-r--r--engine/classes/XMLRPCBase64Parameter.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/engine/classes/XMLRPCBase64Parameter.php b/engine/classes/XMLRPCBase64Parameter.php
new file mode 100644
index 000000000..7db0a761c
--- /dev/null
+++ b/engine/classes/XMLRPCBase64Parameter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * A base 64 encoded blob of binary.
+ *
+ * @package Elgg.Core
+ * @subpackage XMLRPC
+ */
+class XMLRPCBase64Parameter extends XMLRPCParameter {
+ /**
+ * Construct a base64 encoded block
+ *
+ * @param string $blob Unencoded binary blob
+ */
+ function __construct($blob) {
+ parent::__construct();
+
+ $this->value = base64_encode($blob);
+ }
+
+ /**
+ * Convert to string
+ *
+ * @return string
+ */
+ function __toString() {
+ return "<value><base64>{$value}</base64></value>";
+ }
+}