Beispiel #1
0
void phpg_register_exceptions()
{
	zend_class_entry ce;
	TSRMLS_FETCH();

	INIT_CLASS_ENTRY(ce, "PhpGtkException", NULL);
#if ZEND_EXTENSION_API_NO > 220051025
	phpg_generic_exception = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#else
	phpg_generic_exception = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
#endif
	phpg_generic_exception->ce_flags |= ZEND_ACC_FINAL;
	phpg_generic_exception->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;

	INIT_CLASS_ENTRY(ce, "PhpGtkConstructException", NULL);
	phpg_construct_exception = zend_register_internal_class_ex(&ce, phpg_generic_exception, NULL TSRMLS_CC);
	phpg_construct_exception->ce_flags |= ZEND_ACC_FINAL;
	phpg_construct_exception->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;

	INIT_CLASS_ENTRY(ce, "PhpGtkTypeException", NULL);
	phpg_type_exception = zend_register_internal_class_ex(&ce, phpg_generic_exception, NULL TSRMLS_CC);
	phpg_type_exception->ce_flags |= ZEND_ACC_FINAL;
	phpg_type_exception->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;

	INIT_CLASS_ENTRY(ce, "PhpGtkGErrorException", NULL);
	phpg_gerror_exception = zend_register_internal_class_ex(&ce, phpg_generic_exception, NULL TSRMLS_CC);
	phpg_gerror_exception->ce_flags |= ZEND_ACC_FINAL;
	phpg_gerror_exception->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
	zend_declare_property_string(phpg_gerror_exception, "domain", sizeof("domain")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
	zend_declare_property_string(phpg_gerror_exception, "message", sizeof("message")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
	zend_declare_property_string(phpg_gerror_exception, "code", sizeof("code")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC);
}
void php_phongo_logicexception_init_ce(INIT_FUNC_ARGS) /* {{{ */
{
	zend_class_entry ce;

	INIT_NS_CLASS_ENTRY(ce, "MongoDB\\Driver\\Exception", "LogicException", php_phongo_logicexception_me);
#if PHP_VERSION_ID >= 70000
	php_phongo_logicexception_ce = zend_register_internal_class_ex(&ce, spl_ce_LogicException);
#else
	php_phongo_logicexception_ce = zend_register_internal_class_ex(&ce, spl_ce_LogicException, NULL TSRMLS_CC);
#endif
	zend_class_implements(php_phongo_logicexception_ce TSRMLS_CC, 1, php_phongo_exception_ce);
} /* }}} */
void php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS) /* {{{ */
{
	zend_class_entry ce;

	INIT_NS_CLASS_ENTRY(ce, "MongoDB\\Driver\\Exception", "ConnectionTimeoutException", php_phongo_connectiontimeoutexception_me);
#if PHP_VERSION_ID >= 70000
	php_phongo_connectiontimeoutexception_ce = zend_register_internal_class_ex(&ce, php_phongo_connectionexception_ce);
#else
	php_phongo_connectiontimeoutexception_ce = zend_register_internal_class_ex(&ce, php_phongo_connectionexception_ce, NULL TSRMLS_CC);
#endif
	PHONGO_CE_FINAL(php_phongo_connectiontimeoutexception_ce);
} /* }}} */
void riak_map_reduce_input_key_data_list_input_init(TSRMLS_D) /* {{{ */
{
    zend_class_entry ce;
    INIT_NS_CLASS_ENTRY(ce, "Riak\\MapReduce\\Input", "KeyDataListInput", riak_mrinputkeydatalist_methods);
    riak_mrinput_keydatalist_ce = zend_register_internal_class_ex(&ce, riak_mrinput_ce, NULL TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_keydatalist_ce, "inputList", sizeof("inputList")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
}
Beispiel #5
0
void sapnwrfc_register_exceptions()
{
    zend_class_entry ce;

    INIT_CLASS_ENTRY(ce, "SAPNWRFC\\Exception", sapnwrfc_exception_class_functions);
    sapnwrfc_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RuntimeException);
    zend_declare_property_null(sapnwrfc_exception_ce, "errorInfo", sizeof("errorInfo") - 1, ZEND_ACC_PROTECTED);

    INIT_CLASS_ENTRY(ce, "SAPNWRFC\\ConnectionException", NULL);
    sapnwrfc_connection_exception_ce = zend_register_internal_class_ex(&ce, sapnwrfc_exception_ce);
    sapnwrfc_connection_exception_ce->ce_flags |= ZEND_ACC_FINAL;

    INIT_CLASS_ENTRY(ce, "SAPNWRFC\\FunctionCallException", NULL);
    sapnwrfc_function_exception_ce = zend_register_internal_class_ex(&ce, sapnwrfc_exception_ce);
    sapnwrfc_function_exception_ce->ce_flags |= ZEND_ACC_FINAL;
}
Beispiel #6
0
void mongo_init_MongoConnectionException(TSRMLS_D)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "MongoConnectionException", NULL);
	mongo_ce_ConnectionException = zend_register_internal_class_ex(&ce, mongo_ce_Exception, NULL TSRMLS_CC);
}
void mongo_init_MongoDuplicateKeyException(TSRMLS_D)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "MongoDuplicateKeyException", NULL);
	mongo_ce_DuplicateKeyException = zend_register_internal_class_ex(&ce, mongo_ce_WriteConcernException, NULL TSRMLS_CC);
}
void cassandra_define_WriteTimeoutException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\WriteTimeoutException", WriteTimeoutException_methods);
  cassandra_write_timeout_exception_ce = zend_register_internal_class_ex(&ce, cassandra_execution_exception_ce, NULL TSRMLS_CC);
}
Beispiel #9
0
void cassandra_define_ServerException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\ServerException", ServerException_methods);
  cassandra_server_exception_ce = zend_register_internal_class_ex(&ce, cassandra_runtime_exception_ce, NULL TSRMLS_CC);
}
void cassandra_define_InvalidSyntaxException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\InvalidSyntaxException", InvalidSyntaxException_methods);
  cassandra_invalid_syntax_exception_ce = zend_register_internal_class_ex(&ce, cassandra_validation_exception_ce, NULL TSRMLS_CC);
}
Beispiel #11
0
void yee_behavior_do_register_ce() {
	zend_class_entry ce;
	INIT_CLASS_ENTRY(ce, "yii\\base\\Behavior", methods_Behavior);
	yee_ce_Behavior = zend_register_internal_class_ex(&ce, yee_ce_Object, "yii\\base\\Object");
	
	zend_declare_property_null(yee_ce_Behavior, ZEND_STRL("owner"), ZEND_ACC_PUBLIC);
}
Beispiel #12
0
void cassandra_define_TruncateException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\TruncateException", TruncateException_methods);
  cassandra_truncate_exception_ce = zend_register_internal_class_ex(&ce, cassandra_execution_exception_ce, NULL TSRMLS_CC);
}
void cassandra_define_DivideByZeroException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\DivideByZeroException", DivideByZeroException_methods);
  cassandra_divide_by_zero_exception_ce = zend_register_internal_class_ex(&ce, cassandra_range_exception_ce, NULL TSRMLS_CC);
  zend_class_implements(cassandra_divide_by_zero_exception_ce TSRMLS_CC, 1, cassandra_exception_ce);
}
void ktaglib_init_KTaglib_ID3v2_CommentsFrame(void)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "KTaglib_ID3v2_CommentsFrame", KTaglib_ID3v2_CommentsFrame_methods);
	ce.create_object = ktaglib_init_KTaglib_new;
	ktaglib_ce_ID3v2_CommentsFrame = zend_register_internal_class_ex(&ce, ktaglib_ce_ID3v2_Frame, NULL TSRMLS_CC);
}
void cassandra_define_InvalidArgumentException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\InvalidArgumentException", InvalidArgumentException_methods);
  cassandra_invalid_argument_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_InvalidArgumentException, NULL TSRMLS_CC);
  zend_class_implements(cassandra_invalid_argument_exception_ce TSRMLS_CC, 1, cassandra_exception_ce);
}
Beispiel #16
0
void cassandra_define_RangeException(TSRMLS_D)
{
  zend_class_entry ce;

  INIT_CLASS_ENTRY(ce, "Cassandra\\Exception\\RangeException", RangeException_methods);
  cassandra_range_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RangeException, NULL TSRMLS_CC);
  zend_class_implements(cassandra_range_exception_ce TSRMLS_CC, 1, cassandra_exception_ce);
}
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 mongo_init_MongoResultException(TSRMLS_D)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "MongoResultException", MongoResultException_methods);
	mongo_ce_ResultException = zend_register_internal_class_ex(&ce, mongo_ce_Exception, NULL TSRMLS_CC);

	zend_declare_property_null(mongo_ce_ResultException, "document", strlen("document"), ZEND_ACC_PUBLIC TSRMLS_CC);
}
Beispiel #19
0
void mongo_init_MongoUpdateBatch(TSRMLS_D)
{
	zend_class_entry update_batch;
	INIT_CLASS_ENTRY(update_batch, "MongoUpdateBatch", MongoUpdateBatch_methods);

	update_batch.create_object = php_mongo_write_batch_object_new;

	mongo_ce_UpdateBatch = zend_register_internal_class_ex(&update_batch, mongo_ce_WriteBatch, "MongoWriteBatch" TSRMLS_CC);
}
Beispiel #20
0
void mongo_init_MongoGridFSCursor(TSRMLS_D)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "MongoGridFSCursor", MongoGridFSCursor_methods);
	mongo_ce_GridFSCursor = zend_register_internal_class_ex(&ce, mongo_ce_Cursor, "MongoCursor" TSRMLS_CC);

	zend_declare_property_null(mongo_ce_GridFSCursor, "gridfs", strlen("gridfs"), ZEND_ACC_PROTECTED|MONGO_ACC_READ_ONLY TSRMLS_CC);
}
void mongo_init_MongoWriteConcernException(TSRMLS_D)
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "MongoWriteConcernException", MongoWriteConcernException_methods);
	mongo_ce_WriteConcernException = zend_register_internal_class_ex(&ce, mongo_ce_CursorException, NULL TSRMLS_CC);

	zend_declare_property_null(mongo_ce_WriteConcernException, "document", strlen("document"), ZEND_ACC_PRIVATE TSRMLS_CC);
}
Beispiel #22
0
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");
}
Beispiel #23
0
void riak_map_reduce_input_bucket_input_init(TSRMLS_D) /* {{{ */
{
    zend_class_entry ce;
    INIT_NS_CLASS_ENTRY(ce, "Riak\\MapReduce\\Input", "BucketInput", riak_mrinputbucket_methods);
    riak_mrinput_bucket_ce = zend_register_internal_class_ex(&ce, riak_mrinput_ce, NULL TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_bucket_ce, "name", sizeof("name")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_bucket_ce, "keyFilters", sizeof("keyFilters")-1, ZEND_ACC_PUBLIC TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_bucket_ce, "idxname", sizeof("idxname")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_bucket_ce, "idxstart", sizeof("idxstart")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_mrinput_bucket_ce, "idxend", sizeof("idxend")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
}
Beispiel #24
0
void swoole_http_init(int module_number TSRMLS_DC)
{
    INIT_CLASS_ENTRY(swoole_http_server_ce, "swoole_http_server", swoole_http_server_methods);
    swoole_http_server_class_entry_ptr = zend_register_internal_class_ex(&swoole_http_server_ce, swoole_server_class_entry_ptr, "swoole_server" TSRMLS_CC);

    INIT_CLASS_ENTRY(swoole_http_response_ce, "swoole_http_response", swoole_http_response_methods);
    swoole_http_response_class_entry_ptr = zend_register_internal_class(&swoole_http_response_ce TSRMLS_CC);

    INIT_CLASS_ENTRY(swoole_http_response_ce, "swoole_http_request", NULL);
    swoole_http_request_class_entry_ptr = zend_register_internal_class(&swoole_http_request_ce TSRMLS_CC);
}
Beispiel #25
0
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;
}
Beispiel #26
0
void intl_register_IntlException_class( void )
{
	zend_class_entry ce,
					 *default_exception_ce;

	default_exception_ce = zend_exception_get_default(  );

	/* Create and register 'IntlException' class. */
	INIT_CLASS_ENTRY_EX( ce, "IntlException", sizeof( "IntlException" ) - 1, NULL );
	IntlException_ce_ptr = zend_register_internal_class_ex( &ce,
		default_exception_ce );
	IntlException_ce_ptr->create_object = default_exception_ce->create_object;
}
Beispiel #27
0
/* {{{ spl_register_sub_class */
PHPAPI void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, const zend_function_entry * function_list)
{
    zend_class_entry ce;

    INIT_CLASS_ENTRY_EX(ce, class_name, strlen(class_name), function_list);
    *ppce = zend_register_internal_class_ex(&ce, parent_ce);

    /* entries changed by initialize */
    if (obj_ctor) {
        (*ppce)->create_object = obj_ctor;
    } else {
        (*ppce)->create_object = parent_ce->create_object;
    }
}
Beispiel #28
0
static int register_timecop_classes()
{
	zend_class_entry ce;
	zend_class_entry *self_ce, *parent_ce;

	parent_ce = zend_hash_str_find_ptr(CG(class_table), "datetime", sizeof("datetime")-1);
	if (parent_ce == NULL) {
		return SUCCESS; /* DateTime must be initialized before */
	}

	INIT_CLASS_ENTRY(ce, "TimecopDateTime", timecop_datetime_class_functions);
	self_ce = zend_register_internal_class_ex(&ce, parent_ce);
	self_ce->create_object = parent_ce->create_object;

	TIMECOP_G(ce_DateTime) = parent_ce;
	TIMECOP_G(ce_TimecopDateTime) = self_ce;

	INIT_CLASS_ENTRY(ce, "TimecopOrigDateTime", timecop_orig_datetime_class_functions);
	self_ce = zend_register_internal_class_ex(&ce, parent_ce);
	self_ce->create_object = parent_ce->create_object;

	return SUCCESS;
}
Beispiel #29
0
void riak_input_put_input_init(TSRMLS_D) /* {{{ */
{
    zend_class_entry ce;
    INIT_NS_CLASS_ENTRY(ce, "Riak\\Input", "PutInput", riak_put_input_methods);
    riak_put_input_ce = zend_register_internal_class_ex(&ce, riak_input_ce, NULL TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "w", sizeof("w")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "dw", sizeof("dw")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "pw", sizeof("pw")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "vClock", sizeof("vClock")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "returnHead", sizeof("returnHead")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "returnBody", sizeof("returnBody")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "ifNoneMatch", sizeof("ifNoneMatch")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
    zend_declare_property_null(riak_put_input_ce, "ifNotModified", sizeof("ifNotModified")-1, ZEND_ACC_PROTECTED TSRMLS_CC);
}
Beispiel #30
0
PHP_SHELLINFORD_API int
php_shellinford_except_class_register(TSRMLS_D)
{
    zend_class_entry ce;

    INIT_CLASS_ENTRY(ce, ZEND_NS_NAME(SHELLINFORD_NS, "Exception"), NULL);

    php_shellinford_except_ce = zend_register_internal_class_ex(
        &ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
    if (php_shellinford_except_ce == NULL) {
        return FAILURE;
    }

    return SUCCESS;
}