mirror of
https://github.com/php/php-src.git
synced 2024-12-21 07:51:23 +08:00
Added private constructor to IntlTimeZone.
This commit is contained in:
parent
f3802db7a0
commit
72beff0d41
@ -524,6 +524,7 @@ ZEND_END_ARG_INFO()
|
||||
* Every 'IntlTimeZone' class method has an entry in this table
|
||||
*/
|
||||
static zend_function_entry TimeZone_class_functions[] = {
|
||||
PHP_ME(IntlTimeZone, __construct, ainfo_tz_void, ZEND_ACC_PRIVATE)
|
||||
PHP_ME_MAPPING(createTimeZone, intltz_create_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(createDefault, intltz_create_default, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
|
@ -34,6 +34,13 @@ extern "C" {
|
||||
}
|
||||
#include "common/common_enum.h"
|
||||
|
||||
U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
|
||||
{
|
||||
zend_throw_exception( NULL,
|
||||
"An object of this type cannot be created with the new operator",
|
||||
0 TSRMLS_CC );
|
||||
}
|
||||
|
||||
U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
|
||||
{
|
||||
char *str_id;
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(IntlTimeZone, __construct)
|
||||
|
||||
PHP_FUNCTION(intltz_create_time_zone);
|
||||
|
||||
PHP_FUNCTION(intltz_from_date_time_zone);
|
||||
|
Loading…
Reference in New Issue
Block a user