From 1b72be7c8bdc5fb9e2eea0652c201a4ee4fec9b1 Mon Sep 17 00:00:00 2001 From: JasperVanEck Date: Fri, 29 Nov 2013 13:30:41 +0100 Subject: Further update README.md --- Examples/README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'Examples') diff --git a/Examples/README.md b/Examples/README.md index 20fcd57..1bb7bd5 100644 --- a/Examples/README.md +++ b/Examples/README.md @@ -13,7 +13,7 @@ The following examples are available: Extension -~~~~~~~~~ +--------- The first example does nothing - it only shows how to create your own extension. This means your extension will be listed in the @@ -71,3 +71,38 @@ FunctionNoParameters Functions and/or classes defined in this example. - Php::Value my_no_parameters_function() + +FunctionWithParameters +---------------------- + + + The fifth example is an example to show how several different kinds + of parameters can used for functions. When defining the parameters for + your function + + The first option being the undefined parameters. With undefined + parameters, we can pass any and as many parameters as we want to + the function. + + The second option is defining each parameter when adding the function + to your extension. In this case we have added two Php::numericType + parameters to the function. In 'type.h' you can find all avaiable + types, however not every type has been implemented yet. + + The third option is passing a reference of a variable. Meaning when + it is altered in the C++ code, its value will also change in the PHP + code. + + Functions and/or classes defined in this example. + - void my_with_undefined_parameters_function(Php::Parameters ¶ms) + - Php::Value my_with_defined_parameters_function(Php::Parameters ¶ms) + - void my_with_defined_parameters_reference_function(Php::Parameters ¶ms) + - void my_with_defined_array_parameters_function(Php::Parameters ¶ms) + - void my_with_defined_object_parameters_function(Php::Parameters ¶ms) + + +Exceptions +---------- + + The sixth example is composed of two parts, the throw exception and + the catch exception examples. -- cgit v1.2.3