From ebcc52da0318555183e5dd0dbf828d0410343d96 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Thu, 6 Mar 2014 10:43:10 +0100 Subject: changes to documentation --- documentation/classes-and-objects.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'documentation/classes-and-objects.html') 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 -- cgit v1.2.3