1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 5                                                        |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | http://www.php.net/license/3_01.txt                                  |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Authors: Ed Batutis <ed@batutis.com>                                 |
14    +----------------------------------------------------------------------+
15  */
16 
17 #include "normalizer_class.h"
18 #include "php_intl.h"
19 #include "normalizer_normalize.h"
20 #include "intl_error.h"
21 
22 #include <unicode/unorm.h>
23 
24 zend_class_entry *Normalizer_ce_ptr = NULL;
25 
26 /*
27  * 'Normalizer' class registration structures & functions
28  */
29 
30 /* {{{ Normalizer methods arguments info */
31 
32 ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 )
33 	ZEND_ARG_INFO( 0, arg1 )
34 	ZEND_ARG_INFO( 0, arg2 )
35 	ZEND_ARG_INFO( 0, arg3 )
36 ZEND_END_ARG_INFO()
37 
38 /* }}} */
39 
40 /* {{{ Normalizer_class_functions
41  * Every 'Normalizer' class method has an entry in this table
42  */
43 
44 function_entry Normalizer_class_functions[] = {
45 	ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
46 	ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
47 	PHP_FE_END
48 };
49 /* }}} */
50 
51 /* {{{ normalizer_register_Normalizer_class
52  * Initialize 'Normalizer' class
53  */
normalizer_register_Normalizer_class(TSRMLS_D)54 void normalizer_register_Normalizer_class( TSRMLS_D )
55 {
56 	zend_class_entry ce;
57 
58 	/* Create and register 'Normalizer' class. */
59 	INIT_CLASS_ENTRY( ce, "Normalizer", Normalizer_class_functions );
60 	ce.create_object = NULL;
61 	Normalizer_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
62 
63 	/* Declare 'Normalizer' class properties. */
64 	if( !Normalizer_ce_ptr )
65 	{
66 		zend_error( E_ERROR,
67 			"Normalizer: attempt to create properties "
68 			"on a non-registered class." );
69 		return;
70 	}
71 }
72 /* }}} */
73 
74 /*
75  * Local variables:
76  * tab-width: 4
77  * c-basic-offset: 4
78  * End:
79  * vim600: noet sw=4 ts=4 fdm=marker
80  * vim<600: noet sw=4 ts=4
81  */
82