aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2018-09-06 20:39:56 +0300
committerGitHub <noreply@github.com>2018-09-06 20:39:56 +0300
commitaa1a092a9e231e8f923ab40365dff092c2908903 (patch)
treec192d6dd2948e83122893ab67228141b271c2d22 /src/NXP/Classes
parent855ca5dfc1a6d70d9872df4b0d7bea8ba3c4c040 (diff)
parent3011a1c55686ef5a0c7759ae1efcb2a71623ab9c (diff)
Merge pull request #26 from phpfui/getters_for_function_and_operators
Getters for function and operators
Diffstat (limited to 'src/NXP/Classes')
-rw-r--r--src/NXP/Classes/TokenFactory.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/NXP/Classes/TokenFactory.php b/src/NXP/Classes/TokenFactory.php
index 19ba1cf..2b1e00e 100644
--- a/src/NXP/Classes/TokenFactory.php
+++ b/src/NXP/Classes/TokenFactory.php
@@ -51,6 +51,18 @@ class TokenFactory
$this->functions[$name] = array($places, $function);
}
+
+ /**
+ * get functions
+ *
+ * @return array containing callback and places indexed by
+ * function name
+ */
+ public function getFunctions()
+ {
+ return $this->functions;
+ }
+
/**
* Add operator
* @param string $operatorClass
@@ -69,6 +81,16 @@ class TokenFactory
}
/**
+ * Get registered operators
+ *
+ * @return array of operator class names
+ */
+ public function getOperators()
+ {
+ return $this->operators;
+ }
+
+ /**
* Add variable
* @param string $name
* @param mixed $value