mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Generate method entries for ext/intl
Closes GH-5370
This commit is contained in:
parent
ae1364c350
commit
f00bcfbb7d
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlBreakIterator implements Traversable
|
||||
{
|
||||
/** @return IntlBreakIterator|null */
|
||||
|
@ -71,3 +71,81 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_IntlPartsIterator_getBreakIterator arginfo_class_IntlBreakIterator_createCodePointInstance
|
||||
|
||||
#define arginfo_class_IntlCodePointBreakIterator_getLastCodePoint arginfo_class_IntlBreakIterator_createCodePointInstance
|
||||
|
||||
|
||||
ZEND_METHOD(IntlBreakIterator, createCharacterInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, createCodePointInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, createLineInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, createSentenceInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, createTitleInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, createWordInstance);
|
||||
ZEND_METHOD(IntlBreakIterator, __construct);
|
||||
ZEND_METHOD(IntlBreakIterator, current);
|
||||
ZEND_METHOD(IntlBreakIterator, first);
|
||||
ZEND_METHOD(IntlBreakIterator, following);
|
||||
ZEND_METHOD(IntlBreakIterator, getErrorCode);
|
||||
ZEND_METHOD(IntlBreakIterator, getErrorMessage);
|
||||
ZEND_METHOD(IntlBreakIterator, getLocale);
|
||||
ZEND_METHOD(IntlBreakIterator, getPartsIterator);
|
||||
ZEND_METHOD(IntlBreakIterator, getText);
|
||||
ZEND_METHOD(IntlBreakIterator, isBoundary);
|
||||
ZEND_METHOD(IntlBreakIterator, last);
|
||||
ZEND_METHOD(IntlBreakIterator, next);
|
||||
ZEND_METHOD(IntlBreakIterator, preceding);
|
||||
ZEND_METHOD(IntlBreakIterator, previous);
|
||||
ZEND_METHOD(IntlBreakIterator, setText);
|
||||
ZEND_METHOD(IntlRuleBasedBreakIterator, __construct);
|
||||
ZEND_METHOD(IntlRuleBasedBreakIterator, getBinaryRules);
|
||||
ZEND_METHOD(IntlRuleBasedBreakIterator, getRules);
|
||||
ZEND_METHOD(IntlRuleBasedBreakIterator, getRuleStatus);
|
||||
ZEND_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec);
|
||||
ZEND_METHOD(IntlPartsIterator, getBreakIterator);
|
||||
ZEND_METHOD(IntlCodePointBreakIterator, getLastCodePoint);
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlBreakIterator_methods[] = {
|
||||
ZEND_ME(IntlBreakIterator, createCharacterInstance, arginfo_class_IntlBreakIterator_createCharacterInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, createCodePointInstance, arginfo_class_IntlBreakIterator_createCodePointInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, createLineInstance, arginfo_class_IntlBreakIterator_createLineInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, createSentenceInstance, arginfo_class_IntlBreakIterator_createSentenceInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, createTitleInstance, arginfo_class_IntlBreakIterator_createTitleInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, createWordInstance, arginfo_class_IntlBreakIterator_createWordInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(IntlBreakIterator, __construct, arginfo_class_IntlBreakIterator___construct, ZEND_ACC_PRIVATE)
|
||||
ZEND_ME(IntlBreakIterator, current, arginfo_class_IntlBreakIterator_current, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, first, arginfo_class_IntlBreakIterator_first, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, following, arginfo_class_IntlBreakIterator_following, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, getErrorCode, arginfo_class_IntlBreakIterator_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, getErrorMessage, arginfo_class_IntlBreakIterator_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, getLocale, arginfo_class_IntlBreakIterator_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, getPartsIterator, arginfo_class_IntlBreakIterator_getPartsIterator, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, getText, arginfo_class_IntlBreakIterator_getText, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, isBoundary, arginfo_class_IntlBreakIterator_isBoundary, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, last, arginfo_class_IntlBreakIterator_last, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, next, arginfo_class_IntlBreakIterator_next, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, preceding, arginfo_class_IntlBreakIterator_preceding, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, previous, arginfo_class_IntlBreakIterator_previous, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlBreakIterator, setText, arginfo_class_IntlBreakIterator_setText, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlRuleBasedBreakIterator_methods[] = {
|
||||
ZEND_ME(IntlRuleBasedBreakIterator, __construct, arginfo_class_IntlRuleBasedBreakIterator___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlRuleBasedBreakIterator, getBinaryRules, arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlRuleBasedBreakIterator, getRules, arginfo_class_IntlRuleBasedBreakIterator_getRules, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlRuleBasedBreakIterator, getRuleStatus, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatus, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlRuleBasedBreakIterator, getRuleStatusVec, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlPartsIterator_methods[] = {
|
||||
ZEND_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlCodePointBreakIterator_methods[] = {
|
||||
ZEND_ME(IntlCodePointBreakIterator, getLastCodePoint, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -28,9 +28,6 @@ extern "C" {
|
||||
#define USE_BREAKITERATOR_POINTER 1
|
||||
#include "breakiterator_class.h"
|
||||
#include "breakiterator_arginfo.h"
|
||||
#include "breakiterator_methods.h"
|
||||
#include "rulebasedbreakiterator_methods.h"
|
||||
#include "codepointiterator_methods.h"
|
||||
#include <zend_exceptions.h>
|
||||
#include <zend_interfaces.h>
|
||||
#include <assert.h>
|
||||
@ -218,57 +215,6 @@ static zend_object *BreakIterator_object_create(zend_class_entry *ce)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ BreakIterator_class_functions
|
||||
* Every 'IntlBreakIterator' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry BreakIterator_class_functions[] = {
|
||||
PHP_ME(BreakIterator, __construct, arginfo_class_IntlBreakIterator___construct, ZEND_ACC_PRIVATE)
|
||||
PHP_ME(BreakIterator, createWordInstance, arginfo_class_IntlBreakIterator_createWordInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, createLineInstance, arginfo_class_IntlBreakIterator_createLineInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, createCharacterInstance, arginfo_class_IntlBreakIterator_createCharacterInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, createSentenceInstance, arginfo_class_IntlBreakIterator_createSentenceInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, createTitleInstance, arginfo_class_IntlBreakIterator_createTitleInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, createCodePointInstance, arginfo_class_IntlBreakIterator_createCodePointInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, getText, arginfo_class_IntlBreakIterator_getText, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, setText, arginfo_class_IntlBreakIterator_setText, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, first, arginfo_class_IntlBreakIterator_first, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, last, arginfo_class_IntlBreakIterator_last, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, previous, arginfo_class_IntlBreakIterator_previous, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, next, arginfo_class_IntlBreakIterator_next, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, current, arginfo_class_IntlBreakIterator_current, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, following, arginfo_class_IntlBreakIterator_following, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, preceding, arginfo_class_IntlBreakIterator_preceding, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, isBoundary, arginfo_class_IntlBreakIterator_isBoundary, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, getLocale, arginfo_class_IntlBreakIterator_getLocale, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, getPartsIterator, arginfo_class_IntlBreakIterator_getPartsIterator, ZEND_ACC_PUBLIC)
|
||||
|
||||
PHP_ME(BreakIterator, getErrorCode, arginfo_class_IntlBreakIterator_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(BreakIterator, getErrorMessage, arginfo_class_IntlBreakIterator_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ RuleBasedBreakIterator_class_functions
|
||||
*/
|
||||
static const zend_function_entry RuleBasedBreakIterator_class_functions[] = {
|
||||
PHP_ME(IntlRuleBasedBreakIterator, __construct, arginfo_class_IntlRuleBasedBreakIterator___construct, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlRuleBasedBreakIterator, getRules, arginfo_class_IntlRuleBasedBreakIterator_getRules, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlRuleBasedBreakIterator, getRuleStatus, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatus, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlRuleBasedBreakIterator, getRuleStatusVec, arginfo_class_IntlRuleBasedBreakIterator_getRuleStatusVec, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlRuleBasedBreakIterator, getBinaryRules, arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ CodePointBreakIterator_class_functions
|
||||
*/
|
||||
static const zend_function_entry CodePointBreakIterator_class_functions[] = {
|
||||
PHP_ME(IntlCodePointBreakIterator, getLastCodePoint, arginfo_class_IntlCodePointBreakIterator_getLastCodePoint, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ breakiterator_register_BreakIterator_class
|
||||
* Initialize 'BreakIterator' class
|
||||
*/
|
||||
@ -277,7 +223,7 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void)
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'BreakIterator' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlBreakIterator", BreakIterator_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlBreakIterator", class_IntlBreakIterator_methods);
|
||||
ce.create_object = BreakIterator_object_create;
|
||||
ce.get_iterator = _breakiterator_get_iterator;
|
||||
BreakIterator_ce_ptr = zend_register_internal_class(&ce);
|
||||
@ -327,13 +273,13 @@ U_CFUNC void breakiterator_register_BreakIterator_class(void)
|
||||
|
||||
/* Create and register 'RuleBasedBreakIterator' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlRuleBasedBreakIterator",
|
||||
RuleBasedBreakIterator_class_functions);
|
||||
class_IntlRuleBasedBreakIterator_methods);
|
||||
RuleBasedBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
BreakIterator_ce_ptr);
|
||||
|
||||
/* Create and register 'CodePointBreakIterator' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlCodePointBreakIterator",
|
||||
CodePointBreakIterator_class_functions);
|
||||
class_IntlCodePointBreakIterator_methods);
|
||||
CodePointBreakIterator_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
BreakIterator_ce_ptr);
|
||||
}
|
||||
|
@ -286,17 +286,12 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
|
||||
ZVAL_COPY_DEREF(return_value, biter_zval);
|
||||
}
|
||||
|
||||
static const zend_function_entry IntlPartsIterator_class_functions[] = {
|
||||
PHP_ME(IntlPartsIterator, getBreakIterator, arginfo_class_IntlPartsIterator_getBreakIterator, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
U_CFUNC void breakiterator_register_IntlPartsIterator_class(void)
|
||||
{
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'BreakIterator' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlPartsIterator", IntlPartsIterator_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlPartsIterator", class_IntlPartsIterator_methods);
|
||||
IntlPartsIterator_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
IntlIterator_ce_ptr);
|
||||
IntlPartsIterator_ce_ptr->create_object = IntlPartsIterator_object_create;
|
||||
|
@ -33,7 +33,7 @@ using PHP::CodePointBreakIterator;
|
||||
using icu::BreakIterator;
|
||||
using icu::Locale;
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, __construct)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, __construct)
|
||||
{
|
||||
zend_throw_exception( NULL,
|
||||
"An object of this type cannot be created with the new operator",
|
||||
@ -73,42 +73,42 @@ static void _breakiter_factory(const char *func_name,
|
||||
breakiterator_object_create(return_value, biter, 1);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createWordInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createWordInstance)
|
||||
{
|
||||
_breakiter_factory("breakiter_create_word_instance",
|
||||
&BreakIterator::createWordInstance,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createLineInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createLineInstance)
|
||||
{
|
||||
_breakiter_factory("breakiter_create_line_instance",
|
||||
&BreakIterator::createLineInstance,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createCharacterInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createCharacterInstance)
|
||||
{
|
||||
_breakiter_factory("breakiter_create_character_instance",
|
||||
&BreakIterator::createCharacterInstance,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createSentenceInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createSentenceInstance)
|
||||
{
|
||||
_breakiter_factory("breakiter_create_sentence_instance",
|
||||
&BreakIterator::createSentenceInstance,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createTitleInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createTitleInstance)
|
||||
{
|
||||
_breakiter_factory("breakiter_create_title_instance",
|
||||
&BreakIterator::createTitleInstance,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, createCodePointInstance)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, createCodePointInstance)
|
||||
{
|
||||
intl_error_reset(NULL);
|
||||
|
||||
@ -120,7 +120,7 @@ U_CFUNC PHP_METHOD(BreakIterator, createCodePointInstance)
|
||||
breakiterator_object_create(return_value, cpbi, 1);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, getText)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, getText)
|
||||
{
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
object = ZEND_THIS;
|
||||
@ -138,7 +138,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getText)
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, setText)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, setText)
|
||||
{
|
||||
UText *ut = NULL;
|
||||
zend_string *text;
|
||||
@ -217,28 +217,28 @@ static void _breakiter_int32_ret_int32(
|
||||
RETURN_LONG((zend_long)res);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, first)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, first)
|
||||
{
|
||||
_breakiter_no_args_ret_int32("breakiter_first",
|
||||
&BreakIterator::first,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, last)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, last)
|
||||
{
|
||||
_breakiter_no_args_ret_int32("breakiter_last",
|
||||
&BreakIterator::last,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, previous)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, previous)
|
||||
{
|
||||
_breakiter_no_args_ret_int32("breakiter_previous",
|
||||
&BreakIterator::previous,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, next)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, next)
|
||||
{
|
||||
bool no_arg_version = false;
|
||||
|
||||
@ -267,7 +267,7 @@ U_CFUNC PHP_METHOD(BreakIterator, next)
|
||||
}
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, current)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, current)
|
||||
{
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
object = ZEND_THIS;
|
||||
@ -283,21 +283,21 @@ U_CFUNC PHP_METHOD(BreakIterator, current)
|
||||
RETURN_LONG((zend_long)res);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, following)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, following)
|
||||
{
|
||||
_breakiter_int32_ret_int32("breakiter_following",
|
||||
&BreakIterator::following,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, preceding)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, preceding)
|
||||
{
|
||||
_breakiter_int32_ret_int32("breakiter_preceding",
|
||||
&BreakIterator::preceding,
|
||||
INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, isBoundary)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, isBoundary)
|
||||
{
|
||||
zend_long offset;
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
@ -322,7 +322,7 @@ U_CFUNC PHP_METHOD(BreakIterator, isBoundary)
|
||||
RETURN_BOOL((zend_long)res);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, getLocale)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, getLocale)
|
||||
{
|
||||
zend_long locale_type;
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
@ -348,7 +348,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getLocale)
|
||||
RETURN_STRING(locale.getName());
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, getPartsIterator)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, getPartsIterator)
|
||||
{
|
||||
zend_long key_type = 0;
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
@ -372,7 +372,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getPartsIterator)
|
||||
object, return_value, (parts_iter_key_type)key_type);
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, getErrorCode)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorCode)
|
||||
{
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
object = ZEND_THIS;
|
||||
@ -386,7 +386,7 @@ U_CFUNC PHP_METHOD(BreakIterator, getErrorCode)
|
||||
RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio));
|
||||
}
|
||||
|
||||
U_CFUNC PHP_METHOD(BreakIterator, getErrorMessage)
|
||||
U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorMessage)
|
||||
{
|
||||
zend_string* message = NULL;
|
||||
BREAKITER_METHOD_INIT_VARS;
|
||||
|
@ -1,62 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef BREAKITERATOR_METHODS_H
|
||||
#define BREAKITERATOR_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(BreakIterator, __construct);
|
||||
|
||||
PHP_METHOD(BreakIterator, createWordInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, createLineInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, createCharacterInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, createSentenceInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, createTitleInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, createCodePointInstance);
|
||||
|
||||
PHP_METHOD(BreakIterator, getText);
|
||||
|
||||
PHP_METHOD(BreakIterator, setText);
|
||||
|
||||
PHP_METHOD(BreakIterator, first);
|
||||
|
||||
PHP_METHOD(BreakIterator, last);
|
||||
|
||||
PHP_METHOD(BreakIterator, previous);
|
||||
|
||||
PHP_METHOD(BreakIterator, next);
|
||||
|
||||
PHP_METHOD(BreakIterator, current);
|
||||
|
||||
PHP_METHOD(BreakIterator, following);
|
||||
|
||||
PHP_METHOD(BreakIterator, preceding);
|
||||
|
||||
PHP_METHOD(BreakIterator, isBoundary);
|
||||
|
||||
PHP_METHOD(BreakIterator, getLocale);
|
||||
|
||||
PHP_METHOD(BreakIterator, getPartsIterator);
|
||||
|
||||
PHP_METHOD(BreakIterator, getErrorCode);
|
||||
|
||||
PHP_METHOD(BreakIterator, getErrorMessage);
|
||||
|
||||
#endif
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef CODEPOINTITERATOR_METHODS_H
|
||||
#define CODEPOINTITERATOR_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint);
|
||||
|
||||
#endif
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef RULEBASEDBREAKITERATOR_METHODS_H
|
||||
#define RULEBASEDBREAKITERATOR_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(IntlRuleBasedBreakIterator, __construct);
|
||||
|
||||
PHP_METHOD(IntlRuleBasedBreakIterator, getRules);
|
||||
|
||||
PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus);
|
||||
|
||||
PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec);
|
||||
|
||||
PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules);
|
||||
|
||||
#endif
|
@ -1,154 +1,283 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlCalendar
|
||||
{
|
||||
private function __construct() {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
|
||||
* @return IntlCalendar|null
|
||||
* @return IntlCalendar|IntlGregorianCalendar|null
|
||||
* @alias intlcal_create_instance
|
||||
*/
|
||||
public static function createInstance($timeZone = null, ?string $locale = null) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_equals
|
||||
*/
|
||||
public function equals(IntlCalendar $calendar) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_field_difference
|
||||
*/
|
||||
public function fieldDifference(float $when, int $field) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_add
|
||||
*/
|
||||
public function add(int $field, int $amount) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_after
|
||||
*/
|
||||
public function after(IntlCalendar $calendar) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_before
|
||||
*/
|
||||
public function before(IntlCalendar $calendar) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_clear
|
||||
*/
|
||||
public function clear(?int $field = null) {}
|
||||
|
||||
/**
|
||||
* @param DateTime|string $dateTime
|
||||
* @return IntlCalendar|null
|
||||
* @alias intlcal_from_date_time
|
||||
*/
|
||||
public static function fromDateTime($dateTime, ?string $locale = null) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get
|
||||
*/
|
||||
public function get(int $field) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_actual_maximum
|
||||
*/
|
||||
public function getActualMaximum(int $field) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_actual_minimum
|
||||
*/
|
||||
public function getActualMinimum(int $field) {}
|
||||
|
||||
/** @return array */
|
||||
/**
|
||||
* @return array
|
||||
* @alias intlcal_get_available_locales
|
||||
*/
|
||||
public static function getAvailableLocales() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_day_of_week_type
|
||||
*/
|
||||
public function getDayOfWeekType(int $dayOfWeek) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intlcal_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_first_day_of_week
|
||||
*/
|
||||
public function getFirstDayOfWeek() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_greatest_minimum
|
||||
*/
|
||||
public function getGreatestMinimum(int $field) {}
|
||||
|
||||
/** @return IntlIterator|false */
|
||||
/**
|
||||
* @return IntlIterator|false
|
||||
* @alias intlcal_get_keyword_values_for_locale
|
||||
*/
|
||||
public static function getKeywordValuesForLocale(string $key, string $locale, bool $commonlyUsed) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_least_maximum
|
||||
*/
|
||||
public function getLeastMaximum(int $field) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intlcal_get_locale
|
||||
*/
|
||||
public function getLocale(int $localeType) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_maximum
|
||||
*/
|
||||
public function getMaximum(int $field) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_minimal_days_in_first_week
|
||||
*/
|
||||
public function getMinimalDaysInFirstWeek() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_minimal_days_in_first_week
|
||||
*/
|
||||
public function setMinimalDaysInFirstWeek(int $numberOfDays) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_minimum
|
||||
*/
|
||||
public function getMinimum(int $field) {}
|
||||
|
||||
/** @return float */
|
||||
/**
|
||||
* @return float
|
||||
* @alias intlcal_get_now
|
||||
*/
|
||||
public static function getNow() {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias intlcal_get_repeated_wall_time_option
|
||||
*/
|
||||
public function getRepeatedWallTimeOption() {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias intlcal_get_skipped_wall_time_option
|
||||
*/
|
||||
public function getSkippedWallTimeOption() {}
|
||||
|
||||
/** @return float|false */
|
||||
/**
|
||||
* @return float|false
|
||||
* @alias intlcal_get_time
|
||||
*/
|
||||
public function getTime() {}
|
||||
|
||||
/** @return IntlTimeZone|false */
|
||||
/**
|
||||
* @return IntlTimeZone|false
|
||||
* @alias intlcal_get_time_zone
|
||||
*/
|
||||
public function getTimeZone() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias intlcal_get_type
|
||||
*/
|
||||
public function getType() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intlcal_get_weekend_transition
|
||||
*/
|
||||
public function getWeekendTransition(int $dayOfWeek) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_in_daylight_time
|
||||
*/
|
||||
public function inDaylightTime() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_is_equivalent_to
|
||||
*/
|
||||
public function isEquivalentTo(IntlCalendar $calendar) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_is_lenient
|
||||
*/
|
||||
public function isLenient() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_is_weekend
|
||||
*/
|
||||
public function isWeekend(?float $date = null) {}
|
||||
|
||||
/**
|
||||
* @param int|bool $amountOrUpOrDown
|
||||
* @return bool
|
||||
* @alias intlcal_roll
|
||||
*/
|
||||
public function roll(int $field, $amountOrUpOrDown) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_is_set
|
||||
*/
|
||||
public function isSet(int $field) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set
|
||||
*/
|
||||
public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_first_day_of_week
|
||||
*/
|
||||
public function setFirstDayOfWeek(int $dayOfWeek) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_lenient
|
||||
*/
|
||||
public function setLenient(bool $isLenient) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_repeated_wall_time_option
|
||||
*/
|
||||
public function setRepeatedWallTimeOption(int $wallTimeOption) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_skipped_wall_time_option
|
||||
*/
|
||||
public function setSkippedWallTimeOption(int $wallTimeOption) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlcal_set_time
|
||||
*/
|
||||
public function setTime(float $date) {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
|
||||
* @return bool
|
||||
* @alias intlcal_set_time_zone
|
||||
*/
|
||||
public function setTimeZone($timeZone) {}
|
||||
|
||||
/** @return DateTime|false */
|
||||
/**
|
||||
* @return DateTime|false
|
||||
* @alias intlcal_to_date_time
|
||||
*/
|
||||
public function toDateTime() {}
|
||||
}
|
||||
|
||||
@ -157,17 +286,20 @@ class IntlGregorianCalendar extends IntlCalendar
|
||||
public function __construct() {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
|
||||
* @return IntlGregorianCalendar|null
|
||||
* @return bool
|
||||
* @alias intlgregcal_set_gregorian_change
|
||||
*/
|
||||
public static function createInstance($timeZone = null, ?string $locale = null) {}
|
||||
|
||||
/** @return bool */
|
||||
public function setGregorianChange(float $change) {}
|
||||
|
||||
/** @return float|false */
|
||||
/**
|
||||
* @return float|false
|
||||
* @alias intlgregcal_get_gregorian_change
|
||||
*/
|
||||
public function getGregorianChange() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intlgregcal_is_leap_year
|
||||
*/
|
||||
public function isLeapYear(int $year) {}
|
||||
}
|
||||
|
@ -143,8 +143,6 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_IntlGregorianCalendar___construct arginfo_class_IntlCalendar___construct
|
||||
|
||||
#define arginfo_class_IntlGregorianCalendar_createInstance arginfo_class_IntlCalendar_createInstance
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar_setGregorianChange, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, change, IS_DOUBLE, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@ -154,3 +152,115 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar_isLeapYear, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_METHOD(IntlCalendar, __construct);
|
||||
ZEND_FUNCTION(intlcal_create_instance);
|
||||
ZEND_FUNCTION(intlcal_equals);
|
||||
ZEND_FUNCTION(intlcal_field_difference);
|
||||
ZEND_FUNCTION(intlcal_add);
|
||||
ZEND_FUNCTION(intlcal_after);
|
||||
ZEND_FUNCTION(intlcal_before);
|
||||
ZEND_FUNCTION(intlcal_clear);
|
||||
ZEND_FUNCTION(intlcal_from_date_time);
|
||||
ZEND_FUNCTION(intlcal_get);
|
||||
ZEND_FUNCTION(intlcal_get_actual_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_actual_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_available_locales);
|
||||
ZEND_FUNCTION(intlcal_get_day_of_week_type);
|
||||
ZEND_FUNCTION(intlcal_get_error_code);
|
||||
ZEND_FUNCTION(intlcal_get_error_message);
|
||||
ZEND_FUNCTION(intlcal_get_first_day_of_week);
|
||||
ZEND_FUNCTION(intlcal_get_greatest_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_keyword_values_for_locale);
|
||||
ZEND_FUNCTION(intlcal_get_least_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_locale);
|
||||
ZEND_FUNCTION(intlcal_get_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_minimal_days_in_first_week);
|
||||
ZEND_FUNCTION(intlcal_set_minimal_days_in_first_week);
|
||||
ZEND_FUNCTION(intlcal_get_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_now);
|
||||
ZEND_FUNCTION(intlcal_get_repeated_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_get_skipped_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_get_time);
|
||||
ZEND_FUNCTION(intlcal_get_time_zone);
|
||||
ZEND_FUNCTION(intlcal_get_type);
|
||||
ZEND_FUNCTION(intlcal_get_weekend_transition);
|
||||
ZEND_FUNCTION(intlcal_in_daylight_time);
|
||||
ZEND_FUNCTION(intlcal_is_equivalent_to);
|
||||
ZEND_FUNCTION(intlcal_is_lenient);
|
||||
ZEND_FUNCTION(intlcal_is_weekend);
|
||||
ZEND_FUNCTION(intlcal_roll);
|
||||
ZEND_FUNCTION(intlcal_is_set);
|
||||
ZEND_FUNCTION(intlcal_set);
|
||||
ZEND_FUNCTION(intlcal_set_first_day_of_week);
|
||||
ZEND_FUNCTION(intlcal_set_lenient);
|
||||
ZEND_FUNCTION(intlcal_set_repeated_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_set_skipped_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_set_time);
|
||||
ZEND_FUNCTION(intlcal_set_time_zone);
|
||||
ZEND_FUNCTION(intlcal_to_date_time);
|
||||
ZEND_METHOD(IntlGregorianCalendar, __construct);
|
||||
ZEND_FUNCTION(intlgregcal_set_gregorian_change);
|
||||
ZEND_FUNCTION(intlgregcal_get_gregorian_change);
|
||||
ZEND_FUNCTION(intlgregcal_is_leap_year);
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlCalendar_methods[] = {
|
||||
ZEND_ME(IntlCalendar, __construct, arginfo_class_IntlCalendar___construct, ZEND_ACC_PRIVATE)
|
||||
ZEND_ME_MAPPING(createInstance, intlcal_create_instance, arginfo_class_IntlCalendar_createInstance, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(equals, intlcal_equals, arginfo_class_IntlCalendar_equals, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(fieldDifference, intlcal_field_difference, arginfo_class_IntlCalendar_fieldDifference, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(add, intlcal_add, arginfo_class_IntlCalendar_add, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(after, intlcal_after, arginfo_class_IntlCalendar_after, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(before, intlcal_before, arginfo_class_IntlCalendar_before, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(clear, intlcal_clear, arginfo_class_IntlCalendar_clear, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(fromDateTime, intlcal_from_date_time, arginfo_class_IntlCalendar_fromDateTime, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(get, intlcal_get, arginfo_class_IntlCalendar_get, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getActualMaximum, intlcal_get_actual_maximum, arginfo_class_IntlCalendar_getActualMaximum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getActualMinimum, intlcal_get_actual_minimum, arginfo_class_IntlCalendar_getActualMinimum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getAvailableLocales, intlcal_get_available_locales, arginfo_class_IntlCalendar_getAvailableLocales, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDayOfWeekType, intlcal_get_day_of_week_type, arginfo_class_IntlCalendar_getDayOfWeekType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, intlcal_get_error_code, arginfo_class_IntlCalendar_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, intlcal_get_error_message, arginfo_class_IntlCalendar_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getFirstDayOfWeek, intlcal_get_first_day_of_week, arginfo_class_IntlCalendar_getFirstDayOfWeek, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getGreatestMinimum, intlcal_get_greatest_minimum, arginfo_class_IntlCalendar_getGreatestMinimum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getKeywordValuesForLocale, intlcal_get_keyword_values_for_locale, arginfo_class_IntlCalendar_getKeywordValuesForLocale, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getLeastMaximum, intlcal_get_least_maximum, arginfo_class_IntlCalendar_getLeastMaximum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocale, intlcal_get_locale, arginfo_class_IntlCalendar_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getMaximum, intlcal_get_maximum, arginfo_class_IntlCalendar_getMaximum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getMinimalDaysInFirstWeek, intlcal_get_minimal_days_in_first_week, arginfo_class_IntlCalendar_getMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setMinimalDaysInFirstWeek, intlcal_set_minimal_days_in_first_week, arginfo_class_IntlCalendar_setMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getMinimum, intlcal_get_minimum, arginfo_class_IntlCalendar_getMinimum, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getNow, intlcal_get_now, arginfo_class_IntlCalendar_getNow, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getRepeatedWallTimeOption, intlcal_get_repeated_wall_time_option, arginfo_class_IntlCalendar_getRepeatedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getSkippedWallTimeOption, intlcal_get_skipped_wall_time_option, arginfo_class_IntlCalendar_getSkippedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTime, intlcal_get_time, arginfo_class_IntlCalendar_getTime, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTimeZone, intlcal_get_time_zone, arginfo_class_IntlCalendar_getTimeZone, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getType, intlcal_get_type, arginfo_class_IntlCalendar_getType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getWeekendTransition, intlcal_get_weekend_transition, arginfo_class_IntlCalendar_getWeekendTransition, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(inDaylightTime, intlcal_in_daylight_time, arginfo_class_IntlCalendar_inDaylightTime, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isEquivalentTo, intlcal_is_equivalent_to, arginfo_class_IntlCalendar_isEquivalentTo, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isLenient, intlcal_is_lenient, arginfo_class_IntlCalendar_isLenient, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isWeekend, intlcal_is_weekend, arginfo_class_IntlCalendar_isWeekend, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(roll, intlcal_roll, arginfo_class_IntlCalendar_roll, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isSet, intlcal_is_set, arginfo_class_IntlCalendar_isSet, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(set, intlcal_set, arginfo_class_IntlCalendar_set, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setFirstDayOfWeek, intlcal_set_first_day_of_week, arginfo_class_IntlCalendar_setFirstDayOfWeek, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setLenient, intlcal_set_lenient, arginfo_class_IntlCalendar_setLenient, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setRepeatedWallTimeOption, intlcal_set_repeated_wall_time_option, arginfo_class_IntlCalendar_setRepeatedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setSkippedWallTimeOption, intlcal_set_skipped_wall_time_option, arginfo_class_IntlCalendar_setSkippedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setTime, intlcal_set_time, arginfo_class_IntlCalendar_setTime, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setTimeZone, intlcal_set_time_zone, arginfo_class_IntlCalendar_setTimeZone, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(toDateTime, intlcal_to_date_time, arginfo_class_IntlCalendar_toDateTime, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlGregorianCalendar_methods[] = {
|
||||
ZEND_ME(IntlGregorianCalendar, __construct, arginfo_class_IntlGregorianCalendar___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setGregorianChange, intlgregcal_set_gregorian_change, arginfo_class_IntlGregorianCalendar_setGregorianChange, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getGregorianChange, intlgregcal_get_gregorian_change, arginfo_class_IntlGregorianCalendar_getGregorianChange, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isLeapYear, intlgregcal_is_leap_year, arginfo_class_IntlGregorianCalendar_isLeapYear, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -26,9 +26,7 @@ extern "C" {
|
||||
#include "../timezone/timezone_class.h"
|
||||
#define USE_CALENDAR_POINTER 1
|
||||
#include "calendar_class.h"
|
||||
#include "calendar_methods.h"
|
||||
#include "calendar_arginfo.h"
|
||||
#include "gregoriancalendar_methods.h"
|
||||
#include <zend_exceptions.h>
|
||||
#include <assert.h>
|
||||
}
|
||||
@ -265,74 +263,6 @@ static zend_object *Calendar_object_create(zend_class_entry *ce)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Calendar_class_functions
|
||||
* Every 'IntlCalendar' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry Calendar_class_functions[] = {
|
||||
PHP_ME(IntlCalendar, __construct, arginfo_class_IntlCalendar___construct, ZEND_ACC_PRIVATE)
|
||||
PHP_ME_MAPPING(createInstance, intlcal_create_instance, arginfo_class_IntlCalendar_createInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getKeywordValuesForLocale, intlcal_get_keyword_values_for_locale, arginfo_class_IntlCalendar_getKeywordValuesForLocale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getNow, intlcal_get_now, arginfo_class_IntlCalendar_getNow, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getAvailableLocales, intlcal_get_available_locales, arginfo_class_IntlCalendar_getAvailableLocales, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(get, intlcal_get, arginfo_class_IntlCalendar_get, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getTime, intlcal_get_time, arginfo_class_IntlCalendar_getTime, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setTime, intlcal_set_time, arginfo_class_IntlCalendar_setTime, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(add, intlcal_add, arginfo_class_IntlCalendar_add, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setTimeZone, intlcal_set_time_zone, arginfo_class_IntlCalendar_setTimeZone, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(after, intlcal_after, arginfo_class_IntlCalendar_after, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(before, intlcal_before, arginfo_class_IntlCalendar_before, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(set, intlcal_set, arginfo_class_IntlCalendar_set, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(roll, intlcal_roll, arginfo_class_IntlCalendar_roll, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(clear, intlcal_clear, arginfo_class_IntlCalendar_clear, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(fieldDifference, intlcal_field_difference, arginfo_class_IntlCalendar_fieldDifference, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getActualMaximum, intlcal_get_actual_maximum, arginfo_class_IntlCalendar_getActualMaximum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getActualMinimum, intlcal_get_actual_minimum, arginfo_class_IntlCalendar_getActualMinimum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getDayOfWeekType, intlcal_get_day_of_week_type, arginfo_class_IntlCalendar_getDayOfWeekType, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getFirstDayOfWeek, intlcal_get_first_day_of_week, arginfo_class_IntlCalendar_getFirstDayOfWeek, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getGreatestMinimum, intlcal_get_greatest_minimum, arginfo_class_IntlCalendar_getGreatestMinimum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getLeastMaximum, intlcal_get_least_maximum, arginfo_class_IntlCalendar_getLeastMaximum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getLocale, intlcal_get_locale, arginfo_class_IntlCalendar_getLocale, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getMaximum, intlcal_get_maximum, arginfo_class_IntlCalendar_getMaximum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getMinimalDaysInFirstWeek, intlcal_get_minimal_days_in_first_week, arginfo_class_IntlCalendar_getMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getMinimum, intlcal_get_minimum, arginfo_class_IntlCalendar_getMinimum, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getTimeZone, intlcal_get_time_zone, arginfo_class_IntlCalendar_getTimeZone, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getType, intlcal_get_type, arginfo_class_IntlCalendar_getType, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getWeekendTransition,intlcal_get_weekend_transition, arginfo_class_IntlCalendar_getWeekendTransition, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(inDaylightTime, intlcal_in_daylight_time, arginfo_class_IntlCalendar_inDaylightTime, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(isEquivalentTo, intlcal_is_equivalent_to, arginfo_class_IntlCalendar_isEquivalentTo, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(isLenient, intlcal_is_lenient, arginfo_class_IntlCalendar_isLenient, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(isSet, intlcal_is_set, arginfo_class_IntlCalendar_isSet, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(isWeekend, intlcal_is_weekend, arginfo_class_IntlCalendar_isWeekend, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setFirstDayOfWeek, intlcal_set_first_day_of_week, arginfo_class_IntlCalendar_setFirstDayOfWeek, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setLenient, intlcal_set_lenient, arginfo_class_IntlCalendar_setLenient, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setMinimalDaysInFirstWeek,intlcal_set_minimal_days_in_first_week, arginfo_class_IntlCalendar_setMinimalDaysInFirstWeek, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(equals, intlcal_equals, arginfo_class_IntlCalendar_equals, ZEND_ACC_PUBLIC)
|
||||
|
||||
PHP_ME_MAPPING(getRepeatedWallTimeOption, intlcal_get_repeated_wall_time_option, arginfo_class_IntlCalendar_getRepeatedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getSkippedWallTimeOption, intlcal_get_skipped_wall_time_option, arginfo_class_IntlCalendar_getSkippedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setRepeatedWallTimeOption, intlcal_set_repeated_wall_time_option, arginfo_class_IntlCalendar_setRepeatedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setSkippedWallTimeOption, intlcal_set_skipped_wall_time_option, arginfo_class_IntlCalendar_setSkippedWallTimeOption, ZEND_ACC_PUBLIC)
|
||||
|
||||
PHP_ME_MAPPING(fromDateTime, intlcal_from_date_time, arginfo_class_IntlCalendar_fromDateTime, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(toDateTime, intlcal_to_date_time, arginfo_class_IntlCalendar_toDateTime, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getErrorCode, intlcal_get_error_code, arginfo_class_IntlCalendar_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getErrorMessage, intlcal_get_error_message, arginfo_class_IntlCalendar_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ GregorianCalendar_class_functions
|
||||
*/
|
||||
static const zend_function_entry GregorianCalendar_class_functions[] = {
|
||||
PHP_ME(IntlGregorianCalendar, __construct, arginfo_class_IntlGregorianCalendar___construct, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(setGregorianChange, intlgregcal_set_gregorian_change, arginfo_class_IntlGregorianCalendar_setGregorianChange, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getGregorianChange, intlgregcal_get_gregorian_change, arginfo_class_IntlGregorianCalendar_getGregorianChange, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(isLeapYear, intlgregcal_is_leap_year, arginfo_class_IntlGregorianCalendar_isLeapYear, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ calendar_register_IntlCalendar_class
|
||||
* Initialize 'IntlCalendar' class
|
||||
*/
|
||||
@ -341,7 +271,7 @@ void calendar_register_IntlCalendar_class(void)
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'IntlCalendar' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlCalendar", Calendar_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlCalendar", class_IntlCalendar_methods);
|
||||
ce.create_object = Calendar_object_create;
|
||||
Calendar_ce_ptr = zend_register_internal_class(&ce);
|
||||
|
||||
@ -401,7 +331,7 @@ void calendar_register_IntlCalendar_class(void)
|
||||
CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
|
||||
|
||||
/* Create and register 'IntlGregorianCalendar' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", class_IntlGregorianCalendar_methods);
|
||||
GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
Calendar_ce_ptr);
|
||||
}
|
||||
|
@ -1,112 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@netcabo.pt> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef CALENDAR_METHODS_H
|
||||
#define CALENDAR_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(IntlCalendar, __construct);
|
||||
|
||||
PHP_FUNCTION(intlcal_create_instance);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_keyword_values_for_locale);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_now);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_available_locales);
|
||||
|
||||
PHP_FUNCTION(intlcal_get);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_time);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_time);
|
||||
|
||||
PHP_FUNCTION(intlcal_add);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_time_zone);
|
||||
|
||||
PHP_FUNCTION(intlcal_after);
|
||||
|
||||
PHP_FUNCTION(intlcal_before);
|
||||
|
||||
PHP_FUNCTION(intlcal_set);
|
||||
|
||||
PHP_FUNCTION(intlcal_roll);
|
||||
|
||||
PHP_FUNCTION(intlcal_clear);
|
||||
|
||||
PHP_FUNCTION(intlcal_field_difference);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_actual_maximum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_actual_minimum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_day_of_week_type);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_first_day_of_week);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_greatest_minimum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_least_maximum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_locale);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_maximum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_minimal_days_in_first_week);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_minimum);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_time_zone);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_type);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_weekend_transition);
|
||||
|
||||
PHP_FUNCTION(intlcal_in_daylight_time);
|
||||
|
||||
PHP_FUNCTION(intlcal_is_equivalent_to);
|
||||
|
||||
PHP_FUNCTION(intlcal_is_lenient);
|
||||
|
||||
PHP_FUNCTION(intlcal_is_set);
|
||||
|
||||
PHP_FUNCTION(intlcal_is_weekend);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_first_day_of_week);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_lenient);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_minimal_days_in_first_week);
|
||||
|
||||
PHP_FUNCTION(intlcal_equals);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_repeated_wall_time_option);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_skipped_wall_time_option);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_repeated_wall_time_option);
|
||||
|
||||
PHP_FUNCTION(intlcal_set_skipped_wall_time_option);
|
||||
|
||||
PHP_FUNCTION(intlcal_from_date_time);
|
||||
|
||||
PHP_FUNCTION(intlcal_to_date_time);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_error_code);
|
||||
|
||||
PHP_FUNCTION(intlcal_get_error_message);
|
||||
|
||||
#endif /* #ifndef CALENDAR_METHODS_H */
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef GREORIANCALENDAR_METHODS_H
|
||||
#define GREORIANCALENDAR_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION(intlgregcal_create_instance);
|
||||
|
||||
PHP_METHOD(IntlGregorianCalendar, __construct);
|
||||
|
||||
PHP_FUNCTION(intlgregcal_set_gregorian_change);
|
||||
|
||||
PHP_FUNCTION(intlgregcal_get_gregorian_change);
|
||||
|
||||
PHP_FUNCTION(intlgregcal_is_leap_year);
|
||||
|
||||
#endif
|
@ -1,45 +1,86 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class Collator
|
||||
{
|
||||
public function __construct(string $locale) {}
|
||||
|
||||
/** @return Collator|null */
|
||||
/**
|
||||
* @return Collator|null
|
||||
* @alias collator_create
|
||||
*/
|
||||
public static function create(string $locale) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias collator_compare
|
||||
*/
|
||||
public function compare(string $str1, string $str2) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias collator_sort
|
||||
*/
|
||||
public function sort(array &$arr, $sort_flag = Collator::SORT_REGULAR) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias collator_sort_with_sort_keys
|
||||
*/
|
||||
public function sortWithSortKeys(array &$arr) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias collator_asort
|
||||
*/
|
||||
public function asort(array &$arr, int $sort_flag = Collator::SORT_REGULAR) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias collator_get_attribute
|
||||
*/
|
||||
public function getAttribute(int $attr) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias collator_set_attribute
|
||||
*/
|
||||
public function setAttribute(int $attr, int $val) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias collator_get_strength
|
||||
*/
|
||||
public function getStrength() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias collator_set_strength
|
||||
*/
|
||||
public function setStrength(int $strength) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias collator_get_locale
|
||||
*/
|
||||
public function getLocale(int $type) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias collator_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias collator_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias collator_get_sort_key
|
||||
*/
|
||||
public function getSortKey(string $str) {}
|
||||
}
|
||||
|
@ -52,3 +52,38 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getSortKey, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_METHOD(Collator, __construct);
|
||||
ZEND_FUNCTION(collator_create);
|
||||
ZEND_FUNCTION(collator_compare);
|
||||
ZEND_FUNCTION(collator_sort);
|
||||
ZEND_FUNCTION(collator_sort_with_sort_keys);
|
||||
ZEND_FUNCTION(collator_asort);
|
||||
ZEND_FUNCTION(collator_get_attribute);
|
||||
ZEND_FUNCTION(collator_set_attribute);
|
||||
ZEND_FUNCTION(collator_get_strength);
|
||||
ZEND_FUNCTION(collator_set_strength);
|
||||
ZEND_FUNCTION(collator_get_locale);
|
||||
ZEND_FUNCTION(collator_get_error_code);
|
||||
ZEND_FUNCTION(collator_get_error_message);
|
||||
ZEND_FUNCTION(collator_get_sort_key);
|
||||
|
||||
|
||||
static const zend_function_entry class_Collator_methods[] = {
|
||||
ZEND_ME(Collator, __construct, arginfo_class_Collator___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(create, collator_create, arginfo_class_Collator_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(compare, collator_compare, arginfo_class_Collator_compare, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(sort, collator_sort, arginfo_class_Collator_sort, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(sortWithSortKeys, collator_sort_with_sort_keys, arginfo_class_Collator_sortWithSortKeys, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(asort, collator_asort, arginfo_class_Collator_asort, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getAttribute, collator_get_attribute, arginfo_class_Collator_getAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setAttribute, collator_set_attribute, arginfo_class_Collator_setAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getStrength, collator_get_strength, arginfo_class_Collator_getStrength, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setStrength, collator_set_strength, arginfo_class_Collator_setStrength, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocale, collator_get_locale, arginfo_class_Collator_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, collator_get_error_code, arginfo_class_Collator_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, collator_get_error_message, arginfo_class_Collator_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getSortKey, collator_get_sort_key, arginfo_class_Collator_getSortKey, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "php_intl.h"
|
||||
#include "collator_class.h"
|
||||
#include "collator_convert.h"
|
||||
#include "collator_attr.h"
|
||||
|
||||
#include <unicode/ustring.h>
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Vadim Savchuk <vsavchuk@productengine.com> |
|
||||
| Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef COLLATOR_ATTR_H
|
||||
#define COLLATOR_ATTR_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( collator_get_attribute );
|
||||
PHP_FUNCTION( collator_set_attribute );
|
||||
PHP_FUNCTION( collator_get_strength );
|
||||
PHP_FUNCTION( collator_set_strength );
|
||||
|
||||
#endif // COLLATOR_ATTR_H
|
@ -15,13 +15,8 @@
|
||||
|
||||
#include "collator_class.h"
|
||||
#include "php_intl.h"
|
||||
#include "collator_attr.h"
|
||||
#include "collator_compare.h"
|
||||
#include "collator_sort.h"
|
||||
#include "collator_convert.h"
|
||||
#include "collator_locale.h"
|
||||
#include "collator_create.h"
|
||||
#include "collator_error.h"
|
||||
#include "collator_arginfo.h"
|
||||
#include "intl_error.h"
|
||||
|
||||
@ -63,29 +58,6 @@ zend_object *Collator_object_create(zend_class_entry *ce )
|
||||
* 'Collator' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ Collator_class_functions
|
||||
* Every 'Collator' class method has an entry in this table
|
||||
*/
|
||||
|
||||
static const zend_function_entry Collator_class_functions[] = {
|
||||
PHP_ME( Collator, __construct, arginfo_class_Collator___construct, ZEND_ACC_PUBLIC )
|
||||
ZEND_FENTRY( create, ZEND_FN( collator_create ), arginfo_class_Collator_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), arginfo_class_Collator_compare )
|
||||
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), arginfo_class_Collator_sort )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), arginfo_class_Collator_sortWithSortKeys )
|
||||
PHP_NAMED_FE( asort, ZEND_FN( collator_asort ), arginfo_class_Collator_asort )
|
||||
PHP_NAMED_FE( getAttribute, ZEND_FN( collator_get_attribute ), arginfo_class_Collator_getAttribute )
|
||||
PHP_NAMED_FE( setAttribute, ZEND_FN( collator_set_attribute ), arginfo_class_Collator_setAttribute )
|
||||
PHP_NAMED_FE( getStrength, ZEND_FN( collator_get_strength ), arginfo_class_Collator_getStrength )
|
||||
PHP_NAMED_FE( setStrength, ZEND_FN( collator_set_strength ), arginfo_class_Collator_setStrength )
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( collator_get_locale ), arginfo_class_Collator_getLocale )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( collator_get_error_code ), arginfo_class_Collator_getErrorCode )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( collator_get_error_message ), arginfo_class_Collator_getErrorMessage )
|
||||
PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), arginfo_class_Collator_getSortKey )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ collator_register_Collator_class
|
||||
* Initialize 'Collator' class
|
||||
*/
|
||||
@ -94,7 +66,7 @@ void collator_register_Collator_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'Collator' class. */
|
||||
INIT_CLASS_ENTRY( ce, "Collator", Collator_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "Collator", class_Collator_methods );
|
||||
ce.create_object = Collator_object_create;
|
||||
Collator_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "collator_class.h"
|
||||
#include "collator_compare.h"
|
||||
#include "intl_convert.h"
|
||||
|
||||
/* {{{ proto int Collator::compare( string $str1, string $str2 )
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Vadim Savchuk <vsavchuk@productengine.com> |
|
||||
| Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef COLLATOR_COMPARE_H
|
||||
#define COLLATOR_COMPARE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( collator_compare );
|
||||
|
||||
#endif // COLLATOR_COMPARE_H
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "collator_class.h"
|
||||
#include "collator_create.h"
|
||||
#include "intl_data.h"
|
||||
|
||||
/* {{{ */
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Vadim Savchuk <vsavchuk@productengine.com> |
|
||||
| Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef COLLATOR_CREATE_H
|
||||
#define COLLATOR_CREATE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( collator_create );
|
||||
|
||||
PHP_METHOD( Collator, __construct );
|
||||
|
||||
#endif // COLLATOR_CREATE_H
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "collator_class.h"
|
||||
#include "collator_error.h"
|
||||
|
||||
/* {{{ proto int Collator::getErrorCode( Collator $coll )
|
||||
* Get collator's last error code. }}} */
|
||||
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Vadim Savchuk <vsavchuk@productengine.com> |
|
||||
| Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef COLLATOR_ERROR_H
|
||||
#define COLLATOR_ERROR_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( collator_get_error_code );
|
||||
PHP_FUNCTION( collator_get_error_message );
|
||||
|
||||
#endif // COLLATOR_ERROR_H
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "collator_class.h"
|
||||
#include "collator_locale.h"
|
||||
#include "intl_convert.h"
|
||||
|
||||
#include <zend_API.h>
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Vadim Savchuk <vsavchuk@productengine.com> |
|
||||
| Dmitry Lakhtyuk <dlakhtyuk@productengine.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef COLLATOR_LOCALE_H
|
||||
#define COLLATOR_LOCALE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( collator_get_locale );
|
||||
|
||||
#endif // COLLATOR_LOCALE_H
|
@ -20,9 +20,4 @@
|
||||
|
||||
typedef int (*collator_compare_func_t)( zval *result, zval *op1, zval *op2 );
|
||||
|
||||
PHP_FUNCTION( collator_sort );
|
||||
PHP_FUNCTION( collator_sort_with_sort_keys );
|
||||
PHP_FUNCTION( collator_get_sort_key );
|
||||
PHP_FUNCTION( collator_asort );
|
||||
|
||||
#endif // COLLATOR_SORT_H
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlIterator implements Iterator
|
||||
{
|
||||
/** @return mixed */
|
||||
|
@ -10,3 +10,20 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_IntlIterator_rewind arginfo_class_IntlIterator_current
|
||||
|
||||
#define arginfo_class_IntlIterator_valid arginfo_class_IntlIterator_current
|
||||
|
||||
|
||||
ZEND_METHOD(IntlIterator, current);
|
||||
ZEND_METHOD(IntlIterator, key);
|
||||
ZEND_METHOD(IntlIterator, next);
|
||||
ZEND_METHOD(IntlIterator, rewind);
|
||||
ZEND_METHOD(IntlIterator, valid);
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlIterator_methods[] = {
|
||||
ZEND_ME(IntlIterator, current, arginfo_class_IntlIterator_current, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlIterator, key, arginfo_class_IntlIterator_key, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlIterator, next, arginfo_class_IntlIterator_next, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlIterator, rewind, arginfo_class_IntlIterator_rewind, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(IntlIterator, valid, arginfo_class_IntlIterator_valid, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -204,7 +204,7 @@ static zend_object *IntlIterator_object_create(zend_class_entry *ce)
|
||||
return &intern->zo;
|
||||
}
|
||||
|
||||
static PHP_METHOD(IntlIterator, current)
|
||||
PHP_METHOD(IntlIterator, current)
|
||||
{
|
||||
zval *data;
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
@ -220,7 +220,7 @@ static PHP_METHOD(IntlIterator, current)
|
||||
}
|
||||
}
|
||||
|
||||
static PHP_METHOD(IntlIterator, key)
|
||||
PHP_METHOD(IntlIterator, key)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
@ -237,7 +237,7 @@ static PHP_METHOD(IntlIterator, key)
|
||||
}
|
||||
}
|
||||
|
||||
static PHP_METHOD(IntlIterator, next)
|
||||
PHP_METHOD(IntlIterator, next)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
@ -252,7 +252,7 @@ static PHP_METHOD(IntlIterator, next)
|
||||
ii->iterator->index++;
|
||||
}
|
||||
|
||||
static PHP_METHOD(IntlIterator, rewind)
|
||||
PHP_METHOD(IntlIterator, rewind)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
@ -269,7 +269,7 @@ static PHP_METHOD(IntlIterator, rewind)
|
||||
}
|
||||
}
|
||||
|
||||
static PHP_METHOD(IntlIterator, valid)
|
||||
PHP_METHOD(IntlIterator, valid)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
@ -281,16 +281,6 @@ static PHP_METHOD(IntlIterator, valid)
|
||||
RETURN_BOOL(ii->iterator->funcs->valid(ii->iterator) == SUCCESS);
|
||||
}
|
||||
|
||||
static const zend_function_entry IntlIterator_class_functions[] = {
|
||||
PHP_ME(IntlIterator, current, arginfo_class_IntlIterator_current, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlIterator, key, arginfo_class_IntlIterator_key, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlIterator, next, arginfo_class_IntlIterator_next, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlIterator, rewind, arginfo_class_IntlIterator_rewind, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(IntlIterator, valid, arginfo_class_IntlIterator_valid, ZEND_ACC_PUBLIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
|
||||
/* {{{ intl_register_IntlIterator_class
|
||||
* Initialize 'IntlIterator' class
|
||||
*/
|
||||
@ -299,7 +289,7 @@ U_CFUNC void intl_register_IntlIterator_class(void)
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'IntlIterator' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlIterator", IntlIterator_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlIterator", class_IntlIterator_methods);
|
||||
ce.create_object = IntlIterator_object_create;
|
||||
IntlIterator_ce_ptr = zend_register_internal_class(&ce);
|
||||
IntlIterator_ce_ptr->get_iterator = IntlIterator_get_iterator;
|
||||
|
@ -18,11 +18,6 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( intl_get_error_code );
|
||||
PHP_FUNCTION( intl_get_error_message );
|
||||
PHP_FUNCTION( intl_is_failure );
|
||||
PHP_FUNCTION( intl_error_name );
|
||||
|
||||
void intl_expose_icu_error_codes( INIT_FUNC_ARGS );
|
||||
|
||||
#endif // INTL_COMMON_ERROR_H
|
||||
|
@ -106,7 +106,7 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_
|
||||
/* {{{ proto void UConverter::toUCallback(int $reason,
|
||||
string $source, string $codeUnits,
|
||||
int &$error) */
|
||||
static PHP_METHOD(UConverter, toUCallback) {
|
||||
PHP_METHOD(UConverter, toUCallback) {
|
||||
zend_long reason;
|
||||
zend_string *source, *codeUnits;
|
||||
zval *error;
|
||||
@ -123,7 +123,7 @@ static PHP_METHOD(UConverter, toUCallback) {
|
||||
/* {{{ proto void UConverter::fromUCallback(int $reason,
|
||||
array $source, int $codePoint,
|
||||
int &$error) */
|
||||
static PHP_METHOD(UConverter, fromUCallback) {
|
||||
PHP_METHOD(UConverter, fromUCallback) {
|
||||
zend_long reason;
|
||||
zval *source, *error;
|
||||
zend_long codePoint;
|
||||
@ -419,14 +419,14 @@ static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_P
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool UConverter::setSourceEncoding(string encoding) */
|
||||
static PHP_METHOD(UConverter, setSourceEncoding) {
|
||||
PHP_METHOD(UConverter, setSourceEncoding) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool UConverter::setDestinationEncoding(string encoding) */
|
||||
static PHP_METHOD(UConverter, setDestinationEncoding) {
|
||||
PHP_METHOD(UConverter, setDestinationEncoding) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
@ -457,14 +457,14 @@ static void php_converter_do_get_encoding(php_converter_object *objval, UConvert
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::getSourceEncoding() */
|
||||
static PHP_METHOD(UConverter, getSourceEncoding) {
|
||||
PHP_METHOD(UConverter, getSourceEncoding) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::getDestinationEncoding() */
|
||||
static PHP_METHOD(UConverter, getDestinationEncoding) {
|
||||
PHP_METHOD(UConverter, getDestinationEncoding) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
@ -494,14 +494,14 @@ static void php_converter_do_get_type(php_converter_object *objval, UConverter *
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int UConverter::getSourceType() */
|
||||
static PHP_METHOD(UConverter, getSourceType) {
|
||||
PHP_METHOD(UConverter, getSourceType) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int UConverter::getDestinationType() */
|
||||
static PHP_METHOD(UConverter, getDestinationType) {
|
||||
PHP_METHOD(UConverter, getDestinationType) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU);
|
||||
}
|
||||
@ -532,7 +532,7 @@ static void php_converter_resolve_callback(zval *zobj,
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto UConverter::__construct([string dest = 'utf-8',[string src = 'utf-8']]) */
|
||||
static PHP_METHOD(UConverter, __construct) {
|
||||
PHP_METHOD(UConverter, __construct) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
char *src = "utf-8";
|
||||
size_t src_len = sizeof("utf-8") - 1;
|
||||
@ -553,7 +553,7 @@ static PHP_METHOD(UConverter, __construct) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool UConverter::setSubstChars(string $chars) */
|
||||
static PHP_METHOD(UConverter, setSubstChars) {
|
||||
PHP_METHOD(UConverter, setSubstChars) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
char *chars;
|
||||
size_t chars_len;
|
||||
@ -593,7 +593,7 @@ static PHP_METHOD(UConverter, setSubstChars) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::getSubstChars() */
|
||||
static PHP_METHOD(UConverter, getSubstChars) {
|
||||
PHP_METHOD(UConverter, getSubstChars) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
char chars[127];
|
||||
int8_t chars_len = sizeof(chars);
|
||||
@ -681,7 +681,7 @@ static zend_string* php_converter_do_convert(UConverter *dest_cnv,
|
||||
|
||||
/* {{{ proto string UConverter::reasonText(int reason) */
|
||||
#define UCNV_REASON_CASE(v) case (UCNV_ ## v) : RETURN_STRINGL( "REASON_" #v , sizeof( "REASON_" #v ) - 1);
|
||||
static PHP_METHOD(UConverter, reasonText) {
|
||||
PHP_METHOD(UConverter, reasonText) {
|
||||
zend_long reason;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &reason) == FAILURE) {
|
||||
@ -704,7 +704,7 @@ static PHP_METHOD(UConverter, reasonText) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::convert(string str[, bool reverse]) */
|
||||
static PHP_METHOD(UConverter, convert) {
|
||||
PHP_METHOD(UConverter, convert) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
char *str;
|
||||
size_t str_len;
|
||||
@ -730,7 +730,7 @@ static PHP_METHOD(UConverter, convert) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::transcode(string $str, string $toEncoding, string $fromEncoding[, Array $options = array()]) */
|
||||
static PHP_METHOD(UConverter, transcode) {
|
||||
PHP_METHOD(UConverter, transcode) {
|
||||
char *str, *src, *dest;
|
||||
size_t str_len, src_len, dest_len;
|
||||
zval *options = NULL;
|
||||
@ -787,7 +787,7 @@ static PHP_METHOD(UConverter, transcode) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int UConverter::getErrorCode() */
|
||||
static PHP_METHOD(UConverter, getErrorCode) {
|
||||
PHP_METHOD(UConverter, getErrorCode) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
@ -799,7 +799,7 @@ static PHP_METHOD(UConverter, getErrorCode) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string UConverter::getErrorMessage() */
|
||||
static PHP_METHOD(UConverter, getErrorMessage) {
|
||||
PHP_METHOD(UConverter, getErrorMessage) {
|
||||
php_converter_object *objval = CONV_GET(ZEND_THIS);
|
||||
zend_string *message = intl_error_get_message(&(objval->error));
|
||||
|
||||
@ -816,7 +816,7 @@ static PHP_METHOD(UConverter, getErrorMessage) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array UConverter::getAvailable() */
|
||||
static PHP_METHOD(UConverter, getAvailable) {
|
||||
PHP_METHOD(UConverter, getAvailable) {
|
||||
int32_t i,
|
||||
count = ucnv_countAvailable();
|
||||
|
||||
@ -834,7 +834,7 @@ static PHP_METHOD(UConverter, getAvailable) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array UConverter::getAliases(string name) */
|
||||
static PHP_METHOD(UConverter, getAliases) {
|
||||
PHP_METHOD(UConverter, getAliases) {
|
||||
char *name;
|
||||
size_t name_len;
|
||||
UErrorCode error = U_ZERO_ERROR;
|
||||
@ -868,7 +868,7 @@ static PHP_METHOD(UConverter, getAliases) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array UConverter::getStandards() */
|
||||
static PHP_METHOD(UConverter, getStandards) {
|
||||
PHP_METHOD(UConverter, getStandards) {
|
||||
uint16_t i, count;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
@ -891,43 +891,6 @@ static PHP_METHOD(UConverter, getStandards) {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static const zend_function_entry php_converter_methods[] = {
|
||||
PHP_ME(UConverter, __construct, arginfo_class_UConverter___construct, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Encoding selection */
|
||||
PHP_ME(UConverter, setSourceEncoding, arginfo_class_UConverter_setSourceEncoding, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, setDestinationEncoding, arginfo_class_UConverter_setDestinationEncoding, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, getSourceEncoding, arginfo_class_UConverter_getSourceEncoding, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, getDestinationEncoding, arginfo_class_UConverter_getDestinationEncoding, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Introspection for algorithmic converters */
|
||||
PHP_ME(UConverter, getSourceType, arginfo_class_UConverter_getSourceType, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, getDestinationType, arginfo_class_UConverter_getDestinationType, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Basic codeunit error handling */
|
||||
PHP_ME(UConverter, getSubstChars, arginfo_class_UConverter_getSubstChars, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, setSubstChars, arginfo_class_UConverter_setSubstChars, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Default callback handlers */
|
||||
PHP_ME(UConverter, toUCallback, arginfo_class_UConverter_toUCallback, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, fromUCallback, arginfo_class_UConverter_fromUCallback, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Core conversion workhorses */
|
||||
PHP_ME(UConverter, convert, arginfo_class_UConverter_convert, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, transcode, arginfo_class_UConverter_transcode, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
|
||||
/* Error inspection */
|
||||
PHP_ME(UConverter, getErrorCode, arginfo_class_UConverter_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(UConverter, getErrorMessage, arginfo_class_UConverter_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
|
||||
/* Enumeration and lookup */
|
||||
PHP_ME(UConverter, reasonText, arginfo_class_UConverter_reasonText, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME(UConverter, getAvailable, arginfo_class_UConverter_getAvailable, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME(UConverter, getAliases, arginfo_class_UConverter_getAliases, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME(UConverter, getStandards, arginfo_class_UConverter_getStandards, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
/* {{{ Converter create/clone/destroy */
|
||||
static void php_converter_dtor_object(zend_object *obj) {
|
||||
php_converter_object *objval = php_converter_fetch_object(obj);
|
||||
@ -1009,7 +972,7 @@ static zend_object *php_converter_clone_object(zend_object *object) {
|
||||
int php_converter_minit(INIT_FUNC_ARGS) {
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "UConverter", php_converter_methods);
|
||||
INIT_CLASS_ENTRY(ce, "UConverter", class_UConverter_methods);
|
||||
php_converter_ce = zend_register_internal_class(&ce);
|
||||
php_converter_ce->create_object = php_converter_create_object;
|
||||
memcpy(&php_converter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class UConverter
|
||||
{
|
||||
public function __construct(?string $destination_encoding = null, ?string $source_encoding = null) {}
|
||||
|
@ -67,3 +67,48 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter_transcode, 0, 0, 3)
|
||||
ZEND_ARG_TYPE_INFO(0, fromEncoding, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_METHOD(UConverter, __construct);
|
||||
ZEND_METHOD(UConverter, convert);
|
||||
ZEND_METHOD(UConverter, fromUCallback);
|
||||
ZEND_METHOD(UConverter, getAliases);
|
||||
ZEND_METHOD(UConverter, getAvailable);
|
||||
ZEND_METHOD(UConverter, getDestinationEncoding);
|
||||
ZEND_METHOD(UConverter, getDestinationType);
|
||||
ZEND_METHOD(UConverter, getErrorCode);
|
||||
ZEND_METHOD(UConverter, getErrorMessage);
|
||||
ZEND_METHOD(UConverter, getSourceEncoding);
|
||||
ZEND_METHOD(UConverter, getSourceType);
|
||||
ZEND_METHOD(UConverter, getStandards);
|
||||
ZEND_METHOD(UConverter, getSubstChars);
|
||||
ZEND_METHOD(UConverter, reasonText);
|
||||
ZEND_METHOD(UConverter, setDestinationEncoding);
|
||||
ZEND_METHOD(UConverter, setSourceEncoding);
|
||||
ZEND_METHOD(UConverter, setSubstChars);
|
||||
ZEND_METHOD(UConverter, toUCallback);
|
||||
ZEND_METHOD(UConverter, transcode);
|
||||
|
||||
|
||||
static const zend_function_entry class_UConverter_methods[] = {
|
||||
ZEND_ME(UConverter, __construct, arginfo_class_UConverter___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, convert, arginfo_class_UConverter_convert, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, fromUCallback, arginfo_class_UConverter_fromUCallback, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getAliases, arginfo_class_UConverter_getAliases, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(UConverter, getAvailable, arginfo_class_UConverter_getAvailable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(UConverter, getDestinationEncoding, arginfo_class_UConverter_getDestinationEncoding, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getDestinationType, arginfo_class_UConverter_getDestinationType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getErrorCode, arginfo_class_UConverter_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getErrorMessage, arginfo_class_UConverter_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getSourceEncoding, arginfo_class_UConverter_getSourceEncoding, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getSourceType, arginfo_class_UConverter_getSourceType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, getStandards, arginfo_class_UConverter_getStandards, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(UConverter, getSubstChars, arginfo_class_UConverter_getSubstChars, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, reasonText, arginfo_class_UConverter_reasonText, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME(UConverter, setDestinationEncoding, arginfo_class_UConverter_setDestinationEncoding, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, setSourceEncoding, arginfo_class_UConverter_setSourceEncoding, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, setSubstChars, arginfo_class_UConverter_setSubstChars, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, toUCallback, arginfo_class_UConverter_toUCallback, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(UConverter, transcode, arginfo_class_UConverter_transcode, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -16,10 +16,6 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( datefmt_create );
|
||||
PHP_FUNCTION( datefmt_get_error_code );
|
||||
PHP_FUNCTION( datefmt_get_error_message );
|
||||
PHP_METHOD( IntlDateFormatter, __construct );
|
||||
void dateformat_register_constants( INIT_FUNC_ARGS );
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlDateFormatter
|
||||
{
|
||||
/**
|
||||
@ -12,57 +14,94 @@ class IntlDateFormatter
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timezone
|
||||
* @param IntlCalendar|int|null $calendar
|
||||
* @return IntlDateFormatter|null
|
||||
* @alias datefmt_create
|
||||
*/
|
||||
public static function create(?string $locale, int $datetype, int $timetype, $timezone = null, $calendar = null, string $pattern = "") {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias datefmt_get_datetype
|
||||
*/
|
||||
public function getDateType() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias datefmt_get_timetype
|
||||
*/
|
||||
public function getTimeType() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias datefmt_get_calendar
|
||||
*/
|
||||
public function getCalendar() {}
|
||||
|
||||
/**
|
||||
* @param IntlCalendar|int|null $which
|
||||
* @return bool
|
||||
* @alias datefmt_set_calendar
|
||||
*/
|
||||
public function setCalendar($which) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias datefmt_get_timezone_id
|
||||
*/
|
||||
public function getTimeZoneId() {}
|
||||
|
||||
/** @return IntlCalendar|null|false */
|
||||
/**
|
||||
* @return IntlCalendar|null|false
|
||||
* @alias datefmt_get_calendar_object
|
||||
*/
|
||||
public function getCalendarObject() {}
|
||||
|
||||
/** @return IntlTimeZone|false */
|
||||
/**
|
||||
* @return IntlTimeZone|false
|
||||
* @alias datefmt_get_timezone
|
||||
*/
|
||||
public function getTimeZone() {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $zone
|
||||
* @return ?bool
|
||||
* @return bool|null
|
||||
* @alias datefmt_set_timezone
|
||||
*/
|
||||
public function setTimeZone($zone) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias datefmt_set_pattern
|
||||
*/
|
||||
public function setPattern(string $pattern) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias datefmt_get_pattern
|
||||
*/
|
||||
public function getPattern() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias datefmt_get_locale
|
||||
*/
|
||||
public function getLocale(int $which = UNKNOWN) {}
|
||||
|
||||
/** @return void */
|
||||
/**
|
||||
* @return void
|
||||
* @alias datefmt_set_lenient
|
||||
*/
|
||||
public function setLenient(bool $lenient) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias datefmt_is_lenient
|
||||
*/
|
||||
public function isLenient() {}
|
||||
|
||||
/**
|
||||
* @param array|int $value
|
||||
* @return string|false
|
||||
* @alias datefmt_format
|
||||
*/
|
||||
public function format($value) {}
|
||||
|
||||
@ -70,18 +109,31 @@ class IntlDateFormatter
|
||||
* @param IntlCalendar|DateTime $object
|
||||
* @param array|int|string|null $format
|
||||
* @return string|false
|
||||
* @alias datefmt_format_object
|
||||
*/
|
||||
public static function formatObject($object, $format = null, ?string $locale = null) {}
|
||||
|
||||
/** @return int|float|false */
|
||||
/**
|
||||
* @return int|float|false
|
||||
* @alias datefmt_parse
|
||||
*/
|
||||
public function parse(string $value, &$position = null) {}
|
||||
|
||||
/** @return array|false */
|
||||
/**
|
||||
* @return array|false
|
||||
* @alias datefmt_localtime
|
||||
*/
|
||||
public function localtime(string $value, &$position = null) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias datefmt_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias datefmt_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
}
|
||||
|
@ -68,3 +68,52 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_IntlDateFormatter_getErrorCode arginfo_class_IntlDateFormatter_getDateType
|
||||
|
||||
#define arginfo_class_IntlDateFormatter_getErrorMessage arginfo_class_IntlDateFormatter_getDateType
|
||||
|
||||
|
||||
ZEND_METHOD(IntlDateFormatter, __construct);
|
||||
ZEND_FUNCTION(datefmt_create);
|
||||
ZEND_FUNCTION(datefmt_get_datetype);
|
||||
ZEND_FUNCTION(datefmt_get_timetype);
|
||||
ZEND_FUNCTION(datefmt_get_calendar);
|
||||
ZEND_FUNCTION(datefmt_set_calendar);
|
||||
ZEND_FUNCTION(datefmt_get_timezone_id);
|
||||
ZEND_FUNCTION(datefmt_get_calendar_object);
|
||||
ZEND_FUNCTION(datefmt_get_timezone);
|
||||
ZEND_FUNCTION(datefmt_set_timezone);
|
||||
ZEND_FUNCTION(datefmt_set_pattern);
|
||||
ZEND_FUNCTION(datefmt_get_pattern);
|
||||
ZEND_FUNCTION(datefmt_get_locale);
|
||||
ZEND_FUNCTION(datefmt_set_lenient);
|
||||
ZEND_FUNCTION(datefmt_is_lenient);
|
||||
ZEND_FUNCTION(datefmt_format);
|
||||
ZEND_FUNCTION(datefmt_format_object);
|
||||
ZEND_FUNCTION(datefmt_parse);
|
||||
ZEND_FUNCTION(datefmt_localtime);
|
||||
ZEND_FUNCTION(datefmt_get_error_code);
|
||||
ZEND_FUNCTION(datefmt_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlDateFormatter_methods[] = {
|
||||
ZEND_ME(IntlDateFormatter, __construct, arginfo_class_IntlDateFormatter___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(create, datefmt_create, arginfo_class_IntlDateFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDateType, datefmt_get_datetype, arginfo_class_IntlDateFormatter_getDateType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTimeType, datefmt_get_timetype, arginfo_class_IntlDateFormatter_getTimeType, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getCalendar, datefmt_get_calendar, arginfo_class_IntlDateFormatter_getCalendar, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setCalendar, datefmt_set_calendar, arginfo_class_IntlDateFormatter_setCalendar, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTimeZoneId, datefmt_get_timezone_id, arginfo_class_IntlDateFormatter_getTimeZoneId, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getCalendarObject, datefmt_get_calendar_object, arginfo_class_IntlDateFormatter_getCalendarObject, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTimeZone, datefmt_get_timezone, arginfo_class_IntlDateFormatter_getTimeZone, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setTimeZone, datefmt_set_timezone, arginfo_class_IntlDateFormatter_setTimeZone, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setPattern, datefmt_set_pattern, arginfo_class_IntlDateFormatter_setPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getPattern, datefmt_get_pattern, arginfo_class_IntlDateFormatter_getPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocale, datefmt_get_locale, arginfo_class_IntlDateFormatter_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setLenient, datefmt_set_lenient, arginfo_class_IntlDateFormatter_setLenient, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(isLenient, datefmt_is_lenient, arginfo_class_IntlDateFormatter_isLenient, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(format, datefmt_format, arginfo_class_IntlDateFormatter_format, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(formatObject, datefmt_format_object, arginfo_class_IntlDateFormatter_formatObject, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(parse, datefmt_parse, arginfo_class_IntlDateFormatter_parse, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(localtime, datefmt_localtime, arginfo_class_IntlDateFormatter_localtime, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, datefmt_get_error_code, arginfo_class_IntlDateFormatter_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, datefmt_get_error_message, arginfo_class_IntlDateFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "dateformat_class.h"
|
||||
#include "../intl_convert.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "dateformat_attr.h"
|
||||
|
||||
#include <unicode/ustring.h>
|
||||
#include <unicode/udat.h>
|
||||
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Kirti Velankar <kirtig@yahoo-inc.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#ifndef DATE_FORMAT_ATTR_H
|
||||
#define DATE_FORMAT_ATTR_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
//PHP_FUNCTION( datefmt_get_timezone );
|
||||
PHP_FUNCTION( datefmt_get_datetype );
|
||||
PHP_FUNCTION( datefmt_get_timetype );
|
||||
PHP_FUNCTION( datefmt_get_locale );
|
||||
PHP_FUNCTION( datefmt_get_pattern );
|
||||
PHP_FUNCTION( datefmt_set_pattern );
|
||||
PHP_FUNCTION( datefmt_is_lenient );
|
||||
PHP_FUNCTION( datefmt_set_lenient );
|
||||
|
||||
#endif // DATE_FORMAT_ATTR_H
|
@ -21,7 +21,6 @@
|
||||
extern "C" {
|
||||
#include "../php_intl.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "dateformat_attrcpp.h"
|
||||
#define USE_TIMEZONE_POINTER 1
|
||||
#include "../timezone/timezone_class.h"
|
||||
#define USE_CALENDAR_POINTER 1
|
||||
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef DATEFORMAT_ATTRCPP_H
|
||||
#define DATEFORMAT_ATTRCPP_H
|
||||
|
||||
PHP_FUNCTION(datefmt_get_timezone_id);
|
||||
|
||||
PHP_FUNCTION(datefmt_get_timezone);
|
||||
|
||||
PHP_FUNCTION(datefmt_set_timezone);
|
||||
|
||||
PHP_FUNCTION(datefmt_get_calendar);
|
||||
|
||||
PHP_FUNCTION(datefmt_set_calendar);
|
||||
|
||||
PHP_FUNCTION(datefmt_get_calendar_object);
|
||||
|
||||
#endif /* DATEFORMAT_ATTRCPP_H */
|
@ -16,12 +16,7 @@
|
||||
#include "dateformat_class.h"
|
||||
#include "php_intl.h"
|
||||
#include "dateformat_data.h"
|
||||
#include "dateformat_format.h"
|
||||
#include "dateformat_format_object.h"
|
||||
#include "dateformat_parse.h"
|
||||
#include "dateformat.h"
|
||||
#include "dateformat_attr.h"
|
||||
#include "dateformat_attrcpp.h"
|
||||
#include "dateformat_arginfo.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
@ -107,35 +102,6 @@ zend_object *IntlDateFormatter_object_clone(zend_object *object)
|
||||
* 'IntlDateFormatter' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ IntlDateFormatter_class_functions
|
||||
* Every 'IntlDateFormatter' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry IntlDateFormatter_class_functions[] = {
|
||||
PHP_ME( IntlDateFormatter, __construct, arginfo_class_IntlDateFormatter___construct, ZEND_ACC_PUBLIC )
|
||||
ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_class_IntlDateFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_class_IntlDateFormatter_getDateType )
|
||||
PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_class_IntlDateFormatter_getTimeType )
|
||||
PHP_NAMED_FE( getCalendar, ZEND_FN( datefmt_get_calendar ), arginfo_class_IntlDateFormatter_getCalendar )
|
||||
PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_class_IntlDateFormatter_getCalendarObject )
|
||||
PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_class_IntlDateFormatter_setCalendar )
|
||||
PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_class_IntlDateFormatter_getTimeZoneId )
|
||||
PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_class_IntlDateFormatter_getTimeZone )
|
||||
PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_class_IntlDateFormatter_setTimeZone )
|
||||
PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_class_IntlDateFormatter_setPattern )
|
||||
PHP_NAMED_FE( getPattern, ZEND_FN( datefmt_get_pattern ), arginfo_class_IntlDateFormatter_getPattern )
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( datefmt_get_locale ), arginfo_class_IntlDateFormatter_getLocale )
|
||||
PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), arginfo_class_IntlDateFormatter_setLenient )
|
||||
PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), arginfo_class_IntlDateFormatter_isLenient )
|
||||
PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), arginfo_class_IntlDateFormatter_format )
|
||||
PHP_ME_MAPPING( formatObject, datefmt_format_object, arginfo_class_IntlDateFormatter_formatObject, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), arginfo_class_IntlDateFormatter_parse )
|
||||
PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), arginfo_class_IntlDateFormatter_localtime )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), arginfo_class_IntlDateFormatter_getErrorCode )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( datefmt_get_error_message ), arginfo_class_IntlDateFormatter_getErrorMessage )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ dateformat_register_class
|
||||
* Initialize 'IntlDateFormatter' class
|
||||
*/
|
||||
@ -144,7 +110,7 @@ void dateformat_register_IntlDateFormatter_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'IntlDateFormatter' class. */
|
||||
INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "IntlDateFormatter", class_IntlDateFormatter_methods );
|
||||
ce.create_object = IntlDateFormatter_object_create;
|
||||
IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( datefmt_create );
|
||||
PHP_METHOD( IntlDateFormatter, __construct );
|
||||
void dateformat_register_constants( INIT_FUNC_ARGS );
|
||||
|
||||
#endif // DATE_FORMATTER_H
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "../common/common_date.h"
|
||||
#include "dateformat.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "dateformat_format.h"
|
||||
#include "dateformat_data.h"
|
||||
|
||||
/* {{{
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef DATE_FORMAT_FORMAT_H
|
||||
#define DATE_FORMAT_FORMAT_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( datefmt_format );
|
||||
|
||||
#endif // DATE_FORMAT_FORMAT_H
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION(datefmt_format_object);
|
@ -23,7 +23,6 @@
|
||||
#include "intl_convert.h"
|
||||
#include "dateformat.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "dateformat_parse.h"
|
||||
#include "dateformat_data.h"
|
||||
|
||||
/* {{{
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Kirti Velankar <kirtig@yahoo-inc.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#ifndef DATE_FORMAT_PARSE_H
|
||||
#define DATE_FORMAT_PARSE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( datefmt_parse );
|
||||
PHP_FUNCTION( datefmt_localtime );
|
||||
|
||||
#endif // DATE_FORMAT_PARSE_H
|
@ -1,57 +1,105 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class NumberFormatter
|
||||
{
|
||||
public function __construct(string $locale, int $style, string $pattern = "") {}
|
||||
|
||||
/** @return NumberFormatter|null */
|
||||
/**
|
||||
* @return NumberFormatter|null
|
||||
* @alias numfmt_create
|
||||
*/
|
||||
public static function create(string $locale, int $style, string $pattern = "") {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_format
|
||||
*/
|
||||
public function format(int|float $value, int $type = NumberFormatter::TYPE_DEFAULT) {}
|
||||
|
||||
/** @return int|float|false */
|
||||
/**
|
||||
* @return int|float|false
|
||||
* @alias numfmt_parse
|
||||
*/
|
||||
public function parse(string $value, int $type = NumberFormatter::TYPE_DOUBLE, &$position = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_format_currency
|
||||
*/
|
||||
public function formatCurrency(float $value, string $currency) {}
|
||||
|
||||
/** @return float|false */
|
||||
/**
|
||||
* @return float|false
|
||||
* @alias numfmt_parse_currency
|
||||
*/
|
||||
public function parseCurrency(string $value, &$currency, &$position = null) {}
|
||||
|
||||
/**
|
||||
* @param int|float $value
|
||||
* @return bool
|
||||
* @alias numfmt_set_attribute
|
||||
*/
|
||||
public function setAttribute(int $attr, $value) {}
|
||||
|
||||
/** @return int|float|false */
|
||||
/**
|
||||
* @return int|float|false
|
||||
* @alias numfmt_get_attribute
|
||||
*/
|
||||
public function getAttribute(int $attr) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias numfmt_set_text_attribute
|
||||
*/
|
||||
public function setTextAttribute(int $attr, string $value) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_get_text_attribute
|
||||
*/
|
||||
public function getTextAttribute(int $attr) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias numfmt_set_symbol
|
||||
*/
|
||||
public function setSymbol(int $attr, string $value) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_get_symbol
|
||||
*/
|
||||
public function getSymbol(int $attr) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias numfmt_set_pattern
|
||||
*/
|
||||
public function setPattern(string $pattern) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_get_pattern
|
||||
*/
|
||||
public function getPattern() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias numfmt_get_locale
|
||||
*/
|
||||
public function getLocale(int $type = ULOC_ACTUAL_LOCALE) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias numfmt_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias numfmt_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
}
|
||||
|
@ -64,3 +64,44 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_NumberFormatter_getErrorCode arginfo_class_NumberFormatter_getPattern
|
||||
|
||||
#define arginfo_class_NumberFormatter_getErrorMessage arginfo_class_NumberFormatter_getPattern
|
||||
|
||||
|
||||
ZEND_METHOD(NumberFormatter, __construct);
|
||||
ZEND_FUNCTION(numfmt_create);
|
||||
ZEND_FUNCTION(numfmt_format);
|
||||
ZEND_FUNCTION(numfmt_parse);
|
||||
ZEND_FUNCTION(numfmt_format_currency);
|
||||
ZEND_FUNCTION(numfmt_parse_currency);
|
||||
ZEND_FUNCTION(numfmt_set_attribute);
|
||||
ZEND_FUNCTION(numfmt_get_attribute);
|
||||
ZEND_FUNCTION(numfmt_set_text_attribute);
|
||||
ZEND_FUNCTION(numfmt_get_text_attribute);
|
||||
ZEND_FUNCTION(numfmt_set_symbol);
|
||||
ZEND_FUNCTION(numfmt_get_symbol);
|
||||
ZEND_FUNCTION(numfmt_set_pattern);
|
||||
ZEND_FUNCTION(numfmt_get_pattern);
|
||||
ZEND_FUNCTION(numfmt_get_locale);
|
||||
ZEND_FUNCTION(numfmt_get_error_code);
|
||||
ZEND_FUNCTION(numfmt_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry class_NumberFormatter_methods[] = {
|
||||
ZEND_ME(NumberFormatter, __construct, arginfo_class_NumberFormatter___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(create, numfmt_create, arginfo_class_NumberFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(format, numfmt_format, arginfo_class_NumberFormatter_format, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(parse, numfmt_parse, arginfo_class_NumberFormatter_parse, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(formatCurrency, numfmt_format_currency, arginfo_class_NumberFormatter_formatCurrency, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(parseCurrency, numfmt_parse_currency, arginfo_class_NumberFormatter_parseCurrency, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setAttribute, numfmt_set_attribute, arginfo_class_NumberFormatter_setAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getAttribute, numfmt_get_attribute, arginfo_class_NumberFormatter_getAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setTextAttribute, numfmt_set_text_attribute, arginfo_class_NumberFormatter_setTextAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getTextAttribute, numfmt_get_text_attribute, arginfo_class_NumberFormatter_getTextAttribute, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setSymbol, numfmt_set_symbol, arginfo_class_NumberFormatter_setSymbol, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getSymbol, numfmt_get_symbol, arginfo_class_NumberFormatter_getSymbol, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(setPattern, numfmt_set_pattern, arginfo_class_NumberFormatter_setPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getPattern, numfmt_get_pattern, arginfo_class_NumberFormatter_getPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocale, numfmt_get_locale, arginfo_class_NumberFormatter_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, numfmt_get_error_code, arginfo_class_NumberFormatter_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, numfmt_get_error_message, arginfo_class_NumberFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "formatter_class.h"
|
||||
#include "formatter_attr.h"
|
||||
#include "intl_convert.h"
|
||||
|
||||
#include <unicode/ustring.h>
|
||||
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef FORMATTER_ATTR_H
|
||||
#define FORMATTER_ATTR_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( numfmt_set_attribute );
|
||||
PHP_FUNCTION( numfmt_get_attribute );
|
||||
PHP_FUNCTION( numfmt_set_text_attribute );
|
||||
PHP_FUNCTION( numfmt_get_text_attribute );
|
||||
PHP_FUNCTION( numfmt_set_symbol );
|
||||
PHP_FUNCTION( numfmt_get_symbol );
|
||||
PHP_FUNCTION( numfmt_set_pattern );
|
||||
PHP_FUNCTION( numfmt_get_pattern );
|
||||
PHP_FUNCTION( numfmt_get_locale );
|
||||
|
||||
#endif // FORMATTER_ATTR_H
|
@ -18,9 +18,6 @@
|
||||
#include "php_intl.h"
|
||||
#include "formatter_data.h"
|
||||
#include "formatter_format.h"
|
||||
#include "formatter_parse.h"
|
||||
#include "formatter_main.h"
|
||||
#include "formatter_attr.h"
|
||||
#include "formatter_arginfo.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
@ -92,31 +89,6 @@ zend_object *NumberFormatter_object_clone(zend_object *object)
|
||||
* 'NumberFormatter' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ NumberFormatter_class_functions
|
||||
* Every 'NumberFormatter' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry NumberFormatter_class_functions[] = {
|
||||
PHP_ME( NumberFormatter, __construct, arginfo_class_NumberFormatter___construct, ZEND_ACC_PUBLIC )
|
||||
ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_class_NumberFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_class_NumberFormatter_format )
|
||||
PHP_NAMED_FE( parse, ZEND_FN( numfmt_parse ), arginfo_class_NumberFormatter_parse )
|
||||
PHP_NAMED_FE( formatCurrency, ZEND_FN( numfmt_format_currency ), arginfo_class_NumberFormatter_formatCurrency )
|
||||
PHP_NAMED_FE( parseCurrency, ZEND_FN( numfmt_parse_currency ), arginfo_class_NumberFormatter_parseCurrency )
|
||||
PHP_NAMED_FE( setAttribute, ZEND_FN( numfmt_set_attribute ), arginfo_class_NumberFormatter_setAttribute )
|
||||
PHP_NAMED_FE( getAttribute, ZEND_FN( numfmt_get_attribute ), arginfo_class_NumberFormatter_getAttribute )
|
||||
PHP_NAMED_FE( setTextAttribute, ZEND_FN( numfmt_set_text_attribute ), arginfo_class_NumberFormatter_setTextAttribute )
|
||||
PHP_NAMED_FE( getTextAttribute, ZEND_FN( numfmt_get_text_attribute ), arginfo_class_NumberFormatter_getTextAttribute )
|
||||
PHP_NAMED_FE( setSymbol, ZEND_FN( numfmt_set_symbol ), arginfo_class_NumberFormatter_setSymbol )
|
||||
PHP_NAMED_FE( getSymbol, ZEND_FN( numfmt_get_symbol ), arginfo_class_NumberFormatter_getSymbol )
|
||||
PHP_NAMED_FE( setPattern, ZEND_FN( numfmt_set_pattern ), arginfo_class_NumberFormatter_setPattern )
|
||||
PHP_NAMED_FE( getPattern, ZEND_FN( numfmt_get_pattern ), arginfo_class_NumberFormatter_getPattern )
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( numfmt_get_locale ), arginfo_class_NumberFormatter_getLocale )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( numfmt_get_error_code ), arginfo_class_NumberFormatter_getErrorCode )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( numfmt_get_error_message ), arginfo_class_NumberFormatter_getErrorMessage )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ formatter_register_class
|
||||
* Initialize 'NumberFormatter' class
|
||||
*/
|
||||
@ -125,7 +97,7 @@ void formatter_register_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'NumberFormatter' class. */
|
||||
INIT_CLASS_ENTRY( ce, "NumberFormatter", NumberFormatter_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "NumberFormatter", class_NumberFormatter_methods );
|
||||
ce.create_object = NumberFormatter_object_create;
|
||||
NumberFormatter_ce_ptr = zend_register_internal_class( &ce );
|
||||
NumberFormatter_ce_ptr->serialize = zend_class_serialize_deny;
|
||||
|
@ -17,9 +17,6 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( numfmt_format );
|
||||
PHP_FUNCTION( numfmt_format_currency );
|
||||
|
||||
#define FORMAT_TYPE_DEFAULT 0
|
||||
#define FORMAT_TYPE_INT32 1
|
||||
#define FORMAT_TYPE_INT64 2
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef FORMATTER_MAIN_H
|
||||
#define FORMATTER_MAIN_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( numfmt_create );
|
||||
PHP_FUNCTION( numfmt_get_error_code );
|
||||
PHP_FUNCTION( numfmt_get_error_message );
|
||||
PHP_METHOD( NumberFormatter, __construct );
|
||||
|
||||
#endif // FORMATTER_FORMAT_H
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "formatter_class.h"
|
||||
#include "formatter_format.h"
|
||||
#include "formatter_parse.h"
|
||||
#include "intl_convert.h"
|
||||
|
||||
#define ICU_LOCALE_BUG 1
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef FORMATTER_PARSE_H
|
||||
#define FORMATTER_PARSE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( numfmt_parse );
|
||||
PHP_FUNCTION( numfmt_parse_currency );
|
||||
|
||||
#endif // FORMATTER_PARSE_H
|
@ -18,16 +18,6 @@
|
||||
#include <php.h>
|
||||
#include <unicode/utypes.h>
|
||||
|
||||
PHP_FUNCTION(grapheme_strlen);
|
||||
PHP_FUNCTION(grapheme_strpos);
|
||||
PHP_FUNCTION(grapheme_stripos);
|
||||
PHP_FUNCTION(grapheme_strrpos);
|
||||
PHP_FUNCTION(grapheme_strripos);
|
||||
PHP_FUNCTION(grapheme_substr);
|
||||
PHP_FUNCTION(grapheme_strstr);
|
||||
PHP_FUNCTION(grapheme_stristr);
|
||||
PHP_FUNCTION(grapheme_extract);
|
||||
|
||||
void grapheme_register_constants( INIT_FUNC_ARGS );
|
||||
void grapheme_close_global_iterator( void );
|
||||
|
||||
|
@ -19,9 +19,6 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION(idn_to_ascii);
|
||||
PHP_FUNCTION(idn_to_utf8);
|
||||
|
||||
void idn_register_constants(INIT_FUNC_ARGS);
|
||||
|
||||
#endif /* IDN_IDN_H */
|
||||
|
@ -1,58 +1,114 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class Locale
|
||||
{
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias locale_get_default
|
||||
*/
|
||||
public static function getDefault() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias locale_set_default
|
||||
*/
|
||||
public static function setDefault(string $locale) {}
|
||||
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias locale_get_primary_language
|
||||
*/
|
||||
public static function getPrimaryLanguage(string $locale) {}
|
||||
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias locale_get_script
|
||||
*/
|
||||
public static function getScript(string $locale) {}
|
||||
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias locale_get_region
|
||||
*/
|
||||
public static function getRegion(string $locale) {}
|
||||
|
||||
/** @return array|false|null */
|
||||
/**
|
||||
* @return array|false|null
|
||||
* @alias locale_get_keywords
|
||||
*/
|
||||
public static function getKeywords(string $locale) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_get_display_script
|
||||
*/
|
||||
public static function getDisplayScript(string $locale, ?string $in_locale = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_get_display_region
|
||||
*/
|
||||
public static function getDisplayRegion(string $locale, ?string $in_locale = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_get_display_name
|
||||
*/
|
||||
public static function getDisplayName(string $locale, ?string $in_locale = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_get_display_language
|
||||
*/
|
||||
public static function getDisplayLanguage(string $locale, ?string $in_locale = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_get_display_variant
|
||||
*/
|
||||
public static function getDisplayVariant(string $locale, ?string $in_locale = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_compose
|
||||
*/
|
||||
public static function composeLocale(array $subtags) {}
|
||||
|
||||
/** @return array|null */
|
||||
/**
|
||||
* @return array|null
|
||||
* @alias locale_parse
|
||||
*/
|
||||
public static function parseLocale(string $locale) {}
|
||||
|
||||
/** @return array|null */
|
||||
/**
|
||||
* @return array|null
|
||||
* @alias locale_get_all_variants
|
||||
*/
|
||||
public static function getAllVariants(string $locale) {}
|
||||
|
||||
/** @return bool|null */
|
||||
/**
|
||||
* @return bool|null
|
||||
* @alias locale_filter_matches
|
||||
*/
|
||||
public static function filterMatches(string $langtag, string $locale, bool $canonicalize = false) {}
|
||||
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias locale_lookup
|
||||
*/
|
||||
public static function lookup(array $langtag, string $locale, bool $canonicalize = false, ?string $def = null) {}
|
||||
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias locale_canonicalize
|
||||
*/
|
||||
public static function canonicalize(string $locale) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias locale_accept_from_http
|
||||
*/
|
||||
public static function acceptFromHttp(string $header) {}
|
||||
}
|
||||
|
@ -54,3 +54,46 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_acceptFromHttp, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(locale_get_default);
|
||||
ZEND_FUNCTION(locale_set_default);
|
||||
ZEND_FUNCTION(locale_get_primary_language);
|
||||
ZEND_FUNCTION(locale_get_script);
|
||||
ZEND_FUNCTION(locale_get_region);
|
||||
ZEND_FUNCTION(locale_get_keywords);
|
||||
ZEND_FUNCTION(locale_get_display_script);
|
||||
ZEND_FUNCTION(locale_get_display_region);
|
||||
ZEND_FUNCTION(locale_get_display_name);
|
||||
ZEND_FUNCTION(locale_get_display_language);
|
||||
ZEND_FUNCTION(locale_get_display_variant);
|
||||
ZEND_FUNCTION(locale_compose);
|
||||
ZEND_FUNCTION(locale_parse);
|
||||
ZEND_FUNCTION(locale_get_all_variants);
|
||||
ZEND_FUNCTION(locale_filter_matches);
|
||||
ZEND_FUNCTION(locale_lookup);
|
||||
ZEND_FUNCTION(locale_canonicalize);
|
||||
ZEND_FUNCTION(locale_accept_from_http);
|
||||
|
||||
|
||||
static const zend_function_entry class_Locale_methods[] = {
|
||||
ZEND_ME_MAPPING(getDefault, locale_get_default, arginfo_class_Locale_getDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(setDefault, locale_set_default, arginfo_class_Locale_setDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getPrimaryLanguage, locale_get_primary_language, arginfo_class_Locale_getPrimaryLanguage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getScript, locale_get_script, arginfo_class_Locale_getScript, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getRegion, locale_get_region, arginfo_class_Locale_getRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getKeywords, locale_get_keywords, arginfo_class_Locale_getKeywords, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayScript, locale_get_display_script, arginfo_class_Locale_getDisplayScript, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayRegion, locale_get_display_region, arginfo_class_Locale_getDisplayRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayName, locale_get_display_name, arginfo_class_Locale_getDisplayName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayLanguage, locale_get_display_language, arginfo_class_Locale_getDisplayLanguage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayVariant, locale_get_display_variant, arginfo_class_Locale_getDisplayVariant, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(composeLocale, locale_compose, arginfo_class_Locale_composeLocale, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(parseLocale, locale_parse, arginfo_class_Locale_parseLocale, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getAllVariants, locale_get_all_variants, arginfo_class_Locale_getAllVariants, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(filterMatches, locale_filter_matches, arginfo_class_Locale_filterMatches, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(lookup, locale_lookup, arginfo_class_Locale_lookup, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(canonicalize, locale_canonicalize, arginfo_class_Locale_canonicalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(acceptFromHttp, locale_accept_from_http, arginfo_class_Locale_acceptFromHttp, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "php_intl.h"
|
||||
#include "intl_error.h"
|
||||
#include "locale_class.h"
|
||||
#include "locale_methods.h"
|
||||
#include "locale.h"
|
||||
#include "locale_arginfo.h"
|
||||
|
||||
@ -26,33 +25,6 @@ zend_class_entry *Locale_ce_ptr = NULL;
|
||||
* 'Locale' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ Locale_class_functions
|
||||
* Every 'Locale' class method has an entry in this table
|
||||
*/
|
||||
|
||||
static const zend_function_entry Locale_class_functions[] = {
|
||||
ZEND_FENTRY( getDefault, zif_locale_get_default , arginfo_class_Locale_getDefault , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( setDefault, zif_locale_set_default , arginfo_class_Locale_setDefault , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), arginfo_class_Locale_getPrimaryLanguage , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getScript, ZEND_FN( locale_get_script ), arginfo_class_Locale_getScript , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getRegion, ZEND_FN( locale_get_region ), arginfo_class_Locale_getRegion , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getKeywords, ZEND_FN( locale_get_keywords ), arginfo_class_Locale_getKeywords , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayScript, ZEND_FN( locale_get_display_script ), arginfo_class_Locale_getDisplayScript , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayRegion, ZEND_FN( locale_get_display_region ), arginfo_class_Locale_getDisplayRegion , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayName, ZEND_FN( locale_get_display_name ), arginfo_class_Locale_getDisplayName , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayLanguage, ZEND_FN( locale_get_display_language ), arginfo_class_Locale_getDisplayLanguage , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayVariant, ZEND_FN( locale_get_display_variant ), arginfo_class_Locale_getDisplayVariant , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( composeLocale, ZEND_FN( locale_compose ), arginfo_class_Locale_composeLocale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( parseLocale, ZEND_FN( locale_parse ), arginfo_class_Locale_parseLocale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getAllVariants, ZEND_FN( locale_get_all_variants ), arginfo_class_Locale_getAllVariants , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), arginfo_class_Locale_filterMatches, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), arginfo_class_Locale_lookup, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), arginfo_class_Locale_canonicalize , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), arginfo_class_Locale_acceptFromHttp , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ locale_register_Locale_class
|
||||
* Initialize 'Locale' class
|
||||
*/
|
||||
@ -61,7 +33,7 @@ void locale_register_Locale_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'Locale' class. */
|
||||
INIT_CLASS_ENTRY( ce, "Locale", Locale_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "Locale", class_Locale_methods );
|
||||
ce.create_object = NULL;
|
||||
Locale_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "php_intl.h"
|
||||
#include "locale.h"
|
||||
#include "locale_class.h"
|
||||
#include "locale_methods.h"
|
||||
#include "intl_convert.h"
|
||||
#include "intl_data.h"
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Kirti Velankar <kirtig@yahoo-inc.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef LOCALE_METHODS_H
|
||||
#define LOCALE_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( locale_get_primary_language );
|
||||
PHP_FUNCTION( locale_get_script );
|
||||
PHP_FUNCTION( locale_get_region );
|
||||
PHP_FUNCTION( locale_get_all_variants);
|
||||
|
||||
PHP_NAMED_FUNCTION( zif_locale_get_default );
|
||||
PHP_NAMED_FUNCTION( zif_locale_set_default );
|
||||
|
||||
PHP_FUNCTION( locale_get_display_name );
|
||||
PHP_FUNCTION( locale_get_display_language );
|
||||
PHP_FUNCTION( locale_get_display_script );
|
||||
PHP_FUNCTION( locale_get_display_region );
|
||||
PHP_FUNCTION( locale_get_display_variant );
|
||||
|
||||
PHP_FUNCTION( locale_get_keywords );
|
||||
PHP_FUNCTION( locale_canonicalize);
|
||||
|
||||
PHP_FUNCTION( locale_compose);
|
||||
PHP_FUNCTION( locale_parse);
|
||||
|
||||
PHP_FUNCTION( locale_filter_matches);
|
||||
PHP_FUNCTION( locale_lookup);
|
||||
PHP_FUNCTION( locale_canonicalize);
|
||||
PHP_FUNCTION( locale_accept_from_http);
|
||||
|
||||
#endif // LOCALE_METHODS_H
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef MSG_FORMATTER_H
|
||||
#define MSG_FORMATTER_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( msgfmt_create );
|
||||
PHP_FUNCTION( msgfmt_get_error_code );
|
||||
PHP_FUNCTION( msgfmt_get_error_message );
|
||||
PHP_METHOD( MessageFormatter, __construct );
|
||||
|
||||
#endif // MSG_FORMAT_H
|
@ -1,36 +1,68 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class MessageFormatter
|
||||
{
|
||||
public function __construct(string $locale, string $pattern) {}
|
||||
|
||||
/** @return MessageFormatter|null */
|
||||
/**
|
||||
* @return MessageFormatter|null
|
||||
* @alias msgfmt_create
|
||||
*/
|
||||
public static function create(string $locale, string $pattern) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias msgfmt_format
|
||||
*/
|
||||
public function format(array $args) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias msgfmt_format_message
|
||||
*/
|
||||
public static function formatMessage(string $locale, string $pattern, array $args) {}
|
||||
|
||||
/** @return array|false */
|
||||
/**
|
||||
* @return array|false
|
||||
* @alias msgfmt_parse
|
||||
*/
|
||||
public function parse(string $value) {}
|
||||
|
||||
/** @return array|false */
|
||||
/**
|
||||
* @return array|false
|
||||
* @alias msgfmt_parse_message
|
||||
*/
|
||||
public static function parseMessage(string $locale, string $pattern, string $source) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias msgfmt_set_pattern
|
||||
*/
|
||||
public function setPattern(string $pattern) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias msgfmt_get_pattern
|
||||
*/
|
||||
public function getPattern() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias msgfmt_get_locale
|
||||
*/
|
||||
public function getLocale() {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias msgfmt_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias msgfmt_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
}
|
||||
|
@ -39,3 +39,32 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_MessageFormatter_getErrorCode arginfo_class_MessageFormatter_getPattern
|
||||
|
||||
#define arginfo_class_MessageFormatter_getErrorMessage arginfo_class_MessageFormatter_getPattern
|
||||
|
||||
|
||||
ZEND_METHOD(MessageFormatter, __construct);
|
||||
ZEND_FUNCTION(msgfmt_create);
|
||||
ZEND_FUNCTION(msgfmt_format);
|
||||
ZEND_FUNCTION(msgfmt_format_message);
|
||||
ZEND_FUNCTION(msgfmt_parse);
|
||||
ZEND_FUNCTION(msgfmt_parse_message);
|
||||
ZEND_FUNCTION(msgfmt_set_pattern);
|
||||
ZEND_FUNCTION(msgfmt_get_pattern);
|
||||
ZEND_FUNCTION(msgfmt_get_locale);
|
||||
ZEND_FUNCTION(msgfmt_get_error_code);
|
||||
ZEND_FUNCTION(msgfmt_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry class_MessageFormatter_methods[] = {
|
||||
ZEND_ME(MessageFormatter, __construct, arginfo_class_MessageFormatter___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(create, msgfmt_create, arginfo_class_MessageFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(format, msgfmt_format, arginfo_class_MessageFormatter_format, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(formatMessage, msgfmt_format_message, arginfo_class_MessageFormatter_formatMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(parse, msgfmt_parse, arginfo_class_MessageFormatter_parse, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(parseMessage, msgfmt_parse_message, arginfo_class_MessageFormatter_parseMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(setPattern, msgfmt_set_pattern, arginfo_class_MessageFormatter_setPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getPattern, msgfmt_get_pattern, arginfo_class_MessageFormatter_getPattern, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocale, msgfmt_get_locale, arginfo_class_MessageFormatter_getLocale, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, msgfmt_get_error_code, arginfo_class_MessageFormatter_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, msgfmt_get_error_message, arginfo_class_MessageFormatter_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "msgformat_class.h"
|
||||
#include "msgformat_attr.h"
|
||||
#include "msgformat_data.h"
|
||||
#include "intl_convert.h"
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef MSG_FORMAT_ATTR_H
|
||||
#define MSG_FORMAT_ATTR_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( msgfmt_set_pattern );
|
||||
PHP_FUNCTION( msgfmt_get_pattern );
|
||||
PHP_FUNCTION( msgfmt_get_locale );
|
||||
|
||||
#endif // MSG_FORMAT_ATTR_H
|
@ -17,10 +17,6 @@
|
||||
#include "msgformat_class.h"
|
||||
#include "php_intl.h"
|
||||
#include "msgformat_data.h"
|
||||
#include "msgformat_format.h"
|
||||
#include "msgformat_parse.h"
|
||||
#include "msgformat.h"
|
||||
#include "msgformat_attr.h"
|
||||
#include "msgformat_arginfo.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
@ -92,25 +88,6 @@ zend_object *MessageFormatter_object_clone(zend_object *object)
|
||||
* 'MessageFormatter' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ MessageFormatter_class_functions
|
||||
* Every 'MessageFormatter' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry MessageFormatter_class_functions[] = {
|
||||
PHP_ME( MessageFormatter, __construct, arginfo_class_MessageFormatter___construct, ZEND_ACC_PUBLIC )
|
||||
ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_class_MessageFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_class_MessageFormatter_format )
|
||||
ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_class_MessageFormatter_formatMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( parse, ZEND_FN( msgfmt_parse ), arginfo_class_MessageFormatter_parse )
|
||||
ZEND_FENTRY( parseMessage, ZEND_FN( msgfmt_parse_message ), arginfo_class_MessageFormatter_parseMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( setPattern, ZEND_FN( msgfmt_set_pattern ), arginfo_class_MessageFormatter_setPattern )
|
||||
PHP_NAMED_FE( getPattern, ZEND_FN( msgfmt_get_pattern ), arginfo_class_MessageFormatter_getPattern )
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( msgfmt_get_locale ), arginfo_class_MessageFormatter_getLocale )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( msgfmt_get_error_code ), arginfo_class_MessageFormatter_getErrorCode )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( msgfmt_get_error_message ), arginfo_class_MessageFormatter_getErrorMessage )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ msgformat_register_class
|
||||
* Initialize 'MessageFormatter' class
|
||||
*/
|
||||
@ -119,7 +96,7 @@ void msgformat_register_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'MessageFormatter' class. */
|
||||
INIT_CLASS_ENTRY( ce, "MessageFormatter", MessageFormatter_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "MessageFormatter", class_MessageFormatter_methods );
|
||||
ce.create_object = MessageFormatter_object_create;
|
||||
MessageFormatter_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "msgformat_class.h"
|
||||
#include "msgformat_format.h"
|
||||
#include "msgformat_data.h"
|
||||
#include "msgformat_helpers.h"
|
||||
#include "intl_convert.h"
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef MSG_FORMAT_FORMAT_H
|
||||
#define MSG_FORMAT_FORMAT_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( msgfmt_format );
|
||||
PHP_FUNCTION( msgfmt_format_message );
|
||||
|
||||
#endif // MSG_FORMAT_FORMAT_H
|
@ -35,7 +35,6 @@
|
||||
extern "C" {
|
||||
#include "php_intl.h"
|
||||
#include "msgformat_class.h"
|
||||
#include "msgformat_format.h"
|
||||
#include "msgformat_helpers.h"
|
||||
#include "intl_convert.h"
|
||||
#define USE_TIMEZONE_POINTER
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "msgformat_class.h"
|
||||
#include "msgformat_parse.h"
|
||||
#include "msgformat_data.h"
|
||||
#include "msgformat_helpers.h"
|
||||
#include "intl_convert.h"
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stanislav Malyshev <stas@zend.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef MSG_FORMAT_PARSE_H
|
||||
#define MSG_FORMAT_PARSE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( msgfmt_parse );
|
||||
PHP_FUNCTION( msgfmt_parse_message );
|
||||
|
||||
#endif // MSG_FORMAT_PARSE_H
|
@ -1,15 +1,26 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class Normalizer
|
||||
{
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias normalizer_normalize
|
||||
*/
|
||||
public static function normalize(string $input, int $form = Normalizer::FORM_C) {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias normalizer_is_normalized
|
||||
*/
|
||||
public static function isNormalized(string $input, int $form = Normalizer::FORM_C) {}
|
||||
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
/** @return string|null */
|
||||
/**
|
||||
* @return string|null
|
||||
* @alias normalizer_get_raw_decomposition
|
||||
*/
|
||||
public static function getRawDecomposition(string $input, int $form = Normalizer::FORM_C) {}
|
||||
#endif
|
||||
}
|
||||
|
@ -13,3 +13,20 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_getRawDecomposition, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, form, IS_LONG, 0, "Normalizer::FORM_C")
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_FUNCTION(normalizer_normalize);
|
||||
ZEND_FUNCTION(normalizer_is_normalized);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
ZEND_FUNCTION(normalizer_get_raw_decomposition);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry class_Normalizer_methods[] = {
|
||||
ZEND_ME_MAPPING(normalize, normalizer_normalize, arginfo_class_Normalizer_normalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(isNormalized, normalizer_is_normalized, arginfo_class_Normalizer_isNormalized, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
ZEND_ME_MAPPING(getRawDecomposition, normalizer_get_raw_decomposition, arginfo_class_Normalizer_getRawDecomposition, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "normalizer_class.h"
|
||||
#include "php_intl.h"
|
||||
#include "normalizer_normalize.h"
|
||||
#include "normalizer_arginfo.h"
|
||||
#include "intl_error.h"
|
||||
|
||||
@ -26,20 +25,6 @@ zend_class_entry *Normalizer_ce_ptr = NULL;
|
||||
* 'Normalizer' class registration structures & functions
|
||||
*/
|
||||
|
||||
/* {{{ Normalizer_class_functions
|
||||
* Every 'Normalizer' class method has an entry in this table
|
||||
*/
|
||||
|
||||
static const zend_function_entry Normalizer_class_functions[] = {
|
||||
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), arginfo_class_Normalizer_normalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), arginfo_class_Normalizer_isNormalized, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
ZEND_FENTRY( getRawDecomposition, ZEND_FN( normalizer_get_raw_decomposition ), arginfo_class_Normalizer_getRawDecomposition, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
#endif
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ normalizer_register_Normalizer_class
|
||||
* Initialize 'Normalizer' class
|
||||
*/
|
||||
@ -48,7 +33,7 @@ void normalizer_register_Normalizer_class( void )
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'Normalizer' class. */
|
||||
INIT_CLASS_ENTRY( ce, "Normalizer", Normalizer_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "Normalizer", class_Normalizer_methods );
|
||||
ce.create_object = NULL;
|
||||
Normalizer_ce_ptr = zend_register_internal_class( &ce );
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#endif
|
||||
#include "normalizer.h"
|
||||
#include "normalizer_class.h"
|
||||
#include "normalizer_normalize.h"
|
||||
#include "intl_convert.h"
|
||||
#include <unicode/utf8.h>
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Ed Batutis <ed@batutis.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef NORMALIZER_NORMALIZE_H
|
||||
#define NORMALIZER_NORMALIZE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_FUNCTION( normalizer_normalize );
|
||||
PHP_FUNCTION( normalizer_is_normalized );
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
PHP_FUNCTION( normalizer_get_raw_decomposition );
|
||||
#endif
|
||||
|
||||
#endif // NORMALIZER_NORMALIZE_H
|
@ -25,60 +25,37 @@
|
||||
#include "intl_error.h"
|
||||
#include "collator/collator_class.h"
|
||||
#include "collator/collator.h"
|
||||
#include "collator/collator_attr.h"
|
||||
#include "collator/collator_compare.h"
|
||||
#include "collator/collator_sort.h"
|
||||
#include "collator/collator_convert.h"
|
||||
#include "collator/collator_locale.h"
|
||||
#include "collator/collator_create.h"
|
||||
#include "collator/collator_error.h"
|
||||
|
||||
#include "converter/converter.h"
|
||||
|
||||
#include "formatter/formatter.h"
|
||||
#include "formatter/formatter_class.h"
|
||||
#include "formatter/formatter_attr.h"
|
||||
#include "formatter/formatter_format.h"
|
||||
#include "formatter/formatter_main.h"
|
||||
#include "formatter/formatter_parse.h"
|
||||
|
||||
#include "grapheme/grapheme.h"
|
||||
|
||||
#include "msgformat/msgformat.h"
|
||||
#include "msgformat/msgformat_class.h"
|
||||
#include "msgformat/msgformat_attr.h"
|
||||
#include "msgformat/msgformat_format.h"
|
||||
#include "msgformat/msgformat_parse.h"
|
||||
|
||||
#include "normalizer/normalizer.h"
|
||||
#include "normalizer/normalizer_class.h"
|
||||
#include "normalizer/normalizer_normalize.h"
|
||||
|
||||
#include "locale/locale.h"
|
||||
#include "locale/locale_class.h"
|
||||
#include "locale/locale_methods.h"
|
||||
|
||||
#include "dateformat/dateformat.h"
|
||||
#include "dateformat/dateformat_class.h"
|
||||
#include "dateformat/dateformat_attr.h"
|
||||
#include "dateformat/dateformat_attrcpp.h"
|
||||
#include "dateformat/dateformat_format.h"
|
||||
#include "dateformat/dateformat_format_object.h"
|
||||
#include "dateformat/dateformat_parse.h"
|
||||
#include "dateformat/dateformat_data.h"
|
||||
|
||||
#include "resourcebundle/resourcebundle_class.h"
|
||||
|
||||
#include "transliterator/transliterator.h"
|
||||
#include "transliterator/transliterator_class.h"
|
||||
#include "transliterator/transliterator_methods.h"
|
||||
|
||||
#include "timezone/timezone_class.h"
|
||||
#include "timezone/timezone_methods.h"
|
||||
|
||||
#include "calendar/calendar_class.h"
|
||||
#include "calendar/calendar_methods.h"
|
||||
#include "calendar/gregoriancalendar_methods.h"
|
||||
|
||||
#include "breakiterator/breakiterator_class.h"
|
||||
#include "breakiterator/breakiterator_iterators.h"
|
||||
@ -88,10 +65,7 @@
|
||||
|
||||
# include "spoofchecker/spoofchecker_class.h"
|
||||
# include "spoofchecker/spoofchecker.h"
|
||||
# include "spoofchecker/spoofchecker_create.h"
|
||||
# include "spoofchecker/spoofchecker_main.h"
|
||||
|
||||
#include "msgformat/msgformat.h"
|
||||
#include "common/common_error.h"
|
||||
#include "common/common_enum.h"
|
||||
|
||||
@ -121,223 +95,6 @@ const char *intl_locale_get_default( void )
|
||||
return INTL_G(default_locale);
|
||||
}
|
||||
|
||||
/* {{{ intl_functions
|
||||
*
|
||||
* Every user visible function must have an entry in intl_functions[].
|
||||
*/
|
||||
static const zend_function_entry intl_functions[] = {
|
||||
|
||||
/* collator functions */
|
||||
PHP_FE( collator_create, arginfo_collator_create )
|
||||
PHP_FE( collator_compare, arginfo_collator_compare )
|
||||
PHP_FE( collator_get_attribute, arginfo_collator_get_attribute )
|
||||
PHP_FE( collator_set_attribute, arginfo_collator_set_attribute )
|
||||
PHP_FE( collator_get_strength, arginfo_collator_get_strength )
|
||||
PHP_FE( collator_set_strength, arginfo_collator_set_strength )
|
||||
PHP_FE( collator_sort, arginfo_collator_sort )
|
||||
PHP_FE( collator_sort_with_sort_keys, arginfo_collator_sort_with_sort_keys )
|
||||
PHP_FE( collator_asort, arginfo_collator_asort )
|
||||
PHP_FE( collator_get_locale, arginfo_collator_get_locale )
|
||||
PHP_FE( collator_get_error_code, arginfo_collator_get_error_code )
|
||||
PHP_FE( collator_get_error_message, arginfo_collator_get_error_message )
|
||||
PHP_FE( collator_get_sort_key, arginfo_collator_get_sort_key )
|
||||
|
||||
/* formatter functions */
|
||||
PHP_FE( numfmt_create, arginfo_numfmt_create )
|
||||
PHP_FE( numfmt_format, arginfo_numfmt_format )
|
||||
PHP_FE( numfmt_parse, arginfo_numfmt_parse )
|
||||
PHP_FE( numfmt_format_currency, arginfo_numfmt_format_currency )
|
||||
PHP_FE( numfmt_parse_currency, arginfo_numfmt_parse_currency )
|
||||
PHP_FE( numfmt_set_attribute, arginfo_numfmt_set_attribute )
|
||||
PHP_FE( numfmt_get_attribute, arginfo_numfmt_get_attribute )
|
||||
PHP_FE( numfmt_set_text_attribute, arginfo_numfmt_set_text_attribute )
|
||||
PHP_FE( numfmt_get_text_attribute, arginfo_numfmt_get_text_attribute )
|
||||
PHP_FE( numfmt_set_symbol, arginfo_numfmt_set_symbol )
|
||||
PHP_FE( numfmt_get_symbol, arginfo_numfmt_get_symbol )
|
||||
PHP_FE( numfmt_set_pattern, arginfo_numfmt_set_pattern )
|
||||
PHP_FE( numfmt_get_pattern, arginfo_numfmt_get_pattern )
|
||||
PHP_FE( numfmt_get_locale, arginfo_numfmt_get_locale )
|
||||
PHP_FE( numfmt_get_error_code, arginfo_numfmt_get_error_code )
|
||||
PHP_FE( numfmt_get_error_message, arginfo_numfmt_get_error_message )
|
||||
|
||||
/* normalizer functions */
|
||||
PHP_FE( normalizer_normalize, arginfo_normalizer_normalize )
|
||||
PHP_FE( normalizer_is_normalized, arginfo_normalizer_is_normalized )
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
PHP_FE( normalizer_get_raw_decomposition, arginfo_normalizer_get_raw_decomposition )
|
||||
#endif
|
||||
|
||||
/* Locale functions */
|
||||
PHP_NAMED_FE( locale_get_default, zif_locale_get_default, arginfo_locale_get_default )
|
||||
PHP_NAMED_FE( locale_set_default, zif_locale_set_default, arginfo_locale_set_default )
|
||||
PHP_FE( locale_get_primary_language, arginfo_locale_get_primary_language )
|
||||
PHP_FE( locale_get_script, arginfo_locale_get_script )
|
||||
PHP_FE( locale_get_region, arginfo_locale_get_region )
|
||||
PHP_FE( locale_get_keywords, arginfo_locale_get_keywords )
|
||||
PHP_FE( locale_get_display_script, arginfo_locale_get_display_script )
|
||||
PHP_FE( locale_get_display_region, arginfo_locale_get_display_region )
|
||||
PHP_FE( locale_get_display_name, arginfo_locale_get_display_name )
|
||||
PHP_FE( locale_get_display_language, arginfo_locale_get_display_language)
|
||||
PHP_FE( locale_get_display_variant, arginfo_locale_get_display_variant )
|
||||
PHP_FE( locale_compose, arginfo_locale_compose )
|
||||
PHP_FE( locale_parse, arginfo_locale_parse )
|
||||
PHP_FE( locale_get_all_variants, arginfo_locale_get_all_variants )
|
||||
PHP_FE( locale_filter_matches, arginfo_locale_filter_matches )
|
||||
PHP_FE( locale_canonicalize, arginfo_locale_canonicalize )
|
||||
PHP_FE( locale_lookup, arginfo_locale_lookup )
|
||||
PHP_FE( locale_accept_from_http, arginfo_locale_accept_from_http )
|
||||
|
||||
/* MessageFormatter functions */
|
||||
PHP_FE( msgfmt_create, arginfo_msgfmt_create )
|
||||
PHP_FE( msgfmt_format, arginfo_msgfmt_format )
|
||||
PHP_FE( msgfmt_format_message, arginfo_msgfmt_format_message )
|
||||
PHP_FE( msgfmt_parse, arginfo_msgfmt_parse )
|
||||
PHP_FE( msgfmt_parse_message, arginfo_msgfmt_parse_message )
|
||||
PHP_FE( msgfmt_set_pattern, arginfo_msgfmt_set_pattern )
|
||||
PHP_FE( msgfmt_get_pattern, arginfo_msgfmt_get_locale )
|
||||
PHP_FE( msgfmt_get_locale, arginfo_msgfmt_get_locale )
|
||||
PHP_FE( msgfmt_get_error_code, arginfo_msgfmt_get_error_code )
|
||||
PHP_FE( msgfmt_get_error_message, arginfo_msgfmt_get_error_message )
|
||||
|
||||
/* IntlDateFormatter functions */
|
||||
PHP_FE( datefmt_create, arginfo_datefmt_create )
|
||||
PHP_FE( datefmt_get_datetype, arginfo_datefmt_get_datetype )
|
||||
PHP_FE( datefmt_get_timetype, arginfo_datefmt_get_timetype )
|
||||
PHP_FE( datefmt_get_calendar, arginfo_datefmt_get_calendar )
|
||||
PHP_FE( datefmt_get_calendar_object, arginfo_datefmt_get_calendar_object )
|
||||
PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar )
|
||||
PHP_FE( datefmt_get_locale, arginfo_datefmt_get_locale )
|
||||
PHP_FE( datefmt_get_timezone_id, arginfo_datefmt_get_timezone_id )
|
||||
PHP_FE( datefmt_get_timezone, arginfo_datefmt_get_timezone )
|
||||
PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone )
|
||||
PHP_FE( datefmt_get_pattern, arginfo_datefmt_get_pattern )
|
||||
PHP_FE( datefmt_set_pattern, arginfo_datefmt_set_pattern )
|
||||
PHP_FE( datefmt_is_lenient, arginfo_datefmt_is_lenient )
|
||||
PHP_FE( datefmt_set_lenient, arginfo_datefmt_set_lenient )
|
||||
PHP_FE( datefmt_format, arginfo_datefmt_format )
|
||||
PHP_FE( datefmt_format_object, arginfo_datefmt_format_object )
|
||||
PHP_FE( datefmt_parse, arginfo_datefmt_parse )
|
||||
PHP_FE( datefmt_localtime , arginfo_datefmt_localtime )
|
||||
PHP_FE( datefmt_get_error_code, arginfo_datefmt_get_error_code )
|
||||
PHP_FE( datefmt_get_error_message, arginfo_datefmt_get_error_message )
|
||||
|
||||
/* grapheme functions */
|
||||
PHP_FE( grapheme_strlen, arginfo_grapheme_strlen )
|
||||
PHP_FE( grapheme_strpos, arginfo_grapheme_strpos )
|
||||
PHP_FE( grapheme_stripos, arginfo_grapheme_stripos )
|
||||
PHP_FE( grapheme_strrpos, arginfo_grapheme_strrpos )
|
||||
PHP_FE( grapheme_strripos, arginfo_grapheme_strripos )
|
||||
PHP_FE( grapheme_substr, arginfo_grapheme_substr )
|
||||
PHP_FE( grapheme_strstr, arginfo_grapheme_strstr )
|
||||
PHP_FE( grapheme_stristr, arginfo_grapheme_stristr )
|
||||
PHP_FE( grapheme_extract, arginfo_grapheme_extract )
|
||||
|
||||
/* IDN functions */
|
||||
PHP_FE( idn_to_ascii, arginfo_idn_to_ascii)
|
||||
PHP_FE( idn_to_utf8, arginfo_idn_to_utf8)
|
||||
|
||||
/* ResourceBundle functions */
|
||||
PHP_FE( resourcebundle_create, arginfo_resourcebundle_create )
|
||||
PHP_FE( resourcebundle_get, arginfo_resourcebundle_get )
|
||||
PHP_FE( resourcebundle_count, arginfo_resourcebundle_count )
|
||||
PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales )
|
||||
PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code )
|
||||
PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message )
|
||||
|
||||
/* Transliterator functions */
|
||||
PHP_FE( transliterator_create, arginfo_transliterator_create )
|
||||
PHP_FE( transliterator_create_from_rules, arginfo_transliterator_create_from_rules )
|
||||
PHP_FE( transliterator_list_ids, arginfo_transliterator_list_ids )
|
||||
PHP_FE( transliterator_create_inverse, arginfo_transliterator_create_inverse)
|
||||
PHP_FE( transliterator_transliterate, arginfo_transliterator_transliterate )
|
||||
PHP_FE( transliterator_get_error_code, arginfo_transliterator_get_error_code )
|
||||
PHP_FE( transliterator_get_error_message, arginfo_transliterator_get_error_message )
|
||||
|
||||
/* TimeZone functions */
|
||||
PHP_FE( intltz_create_time_zone, arginfo_intltz_create_time_zone )
|
||||
PHP_FE( intltz_from_date_time_zone, arginfo_intltz_from_date_time_zone )
|
||||
PHP_FE( intltz_create_default, arginfo_intltz_create_default )
|
||||
PHP_FE( intltz_get_id, arginfo_intltz_get_id )
|
||||
PHP_FE( intltz_get_gmt, arginfo_intltz_get_gmt )
|
||||
PHP_FE( intltz_get_unknown, arginfo_intltz_get_unknown )
|
||||
PHP_FE( intltz_create_enumeration, arginfo_intltz_create_enumeration )
|
||||
PHP_FE( intltz_count_equivalent_ids, arginfo_intltz_count_equivalent_ids )
|
||||
PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_intltz_create_time_zone_id_enumeration )
|
||||
PHP_FE( intltz_get_canonical_id, arginfo_intltz_get_canonical_id )
|
||||
PHP_FE( intltz_get_region, arginfo_intltz_get_region )
|
||||
PHP_FE( intltz_get_tz_data_version, arginfo_intltz_get_tz_data_version )
|
||||
PHP_FE( intltz_get_equivalent_id, arginfo_intltz_get_equivalent_id )
|
||||
PHP_FE( intltz_use_daylight_time, arginfo_intltz_use_daylight_time )
|
||||
PHP_FE( intltz_get_offset, arginfo_intltz_get_offset )
|
||||
PHP_FE( intltz_get_raw_offset, arginfo_intltz_get_raw_offset )
|
||||
PHP_FE( intltz_has_same_rules, arginfo_intltz_has_same_rules )
|
||||
PHP_FE( intltz_get_display_name, arginfo_intltz_get_display_name )
|
||||
PHP_FE( intltz_get_dst_savings, arginfo_intltz_get_dst_savings )
|
||||
PHP_FE( intltz_to_date_time_zone, arginfo_intltz_to_date_time_zone )
|
||||
PHP_FE( intltz_get_error_code, arginfo_intltz_get_error_code )
|
||||
PHP_FE( intltz_get_error_message, arginfo_intltz_get_error_message )
|
||||
|
||||
PHP_FE( intlcal_create_instance, arginfo_intlcal_create_instance )
|
||||
PHP_FE( intlcal_get_keyword_values_for_locale, arginfo_intlcal_get_keyword_values_for_locale )
|
||||
PHP_FE( intlcal_get_now, arginfo_intlcal_get_now )
|
||||
PHP_FE( intlcal_get_available_locales, arginfo_intlcal_get_available_locales )
|
||||
PHP_FE( intlcal_get, arginfo_intlcal_get )
|
||||
PHP_FE( intlcal_get_time, arginfo_intlcal_get_time )
|
||||
PHP_FE( intlcal_set_time, arginfo_intlcal_set_time )
|
||||
PHP_FE( intlcal_add, arginfo_intlcal_add )
|
||||
PHP_FE( intlcal_set_time_zone, arginfo_intlcal_set_time_zone )
|
||||
PHP_FE( intlcal_after, arginfo_intlcal_after )
|
||||
PHP_FE( intlcal_before, arginfo_intlcal_before )
|
||||
PHP_FE( intlcal_set, arginfo_intlcal_set )
|
||||
PHP_FE( intlcal_roll, arginfo_intlcal_roll )
|
||||
PHP_FE( intlcal_clear, arginfo_intlcal_clear )
|
||||
PHP_FE( intlcal_field_difference, arginfo_intlcal_field_difference )
|
||||
PHP_FE( intlcal_get_actual_maximum, arginfo_intlcal_get_actual_maximum )
|
||||
PHP_FE( intlcal_get_actual_minimum, arginfo_intlcal_get_actual_minimum )
|
||||
PHP_FE( intlcal_get_day_of_week_type, arginfo_intlcal_get_day_of_week_type )
|
||||
PHP_FE( intlcal_get_first_day_of_week, arginfo_intlcal_get_first_day_of_week )
|
||||
PHP_FE( intlcal_get_greatest_minimum, arginfo_intlcal_get_greatest_minimum )
|
||||
PHP_FE( intlcal_get_least_maximum, arginfo_intlcal_get_least_maximum )
|
||||
PHP_FE( intlcal_get_locale, arginfo_intlcal_get_locale )
|
||||
PHP_FE( intlcal_get_maximum, arginfo_intlcal_get_maximum )
|
||||
PHP_FE( intlcal_get_minimal_days_in_first_week, arginfo_intlcal_get_minimal_days_in_first_week )
|
||||
PHP_FE( intlcal_get_minimum, arginfo_intlcal_get_minimum )
|
||||
PHP_FE( intlcal_get_time_zone, arginfo_intlcal_get_time_zone )
|
||||
PHP_FE( intlcal_get_type, arginfo_intlcal_get_type )
|
||||
PHP_FE( intlcal_get_weekend_transition, arginfo_intlcal_get_weekend_transition )
|
||||
PHP_FE( intlcal_in_daylight_time, arginfo_intlcal_in_daylight_time )
|
||||
PHP_FE( intlcal_is_equivalent_to, arginfo_intlcal_is_equivalent_to )
|
||||
PHP_FE( intlcal_is_lenient, arginfo_intlcal_is_lenient )
|
||||
PHP_FE( intlcal_is_set, arginfo_intlcal_is_set )
|
||||
PHP_FE( intlcal_is_weekend, arginfo_intlcal_is_weekend )
|
||||
PHP_FE( intlcal_set_first_day_of_week, arginfo_intlcal_set_first_day_of_week )
|
||||
PHP_FE( intlcal_set_lenient, arginfo_intlcal_set_lenient )
|
||||
PHP_FE( intlcal_set_minimal_days_in_first_week, arginfo_intlcal_set_minimal_days_in_first_week )
|
||||
PHP_FE( intlcal_equals, arginfo_intlcal_equals )
|
||||
PHP_FE( intlcal_from_date_time, arginfo_intlcal_from_date_time )
|
||||
PHP_FE( intlcal_to_date_time, arginfo_intlcal_to_date_time )
|
||||
PHP_FE( intlcal_get_repeated_wall_time_option, arginfo_intlcal_get_repeated_wall_time_option )
|
||||
PHP_FE( intlcal_get_skipped_wall_time_option, arginfo_intlcal_get_skipped_wall_time_option )
|
||||
PHP_FE( intlcal_set_repeated_wall_time_option, arginfo_intlcal_set_repeated_wall_time_option )
|
||||
PHP_FE( intlcal_set_skipped_wall_time_option, arginfo_intlcal_set_skipped_wall_time_option )
|
||||
PHP_FE( intlcal_get_error_code, arginfo_intlcal_get_error_code )
|
||||
PHP_FE( intlcal_get_error_message, arginfo_intlcal_get_error_message )
|
||||
|
||||
PHP_FE( intlgregcal_create_instance, arginfo_intlgregcal_create_instance )
|
||||
PHP_FE( intlgregcal_set_gregorian_change, arginfo_intlgregcal_set_gregorian_change )
|
||||
PHP_FE( intlgregcal_get_gregorian_change, arginfo_intlgregcal_get_gregorian_change )
|
||||
PHP_FE( intlgregcal_is_leap_year, arginfo_intlgregcal_is_leap_year )
|
||||
|
||||
/* common functions */
|
||||
PHP_FE( intl_get_error_code, arginfo_intl_get_error_code )
|
||||
PHP_FE( intl_get_error_message, arginfo_intl_get_error_message )
|
||||
PHP_FE( intl_is_failure, arginfo_intl_is_failure )
|
||||
PHP_FE( intl_error_name, arginfo_intl_error_name )
|
||||
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ INI Settings */
|
||||
PHP_INI_BEGIN()
|
||||
STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals)
|
||||
@ -352,7 +109,7 @@ static PHP_GINIT_FUNCTION(intl);
|
||||
zend_module_entry intl_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"intl",
|
||||
intl_functions,
|
||||
ext_functions,
|
||||
PHP_MINIT( intl ),
|
||||
PHP_MSHUTDOWN( intl ),
|
||||
PHP_RINIT( intl ),
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
/* calendar */
|
||||
|
||||
/** @param IntlTimeZone|DateTimeZone|string|null $timeZone */
|
||||
@ -43,8 +45,6 @@ function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek): i
|
||||
|
||||
function intlcal_get_first_day_of_week(IntlCalendar $calendar): int|false {}
|
||||
|
||||
function intlcal_greatest_minimum(IntlCalendar $calendar, int $field): int|false {}
|
||||
|
||||
function intlcal_get_least_maximum(IntlCalendar $calendar, int $field): int|false {}
|
||||
|
||||
function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field): int|false {}
|
||||
|
@ -89,8 +89,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_intlcal_get_first_day_of_week, 0
|
||||
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_intlcal_greatest_minimum arginfo_intlcal_get
|
||||
|
||||
#define arginfo_intlcal_get_least_maximum arginfo_intlcal_get
|
||||
|
||||
#define arginfo_intlcal_get_greatest_minimum arginfo_intlcal_get
|
||||
@ -773,3 +771,384 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_transliterator_get_error_message, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_ARG_OBJ_INFO(0, trans, Transliterator, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
ZEND_FUNCTION(intlcal_create_instance);
|
||||
ZEND_FUNCTION(intlcal_get_keyword_values_for_locale);
|
||||
ZEND_FUNCTION(intlcal_get_now);
|
||||
ZEND_FUNCTION(intlcal_get_available_locales);
|
||||
ZEND_FUNCTION(intlcal_get);
|
||||
ZEND_FUNCTION(intlcal_get_time);
|
||||
ZEND_FUNCTION(intlcal_set_time);
|
||||
ZEND_FUNCTION(intlcal_add);
|
||||
ZEND_FUNCTION(intlcal_set_time_zone);
|
||||
ZEND_FUNCTION(intlcal_after);
|
||||
ZEND_FUNCTION(intlcal_before);
|
||||
ZEND_FUNCTION(intlcal_set);
|
||||
ZEND_FUNCTION(intlcal_roll);
|
||||
ZEND_FUNCTION(intlcal_clear);
|
||||
ZEND_FUNCTION(intlcal_field_difference);
|
||||
ZEND_FUNCTION(intlcal_get_actual_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_actual_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_day_of_week_type);
|
||||
ZEND_FUNCTION(intlcal_get_first_day_of_week);
|
||||
ZEND_FUNCTION(intlcal_get_least_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_greatest_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_locale);
|
||||
ZEND_FUNCTION(intlcal_get_maximum);
|
||||
ZEND_FUNCTION(intlcal_get_minimal_days_in_first_week);
|
||||
ZEND_FUNCTION(intlcal_set_minimal_days_in_first_week);
|
||||
ZEND_FUNCTION(intlcal_get_minimum);
|
||||
ZEND_FUNCTION(intlcal_get_time_zone);
|
||||
ZEND_FUNCTION(intlcal_get_type);
|
||||
ZEND_FUNCTION(intlcal_get_weekend_transition);
|
||||
ZEND_FUNCTION(intlcal_in_daylight_time);
|
||||
ZEND_FUNCTION(intlcal_is_lenient);
|
||||
ZEND_FUNCTION(intlcal_is_set);
|
||||
ZEND_FUNCTION(intlcal_is_equivalent_to);
|
||||
ZEND_FUNCTION(intlcal_is_weekend);
|
||||
ZEND_FUNCTION(intlcal_set_first_day_of_week);
|
||||
ZEND_FUNCTION(intlcal_set_lenient);
|
||||
ZEND_FUNCTION(intlcal_get_repeated_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_equals);
|
||||
ZEND_FUNCTION(intlcal_get_skipped_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_set_repeated_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_set_skipped_wall_time_option);
|
||||
ZEND_FUNCTION(intlcal_from_date_time);
|
||||
ZEND_FUNCTION(intlcal_to_date_time);
|
||||
ZEND_FUNCTION(intlcal_get_error_code);
|
||||
ZEND_FUNCTION(intlcal_get_error_message);
|
||||
ZEND_FUNCTION(intlgregcal_create_instance);
|
||||
ZEND_FUNCTION(intlgregcal_set_gregorian_change);
|
||||
ZEND_FUNCTION(intlgregcal_get_gregorian_change);
|
||||
ZEND_FUNCTION(intlgregcal_is_leap_year);
|
||||
ZEND_FUNCTION(collator_create);
|
||||
ZEND_FUNCTION(collator_compare);
|
||||
ZEND_FUNCTION(collator_get_attribute);
|
||||
ZEND_FUNCTION(collator_set_attribute);
|
||||
ZEND_FUNCTION(collator_get_strength);
|
||||
ZEND_FUNCTION(collator_set_strength);
|
||||
ZEND_FUNCTION(collator_sort);
|
||||
ZEND_FUNCTION(collator_sort_with_sort_keys);
|
||||
ZEND_FUNCTION(collator_asort);
|
||||
ZEND_FUNCTION(collator_get_locale);
|
||||
ZEND_FUNCTION(collator_get_error_code);
|
||||
ZEND_FUNCTION(collator_get_error_message);
|
||||
ZEND_FUNCTION(collator_get_sort_key);
|
||||
ZEND_FUNCTION(intl_get_error_code);
|
||||
ZEND_FUNCTION(intl_get_error_message);
|
||||
ZEND_FUNCTION(intl_is_failure);
|
||||
ZEND_FUNCTION(intl_error_name);
|
||||
ZEND_FUNCTION(datefmt_create);
|
||||
ZEND_FUNCTION(datefmt_get_datetype);
|
||||
ZEND_FUNCTION(datefmt_get_timetype);
|
||||
ZEND_FUNCTION(datefmt_get_calendar);
|
||||
ZEND_FUNCTION(datefmt_set_calendar);
|
||||
ZEND_FUNCTION(datefmt_get_timezone_id);
|
||||
ZEND_FUNCTION(datefmt_get_calendar_object);
|
||||
ZEND_FUNCTION(datefmt_get_timezone);
|
||||
ZEND_FUNCTION(datefmt_set_timezone);
|
||||
ZEND_FUNCTION(datefmt_set_pattern);
|
||||
ZEND_FUNCTION(datefmt_get_pattern);
|
||||
ZEND_FUNCTION(datefmt_get_locale);
|
||||
ZEND_FUNCTION(datefmt_set_lenient);
|
||||
ZEND_FUNCTION(datefmt_is_lenient);
|
||||
ZEND_FUNCTION(datefmt_format);
|
||||
ZEND_FUNCTION(datefmt_format_object);
|
||||
ZEND_FUNCTION(datefmt_parse);
|
||||
ZEND_FUNCTION(datefmt_localtime);
|
||||
ZEND_FUNCTION(datefmt_get_error_code);
|
||||
ZEND_FUNCTION(datefmt_get_error_message);
|
||||
ZEND_FUNCTION(numfmt_create);
|
||||
ZEND_FUNCTION(numfmt_format);
|
||||
ZEND_FUNCTION(numfmt_parse);
|
||||
ZEND_FUNCTION(numfmt_format_currency);
|
||||
ZEND_FUNCTION(numfmt_parse_currency);
|
||||
ZEND_FUNCTION(numfmt_set_attribute);
|
||||
ZEND_FUNCTION(numfmt_get_attribute);
|
||||
ZEND_FUNCTION(numfmt_set_text_attribute);
|
||||
ZEND_FUNCTION(numfmt_get_text_attribute);
|
||||
ZEND_FUNCTION(numfmt_set_symbol);
|
||||
ZEND_FUNCTION(numfmt_get_symbol);
|
||||
ZEND_FUNCTION(numfmt_set_pattern);
|
||||
ZEND_FUNCTION(numfmt_get_pattern);
|
||||
ZEND_FUNCTION(numfmt_get_locale);
|
||||
ZEND_FUNCTION(numfmt_get_error_code);
|
||||
ZEND_FUNCTION(numfmt_get_error_message);
|
||||
ZEND_FUNCTION(grapheme_strlen);
|
||||
ZEND_FUNCTION(grapheme_strpos);
|
||||
ZEND_FUNCTION(grapheme_stripos);
|
||||
ZEND_FUNCTION(grapheme_strrpos);
|
||||
ZEND_FUNCTION(grapheme_strripos);
|
||||
ZEND_FUNCTION(grapheme_substr);
|
||||
ZEND_FUNCTION(grapheme_strstr);
|
||||
ZEND_FUNCTION(grapheme_stristr);
|
||||
ZEND_FUNCTION(grapheme_extract);
|
||||
ZEND_FUNCTION(idn_to_ascii);
|
||||
ZEND_FUNCTION(idn_to_utf8);
|
||||
ZEND_FUNCTION(locale_get_default);
|
||||
ZEND_FUNCTION(locale_set_default);
|
||||
ZEND_FUNCTION(locale_get_primary_language);
|
||||
ZEND_FUNCTION(locale_get_script);
|
||||
ZEND_FUNCTION(locale_get_region);
|
||||
ZEND_FUNCTION(locale_get_keywords);
|
||||
ZEND_FUNCTION(locale_get_display_script);
|
||||
ZEND_FUNCTION(locale_get_display_region);
|
||||
ZEND_FUNCTION(locale_get_display_name);
|
||||
ZEND_FUNCTION(locale_get_display_language);
|
||||
ZEND_FUNCTION(locale_get_display_variant);
|
||||
ZEND_FUNCTION(locale_compose);
|
||||
ZEND_FUNCTION(locale_parse);
|
||||
ZEND_FUNCTION(locale_get_all_variants);
|
||||
ZEND_FUNCTION(locale_filter_matches);
|
||||
ZEND_FUNCTION(locale_canonicalize);
|
||||
ZEND_FUNCTION(locale_lookup);
|
||||
ZEND_FUNCTION(locale_accept_from_http);
|
||||
ZEND_FUNCTION(msgfmt_create);
|
||||
ZEND_FUNCTION(msgfmt_format);
|
||||
ZEND_FUNCTION(msgfmt_format_message);
|
||||
ZEND_FUNCTION(msgfmt_parse);
|
||||
ZEND_FUNCTION(msgfmt_parse_message);
|
||||
ZEND_FUNCTION(msgfmt_set_pattern);
|
||||
ZEND_FUNCTION(msgfmt_get_pattern);
|
||||
ZEND_FUNCTION(msgfmt_get_locale);
|
||||
ZEND_FUNCTION(msgfmt_get_error_code);
|
||||
ZEND_FUNCTION(msgfmt_get_error_message);
|
||||
ZEND_FUNCTION(normalizer_normalize);
|
||||
ZEND_FUNCTION(normalizer_is_normalized);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
ZEND_FUNCTION(normalizer_get_raw_decomposition);
|
||||
#endif
|
||||
ZEND_FUNCTION(resourcebundle_create);
|
||||
ZEND_FUNCTION(resourcebundle_get);
|
||||
ZEND_FUNCTION(resourcebundle_count);
|
||||
ZEND_FUNCTION(resourcebundle_locales);
|
||||
ZEND_FUNCTION(resourcebundle_get_error_code);
|
||||
ZEND_FUNCTION(resourcebundle_get_error_message);
|
||||
ZEND_FUNCTION(intltz_count_equivalent_ids);
|
||||
ZEND_FUNCTION(intltz_create_default);
|
||||
ZEND_FUNCTION(intltz_create_enumeration);
|
||||
ZEND_FUNCTION(intltz_create_time_zone);
|
||||
ZEND_FUNCTION(intltz_create_time_zone_id_enumeration);
|
||||
ZEND_FUNCTION(intltz_from_date_time_zone);
|
||||
ZEND_FUNCTION(intltz_get_canonical_id);
|
||||
ZEND_FUNCTION(intltz_get_display_name);
|
||||
ZEND_FUNCTION(intltz_get_dst_savings);
|
||||
ZEND_FUNCTION(intltz_get_equivalent_id);
|
||||
ZEND_FUNCTION(intltz_get_error_code);
|
||||
ZEND_FUNCTION(intltz_get_error_message);
|
||||
ZEND_FUNCTION(intltz_get_gmt);
|
||||
ZEND_FUNCTION(intltz_get_id);
|
||||
ZEND_FUNCTION(intltz_get_offset);
|
||||
ZEND_FUNCTION(intltz_get_raw_offset);
|
||||
ZEND_FUNCTION(intltz_get_region);
|
||||
ZEND_FUNCTION(intltz_get_tz_data_version);
|
||||
ZEND_FUNCTION(intltz_get_unknown);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FUNCTION(intltz_get_windows_id);
|
||||
#endif
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FUNCTION(intltz_get_id_for_windows_id);
|
||||
#endif
|
||||
ZEND_FUNCTION(intltz_has_same_rules);
|
||||
ZEND_FUNCTION(intltz_to_date_time_zone);
|
||||
ZEND_FUNCTION(intltz_use_daylight_time);
|
||||
ZEND_FUNCTION(transliterator_create);
|
||||
ZEND_FUNCTION(transliterator_create_from_rules);
|
||||
ZEND_FUNCTION(transliterator_list_ids);
|
||||
ZEND_FUNCTION(transliterator_create_inverse);
|
||||
ZEND_FUNCTION(transliterator_transliterate);
|
||||
ZEND_FUNCTION(transliterator_get_error_code);
|
||||
ZEND_FUNCTION(transliterator_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(intlcal_create_instance, arginfo_intlcal_create_instance)
|
||||
ZEND_FE(intlcal_get_keyword_values_for_locale, arginfo_intlcal_get_keyword_values_for_locale)
|
||||
ZEND_FE(intlcal_get_now, arginfo_intlcal_get_now)
|
||||
ZEND_FE(intlcal_get_available_locales, arginfo_intlcal_get_available_locales)
|
||||
ZEND_FE(intlcal_get, arginfo_intlcal_get)
|
||||
ZEND_FE(intlcal_get_time, arginfo_intlcal_get_time)
|
||||
ZEND_FE(intlcal_set_time, arginfo_intlcal_set_time)
|
||||
ZEND_FE(intlcal_add, arginfo_intlcal_add)
|
||||
ZEND_FE(intlcal_set_time_zone, arginfo_intlcal_set_time_zone)
|
||||
ZEND_FE(intlcal_after, arginfo_intlcal_after)
|
||||
ZEND_FE(intlcal_before, arginfo_intlcal_before)
|
||||
ZEND_FE(intlcal_set, arginfo_intlcal_set)
|
||||
ZEND_FE(intlcal_roll, arginfo_intlcal_roll)
|
||||
ZEND_FE(intlcal_clear, arginfo_intlcal_clear)
|
||||
ZEND_FE(intlcal_field_difference, arginfo_intlcal_field_difference)
|
||||
ZEND_FE(intlcal_get_actual_maximum, arginfo_intlcal_get_actual_maximum)
|
||||
ZEND_FE(intlcal_get_actual_minimum, arginfo_intlcal_get_actual_minimum)
|
||||
ZEND_FE(intlcal_get_day_of_week_type, arginfo_intlcal_get_day_of_week_type)
|
||||
ZEND_FE(intlcal_get_first_day_of_week, arginfo_intlcal_get_first_day_of_week)
|
||||
ZEND_FE(intlcal_get_least_maximum, arginfo_intlcal_get_least_maximum)
|
||||
ZEND_FE(intlcal_get_greatest_minimum, arginfo_intlcal_get_greatest_minimum)
|
||||
ZEND_FE(intlcal_get_locale, arginfo_intlcal_get_locale)
|
||||
ZEND_FE(intlcal_get_maximum, arginfo_intlcal_get_maximum)
|
||||
ZEND_FE(intlcal_get_minimal_days_in_first_week, arginfo_intlcal_get_minimal_days_in_first_week)
|
||||
ZEND_FE(intlcal_set_minimal_days_in_first_week, arginfo_intlcal_set_minimal_days_in_first_week)
|
||||
ZEND_FE(intlcal_get_minimum, arginfo_intlcal_get_minimum)
|
||||
ZEND_FE(intlcal_get_time_zone, arginfo_intlcal_get_time_zone)
|
||||
ZEND_FE(intlcal_get_type, arginfo_intlcal_get_type)
|
||||
ZEND_FE(intlcal_get_weekend_transition, arginfo_intlcal_get_weekend_transition)
|
||||
ZEND_FE(intlcal_in_daylight_time, arginfo_intlcal_in_daylight_time)
|
||||
ZEND_FE(intlcal_is_lenient, arginfo_intlcal_is_lenient)
|
||||
ZEND_FE(intlcal_is_set, arginfo_intlcal_is_set)
|
||||
ZEND_FE(intlcal_is_equivalent_to, arginfo_intlcal_is_equivalent_to)
|
||||
ZEND_FE(intlcal_is_weekend, arginfo_intlcal_is_weekend)
|
||||
ZEND_FE(intlcal_set_first_day_of_week, arginfo_intlcal_set_first_day_of_week)
|
||||
ZEND_FE(intlcal_set_lenient, arginfo_intlcal_set_lenient)
|
||||
ZEND_FE(intlcal_get_repeated_wall_time_option, arginfo_intlcal_get_repeated_wall_time_option)
|
||||
ZEND_FE(intlcal_equals, arginfo_intlcal_equals)
|
||||
ZEND_FE(intlcal_get_skipped_wall_time_option, arginfo_intlcal_get_skipped_wall_time_option)
|
||||
ZEND_FE(intlcal_set_repeated_wall_time_option, arginfo_intlcal_set_repeated_wall_time_option)
|
||||
ZEND_FE(intlcal_set_skipped_wall_time_option, arginfo_intlcal_set_skipped_wall_time_option)
|
||||
ZEND_FE(intlcal_from_date_time, arginfo_intlcal_from_date_time)
|
||||
ZEND_FE(intlcal_to_date_time, arginfo_intlcal_to_date_time)
|
||||
ZEND_FE(intlcal_get_error_code, arginfo_intlcal_get_error_code)
|
||||
ZEND_FE(intlcal_get_error_message, arginfo_intlcal_get_error_message)
|
||||
ZEND_FE(intlgregcal_create_instance, arginfo_intlgregcal_create_instance)
|
||||
ZEND_FE(intlgregcal_set_gregorian_change, arginfo_intlgregcal_set_gregorian_change)
|
||||
ZEND_FE(intlgregcal_get_gregorian_change, arginfo_intlgregcal_get_gregorian_change)
|
||||
ZEND_FE(intlgregcal_is_leap_year, arginfo_intlgregcal_is_leap_year)
|
||||
ZEND_FE(collator_create, arginfo_collator_create)
|
||||
ZEND_FE(collator_compare, arginfo_collator_compare)
|
||||
ZEND_FE(collator_get_attribute, arginfo_collator_get_attribute)
|
||||
ZEND_FE(collator_set_attribute, arginfo_collator_set_attribute)
|
||||
ZEND_FE(collator_get_strength, arginfo_collator_get_strength)
|
||||
ZEND_FE(collator_set_strength, arginfo_collator_set_strength)
|
||||
ZEND_FE(collator_sort, arginfo_collator_sort)
|
||||
ZEND_FE(collator_sort_with_sort_keys, arginfo_collator_sort_with_sort_keys)
|
||||
ZEND_FE(collator_asort, arginfo_collator_asort)
|
||||
ZEND_FE(collator_get_locale, arginfo_collator_get_locale)
|
||||
ZEND_FE(collator_get_error_code, arginfo_collator_get_error_code)
|
||||
ZEND_FE(collator_get_error_message, arginfo_collator_get_error_message)
|
||||
ZEND_FE(collator_get_sort_key, arginfo_collator_get_sort_key)
|
||||
ZEND_FE(intl_get_error_code, arginfo_intl_get_error_code)
|
||||
ZEND_FE(intl_get_error_message, arginfo_intl_get_error_message)
|
||||
ZEND_FE(intl_is_failure, arginfo_intl_is_failure)
|
||||
ZEND_FE(intl_error_name, arginfo_intl_error_name)
|
||||
ZEND_FE(datefmt_create, arginfo_datefmt_create)
|
||||
ZEND_FE(datefmt_get_datetype, arginfo_datefmt_get_datetype)
|
||||
ZEND_FE(datefmt_get_timetype, arginfo_datefmt_get_timetype)
|
||||
ZEND_FE(datefmt_get_calendar, arginfo_datefmt_get_calendar)
|
||||
ZEND_FE(datefmt_set_calendar, arginfo_datefmt_set_calendar)
|
||||
ZEND_FE(datefmt_get_timezone_id, arginfo_datefmt_get_timezone_id)
|
||||
ZEND_FE(datefmt_get_calendar_object, arginfo_datefmt_get_calendar_object)
|
||||
ZEND_FE(datefmt_get_timezone, arginfo_datefmt_get_timezone)
|
||||
ZEND_FE(datefmt_set_timezone, arginfo_datefmt_set_timezone)
|
||||
ZEND_FE(datefmt_set_pattern, arginfo_datefmt_set_pattern)
|
||||
ZEND_FE(datefmt_get_pattern, arginfo_datefmt_get_pattern)
|
||||
ZEND_FE(datefmt_get_locale, arginfo_datefmt_get_locale)
|
||||
ZEND_FE(datefmt_set_lenient, arginfo_datefmt_set_lenient)
|
||||
ZEND_FE(datefmt_is_lenient, arginfo_datefmt_is_lenient)
|
||||
ZEND_FE(datefmt_format, arginfo_datefmt_format)
|
||||
ZEND_FE(datefmt_format_object, arginfo_datefmt_format_object)
|
||||
ZEND_FE(datefmt_parse, arginfo_datefmt_parse)
|
||||
ZEND_FE(datefmt_localtime, arginfo_datefmt_localtime)
|
||||
ZEND_FE(datefmt_get_error_code, arginfo_datefmt_get_error_code)
|
||||
ZEND_FE(datefmt_get_error_message, arginfo_datefmt_get_error_message)
|
||||
ZEND_FE(numfmt_create, arginfo_numfmt_create)
|
||||
ZEND_FE(numfmt_format, arginfo_numfmt_format)
|
||||
ZEND_FE(numfmt_parse, arginfo_numfmt_parse)
|
||||
ZEND_FE(numfmt_format_currency, arginfo_numfmt_format_currency)
|
||||
ZEND_FE(numfmt_parse_currency, arginfo_numfmt_parse_currency)
|
||||
ZEND_FE(numfmt_set_attribute, arginfo_numfmt_set_attribute)
|
||||
ZEND_FE(numfmt_get_attribute, arginfo_numfmt_get_attribute)
|
||||
ZEND_FE(numfmt_set_text_attribute, arginfo_numfmt_set_text_attribute)
|
||||
ZEND_FE(numfmt_get_text_attribute, arginfo_numfmt_get_text_attribute)
|
||||
ZEND_FE(numfmt_set_symbol, arginfo_numfmt_set_symbol)
|
||||
ZEND_FE(numfmt_get_symbol, arginfo_numfmt_get_symbol)
|
||||
ZEND_FE(numfmt_set_pattern, arginfo_numfmt_set_pattern)
|
||||
ZEND_FE(numfmt_get_pattern, arginfo_numfmt_get_pattern)
|
||||
ZEND_FE(numfmt_get_locale, arginfo_numfmt_get_locale)
|
||||
ZEND_FE(numfmt_get_error_code, arginfo_numfmt_get_error_code)
|
||||
ZEND_FE(numfmt_get_error_message, arginfo_numfmt_get_error_message)
|
||||
ZEND_FE(grapheme_strlen, arginfo_grapheme_strlen)
|
||||
ZEND_FE(grapheme_strpos, arginfo_grapheme_strpos)
|
||||
ZEND_FE(grapheme_stripos, arginfo_grapheme_stripos)
|
||||
ZEND_FE(grapheme_strrpos, arginfo_grapheme_strrpos)
|
||||
ZEND_FE(grapheme_strripos, arginfo_grapheme_strripos)
|
||||
ZEND_FE(grapheme_substr, arginfo_grapheme_substr)
|
||||
ZEND_FE(grapheme_strstr, arginfo_grapheme_strstr)
|
||||
ZEND_FE(grapheme_stristr, arginfo_grapheme_stristr)
|
||||
ZEND_FE(grapheme_extract, arginfo_grapheme_extract)
|
||||
ZEND_FE(idn_to_ascii, arginfo_idn_to_ascii)
|
||||
ZEND_FE(idn_to_utf8, arginfo_idn_to_utf8)
|
||||
ZEND_FE(locale_get_default, arginfo_locale_get_default)
|
||||
ZEND_FE(locale_set_default, arginfo_locale_set_default)
|
||||
ZEND_FE(locale_get_primary_language, arginfo_locale_get_primary_language)
|
||||
ZEND_FE(locale_get_script, arginfo_locale_get_script)
|
||||
ZEND_FE(locale_get_region, arginfo_locale_get_region)
|
||||
ZEND_FE(locale_get_keywords, arginfo_locale_get_keywords)
|
||||
ZEND_FE(locale_get_display_script, arginfo_locale_get_display_script)
|
||||
ZEND_FE(locale_get_display_region, arginfo_locale_get_display_region)
|
||||
ZEND_FE(locale_get_display_name, arginfo_locale_get_display_name)
|
||||
ZEND_FE(locale_get_display_language, arginfo_locale_get_display_language)
|
||||
ZEND_FE(locale_get_display_variant, arginfo_locale_get_display_variant)
|
||||
ZEND_FE(locale_compose, arginfo_locale_compose)
|
||||
ZEND_FE(locale_parse, arginfo_locale_parse)
|
||||
ZEND_FE(locale_get_all_variants, arginfo_locale_get_all_variants)
|
||||
ZEND_FE(locale_filter_matches, arginfo_locale_filter_matches)
|
||||
ZEND_FE(locale_canonicalize, arginfo_locale_canonicalize)
|
||||
ZEND_FE(locale_lookup, arginfo_locale_lookup)
|
||||
ZEND_FE(locale_accept_from_http, arginfo_locale_accept_from_http)
|
||||
ZEND_FE(msgfmt_create, arginfo_msgfmt_create)
|
||||
ZEND_FE(msgfmt_format, arginfo_msgfmt_format)
|
||||
ZEND_FE(msgfmt_format_message, arginfo_msgfmt_format_message)
|
||||
ZEND_FE(msgfmt_parse, arginfo_msgfmt_parse)
|
||||
ZEND_FE(msgfmt_parse_message, arginfo_msgfmt_parse_message)
|
||||
ZEND_FE(msgfmt_set_pattern, arginfo_msgfmt_set_pattern)
|
||||
ZEND_FE(msgfmt_get_pattern, arginfo_msgfmt_get_pattern)
|
||||
ZEND_FE(msgfmt_get_locale, arginfo_msgfmt_get_locale)
|
||||
ZEND_FE(msgfmt_get_error_code, arginfo_msgfmt_get_error_code)
|
||||
ZEND_FE(msgfmt_get_error_message, arginfo_msgfmt_get_error_message)
|
||||
ZEND_FE(normalizer_normalize, arginfo_normalizer_normalize)
|
||||
ZEND_FE(normalizer_is_normalized, arginfo_normalizer_is_normalized)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 56
|
||||
ZEND_FE(normalizer_get_raw_decomposition, arginfo_normalizer_get_raw_decomposition)
|
||||
#endif
|
||||
ZEND_FE(resourcebundle_create, arginfo_resourcebundle_create)
|
||||
ZEND_FE(resourcebundle_get, arginfo_resourcebundle_get)
|
||||
ZEND_FE(resourcebundle_count, arginfo_resourcebundle_count)
|
||||
ZEND_FE(resourcebundle_locales, arginfo_resourcebundle_locales)
|
||||
ZEND_FE(resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code)
|
||||
ZEND_FE(resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message)
|
||||
ZEND_FE(intltz_count_equivalent_ids, arginfo_intltz_count_equivalent_ids)
|
||||
ZEND_FE(intltz_create_default, arginfo_intltz_create_default)
|
||||
ZEND_FE(intltz_create_enumeration, arginfo_intltz_create_enumeration)
|
||||
ZEND_FE(intltz_create_time_zone, arginfo_intltz_create_time_zone)
|
||||
ZEND_FE(intltz_create_time_zone_id_enumeration, arginfo_intltz_create_time_zone_id_enumeration)
|
||||
ZEND_FE(intltz_from_date_time_zone, arginfo_intltz_from_date_time_zone)
|
||||
ZEND_FE(intltz_get_canonical_id, arginfo_intltz_get_canonical_id)
|
||||
ZEND_FE(intltz_get_display_name, arginfo_intltz_get_display_name)
|
||||
ZEND_FE(intltz_get_dst_savings, arginfo_intltz_get_dst_savings)
|
||||
ZEND_FE(intltz_get_equivalent_id, arginfo_intltz_get_equivalent_id)
|
||||
ZEND_FE(intltz_get_error_code, arginfo_intltz_get_error_code)
|
||||
ZEND_FE(intltz_get_error_message, arginfo_intltz_get_error_message)
|
||||
ZEND_FE(intltz_get_gmt, arginfo_intltz_get_gmt)
|
||||
ZEND_FE(intltz_get_id, arginfo_intltz_get_id)
|
||||
ZEND_FE(intltz_get_offset, arginfo_intltz_get_offset)
|
||||
ZEND_FE(intltz_get_raw_offset, arginfo_intltz_get_raw_offset)
|
||||
ZEND_FE(intltz_get_region, arginfo_intltz_get_region)
|
||||
ZEND_FE(intltz_get_tz_data_version, arginfo_intltz_get_tz_data_version)
|
||||
ZEND_FE(intltz_get_unknown, arginfo_intltz_get_unknown)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FE(intltz_get_windows_id, arginfo_intltz_get_windows_id)
|
||||
#endif
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FE(intltz_get_id_for_windows_id, arginfo_intltz_get_id_for_windows_id)
|
||||
#endif
|
||||
ZEND_FE(intltz_has_same_rules, arginfo_intltz_has_same_rules)
|
||||
ZEND_FE(intltz_to_date_time_zone, arginfo_intltz_to_date_time_zone)
|
||||
ZEND_FE(intltz_use_daylight_time, arginfo_intltz_use_daylight_time)
|
||||
ZEND_FE(transliterator_create, arginfo_transliterator_create)
|
||||
ZEND_FE(transliterator_create_from_rules, arginfo_transliterator_create_from_rules)
|
||||
ZEND_FE(transliterator_list_ids, arginfo_transliterator_list_ids)
|
||||
ZEND_FE(transliterator_create_inverse, arginfo_transliterator_create_inverse)
|
||||
ZEND_FE(transliterator_transliterate, arginfo_transliterator_transliterate)
|
||||
ZEND_FE(transliterator_get_error_code, arginfo_transliterator_get_error_code)
|
||||
ZEND_FE(transliterator_get_error_message, arginfo_transliterator_get_error_message)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -1,27 +1,45 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class ResourceBundle implements Traversable
|
||||
{
|
||||
public function __construct(?string $locale, ?string $bundlename, bool $fallback = true) {}
|
||||
|
||||
/** @return ResourceBundle|null */
|
||||
/**
|
||||
* @return ResourceBundle|null
|
||||
* @alias resourcebundle_create
|
||||
*/
|
||||
public static function create(?string $locale, ?string $bundlename, bool $fallback = true) {}
|
||||
|
||||
/**
|
||||
* @param string|int $index
|
||||
* @return mixed
|
||||
* @alias resourcebundle_get
|
||||
*/
|
||||
public function get($index, bool $fallback = true) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias resourcebundle_count
|
||||
*/
|
||||
public function count() {}
|
||||
|
||||
/** @return array|false */
|
||||
/**
|
||||
* @return array|false
|
||||
* @alias resourcebundle_locales
|
||||
*/
|
||||
public static function getLocales(string $bundlename) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias resourcebundle_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string */
|
||||
/**
|
||||
* @return string
|
||||
* @alias resourcebundle_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
}
|
||||
|
@ -23,3 +23,24 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_ResourceBundle_getErrorCode arginfo_class_ResourceBundle_count
|
||||
|
||||
#define arginfo_class_ResourceBundle_getErrorMessage arginfo_class_ResourceBundle_count
|
||||
|
||||
|
||||
ZEND_METHOD(ResourceBundle, __construct);
|
||||
ZEND_FUNCTION(resourcebundle_create);
|
||||
ZEND_FUNCTION(resourcebundle_get);
|
||||
ZEND_FUNCTION(resourcebundle_count);
|
||||
ZEND_FUNCTION(resourcebundle_locales);
|
||||
ZEND_FUNCTION(resourcebundle_get_error_code);
|
||||
ZEND_FUNCTION(resourcebundle_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry class_ResourceBundle_methods[] = {
|
||||
ZEND_ME(ResourceBundle, __construct, arginfo_class_ResourceBundle___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(create, resourcebundle_create, arginfo_class_ResourceBundle_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(get, resourcebundle_get, arginfo_class_ResourceBundle_get, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(count, resourcebundle_count, arginfo_class_ResourceBundle_count, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getLocales, resourcebundle_locales, arginfo_class_ResourceBundle_getLocales, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, resourcebundle_get_error_code, arginfo_class_ResourceBundle_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, resourcebundle_get_error_message, arginfo_class_ResourceBundle_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -368,21 +368,6 @@ PHP_FUNCTION( resourcebundle_get_error_message )
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ ResourceBundle_class_functions
|
||||
* Every 'ResourceBundle' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry ResourceBundle_class_functions[] = {
|
||||
PHP_ME( ResourceBundle, __construct, arginfo_class_ResourceBundle___construct, ZEND_ACC_PUBLIC )
|
||||
ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_class_ResourceBundle_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_class_ResourceBundle_get, ZEND_ACC_PUBLIC )
|
||||
ZEND_NAMED_ME( count, ZEND_FN(resourcebundle_count), arginfo_class_ResourceBundle_count, ZEND_ACC_PUBLIC )
|
||||
ZEND_NAMED_ME( getLocales, ZEND_FN(resourcebundle_locales), arginfo_class_ResourceBundle_getLocales, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC )
|
||||
ZEND_NAMED_ME( getErrorCode, ZEND_FN(resourcebundle_get_error_code), arginfo_class_ResourceBundle_getErrorCode, ZEND_ACC_PUBLIC )
|
||||
ZEND_NAMED_ME( getErrorMessage, ZEND_FN(resourcebundle_get_error_message), arginfo_class_ResourceBundle_getErrorMessage, ZEND_ACC_PUBLIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ resourcebundle_register_class
|
||||
* Initialize 'ResourceBundle' class
|
||||
*/
|
||||
@ -390,7 +375,7 @@ void resourcebundle_register_class( void )
|
||||
{
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_CLASS_ENTRY( ce, "ResourceBundle", ResourceBundle_class_functions );
|
||||
INIT_CLASS_ENTRY( ce, "ResourceBundle", class_ResourceBundle_methods );
|
||||
|
||||
ce.create_object = ResourceBundle_object_create;
|
||||
ce.get_iterator = resourcebundle_get_iterator;
|
||||
|
@ -49,11 +49,4 @@ static inline ResourceBundle_object *php_intl_resourcebundle_fetch_object(zend_o
|
||||
void resourcebundle_register_class( void );
|
||||
extern zend_class_entry *ResourceBundle_ce_ptr;
|
||||
|
||||
PHP_FUNCTION( resourcebundle_create );
|
||||
PHP_FUNCTION( resourcebundle_get );
|
||||
PHP_FUNCTION( resourcebundle_count );
|
||||
PHP_FUNCTION( resourcebundle_locales );
|
||||
PHP_FUNCTION( resourcebundle_get_error_code );
|
||||
PHP_FUNCTION( resourcebundle_get_error_message );
|
||||
|
||||
#endif // #ifndef RESOURCEBUNDLE_CLASS_H
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class Spoofchecker
|
||||
{
|
||||
public function __construct() {}
|
||||
|
@ -27,3 +27,26 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_setRestrictionLevel, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
|
||||
ZEND_METHOD(Spoofchecker, __construct);
|
||||
ZEND_METHOD(Spoofchecker, isSuspicious);
|
||||
ZEND_METHOD(Spoofchecker, areConfusable);
|
||||
ZEND_METHOD(Spoofchecker, setAllowedLocales);
|
||||
ZEND_METHOD(Spoofchecker, setChecks);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
ZEND_METHOD(Spoofchecker, setRestrictionLevel);
|
||||
#endif
|
||||
|
||||
|
||||
static const zend_function_entry class_Spoofchecker_methods[] = {
|
||||
ZEND_ME(Spoofchecker, __construct, arginfo_class_Spoofchecker___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(Spoofchecker, isSuspicious, arginfo_class_Spoofchecker_isSuspicious, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(Spoofchecker, areConfusable, arginfo_class_Spoofchecker_areConfusable, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(Spoofchecker, setAllowedLocales, arginfo_class_Spoofchecker_setAllowedLocales, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(Spoofchecker, setChecks, arginfo_class_Spoofchecker_setChecks, ZEND_ACC_PUBLIC)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
ZEND_ME(Spoofchecker, setRestrictionLevel, arginfo_class_Spoofchecker_setRestrictionLevel, ZEND_ACC_PUBLIC)
|
||||
#endif
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -13,8 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "spoofchecker_class.h"
|
||||
#include "spoofchecker_main.h"
|
||||
#include "spoofchecker_create.h"
|
||||
#include "spoofchecker_arginfo.h"
|
||||
#include "php_intl.h"
|
||||
#include "intl_error.h"
|
||||
@ -63,19 +61,6 @@ zend_object *Spoofchecker_object_create(zend_class_entry *ce)
|
||||
* Every 'Spoofchecker' class method has an entry in this table
|
||||
*/
|
||||
|
||||
static const zend_function_entry Spoofchecker_class_functions[] = {
|
||||
PHP_ME(Spoofchecker, __construct, arginfo_class_Spoofchecker___construct, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(Spoofchecker, isSuspicious, arginfo_class_Spoofchecker_isSuspicious, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(Spoofchecker, areConfusable, arginfo_class_Spoofchecker_areConfusable, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(Spoofchecker, setAllowedLocales, arginfo_class_Spoofchecker_setAllowedLocales, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(Spoofchecker, setChecks, arginfo_class_Spoofchecker_setChecks, ZEND_ACC_PUBLIC)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
PHP_ME(Spoofchecker, setRestrictionLevel, arginfo_class_Spoofchecker_setRestrictionLevel, ZEND_ACC_PUBLIC)
|
||||
#endif
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */
|
||||
{
|
||||
zend_object *new_obj_val;
|
||||
@ -108,7 +93,7 @@ void spoofchecker_register_Spoofchecker_class(void)
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'Spoofchecker' class. */
|
||||
INIT_CLASS_ENTRY(ce, "Spoofchecker", Spoofchecker_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "Spoofchecker", class_Spoofchecker_methods);
|
||||
ce.create_object = Spoofchecker_object_create;
|
||||
Spoofchecker_ce_ptr = zend_register_internal_class(&ce);
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <php.h>
|
||||
|
||||
#include "intl_common.h"
|
||||
#include "spoofchecker_create.h"
|
||||
#include "intl_error.h"
|
||||
#include "intl_data.h"
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "php_intl.h"
|
||||
#include "spoofchecker_class.h"
|
||||
#include "spoofchecker_create.h"
|
||||
#include "intl_data.h"
|
||||
|
||||
/* {{{ proto Spoofchecker::__construct()
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Scott MacVicar <scottmac@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef SPOOFCHECKER_CREATE_H
|
||||
#define SPOOFCHECKER_CREATE_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(Spoofchecker, __construct);
|
||||
|
||||
#endif // SPOOFCHECKER_CREATE_H
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Scott MacVicar <scottmac@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef SPOOFCHECKER_MAIN_H
|
||||
#define SPOOFCHECKER_MAIN_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(Spoofchecker, isSuspicious);
|
||||
PHP_METHOD(Spoofchecker, areConfusable);
|
||||
PHP_METHOD(Spoofchecker, setAllowedLocales);
|
||||
PHP_METHOD(Spoofchecker, setChecks);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
PHP_METHOD(Spoofchecker, setRestrictionLevel);
|
||||
#endif
|
||||
|
||||
#endif // SPOOFCHECKER_MAIN_H
|
@ -1,82 +1,154 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlTimeZone
|
||||
{
|
||||
private function __construct() {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intltz_count_equivalent_ids
|
||||
*/
|
||||
public static function countEquivalentIDs(string $zoneId) {}
|
||||
|
||||
/** @return IntlTimeZone */
|
||||
/**
|
||||
* @return IntlTimeZone
|
||||
* @alias intltz_create_default
|
||||
*/
|
||||
public static function createDefault() {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|string|int|double|null $countryOrRawOffset
|
||||
* @return IntlIterator|false
|
||||
* @alias intltz_create_enumeration
|
||||
*/
|
||||
public static function createEnumeration($countryOrRawOffset = null) {}
|
||||
|
||||
/** @return IntlTimeZone|null */
|
||||
/**
|
||||
* @return IntlTimeZone|null
|
||||
* @alias intltz_create_time_zone
|
||||
*/
|
||||
public static function createTimeZone(string $zoneId) {}
|
||||
|
||||
/** @return IntlIterator|false */
|
||||
/**
|
||||
* @return IntlIterator|false
|
||||
* @alias intltz_create_time_zone_id_enumeration
|
||||
*/
|
||||
public static function createTimeZoneIDEnumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null) {}
|
||||
|
||||
/** @return IntlTimeZone|null */
|
||||
/**
|
||||
* @return IntlTimeZone|null
|
||||
* @alias intltz_from_date_time_zone
|
||||
*/
|
||||
public static function fromDateTimeZone(DateTimeZone $zone) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_canonical_id
|
||||
*/
|
||||
public static function getCanonicalID(string $zoneId, &$isSystemID = null) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_display_name
|
||||
*/
|
||||
public function getDisplayName(bool $isDaylight = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias intltz_get_dst_savings
|
||||
*/
|
||||
public function getDSTSavings() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_equivalent_id
|
||||
*/
|
||||
public static function getEquivalentID(string $zoneId, int $index) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias intltz_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
|
||||
/** @return IntlTimeZone */
|
||||
/**
|
||||
* @return IntlTimeZone
|
||||
* @alias intltz_get_gmt
|
||||
*/
|
||||
public static function getGMT() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_id
|
||||
*/
|
||||
public function getID() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intltz_get_offset
|
||||
*/
|
||||
public function getOffset(float $date, bool $local, &$rawOffset, &$dstOffset) {}
|
||||
|
||||
/** @return int */
|
||||
/**
|
||||
* @return int
|
||||
* @alias intltz_get_raw_offset
|
||||
*/
|
||||
public function getRawOffset() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_region
|
||||
*/
|
||||
public static function getRegion(string $zoneId) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_tz_data_version
|
||||
*/
|
||||
public static function getTZDataVersion() {}
|
||||
|
||||
/** @return IntlTimeZone */
|
||||
/**
|
||||
* @return IntlTimeZone
|
||||
* @alias intltz_get_unknown
|
||||
*/
|
||||
public static function getUnknown() {}
|
||||
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_windows_id
|
||||
*/
|
||||
public static function getWindowsID(string $timezone) {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias intltz_get_id_for_windows_id
|
||||
*/
|
||||
public static function getIDForWindowsID(string $timezone, string $region = UNKNOWN) {}
|
||||
#endif
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intltz_has_same_rules
|
||||
*/
|
||||
public function hasSameRules(IntlTimeZone $otherTimeZone) {}
|
||||
|
||||
/** @return DateTimeZone|false */
|
||||
/**
|
||||
* @return DateTimeZone|false
|
||||
* @alias intltz_to_date_time_zone
|
||||
*/
|
||||
public function toDateTimeZone() {}
|
||||
|
||||
/** @return bool */
|
||||
/**
|
||||
* @return bool
|
||||
* @alias intltz_use_daylight_time
|
||||
*/
|
||||
public function useDaylightTime() {}
|
||||
}
|
||||
|
@ -86,3 +86,68 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_IntlTimeZone_toDateTimeZone arginfo_class_IntlTimeZone___construct
|
||||
|
||||
#define arginfo_class_IntlTimeZone_useDaylightTime arginfo_class_IntlTimeZone___construct
|
||||
|
||||
|
||||
ZEND_METHOD(IntlTimeZone, __construct);
|
||||
ZEND_FUNCTION(intltz_count_equivalent_ids);
|
||||
ZEND_FUNCTION(intltz_create_default);
|
||||
ZEND_FUNCTION(intltz_create_enumeration);
|
||||
ZEND_FUNCTION(intltz_create_time_zone);
|
||||
ZEND_FUNCTION(intltz_create_time_zone_id_enumeration);
|
||||
ZEND_FUNCTION(intltz_from_date_time_zone);
|
||||
ZEND_FUNCTION(intltz_get_canonical_id);
|
||||
ZEND_FUNCTION(intltz_get_display_name);
|
||||
ZEND_FUNCTION(intltz_get_dst_savings);
|
||||
ZEND_FUNCTION(intltz_get_equivalent_id);
|
||||
ZEND_FUNCTION(intltz_get_error_code);
|
||||
ZEND_FUNCTION(intltz_get_error_message);
|
||||
ZEND_FUNCTION(intltz_get_gmt);
|
||||
ZEND_FUNCTION(intltz_get_id);
|
||||
ZEND_FUNCTION(intltz_get_offset);
|
||||
ZEND_FUNCTION(intltz_get_raw_offset);
|
||||
ZEND_FUNCTION(intltz_get_region);
|
||||
ZEND_FUNCTION(intltz_get_tz_data_version);
|
||||
ZEND_FUNCTION(intltz_get_unknown);
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FUNCTION(intltz_get_windows_id);
|
||||
#endif
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_FUNCTION(intltz_get_id_for_windows_id);
|
||||
#endif
|
||||
ZEND_FUNCTION(intltz_has_same_rules);
|
||||
ZEND_FUNCTION(intltz_to_date_time_zone);
|
||||
ZEND_FUNCTION(intltz_use_daylight_time);
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlTimeZone_methods[] = {
|
||||
ZEND_ME(IntlTimeZone, __construct, arginfo_class_IntlTimeZone___construct, ZEND_ACC_PRIVATE)
|
||||
ZEND_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, arginfo_class_IntlTimeZone_countEquivalentIDs, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createDefault, intltz_create_default, arginfo_class_IntlTimeZone_createDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createEnumeration, intltz_create_enumeration, arginfo_class_IntlTimeZone_createEnumeration, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createTimeZone, intltz_create_time_zone, arginfo_class_IntlTimeZone_createTimeZone, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, arginfo_class_IntlTimeZone_fromDateTimeZone, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, arginfo_class_IntlTimeZone_getCanonicalID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getDisplayName, intltz_get_display_name, arginfo_class_IntlTimeZone_getDisplayName, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getDSTSavings, intltz_get_dst_savings, arginfo_class_IntlTimeZone_getDSTSavings, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, arginfo_class_IntlTimeZone_getEquivalentID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, intltz_get_error_code, arginfo_class_IntlTimeZone_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, intltz_get_error_message, arginfo_class_IntlTimeZone_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getGMT, intltz_get_gmt, arginfo_class_IntlTimeZone_getGMT, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getID, intltz_get_id, arginfo_class_IntlTimeZone_getID, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getOffset, intltz_get_offset, arginfo_class_IntlTimeZone_getOffset, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getRawOffset, intltz_get_raw_offset, arginfo_class_IntlTimeZone_getRawOffset, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getRegion, intltz_get_region, arginfo_class_IntlTimeZone_getRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, arginfo_class_IntlTimeZone_getTZDataVersion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(getUnknown, intltz_get_unknown, arginfo_class_IntlTimeZone_getUnknown, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_ME_MAPPING(getWindowsID, intltz_get_windows_id, arginfo_class_IntlTimeZone_getWindowsID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
#endif
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
ZEND_ME_MAPPING(getIDForWindowsID, intltz_get_id_for_windows_id, arginfo_class_IntlTimeZone_getIDForWindowsID, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
#endif
|
||||
ZEND_ME_MAPPING(hasSameRules, intltz_has_same_rules, arginfo_class_IntlTimeZone_hasSameRules, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, arginfo_class_IntlTimeZone_toDateTimeZone, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, arginfo_class_IntlTimeZone_useDaylightTime, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
@ -29,7 +29,6 @@ extern "C" {
|
||||
#include "../intl_convert.h"
|
||||
#define USE_TIMEZONE_POINTER 1
|
||||
#include "timezone_class.h"
|
||||
#include "timezone_methods.h"
|
||||
#include "timezone_arginfo.h"
|
||||
#include <zend_exceptions.h>
|
||||
#include <zend_interfaces.h>
|
||||
@ -391,42 +390,6 @@ static zend_object *TimeZone_object_create(zend_class_entry *ce)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ TimeZone_class_functions
|
||||
* Every 'IntlTimeZone' class method has an entry in this table
|
||||
*/
|
||||
static const zend_function_entry TimeZone_class_functions[] = {
|
||||
PHP_ME(IntlTimeZone, __construct, arginfo_class_IntlTimeZone___construct, ZEND_ACC_PRIVATE)
|
||||
PHP_ME_MAPPING(createTimeZone, intltz_create_time_zone, arginfo_class_IntlTimeZone_createTimeZone, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, arginfo_class_IntlTimeZone_fromDateTimeZone, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(createDefault, intltz_create_default, arginfo_class_IntlTimeZone_createDefault, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getGMT, intltz_get_gmt, arginfo_class_IntlTimeZone_getGMT, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getUnknown, intltz_get_unknown, arginfo_class_IntlTimeZone_getUnknown, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(createEnumeration, intltz_create_enumeration, arginfo_class_IntlTimeZone_createEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, arginfo_class_IntlTimeZone_countEquivalentIDs, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, arginfo_class_IntlTimeZone_getCanonicalID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getRegion, intltz_get_region, arginfo_class_IntlTimeZone_getRegion, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, arginfo_class_IntlTimeZone_getTZDataVersion, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, arginfo_class_IntlTimeZone_getEquivalentID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
|
||||
PHP_ME_MAPPING(getID, intltz_get_id, arginfo_class_IntlTimeZone_getID, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(useDaylightTime, intltz_use_daylight_time, arginfo_class_IntlTimeZone_useDaylightTime, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getOffset, intltz_get_offset, arginfo_class_IntlTimeZone_getOffset, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getRawOffset, intltz_get_raw_offset, arginfo_class_IntlTimeZone_getRawOffset, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(hasSameRules, intltz_has_same_rules, arginfo_class_IntlTimeZone_hasSameRules, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getDisplayName, intltz_get_display_name, arginfo_class_IntlTimeZone_getDisplayName, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getDSTSavings, intltz_get_dst_savings, arginfo_class_IntlTimeZone_getDSTSavings, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, arginfo_class_IntlTimeZone_toDateTimeZone, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getErrorCode, intltz_get_error_code, arginfo_class_IntlTimeZone_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
PHP_ME_MAPPING(getErrorMessage, intltz_get_error_message, arginfo_class_IntlTimeZone_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
PHP_ME_MAPPING(getWindowsID, intltz_get_windows_id, arginfo_class_IntlTimeZone_getWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ME_MAPPING(getIDForWindowsID, intltz_get_id_for_windows_id, arginfo_class_IntlTimeZone_getIDForWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
#endif
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ timezone_register_IntlTimeZone_class
|
||||
* Initialize 'IntlTimeZone' class
|
||||
*/
|
||||
@ -435,7 +398,7 @@ U_CFUNC void timezone_register_IntlTimeZone_class(void)
|
||||
zend_class_entry ce;
|
||||
|
||||
/* Create and register 'IntlTimeZone' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlTimeZone", TimeZone_class_functions);
|
||||
INIT_CLASS_ENTRY(ce, "IntlTimeZone", class_IntlTimeZone_methods);
|
||||
ce.create_object = TimeZone_object_create;
|
||||
TimeZone_ce_ptr = zend_register_internal_class(&ce);
|
||||
if (!TimeZone_ce_ptr) {
|
||||
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Gustavo Lopes <cataphract@netcabo.pt> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef TIMEZONE_METHODS_H
|
||||
#define TIMEZONE_METHODS_H
|
||||
|
||||
#include <php.h>
|
||||
|
||||
PHP_METHOD(IntlTimeZone, __construct);
|
||||
|
||||
PHP_FUNCTION(intltz_create_time_zone);
|
||||
|
||||
PHP_FUNCTION(intltz_from_date_time_zone);
|
||||
|
||||
PHP_FUNCTION(intltz_create_default);
|
||||
|
||||
PHP_FUNCTION(intltz_get_id);
|
||||
|
||||
PHP_FUNCTION(intltz_get_gmt);
|
||||
|
||||
PHP_FUNCTION(intltz_get_unknown);
|
||||
|
||||
PHP_FUNCTION(intltz_create_enumeration);
|
||||
|
||||
PHP_FUNCTION(intltz_count_equivalent_ids);
|
||||
|
||||
PHP_FUNCTION(intltz_create_time_zone_id_enumeration);
|
||||
|
||||
PHP_FUNCTION(intltz_get_canonical_id);
|
||||
|
||||
PHP_FUNCTION(intltz_get_region);
|
||||
|
||||
PHP_FUNCTION(intltz_get_tz_data_version);
|
||||
|
||||
PHP_FUNCTION(intltz_get_equivalent_id);
|
||||
|
||||
PHP_FUNCTION(intltz_use_daylight_time);
|
||||
|
||||
PHP_FUNCTION(intltz_get_offset);
|
||||
|
||||
PHP_FUNCTION(intltz_get_raw_offset);
|
||||
|
||||
PHP_FUNCTION(intltz_has_same_rules);
|
||||
|
||||
PHP_FUNCTION(intltz_get_display_name);
|
||||
|
||||
PHP_FUNCTION(intltz_get_dst_savings);
|
||||
|
||||
PHP_FUNCTION(intltz_to_date_time_zone);
|
||||
|
||||
PHP_FUNCTION(intltz_get_error_code);
|
||||
|
||||
PHP_FUNCTION(intltz_get_error_message);
|
||||
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||
PHP_FUNCTION(intltz_get_windows_id);
|
||||
PHP_FUNCTION(intltz_get_id_for_windows_id);
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef TIMEZONE_METHODS_H */
|
@ -1,27 +1,50 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class Transliterator
|
||||
{
|
||||
final private function __construct() {}
|
||||
|
||||
/** @return Transliterator|null */
|
||||
/**
|
||||
* @return Transliterator|null
|
||||
* @alias transliterator_create
|
||||
*/
|
||||
public static function create(string $id, int $direction = Transliterator::FORWARD) {}
|
||||
|
||||
/** @return Transliterator|null */
|
||||
/**
|
||||
* @return Transliterator|null
|
||||
* @alias transliterator_create_from_rules
|
||||
*/
|
||||
public static function createFromRules(string $rules, int $direction = Transliterator::FORWARD) {}
|
||||
|
||||
/** @return Transliterator|null */
|
||||
/**
|
||||
* @return Transliterator|null
|
||||
* @alias transliterator_create_inverse
|
||||
*/
|
||||
public function createInverse() {}
|
||||
|
||||
/** @return array|false */
|
||||
/**
|
||||
* @return array|false
|
||||
* @alias transliterator_list_ids
|
||||
*/
|
||||
public static function listIDs() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias transliterator_transliterate
|
||||
*/
|
||||
public function transliterate(string $subject, int $start = 0, int $end = -1) {}
|
||||
|
||||
/** @return int|false */
|
||||
/**
|
||||
* @return int|false
|
||||
* @alias transliterator_get_error_code
|
||||
*/
|
||||
public function getErrorCode() {}
|
||||
|
||||
/** @return string|false */
|
||||
/**
|
||||
* @return string|false
|
||||
* @alias transliterator_get_error_message
|
||||
*/
|
||||
public function getErrorMessage() {}
|
||||
}
|
||||
|
@ -26,3 +26,26 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_Transliterator_getErrorCode arginfo_class_Transliterator___construct
|
||||
|
||||
#define arginfo_class_Transliterator_getErrorMessage arginfo_class_Transliterator___construct
|
||||
|
||||
|
||||
ZEND_METHOD(Transliterator, __construct);
|
||||
ZEND_FUNCTION(transliterator_create);
|
||||
ZEND_FUNCTION(transliterator_create_from_rules);
|
||||
ZEND_FUNCTION(transliterator_create_inverse);
|
||||
ZEND_FUNCTION(transliterator_list_ids);
|
||||
ZEND_FUNCTION(transliterator_transliterate);
|
||||
ZEND_FUNCTION(transliterator_get_error_code);
|
||||
ZEND_FUNCTION(transliterator_get_error_message);
|
||||
|
||||
|
||||
static const zend_function_entry class_Transliterator_methods[] = {
|
||||
ZEND_ME(Transliterator, __construct, arginfo_class_Transliterator___construct, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
|
||||
ZEND_ME_MAPPING(create, transliterator_create, arginfo_class_Transliterator_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createFromRules, transliterator_create_from_rules, arginfo_class_Transliterator_createFromRules, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(createInverse, transliterator_create_inverse, arginfo_class_Transliterator_createInverse, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(listIDs, transliterator_list_ids, arginfo_class_Transliterator_listIDs, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
|
||||
ZEND_ME_MAPPING(transliterate, transliterator_transliterate, arginfo_class_Transliterator_transliterate, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorCode, transliterator_get_error_code, arginfo_class_Transliterator_getErrorCode, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME_MAPPING(getErrorMessage, transliterator_get_error_message, arginfo_class_Transliterator_getErrorMessage, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user