From 7e7617eb0771fa104d948d6e041805e374609022 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Tue, 12 Feb 2008 14:35:12 +0000 Subject: [PATCH] The list and table have been merged into a single annotated table for conciseness and readability git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@252766 c90b9560-bf6c-de11-be94-00142212c4b1 --- internals2/structure/modstruct.xml | 506 ++++++++++++++++++----------- 1 file changed, 324 insertions(+), 182 deletions(-) diff --git a/internals2/structure/modstruct.xml b/internals2/structure/modstruct.xml index 9c130a6e3f..b5a8f131f3 100644 --- a/internals2/structure/modstruct.xml +++ b/internals2/structure/modstruct.xml @@ -1,5 +1,5 @@ - + The zend_module structure @@ -103,190 +103,24 @@ struct _zend_module_entry { globals. - - - - Fields which are not intended for developers to use are marked by an - asterisk (*). - - - - - size * - - - The size in bytes of the structure. - - - - - - zend_api - - - The version of the Zend API this module was compiled against. - - - - - - zend_debug - zts - - - Flags indicating whether the module was compiled with debugging turned on - and/or ZTS (TSRM) enabled. - - - - - - ini_entry - - - This pointer is used internally by Zend to keep a non-local reference to - any INI entries declared for the module. - - - - - - deps - - - A pointer to a list of dependencies for the module. - - - - - - name - - - The name of the module. This is the short name, such as - "spl" or "standard". - - - - - - functions - - - A pointer to the module's function table, which Zend uses to expose - functions in the module to user space. - - - - - - module_startup_func - module_shutdown_func - request_startup_func - request_shutdown_func - - - These are callback functions that Zend will call at particular times - during PHP's processing. Specifically, at first initialization, at final - shutdown, at the start of each particular request, and at the end of each - request. - - - - - - info_func - - - This is another callback function, which Zend will call when a script - invokes phpinfo. - - - - - - version - - - A string giving the version of the module, as specified by the module - developer. It is strongly recommended that the - version number be either in the format expected by - version_compare, or a CVS or SVN revision number - (i.e. "$Rev$"). - - - - - - globals_size (*) - - - The size of the data structure containing the module's globals, if any. - - - - - - globals_id_ptr (*) - globals_ptr (*) - - - Only one of these two fields will exist, depending upon whether the - USING_ZTS constant is &true;. The former is an index - into TSRM's allocation table for the module's globals, and the - latter is a pointer directly to the globals. - - - - - - globals_ctor - globals_dtor - - - These functions are called by Zend to set up and destroy a module's - globals. - - - - - - post_deactivate_func - - - This function is called by Zend after request shutdown. It is rarely used. - - - - - - module_started (*) - type (*) - handle (*) - module_number (*) - - - These fields are used for Zend's internal tracking information. - - - - - - - - This table gives the values that each field would have if the developer - were to fill in the structure entirely by hand, without recourse to any of - the shortcut macros. This is not recommended. The - "correct" values for many fields may change. Use the macros - whenever possible. - + + + This table gives the values that each field would have if the developer + were to fill in the structure entirely by hand, without recourse to any of + the shortcut macros. This is not recommended. The + "correct" values for many fields may change. Use the macros + whenever possible. + + Module structure field values - + - FieldValue + Field + Value + Description @@ -294,23 +128,331 @@ struct _zend_module_entry { size - + + + This field is not intended for use by module developers. + + + + + This field is filled in by STANDARD_MODULE_HEADER_EX. + + + This field is filled in by STANDARD_MODULE_HEADER. sizeof(zend_module_entry) + + The size in bytes of the structure. + zend_api - + + + ZEND_MODULE_API_NO + + The version of the Zend API this module was compiled against. + + + + zend_debug + + + + + ZEND_DEBUG + + A flag indicating whether the module was compiled with debugging turned + on. + + + + + + zts + + + + + USING_ZTS + + A flag indicating whether the module was compiled with ZTS (TSRM) enabled + (see ). + + + + + + ini_entry + + + + &null; + + This pointer is used internally by Zend to keep a non-local reference to + any INI entries declared for the module. + + + + + + deps + + + &null; + + A pointer to a list of dependencies for the module. + + + + + + name + + "mymodule" + + The name of the module. This is the short name, such as "spl" + or "standard". + + + + + + functions + + mymodule_functions + + A pointer to the module's function table, which Zend uses to expose + functions in the module to user space. + + + + + + module_startup_func + + PHP_MINIT(mymodule) + + A callback function that Zend will call the first time a module is loaded + into a particular instance of PHP. + + + + + + module_shutdown_func + + PHP_MSHUTDOWN(mymodule) + + A callback function that Zend will call the when a module is unloaded + from a particular instance of PHP, typically during final shutdown. + + + + + + request_startup_func + + PHP_RINIT(mymodule) + + A callback function that Zend will call at the beginning of each request. + + + + + + request_shutdown_func + + PHP_RSHUTDOWN(mymodule) + + A callback function that Zend will call at the end of each request. + + + + + + info_func + + PHP_MINFO(mymodule) + + A callback function that Zend will call when the phpinfo + function is called. + + + + + + version + + NO_VERSION_YET + + A string giving the version of the module, as specified by the module + developer. It is recommended that the version number be either in the + format expected by version_compare() (e.g. "1.0.5-dev"), or a + CVS or SVN revision number (e.g. "$Rev$"). + + + + + + globals_size + + + + This field is filled in by STANDARD_MODULE_PROPERTIES. + + + + + This field is filled in by NO_MODULE_GLOBALS. + + + + + This field is filled in by PHP_MODULE_GLOBALS. + + + + sizeof(zend_mymodule_globals) + + The size of the data structure containing the module's globals, if any. + + + + + + globals_id_ptr + + + + + + + This field only exists when USING_ZTS is &true;. + + + + &mymodule_globals_id + + Only one of these two fields will exist, depending upon whether the + USING_ZTS constant is &true;. The former is an index + into TSRM's allocation table for the module's globals, and the latter is + a pointer directly to the globals. + + + + + + globals_ptr + + + + + + + This field only exists when USING_ZTS is &false;. + + + + &mymodule_globals + + + + + globals_ctor + + + + + PHP_GINIT(mymodule) + + This funtion is called to initialize a module's globals before + any module_startup_func. + + + + + + globals_dtor + + + + + PHP_GSHUTDOWN(mymodule) + + This funtion is called to deallocate a module's globals after + any module_shutdown_func. + + + + + + post_deactivate_func + + + ZEND_MODULE_POST_ZEND_DEACTIVATE_N(mymodule) + + This function is called by Zend after request shutdown. It is rarely used. + + + + + + module_started + + + + This field is filled in by STANDARD_MODULE_PROPERTIES_EX. + + + + + 0 + + These fields are used for Zend's internal tracking information. + + + + + + type + + + + + 0 + + + + + handle + + + + + &null; + + + + + module_number + + + + + 0 + +