diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 10:43:10 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 10:43:10 +0100 |
commit | ebcc52da0318555183e5dd0dbf828d0410343d96 (patch) | |
tree | 0a3fb337d4c35e42e8f32cf65f94f65625c8f985 /documentation/classes-and-objects.html | |
parent | 0b9a0e7cf6b7ae6e723e8c924b82190053247c78 (diff) |
changes to documentation
Diffstat (limited to 'documentation/classes-and-objects.html')
-rw-r--r-- | documentation/classes-and-objects.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/documentation/classes-and-objects.html b/documentation/classes-and-objects.html index de4e234..f407f2d 100644 --- a/documentation/classes-and-objects.html +++ b/documentation/classes-and-objects.html @@ -141,8 +141,18 @@ extern "C" { // description of the class so that PHP knows which methods are accessible Php::Class<Counter> counter("Counter"); - counter.method("increment", &Counter::increment, { Php::ByVal("change", Php::Type::Numeric, false) }); - counter.method("decrement", &Counter::decrement, { Php::ByVal("change", Php::Type::Numeric, false) }); + + // register the increment method, and specify its parameters + counter.method("increment", &Counter::increment, { + Php::ByVal("change", Php::Type::Numeric, false) + }); + + // register the decrement, and specify its parameters + counter.method("decrement", &Counter::decrement, { + Php::ByVal("change", Php::Type::Numeric, false) + }); + + // register the value method counter.method("value", &Counter::value); // add the class to the extension |