Lines Matching refs:module
1751 ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{ */ in zend_startup_module_ex()
1756 if (module->module_started) { in zend_startup_module_ex()
1759 module->module_started = 1; in zend_startup_module_ex()
1762 if (module->deps) { in zend_startup_module_ex()
1763 const zend_module_dep *dep = module->deps; in zend_startup_module_ex()
1775 …NG, "Cannot load module '%s' because required module '%s' is not loaded", module->name, dep->name); in zend_startup_module_ex()
1776 module->module_started = 0; in zend_startup_module_ex()
1786 if (module->globals_size) { in zend_startup_module_ex()
1788 …ts_allocate_id(module->globals_id_ptr, module->globals_size, (ts_allocate_ctor) module->globals_ct… in zend_startup_module_ex()
1790 if (module->globals_ctor) { in zend_startup_module_ex()
1791 module->globals_ctor(module->globals_ptr TSRMLS_CC); in zend_startup_module_ex()
1795 if (module->module_startup_func) { in zend_startup_module_ex()
1796 EG(current_module) = module; in zend_startup_module_ex()
1797 if (module->module_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) { in zend_startup_module_ex()
1798 zend_error(E_CORE_ERROR,"Unable to start %s module", module->name); in zend_startup_module_ex()
1808 static int zend_startup_module_int(zend_module_entry *module TSRMLS_DC) /* {{{ */ in zend_startup_module_int()
1810 …return (zend_startup_module_ex(module TSRMLS_CC) == SUCCESS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_AP… in zend_startup_module_int()
1852 zend_module_entry *module; in zend_collect_module_handlers() local
1861 zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS; in zend_collect_module_handlers()
1863 if (module->request_startup_func) { in zend_collect_module_handlers()
1866 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1869 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1886 zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS; in zend_collect_module_handlers()
1888 if (module->request_startup_func) { in zend_collect_module_handlers()
1889 module_request_startup_handlers[startup_count++] = module; in zend_collect_module_handlers()
1891 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1892 module_request_shutdown_handlers[--shutdown_count] = module; in zend_collect_module_handlers()
1894 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1895 module_post_deactivate_handlers[--post_deactivate_count] = module; in zend_collect_module_handlers()
1943 ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{ */ in zend_register_module_ex()
1949 if (!module) { in zend_register_module_ex()
1954 zend_printf("%s: Registering module %d\n", module->name, module->module_number); in zend_register_module_ex()
1958 if (module->deps) { in zend_register_module_ex()
1959 const zend_module_dep *dep = module->deps; in zend_register_module_ex()
1969 …nnot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name); in zend_register_module_ex()
1978 name_len = strlen(module->name); in zend_register_module_ex()
1979 lcname = zend_str_tolower_dup(module->name, name_len); in zend_register_module_ex()
1981 …if (zend_hash_add(&module_registry, lcname, name_len+1, (void *)module, sizeof(zend_module_entry),… in zend_register_module_ex()
1982 zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name); in zend_register_module_ex()
1987 module = module_ptr; in zend_register_module_ex()
1988 EG(current_module) = module; in zend_register_module_ex()
1990 …if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRML… in zend_register_module_ex()
1992 zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name); in zend_register_module_ex()
1997 return module; in zend_register_module_ex()
2001 ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module TSRMLS_DC) /* {… in zend_register_internal_module()
2003 module->module_number = zend_next_free_module(); in zend_register_internal_module()
2004 module->type = MODULE_PERSISTENT; in zend_register_internal_module()
2005 return zend_register_module_ex(module TSRMLS_CC); in zend_register_internal_module()
2099 internal_function->module = EG(current_module); in zend_register_functions()
2372 ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */ in zend_startup_module() argument
2376 …if ((module = zend_register_internal_module(module TSRMLS_CC)) != NULL && zend_startup_module_ex(m… in zend_startup_module()
2385 zend_module_entry *module; in zend_get_module_started() local
2387 …module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module… in zend_get_module_started()
2393 …if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->info.internal.module->module_number == *module_nu… in clean_module_class()
2407 void module_destructor(zend_module_entry *module) /* {{{ */ in module_destructor() argument
2411 if (module->type == MODULE_TEMPORARY) { in module_destructor()
2412 zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC); in module_destructor()
2413 clean_module_constants(module->module_number TSRMLS_CC); in module_destructor()
2414 clean_module_classes(module->module_number TSRMLS_CC); in module_destructor()
2417 if (module->module_started && module->module_shutdown_func) { in module_destructor()
2419 zend_printf("%s: Module shutdown\n", module->name); in module_destructor()
2421 module->module_shutdown_func(module->type, module->module_number TSRMLS_CC); in module_destructor()
2425 if (module->globals_size) { in module_destructor()
2427 if (*module->globals_id_ptr) { in module_destructor()
2428 ts_free_id(*module->globals_id_ptr); in module_destructor()
2431 if (module->globals_dtor) { in module_destructor()
2432 module->globals_dtor(module->globals_ptr TSRMLS_CC); in module_destructor()
2437 module->module_started=0; in module_destructor()
2438 if (module->functions) { in module_destructor()
2439 zend_unregister_functions(module->functions, -1, NULL TSRMLS_CC); in module_destructor()
2444 if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { in module_destructor()
2445 DL_UNLOAD(module->handle); in module_destructor()
2457 zend_module_entry *module = *p; in zend_activate_modules() local
2459 if (module->request_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) { in zend_activate_modules()
2460 zend_error(E_WARNING, "request_startup() for %s module failed", module->name); in zend_activate_modules()
2469 int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) /* {{{ */ in module_registry_cleanup()
2471 if (module->request_shutdown_func) { in module_registry_cleanup()
2473 zend_printf("%s: Request shutdown\n", module->name); in module_registry_cleanup()
2475 module->request_shutdown_func(module->type, module->module_number TSRMLS_CC); in module_registry_cleanup()
2492 zend_module_entry *module = *p; in zend_deactivate_modules() local
2494 module->request_shutdown_func(module->type, module->module_number TSRMLS_CC); in zend_deactivate_modules()
2513 int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{{ */ in module_registry_unload_temp()
2515 return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP; in module_registry_unload_temp()
2519 static int exec_done_cb(zend_module_entry *module TSRMLS_DC) /* {{{ */ in exec_done_cb()
2521 if (module->post_deactivate_func) { in exec_done_cb()
2522 module->post_deactivate_func(); in exec_done_cb()
2537 zend_module_entry *module = *p; in zend_post_deactivate_modules() local
2539 module->post_deactivate_func(); in zend_post_deactivate_modules()
2563 class_entry->info.internal.module = EG(current_module); in do_register_internal_class()
2928 …->function_handler->internal_function.module = (ce_org->type == ZEND_INTERNAL_CLASS) ? ce_org->inf… in zend_is_callable_check_func()
3458 zend_module_entry *module; in zend_get_module_version() local
3461 if (zend_hash_find(&module_registry, lname, name_len + 1, (void**)&module) == FAILURE) { in zend_get_module_version()
3466 return module->version; in zend_get_module_version()