summaryrefslogtreecommitdiff
path: root/zend/namespace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zend/namespace.cpp')
-rw-r--r--zend/namespace.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/zend/namespace.cpp b/zend/namespace.cpp
index 9274bf0..893f2f0 100644
--- a/zend/namespace.cpp
+++ b/zend/namespace.cpp
@@ -26,7 +26,7 @@ Namespace &Namespace::add(const char *name, const native_callback_0 &function, c
if (locked()) return *this;
// add a function
- _functions.push_back(std::make_shared<Function>(name, function, arguments));
+ _functions.push_back(std::make_shared<NativeFunction>(name, function, arguments));
// allow chaining
return *this;
@@ -45,7 +45,7 @@ Namespace &Namespace::add(const char *name, const native_callback_1 &function, c
if (locked()) return *this;
// add a function
- _functions.push_back(std::make_shared<Function>(name, function, arguments));
+ _functions.push_back(std::make_shared<NativeFunction>(name, function, arguments));
// allow chaining
return *this;
@@ -64,7 +64,7 @@ Namespace &Namespace::add(const char *name, const native_callback_2 &function, c
if (locked()) return *this;
// add a function
- _functions.push_back(std::make_shared<Function>(name, function, arguments));
+ _functions.push_back(std::make_shared<NativeFunction>(name, function, arguments));
// allow chaining
return *this;
@@ -83,7 +83,7 @@ Namespace &Namespace::add(const char *name, const native_callback_3 &function, c
if (locked()) return *this;
// add a function
- _functions.push_back(std::make_shared<Function>(name, function, arguments));
+ _functions.push_back(std::make_shared<NativeFunction>(name, function, arguments));
// allow chaining
return *this;
@@ -97,13 +97,13 @@ Namespace &Namespace::add(const char *name, const native_callback_3 &function, c
*
* @param callback
*/
-void Namespace::functions(const std::function<void(const std::string &ns, Function &func)> &callback)
+void Namespace::functions(const std::function<void(const std::string &ns, NativeFunction &func)> &callback)
{
// loop through the functions, and apply the callback
for (auto &function : _functions) callback(_name, *function);
// loop through the other namespaces
- for (auto &ns : _namespaces) ns->functions([this, callback](const std::string &ns, Function &func) {
+ for (auto &ns : _namespaces) ns->functions([this, callback](const std::string &ns, NativeFunction &func) {
// if this is the root namespace, we don't have to change the prefix
if (_name.size() == 0) return callback(ns, func);