aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCBoolParameter.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/XMLRPCBoolParameter.php')
-rw-r--r--engine/classes/XMLRPCBoolParameter.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/classes/XMLRPCBoolParameter.php b/engine/classes/XMLRPCBoolParameter.php
new file mode 100644
index 000000000..c2714ceff
--- /dev/null
+++ b/engine/classes/XMLRPCBoolParameter.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * @class XMLRPCBoolParameter A boolean.
+ * @author Curverider Ltd
+ */
+class XMLRPCBoolParameter extends XMLRPCParameter
+{
+ function __construct($value)
+ {
+ parent::__construct();
+
+ $this->value = (bool)$value;
+ }
+
+ function __toString()
+ {
+ $code = ($this->value) ? "1" : "0";
+ return "<value><boolean>{$code}</boolean></value>";
+ }
+} \ No newline at end of file