forked from FirebirdSQL/php-firebird
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfbird_classes.h
More file actions
110 lines (92 loc) · 3.61 KB
/
Copy pathfbird_classes.h
File metadata and controls
110 lines (92 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* SPDX-License-Identifier: PHP-3.01
* SPDX-FileCopyrightText: The PHP Group and contributors (see CREDITS) */
#ifndef FBIRD_CLASSES_H
#define FBIRD_CLASSES_H
#include "php.h"
#include "php_fbird_includes.h"
extern zend_class_entry *fbird_connection_ce;
extern zend_class_entry *fbird_transaction_ce;
extern zend_class_entry *fbird_statement_ce;
extern zend_class_entry *fbird_resultset_ce;
extern zend_class_entry *fbird_blob_ce;
extern zend_class_entry *fbird_service_ce;
extern zend_class_entry *fbird_event_ce;
extern zend_class_entry *fbird_batch_ce;
#if FB_API_VER >= 40
extern zend_class_entry *fbird_decfloat_ce;
void fbird_register_decfloat_class(void);
void fbird_setup_decfloat_object(zval *return_value, unsigned char precision,
const void *raw_bytes, unsigned char byte_len);
#else
static zend_class_entry *fbird_decfloat_ce = NULL;
#endif
void fbird_register_classes(void);
void fbird_setup_connection_object(zval *return_value, zend_resource *res);
void fbird_setup_service_object(zval *return_value, zend_resource *res);
void fbird_setup_event_object(zval *rv, fbird_event *ev);
#if FB_API_VER >= 40
void fbird_setup_batch_object(zval *rv, fbird_batch *batch);
#endif
/**
* Extract the zend_resource* from a Firebird\Connection object.
* Returns NULL if obj is not a Firebird\Connection or has no resource.
*/
zend_resource *fbird_connection_get_resource(zend_object *obj);
/**
* Extract the zend_resource* from a Firebird\Service object.
* Returns NULL if obj is not a Firebird\Service or has no resource.
*/
zend_resource *fbird_service_get_resource(zend_object *obj);
/**
* Extract the zend_resource* from a Firebird\Transaction object.
* Returns NULL if obj is not a Firebird\Transaction or has no resource.
*/
zend_resource *fbird_transaction_get_resource(zend_object *obj);
/**
* Wrap a le_trans zend_resource* in a Firebird\Transaction object.
* Stores the resource as a weak reference (EG(regular_list) owns it).
*/
void fbird_setup_transaction_object(zval *return_value, zend_resource *res);
/**
* Extract the zend_resource* from a Firebird\ResultSet object.
* Returns NULL if obj is not a Firebird\ResultSet or has no resource.
*/
zend_resource *fbird_resultset_get_resource(zend_object *obj);
/**
* Extract the zend_resource* from a Firebird\Statement object.
* Returns NULL if obj is not a Firebird\Statement or has no resource.
*/
zend_resource *fbird_statement_get_resource(zend_object *obj);
/**
* Wrap a le_query zend_resource* in a Firebird\ResultSet object.
* Stores the resource as a weak reference (EG(regular_list) owns it).
*/
void fbird_setup_resultset_object(zval *return_value, zend_resource *res);
/**
* Wrap a le_query zend_resource* in a Firebird\Statement object.
* Same weak-reference pattern as fbird_setup_resultset_object().
*/
void fbird_setup_statement_object(zval *return_value, zend_resource *res);
/**
* Extract the zend_resource* from a Firebird\Blob object (M3 Phase G bridge).
* Returns NULL if no resource is set (OOP-native path).
*/
zend_resource *fbird_blob_get_resource(zend_object *obj);
/**
* Wrap a le_blob zend_resource* in a Firebird\Blob object.
* Stores the resource as a weak reference (EG(regular_list) owns it).
*/
void fbird_setup_blob_object(zval *return_value, zend_resource *res);
/**
* Extract the fbird_event* from a Firebird\Event object.
* Returns NULL if obj is not a Firebird\Event.
*/
fbird_event *fbird_event_get_ptr(zend_object *obj);
#if FB_API_VER >= 40
/**
* Extract the fbird_batch* from a Firebird\Batch object.
* Returns NULL if obj is not a Firebird\Batch.
*/
fbird_batch *fbird_batch_get_ptr(zend_object *obj);
#endif
#endif /* FBIRD_CLASSES_H */