Back to index

php5  5.3.10
Defines | Functions
collator.c File Reference
#include "collator_class.h"
#include "collator.h"
#include <unicode/utypes.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>

Go to the source code of this file.

Defines

#define COLLATOR_EXPOSE_CONST(x)   REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
#define COLLATOR_EXPOSE_CLASS_CONST(x)   zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( #x ) - 1, UCOL_##x TSRMLS_CC );
#define COLLATOR_EXPOSE_CUSTOM_CLASS_CONST(name, value)   zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );

Functions

void collator_register_constants (INIT_FUNC_ARGS)

Define Documentation

#define COLLATOR_EXPOSE_CONST (   x)    REGISTER_LONG_CONSTANT(#x, x, CONST_CS)

Function Documentation

Definition at line 33 of file collator.c.

{
       if( !Collator_ce_ptr )
       {
              zend_error( E_ERROR, "Collator class not defined" );
              return;
       }

       #define COLLATOR_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
       #define COLLATOR_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( #x ) - 1, UCOL_##x TSRMLS_CC );
       #define COLLATOR_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );

       /* UColAttributeValue constants */
       COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_VALUE", UCOL_DEFAULT );

       COLLATOR_EXPOSE_CLASS_CONST( PRIMARY );
       COLLATOR_EXPOSE_CLASS_CONST( SECONDARY );
       COLLATOR_EXPOSE_CLASS_CONST( TERTIARY );
       COLLATOR_EXPOSE_CLASS_CONST( DEFAULT_STRENGTH );
       COLLATOR_EXPOSE_CLASS_CONST( QUATERNARY );
       COLLATOR_EXPOSE_CLASS_CONST( IDENTICAL );

       COLLATOR_EXPOSE_CLASS_CONST( OFF );
       COLLATOR_EXPOSE_CLASS_CONST( ON );

       COLLATOR_EXPOSE_CLASS_CONST( SHIFTED );
       COLLATOR_EXPOSE_CLASS_CONST( NON_IGNORABLE );

       COLLATOR_EXPOSE_CLASS_CONST( LOWER_FIRST );
       COLLATOR_EXPOSE_CLASS_CONST( UPPER_FIRST );

       /* UColAttribute constants */
       COLLATOR_EXPOSE_CLASS_CONST( FRENCH_COLLATION );
       COLLATOR_EXPOSE_CLASS_CONST( ALTERNATE_HANDLING );
       COLLATOR_EXPOSE_CLASS_CONST( CASE_FIRST );
       COLLATOR_EXPOSE_CLASS_CONST( CASE_LEVEL );
       COLLATOR_EXPOSE_CLASS_CONST( NORMALIZATION_MODE );
       COLLATOR_EXPOSE_CLASS_CONST( STRENGTH );
       COLLATOR_EXPOSE_CLASS_CONST( HIRAGANA_QUATERNARY_MODE );
       COLLATOR_EXPOSE_CLASS_CONST( NUMERIC_COLLATION );

       /* ULocDataLocaleType constants */
       COLLATOR_EXPOSE_CONST( ULOC_ACTUAL_LOCALE );
       COLLATOR_EXPOSE_CONST( ULOC_VALID_LOCALE );

       /* sort flags */
       COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_REGULAR", COLLATOR_SORT_REGULAR );
       COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_STRING",  COLLATOR_SORT_STRING  );
       COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_NUMERIC", COLLATOR_SORT_NUMERIC );

       #undef COLLATOR_EXPOSE_CUSTOM_CLASS_CONST
       #undef COLLATOR_EXPOSE_CLASS_CONST
       #undef COLLATOR_EXPOSE_CONST
}

Here is the call graph for this function:

Here is the caller graph for this function: