diff options
Diffstat (limited to 'README.EXT_SKEL')
-rw-r--r-- | README.EXT_SKEL | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/README.EXT_SKEL b/README.EXT_SKEL index 20b684ddfa..d44fcc5c6a 100644 --- a/README.EXT_SKEL +++ b/README.EXT_SKEL @@ -45,29 +45,12 @@ HOW TO USE IT --proto=filename. -SOURCE AND HEADER FILE NAME - - ./ext_skel generates 'module_name.c' and 'php_module_name.h' as main source - and header files. Keep these names. - - Module functions (User functions) must be named - - module_name_function() - - When you need to expose module functions to other modules, expose functions - strictly needed by others. Exposed internal function must be named - - php_module_name_function() - - See also CODING_STANDARDS. - - FORMAT OF FUNCTION DEFINITIONS FILE All the definitions must be on one line. In it's simplest form, it's just the function name, e.g. - module_name_function + my_function but then you'll be left with an almost empty function body without any argument handling. @@ -89,9 +72,8 @@ FORMAT OF FUNCTION DEFINITIONS FILE An example: - module_name_function(int arg1, int arg2 [, int arg3 [, int arg4]]) + my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st - Arguments arg1 and arg2 is required. Arguments arg3 and arg4 are optional. If possible, the function definition should also contain it's return type @@ -151,15 +133,15 @@ EXAMPLE The following _one_ line - bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color]) + bool my_drawtext(resource image, string text, resource font, int x, int y [, int color]) will create this function definition for you (note that there are a few question marks to be replaced by you, and you must of course add your own value definitions too): -/* {{{ proto bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color]) +/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y [, int color]) */ -PHP_FUNCTION(module_name_drawtext) +PHP_FUNCTION(my_drawtext) { char *text = NULL; int argc = ZEND_NUM_ARGS(); @@ -182,7 +164,7 @@ PHP_FUNCTION(module_name_drawtext) ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id); } - php_error(E_WARNING, "module_name_drawtext: not yet implemented"); + php_error(E_WARNING, "my_drawtext: not yet implemented"); } /* }}} */ |