summaryrefslogtreecommitdiff
path: root/Examples/CppClassesInPhp/cppclassinphp.php
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-01 22:39:31 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-01 22:39:31 +0100
commit6abc8b4c062c7333a98830004da894ff81613d5b (patch)
tree7b11179ef6775130fce0c4ef537fb3656f716852 /Examples/CppClassesInPhp/cppclassinphp.php
parentabc3b4fbf996a647bcefb02e4ecf643b659577c9 (diff)
added possibility to define interfaces, the class::add() method has been renamed to class::method() and class::property() to prevent ambiguity in defining properties and methods
Diffstat (limited to 'Examples/CppClassesInPhp/cppclassinphp.php')
-rw-r--r--Examples/CppClassesInPhp/cppclassinphp.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/Examples/CppClassesInPhp/cppclassinphp.php b/Examples/CppClassesInPhp/cppclassinphp.php
index cf1e42c..c2076d3 100644
--- a/Examples/CppClassesInPhp/cppclassinphp.php
+++ b/Examples/CppClassesInPhp/cppclassinphp.php
@@ -6,12 +6,17 @@
* An example file to show the working of using a C++ class in PHP.
*/
-// run the regular function
-myFunction();
-
//create a MyCustomClass object, which is an object of a C++ class
$object = new MyClass();
+class ImplementedInterface implements MyInterface
+{
+}
+
+$object2 = new ImplementedInterface();
+
+return;
+
// run a function of the class
$object->myMethod(1);