void mongo_init_MongoCursorException(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoCursorException", MongoCursorException_methods); mongo_ce_CursorException = zend_register_internal_class_ex(&ce, mongo_ce_Exception, NULL TSRMLS_CC); zend_declare_property_null(mongo_ce_CursorException, "host", strlen("host"), ZEND_ACC_PRIVATE|ZEND_ACC_DEPRECATED TSRMLS_CC); }
void curlfile_register_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY( ce, "CURLFile", curlfile_funcs ); curl_CURLFile_class = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(curl_CURLFile_class, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_string(curl_CURLFile_class, "mime", sizeof("mime")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_string(curl_CURLFile_class, "postname", sizeof("postname")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); }
/* This probably should be initialized somewhere, but I didn't find a suitable * place so it's wrapped in a function for now */ zend_class_entry *get_zend_standard_class_def() { if (!zend_standard_class_def) { zend_class_entry class_entry; INIT_CLASS_ENTRY(class_entry, "stdClass", nullptr); zend_standard_class_def = zend_register_internal_class(&class_entry TSRMLS_CC); } return zend_standard_class_def; }
void init_distance_map(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "distance_map", distance_map_methods); distance_map_ce = zend_register_internal_class(&ce TSRMLS_CC); distance_map_ce->create_object = create_distance_map_object; memcpy(&distance_map_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); distance_map_handlers.clone_obj = clone_distance_map_object; }
void init_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MTF", mtf_class_methods); //INIT_CLASS_ENTRY(ce, "MTF", Null); object = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(object, "debug", strlen("debug"), "", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_string(object, "session", strlen("session"), "", ZEND_ACC_PUBLIC TSRMLS_CC); }
void NS(MqBufferS_Init) (TSRMLS_D) { zend_class_entry me_ce; // create class and make depend on "Exception" INIT_CLASS_ENTRY(me_ce,"MqBufferS", NS(MqBufferS_functions)); NS(MqBufferS) = zend_register_internal_class(&me_ce TSRMLS_CC); // define additional properties "buf" to save the "struct MqBufferS *" pointer zend_declare_property_null(NS(MqBufferS), ID(__buf), ZEND_ACC_PRIVATE TSRMLS_CC); }
void mongo_init_MongoTimestamp(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoTimestamp", MongoTimestamp_methods); mongo_ce_Timestamp = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_long(mongo_ce_Timestamp, "sec", strlen("sec"), 0, ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_long(mongo_ce_Timestamp, "inc", strlen("inc"), 0, ZEND_ACC_PUBLIC TSRMLS_CC); }
static void class_init_apple_push(void) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "apple_push", apple_push_methods); apple_push_ce_ptr = zend_register_internal_class(&ce); zend_declare_property_string(apple_push_ce_ptr, "certificate", strlen("certificate"), "null", ZEND_ACC_STATIC TSRMLS_CC); zend_declare_property_string(apple_push_ce_ptr, "gateway", strlen("gateway"), "gateway.push.apple.com:2195", ZEND_ACC_STATIC TSRMLS_CC); zend_declare_property_string(apple_push_ce_ptr, "passphrase", strlen("passphrase"), "", ZEND_ACC_STATIC TSRMLS_CC); }
void swoole_client_init(int module_number TSRMLS_DC) { INIT_CLASS_ENTRY(swoole_client_ce, "swoole_client", swoole_client_methods); swoole_client_class_entry_ptr = zend_register_internal_class(&swoole_client_ce TSRMLS_CC); zend_declare_property_long(swoole_client_class_entry_ptr, SW_STRL("errCode")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_long(swoole_client_class_entry_ptr, SW_STRL("sock")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC); zend_hash_init(&php_sw_long_connections, 16, NULL, ZVAL_PTR_DTOR, 1); }
void mongo_init_MongoDBRef(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoDBRef", MongoDBRef_methods); mongo_ce_DBRef = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(mongo_ce_DBRef, "refKey", strlen("refKey"), "$ref", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); zend_declare_property_string(mongo_ce_DBRef, "idKey", strlen("idKey"), "$id", ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); }
int register_focus_interface() { zend_class_entry temp_ce; INIT_CLASS_ENTRY(temp_ce, "Focus\\Focus", focusphp_focus_interface_functions); focusphp_focus_interface = zend_register_internal_class(&temp_ce TSRMLS_CC); focusphp_focus_interface->ce_flags |= ZEND_ACC_INTERFACE; return SUCCESS; }
void php_driver_define_Custom(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, PHP_DRIVER_NAMESPACE "\\Custom", php_driver_custom_methods); php_driver_custom_ce = zend_register_internal_class(&ce TSRMLS_CC); zend_class_implements(php_driver_custom_ce TSRMLS_CC, 1, php_driver_value_ce); php_driver_custom_ce->ce_flags |= ZEND_ACC_ABSTRACT; }
void php_protocolbuffers_enum_descriptor_builder_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "ProtocolBuffersEnumDescriptorBuilder", protocolbuffers_enum_descriptor_builder_methods); php_protocol_buffers_enum_descriptor_builder_class_entry = zend_register_internal_class(&ce TSRMLS_CC); PHP_PROTOCOLBUFFERS_REGISTER_NS_CLASS_ALIAS(PHP_PROTOCOLBUFFERS_NAMESPACE, "EnumDescriptorBuilder", php_protocol_buffers_enum_descriptor_builder_class_entry); //zend_declare_property_null(php_protocol_buffers_enum_descriptor_builder_class_entry, ZEND_STRL("values")-1, ZEND_ACC_PROTECTED TSRMLS_CC); }
void mongo_init_MongoCode(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoCode", MongoCode_methods); ce.create_object = php_mongo_type_object_new; mongo_ce_Code = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(mongo_ce_Code, "code", strlen("code"), "", ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); zend_declare_property_null(mongo_ce_Code, "scope", strlen("scope"), ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); }
void rtv_init_rtvtemplate(TSRMLS_D){ zend_class_entry ce; INIT_CLASS_ENTRY(ce,"RtvTemplate",rtvtemplate_methods); ce.create_object = create_rtv_template_fragments; rtv_ce_rtvtemplate = zend_register_internal_class(&ce TSRMLS_CC); /* fields */ zend_declare_property_bool(rtv_ce_rtvtemplate,"html", strlen("html"),1,ZEND_ACC_PUBLIC TSRMLS_CC); }
void yee_base_exceptions_do_register_ce() { zend_class_entry ce_exception; INIT_CLASS_ENTRY(ce_exception, "yii\\base\\Exception", exception_methods); yee_ce_Exception = zend_register_internal_class_ex(&ce_exception, zend_exception_get_default(TSRMLS_CC), "Exception"); zend_class_implements(yee_ce_Exception TSRMLS_CC, 1, yee_ce_Arrayable); zend_class_entry ce_invalid_call; INIT_CLASS_ENTRY(ce_invalid_call, "yii\\base\\InvalidCallException", invalid_call_exception_methods); yee_ce_InvalidCallException = zend_register_internal_class_ex(&ce_invalid_call, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_invalid_config; INIT_CLASS_ENTRY(ce_invalid_config, "yii\\base\\InvalidConfigException", invalid_config_exception_methods); yee_ce_InvalidConfigException = zend_register_internal_class_ex(&ce_invalid_config, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_invalid_param; INIT_CLASS_ENTRY(ce_invalid_param, "yii\\base\\InvalidParamException", invalid_param_exception_methods); yee_ce_InvalidParamException = zend_register_internal_class_ex(&ce_invalid_param, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_invalid_route; INIT_CLASS_ENTRY(ce_invalid_route, "yii\\base\\InvalidRouteException", invalid_route_exception_methods); yee_ce_InvalidRouteException = zend_register_internal_class_ex(&ce_invalid_route, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_not_supported; INIT_CLASS_ENTRY(ce_not_supported, "yii\\base\\NotSupportedException", not_supported_exception_methods); yee_ce_NotSupportedException = zend_register_internal_class_ex(&ce_not_supported, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_unknown_class; INIT_CLASS_ENTRY(ce_unknown_class, "yii\\base\\UnknowClassException", unknown_class_exception_methods); yee_ce_UnknownClassException = zend_register_internal_class_ex(&ce_unknown_class, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_unknown_method; INIT_CLASS_ENTRY(ce_unknown_method, "yii\\base\\UnknowMethodException", unknown_method_exception_methods); yee_ce_UnknownMethodException = zend_register_internal_class_ex(&ce_unknown_method, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_unknown_property; INIT_CLASS_ENTRY(ce_unknown_property, "yii\\base\\UnknowPropertyException", unknown_property_exception_methods); yee_ce_UnknownPropertyException = zend_register_internal_class_ex(&ce_unknown_property, yee_ce_Exception, "yii\\base\\Exception"); zend_class_entry ce_user_excepton; INIT_CLASS_ENTRY(ce_user_excepton, "yii\\base\\UserException", NULL); yee_ce_UserException = zend_register_internal_class_ex(&ce_user_excepton, yee_ce_Exception, "yii\\base\\Exception"); }
void mongo_init_MongoRegex(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoRegex", MongoRegex_methods); ce.create_object = php_mongo_type_object_new; mongo_ce_Regex = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(mongo_ce_Regex, "regex", strlen("regex"), "", ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); zend_declare_property_string(mongo_ce_Regex, "flags", strlen("flags"), "", ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); }
void couchbase_init_metadoc(INIT_FUNC_ARGS) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "CouchbaseMetaDoc", metadoc_methods); metadoc_ce = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_null(metadoc_ce, "error", strlen("error"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(metadoc_ce, "value", strlen("value"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(metadoc_ce, "flags", strlen("flags"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(metadoc_ce, "cas", strlen("cas"), ZEND_ACC_PUBLIC TSRMLS_CC); }
static void class_init_Handler(void) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Handler", Handler_methods); Handler_ce_ptr = zend_register_internal_class(&ce); /* {{{ Property registration */ zend_declare_property_long(Handler_ce_ptr, "x", 1, 0, ZEND_ACC_PUBLIC TSRMLS_DC); /* }}} Property registration */ }
void grpc_init_timeval() { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Timeval", timeval_methods); ce.create_object = create_wrapped_grpc_timeval; grpc_ce_timeval = zend_register_internal_class(&ce); memcpy(&timeval_object_handlers_timeval, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); timeval_object_handlers_timeval.offset = XtOffsetOf(wrapped_grpc_timeval, std); timeval_object_handlers_timeval.free_obj = free_wrapped_grpc_timeval; }
void mongo_init_MongoDate(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoDate", MongoDate_methods); ce.create_object = php_mongo_type_object_new; mongo_ce_Date = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_long(mongo_ce_Date, "sec", strlen("sec"), 0, ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); zend_declare_property_long(mongo_ce_Date, "usec", strlen("usec"), 0, ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); }
void mongo_init_MongoGridFSFile(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MongoGridFSFile", MongoGridFSFile_methods); mongo_ce_GridFSFile = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_null(mongo_ce_GridFSFile, "file", strlen("file"), ZEND_ACC_PUBLIC|MONGO_ACC_READ_ONLY TSRMLS_CC); zend_declare_property_null(mongo_ce_GridFSFile, "gridfs", strlen("gridfs"), ZEND_ACC_PROTECTED|MONGO_ACC_READ_ONLY TSRMLS_CC); }
void grpc_init_call() { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\Call", call_methods); ce.create_object = create_wrapped_grpc_call; grpc_ce_call = zend_register_internal_class(&ce); memcpy(&call_object_handlers_call, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); call_object_handlers_call.offset = XtOffsetOf(wrapped_grpc_call, std); call_object_handlers_call.free_obj = free_wrapped_grpc_call; return; }
void pux_init_mux(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Pux\\Mux", mux_methods); ce_pux_mux = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_null(ce_pux_mux, "id", strlen("id"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(ce_pux_mux, "routes", strlen("routes"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(ce_pux_mux, "routesById", strlen("routesById"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(ce_pux_mux, "staticRoutes", strlen("staticRoutes"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(ce_pux_mux, "submux", strlen("submux"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_bool(ce_pux_mux, "expand", strlen("expand"), 1, ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_long(ce_pux_mux, "id_counter", strlen("id_counter"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC); }
void MAPIAppointmentRegisterClass(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "MAPIAppointment", mapi_appointment_class_functions); mapi_appointment_ce = zend_register_internal_class_ex(&ce, NULL, "mapimessage" TSRMLS_CC); mapi_appointment_ce->create_object = mapi_message_create_handler; memcpy(&mapi_appointment_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); mapi_appointment_object_handlers.clone_obj = NULL; }
void php_protocolbuffers_enum_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "ProtocolBuffersEnum", protocolbuffers_enum_methods); php_protocol_buffers_enum_class_entry = zend_register_internal_class(&ce TSRMLS_CC); PHP_PROTOCOLBUFFERS_REGISTER_NS_CLASS_ALIAS(PHP_PROTOCOLBUFFERS_NAMESPACE, "Enum", php_protocol_buffers_enum_class_entry); zend_class_implements(php_protocol_buffers_enum_class_entry TSRMLS_CC, 1, php_protocol_buffers_enum_describable_class_entry); php_protocol_buffers_enum_class_entry->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
void swoole_coroutine_util_init(int module_number TSRMLS_DC) { SWOOLE_INIT_CLASS_ENTRY(swoole_coroutine_util_ce, "swoole_coroutine", "Swoole\\Coroutine", swoole_coroutine_util_methods); swoole_coroutine_util_class_entry_ptr = zend_register_internal_class(&swoole_coroutine_util_ce TSRMLS_CC); INIT_CLASS_ENTRY(swoole_coroutine_iterator_ce, "Swoole\\Coroutine\\Iterator", iterator_methods); swoole_coroutine_iterator_class_entry_ptr = zend_register_internal_class(&swoole_coroutine_iterator_ce TSRMLS_CC); zend_class_implements(swoole_coroutine_iterator_class_entry_ptr TSRMLS_CC, 1, zend_ce_iterator); #ifdef SW_HAVE_COUNTABLE zend_class_implements(swoole_coroutine_iterator_class_entry_ptr TSRMLS_CC, 1, zend_ce_countable); #endif if (SWOOLE_G(use_namespace)) { sw_zend_register_class_alias("swoole_coroutine", swoole_coroutine_util_class_entry_ptr); } else { sw_zend_register_class_alias("Swoole\\Coroutine", swoole_coroutine_util_class_entry_ptr); } if (SWOOLE_G(use_shortname)) { sw_zend_register_class_alias("Co", swoole_coroutine_util_class_entry_ptr); } defer_coros = swHashMap_new(SW_HASHMAP_INIT_BUCKET_N, NULL); //prohibit exit in coroutine INIT_CLASS_ENTRY(swoole_exit_exception_ce, "Swoole\\ExitException", swoole_exit_exception_methods); swoole_exit_exception_class_entry_ptr = zend_register_internal_class_ex(&swoole_exit_exception_ce, zend_exception_get_default()); SWOOLE_DEFINE(EXIT_IN_COROUTINE); SWOOLE_DEFINE(EXIT_IN_SERVER); if (SWOOLE_G(cli)) { ori_exit_handler = zend_get_user_opcode_handler(ZEND_EXIT); zend_set_user_opcode_handler(ZEND_EXIT, coro_exit_handler); } }
void message_init(TSRMLS_D) { zend_class_entry class_type; INIT_CLASS_ENTRY(class_type, "Google\\Protobuf\\Internal\\Message", message_methods); message_type = zend_register_internal_class(&class_type TSRMLS_CC); message_handlers = PEMALLOC(zend_object_handlers); memcpy(message_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); message_handlers->write_property = message_set_property; message_handlers->read_property = message_get_property; message_handlers->get_property_ptr_ptr = message_get_property_ptr_ptr; }
void swoole_table_init(int module_number TSRMLS_DC) { INIT_CLASS_ENTRY(swoole_table_ce, "swoole_table", swoole_table_methods); swoole_table_class_entry_ptr = zend_register_internal_class(&swoole_table_ce TSRMLS_CC); #ifdef HAVE_PCRE zend_class_implements(swoole_table_class_entry_ptr TSRMLS_CC, 2, spl_ce_Iterator, spl_ce_Countable); #endif zend_declare_class_constant_long(swoole_table_class_entry_ptr, SW_STRL("TYPE_INT")-1, SW_TABLE_INT TSRMLS_CC); zend_declare_class_constant_long(swoole_table_class_entry_ptr, SW_STRL("TYPE_STRING")-1, SW_TABLE_STRING TSRMLS_CC); zend_declare_class_constant_long(swoole_table_class_entry_ptr, SW_STRL("TYPE_FLOAT")-1, SW_TABLE_FLOAT TSRMLS_CC); }
void php_pb_php_message_options_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "ProtocolBuffersPHPMessageOptions", php_protocolbuffers_php_message_options_methods); protocol_buffers_php_message_options_class_entry = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_bool(protocol_buffers_php_message_options_class_entry, "use_single_property", sizeof("use_single_property")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_string(protocol_buffers_php_message_options_class_entry, "single_property_name", sizeof("single_property_name")-1, "_properties", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_bool(protocol_buffers_php_message_options_class_entry, "process_unknown_fields", sizeof("process_unknown_fields")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC); PHP_PROTOCOLBUFFERS_REGISTER_NS_CLASS_ALIAS(PHP_PROTOCOLBUFFERS_NAMESPACE, "PHPMessageOptions", protocol_buffers_php_message_options_class_entry); }