summaryrefslogtreecommitdiff
path: root/include/class.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/class.h')
-rw-r--r--include/class.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/class.h b/include/class.h
index e11074c..2c875fa 100644
--- a/include/class.h
+++ b/include/class.h
@@ -91,12 +91,16 @@ public:
/**
* Add a static method to a class
*
- * In C++ a static method is just a plain function, that only at compile
- * time has access to the private variables. You can therefore also supply
- * global functions as static method, and real static methods (that do not
- * even have to come from the same class.
+ * In C++ a static method is in reality just a plain function, that at
+ * compile time has access to private properties of the class that it is a
+ * static member of.
*
- * In PHP scripts, the function will only be callable as real static method
+ * Because a C++ static method is not a real method with a 'this' pointer,
+ * it has the same signature as a normal C++ (non-method) function. Therefore,
+ * you can register real static member functions (&MyClass::myMethod) as well
+ * as normal functions (myFunction) as class methods.
+ *
+ * In PHP scripts, such functions will be callable as static class methods
*
* @param name Name of the method
* @param method The actual method