diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/intl/timezone/timezone_class.cpp | 1 | ||||
-rw-r--r-- | ext/intl/timezone/timezone_methods.cpp | 7 | ||||
-rw-r--r-- | ext/intl/timezone/timezone_methods.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index 850da4a748..c976eb143a 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -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) diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index e596cc5174..b7f31c3f3b 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -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; diff --git a/ext/intl/timezone/timezone_methods.h b/ext/intl/timezone/timezone_methods.h index 824f72a0d2..e153418ea7 100644 --- a/ext/intl/timezone/timezone_methods.h +++ b/ext/intl/timezone/timezone_methods.h @@ -19,6 +19,8 @@ #include <php.h> +PHP_METHOD(IntlTimeZone, __construct) + PHP_FUNCTION(intltz_create_time_zone); PHP_FUNCTION(intltz_from_date_time_zone); |