summaryrefslogtreecommitdiff
path: root/documentation/classes-and-objects.html
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-06 18:13:20 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-06 18:13:20 +0100
commitc3f87faa5ae3a88fbd85ce67349ecb42bc6c1138 (patch)
treea6e0d9453e65214eb1ae7a5acf2ec4bbedaf50fe /documentation/classes-and-objects.html
parent9b44fc65647116f0d2e2b0fd623605977a8c78ca (diff)
changes to documentation
Diffstat (limited to 'documentation/classes-and-objects.html')
-rw-r--r--documentation/classes-and-objects.html18
1 files changed, 8 insertions, 10 deletions
diff --git a/documentation/classes-and-objects.html b/documentation/classes-and-objects.html
index 63c9665..6cbcc7d 100644
--- a/documentation/classes-and-objects.html
+++ b/documentation/classes-and-objects.html
@@ -2,7 +2,7 @@
<p>
Serious business now. C++ and PHP are both object oriented programming
languages, in which you can create classes and objects. The PHP-CPP library
- gives you the tools to combine these two and make a native C++ class
+ gives you the tools to combine these two and make a native C++ classes
accessible from PHP.
</p>
<p>
@@ -96,14 +96,12 @@ Php::Value YourClass::example8(Php::Parameters &amp;params) const;
class to instantiate the moment the "new" operator is used inside a PHP script.
</p>
<p>
- The Php::Class constructor receives a string parameter, with the name of
- the class in PHP. After you've created an instance of the Php::Class object,
- you should specify all methods that you want to make accessible from PHP,
- and finally, when all methods have been registered, you should add the
- class to your extension object so that it will be accessible from PHP.
- Notice that in our example we have used the C++11 std::move() function for this, so
- that the class object is actually <i>moved</i> into the extension object,
- which is a more efficient operation than copying.
+ The Php::Class constructor needs a string parameter, with the name of
+ the class in PHP. The method Php::Class::method() can be used to register
+ the methods that you want to make accessible from PHP. Notice that in our
+ example we have used the C++11 std::move() function to add the class to the
+ extension, so that the class object is actually <i>moved</i> into the extension
+ object, which is a more efficient operation than copying.
</p>
<h2>Method parameters</h2>
<p>
@@ -195,7 +193,7 @@ echo($counter->value()."\n");
</p>
<p>
In the example code we have not shown how to use the Php::ByRef class, but
- that works exaclty the same as in methods, so we thought that an example
+ that works exaclty the same as in function, so we thought that an example
was not really necessary.
</p>
<h2>Access modifiers</h2>