aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/MathExecutor.php
diff options
context:
space:
mode:
authorBruce Wells <bruce.wells@simparel.com>2018-10-30 23:16:01 +0300
committerBruce Wells <bruce.wells@simparel.com>2018-10-31 16:35:40 +0300
commitf0d4562b9ef3bbc64cb8353f0597e639420ede6b (patch)
tree86f215d0c7187843e863e7a980ae81943e7d4a5f /src/NXP/MathExecutor.php
parent334dd26e3c78a36002aed34aa26aa526b11c5dfb (diff)
Division By Zero Exception support
Updated the documentation. Unit tests for strings. DivisionByZeroException support.
Diffstat (limited to 'src/NXP/MathExecutor.php')
-rw-r--r--src/NXP/MathExecutor.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index d62d07a..fbf6ab1 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -219,6 +219,29 @@ class MathExecutor
}
/**
+ * Set division by zero exception reporting
+ *
+ * @param bool $exception default true
+ *
+ * @return MathExecutor
+ */
+ public function setDivisionByZeroException($exception = true)
+ {
+ $this->tokenFactory->setDivisionByZeroException($exception);
+ return $this;
+ }
+
+ /**
+ * Get division by zero exception status
+ *
+ * @return bool
+ */
+ public function getDivisionByZeroException()
+ {
+ return $this->tokenFactory->getDivisionByZeroException();
+ }
+
+ /**
* Execute expression
*
* @param $expression