This source file includes following definitions.
- php_intl_resourcebundle_fetch_object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef RESOURCEBUNDLE_CLASS_H
18 #define RESOURCEBUNDLE_CLASS_H
19
20 #include <unicode/ures.h>
21
22 #include <zend.h>
23 #include "php.h"
24
25 #include "intl_error.h"
26
27 typedef struct {
28 intl_error error;
29
30 UResourceBundle *me;
31 UResourceBundle *child;
32 zend_object zend;
33 } ResourceBundle_object;
34
35 static inline ResourceBundle_object *php_intl_resourcebundle_fetch_object(zend_object *obj) {
36 return (ResourceBundle_object *)((char*)(obj) - XtOffsetOf(ResourceBundle_object, zend));
37 }
38 #define Z_INTL_RESOURCEBUNDLE_P(zv) php_intl_resourcebundle_fetch_object(Z_OBJ_P(zv))
39
40 #define RESOURCEBUNDLE_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(ResourceBundle, rb)
41 #define RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(INTL_RESOURCEBUNDLE, rb)
42 #define RESOURCEBUNDLE_METHOD_FETCH_OBJECT \
43 INTL_METHOD_FETCH_OBJECT(INTL_RESOURCEBUNDLE, rb); \
44 if (RESOURCEBUNDLE_OBJECT(rb) == NULL) { \
45 intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR, \
46 "Found unconstructed ResourceBundle", 0); \
47 RETURN_FALSE; \
48 }
49
50
51 #define RESOURCEBUNDLE_OBJECT(rb) (rb)->me
52
53 void resourcebundle_register_class( void );
54 extern zend_class_entry *ResourceBundle_ce_ptr;
55
56 PHP_FUNCTION( resourcebundle_create );
57 PHP_FUNCTION( resourcebundle_get );
58 PHP_FUNCTION( resourcebundle_count );
59 PHP_FUNCTION( resourcebundle_locales );
60 PHP_FUNCTION( resourcebundle_get_error_code );
61 PHP_FUNCTION( resourcebundle_get_error_message );
62
63 #endif