Back to index

php5  5.3.10
normalizer_class.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | This source file is subject to version 3.01 of the PHP license,      |
00006    | that is bundled with this package in the file LICENSE, and is        |
00007    | available through the world-wide-web at the following url:           |
00008    | http://www.php.net/license/3_01.txt                                  |
00009    | If you did not receive a copy of the PHP license and are unable to   |
00010    | obtain it through the world-wide-web, please send a note to          |
00011    | license@php.net so we can mail you a copy immediately.               |
00012    +----------------------------------------------------------------------+
00013    | Authors: Ed Batutis <ed@batutis.com>                                 |
00014    +----------------------------------------------------------------------+
00015  */
00016 
00017 #include "normalizer_class.h"
00018 #include "php_intl.h"
00019 #include "normalizer_normalize.h"
00020 #include "intl_error.h"
00021 
00022 #include <unicode/unorm.h>
00023 
00024 zend_class_entry *Normalizer_ce_ptr = NULL;
00025 
00026 /*
00027  * 'Normalizer' class registration structures & functions
00028  */
00029 
00030 /* {{{ Normalizer methods arguments info */
00031 
00032 ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 )
00033        ZEND_ARG_INFO( 0, arg1 )
00034        ZEND_ARG_INFO( 0, arg2 )
00035        ZEND_ARG_INFO( 0, arg3 )
00036 ZEND_END_ARG_INFO()
00037 
00038 /* }}} */
00039 
00040 /* {{{ Normalizer_class_functions
00041  * Every 'Normalizer' class method has an entry in this table
00042  */
00043 
00044 function_entry Normalizer_class_functions[] = {
00045        ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
00046        ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
00047        PHP_FE_END
00048 };
00049 /* }}} */
00050 
00051 /* {{{ normalizer_register_Normalizer_class
00052  * Initialize 'Normalizer' class
00053  */
00054 void normalizer_register_Normalizer_class( TSRMLS_D )
00055 {
00056        zend_class_entry ce;
00057 
00058        /* Create and register 'Normalizer' class. */
00059        INIT_CLASS_ENTRY( ce, "Normalizer", Normalizer_class_functions );
00060        ce.create_object = NULL;
00061        Normalizer_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
00062 
00063        /* Declare 'Normalizer' class properties. */
00064        if( !Normalizer_ce_ptr )
00065        {
00066               zend_error( E_ERROR,
00067                      "Normalizer: attempt to create properties "
00068                      "on a non-registered class." );
00069               return;
00070        }
00071 }
00072 /* }}} */
00073 
00074 /*
00075  * Local variables:
00076  * tab-width: 4
00077  * c-basic-offset: 4
00078  * End:
00079  * vim600: noet sw=4 ts=4 fdm=marker
00080  * vim<600: noet sw=4 ts=4
00081  */