xref: /PHP-8.0/ext/intl/locale/locale_class.c (revision f00bcfbb)
1 /*
2    +----------------------------------------------------------------------+
3    | This source file is subject to version 3.01 of the PHP license,      |
4    | that is bundled with this package in the file LICENSE, and is        |
5    | available through the world-wide-web at the following url:           |
6    | http://www.php.net/license/3_01.txt                                  |
7    | If you did not receive a copy of the PHP license and are unable to   |
8    | obtain it through the world-wide-web, please send a note to          |
9    | license@php.net so we can mail you a copy immediately.               |
10    +----------------------------------------------------------------------+
11    | Authors: Kirti Velankar <kirtig@yahoo-inc.com>                       |
12    +----------------------------------------------------------------------+
13 */
14 
15 #include <unicode/uloc.h>
16 #include "php_intl.h"
17 #include "intl_error.h"
18 #include "locale_class.h"
19 #include "locale.h"
20 #include "locale_arginfo.h"
21 
22 zend_class_entry *Locale_ce_ptr = NULL;
23 
24 /*
25  * 'Locale' class registration structures & functions
26  */
27 
28 /* {{{ locale_register_Locale_class
29  * Initialize 'Locale' class
30  */
locale_register_Locale_class(void)31 void locale_register_Locale_class( void )
32 {
33 	zend_class_entry ce;
34 
35 	/* Create and register 'Locale' class. */
36 	INIT_CLASS_ENTRY( ce, "Locale", class_Locale_methods );
37 	ce.create_object = NULL;
38 	Locale_ce_ptr = zend_register_internal_class( &ce );
39 
40 	/* Declare 'Locale' class properties. */
41 	if( !Locale_ce_ptr )
42 	{
43 		zend_error( E_ERROR,
44 			"Locale: Failed to register Locale class.");
45 		return;
46 	}
47 }
48 /* }}} */
49