summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/exception.h10
-rw-r--r--include/value.h11
2 files changed, 21 insertions, 0 deletions
diff --git a/include/exception.h b/include/exception.h
index 5bcc26a..8475925 100644
--- a/include/exception.h
+++ b/include/exception.h
@@ -54,6 +54,16 @@ public:
{
return _message;
}
+
+ /**
+ * Process the exception
+ *
+ * This method is called only from withing the PHP-CPP library,
+ * and will turn the exception into a PHP exception
+ *
+ * @internal
+ */
+ virtual void process();
};
/**
diff --git a/include/value.h b/include/value.h
index 2ffbd7c..f2850c9 100644
--- a/include/value.h
+++ b/include/value.h
@@ -308,6 +308,17 @@ public:
Value operator%(double value);
/**
+ * Comparison operators for hardcoded strings
+ * @param value
+ */
+ bool operator==(const char *value) const { return stringValue() == value; }
+ bool operator!=(const char *value) const { return stringValue() != value; }
+ bool operator<=(const char *value) const { return stringValue() <= value; }
+ bool operator>=(const char *value) const { return stringValue() >= value; }
+ bool operator< (const char *value) const { return stringValue() < value; }
+ bool operator> (const char *value) const { return stringValue() > value; }
+
+ /**
* Comparison operators
* @param value
*/