summaryrefslogtreecommitdiff
path: root/zend/extensionimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zend/extensionimpl.cpp')
-rw-r--r--zend/extensionimpl.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/zend/extensionimpl.cpp b/zend/extensionimpl.cpp
index 9562362..77b9985 100644
--- a/zend/extensionimpl.cpp
+++ b/zend/extensionimpl.cpp
@@ -106,7 +106,7 @@ static ExtensionImpl *find(int number TSRMLS_DC)
* @param tsrm_ls
* @return int 0 on success
*/
-int ExtensionImpl::onStartup(int type, int module_number TSRMLS_DC)
+int ExtensionImpl::processStartup(int type, int module_number TSRMLS_DC)
{
// initialize and allocate the "global" variables
ZEND_INIT_MODULE_GLOBALS(phpcpp, init_globals, NULL);
@@ -131,7 +131,7 @@ int ExtensionImpl::onStartup(int type, int module_number TSRMLS_DC)
* @param tsrm_ls
* @return int
*/
-int ExtensionImpl::onShutdown(int type, int module_number TSRMLS_DC)
+int ExtensionImpl::processShutdown(int type, int module_number TSRMLS_DC)
{
// get the extension
auto *extension = find(module_number TSRMLS_CC);
@@ -150,7 +150,7 @@ int ExtensionImpl::onShutdown(int type, int module_number TSRMLS_DC)
* @param tsrm_ls
* @return int 0 on success
*/
-int ExtensionImpl::onRequest(int type, int module_number TSRMLS_DC)
+int ExtensionImpl::processRequest(int type, int module_number TSRMLS_DC)
{
// get the extension
auto *extension = find(module_number TSRMLS_CC);
@@ -169,7 +169,7 @@ int ExtensionImpl::onRequest(int type, int module_number TSRMLS_DC)
* @param tsrm_ls
* @return int 0 on success
*/
-int ExtensionImpl::onIdle(int type, int module_number TSRMLS_DC)
+int ExtensionImpl::processIdle(int type, int module_number TSRMLS_DC)
{
// get the extension
auto *extension = find(module_number TSRMLS_CC);
@@ -187,35 +187,35 @@ int ExtensionImpl::onIdle(int type, int module_number TSRMLS_DC)
* @param name Name of the extension
* @param version Version number
*/
-ExtensionImpl::ExtensionImpl(Extension *data, const char *name, const char *version) : _data(data)
+ExtensionImpl::ExtensionImpl(Extension *data, const char *name, const char *version) : ExtensionBase(data)
{
// keep extension pointer based on the name
name2extension[name] = this;
// assign all members (apart from the globals)
- _entry.size = sizeof(zend_module_entry); // size of the data
- _entry.zend_api = ZEND_MODULE_API_NO; // api number
- _entry.zend_debug = ZEND_DEBUG; // debug mode enabled?
- _entry.zts = USING_ZTS; // is thread safety enabled?
- _entry.ini_entry = NULL; // the php.ini record
- _entry.deps = NULL; // dependencies on other modules
- _entry.name = name; // extension name
- _entry.functions = NULL; // functions supported by this module (none for now)
- _entry.module_startup_func = &ExtensionImpl::onStartup; // startup function for the whole extension
- _entry.module_shutdown_func = &ExtensionImpl::onShutdown; // shutdown function for the whole extension
- _entry.request_startup_func = &ExtensionImpl::onRequest; // startup function per request
- _entry.request_shutdown_func = &ExtensionImpl::onIdle; // shutdown function per request
- _entry.info_func = NULL; // information for retrieving info
- _entry.version = version; // version string
- _entry.globals_size = 0; // size of the global variables
- _entry.globals_ctor = NULL; // constructor for global variables
- _entry.globals_dtor = NULL; // destructor for global variables
- _entry.post_deactivate_func = NULL; // unknown function
- _entry.module_started = 0; // module is not yet started
- _entry.type = 0; // temporary or persistent module, will be filled by Zend engine
- _entry.handle = NULL; // dlopen() handle, will be filled by Zend engine
- _entry.module_number = 0; // module number will be filled in by Zend engine
- _entry.build_id = (char *)ZEND_MODULE_BUILD_ID; // check if extension and zend engine are compatible
+ _entry.size = sizeof(zend_module_entry); // size of the data
+ _entry.zend_api = ZEND_MODULE_API_NO; // api number
+ _entry.zend_debug = ZEND_DEBUG; // debug mode enabled?
+ _entry.zts = USING_ZTS; // is thread safety enabled?
+ _entry.ini_entry = NULL; // the php.ini record
+ _entry.deps = NULL; // dependencies on other modules
+ _entry.name = name; // extension name
+ _entry.functions = NULL; // functions supported by this module (none for now)
+ _entry.module_startup_func = &ExtensionImpl::processStartup; // startup function for the whole extension
+ _entry.module_shutdown_func = &ExtensionImpl::processShutdown; // shutdown function for the whole extension
+ _entry.request_startup_func = &ExtensionImpl::processRequest; // startup function per request
+ _entry.request_shutdown_func = &ExtensionImpl::processIdle; // shutdown function per request
+ _entry.info_func = NULL; // information for retrieving info
+ _entry.version = version; // version string
+ _entry.globals_size = 0; // size of the global variables
+ _entry.globals_ctor = NULL; // constructor for global variables
+ _entry.globals_dtor = NULL; // destructor for global variables
+ _entry.post_deactivate_func = NULL; // unknown function
+ _entry.module_started = 0; // module is not yet started
+ _entry.type = 0; // temporary or persistent module, will be filled by Zend engine
+ _entry.handle = NULL; // dlopen() handle, will be filled by Zend engine
+ _entry.module_number = 0; // module number will be filled in by Zend engine
+ _entry.build_id = (char *)ZEND_MODULE_BUILD_ID; // check if extension and zend engine are compatible
// things that only need to be initialized
#ifdef ZTS