Back to index

php5  5.3.10
Classes | Defines | Functions | Variables
collator_class.h File Reference
#include <php.h>
#include "intl_common.h"
#include "intl_error.h"
#include <unicode/ucol.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Collator_object

Defines

#define COLLATOR_ERROR(co)   (co)->err
#define COLLATOR_ERROR_P(co)   &(COLLATOR_ERROR(co))
#define COLLATOR_ERROR_CODE(co)   INTL_ERROR_CODE(COLLATOR_ERROR(co))
#define COLLATOR_ERROR_CODE_P(co)   &(INTL_ERROR_CODE(COLLATOR_ERROR(co)))
#define COLLATOR_METHOD_INIT_VARS
#define COLLATOR_METHOD_FETCH_OBJECT
#define COLLATOR_CHECK_STATUS(co, msg)

Functions

void collator_register_Collator_class (TSRMLS_D)
void collator_object_init (Collator_object *co TSRMLS_DC)
void collator_object_destroy (Collator_object *co TSRMLS_DC)

Variables

zend_class_entry * Collator_ce_ptr

Class Documentation

struct Collator_object

Definition at line 28 of file collator_class.h.

Collaboration diagram for Collator_object:
Class Members
intl_error err
UCollator * ucoll
zend_object zo

Define Documentation

#define COLLATOR_CHECK_STATUS (   co,
  msg 
)
Value:
intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC );           \
    if( U_FAILURE( COLLATOR_ERROR_CODE( co ) ) )                                \
    {                                                                           \
        intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), msg, 0 TSRMLS_CC ); \
        RETURN_FALSE;                                                           \
    }                                                                           \

Definition at line 62 of file collator_class.h.

#define COLLATOR_ERROR (   co)    (co)->err

Definition at line 38 of file collator_class.h.

#define COLLATOR_ERROR_CODE (   co)    INTL_ERROR_CODE(COLLATOR_ERROR(co))

Definition at line 41 of file collator_class.h.

#define COLLATOR_ERROR_CODE_P (   co)    &(INTL_ERROR_CODE(COLLATOR_ERROR(co)))

Definition at line 42 of file collator_class.h.

#define COLLATOR_ERROR_P (   co)    &(COLLATOR_ERROR(co))

Definition at line 39 of file collator_class.h.

Value:
co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC ); \
    intl_error_reset( COLLATOR_ERROR_P( co ) TSRMLS_CC );                      \

Definition at line 57 of file collator_class.h.

Value:
zval*             object  = NULL;   \
    Collator_object*  co      = NULL;   \
    intl_error_reset( NULL TSRMLS_CC ); \

Definition at line 52 of file collator_class.h.


Function Documentation

void collator_object_destroy ( Collator_object *co  TSRMLS_DC)

Definition at line 179 of file collator_class.c.

{
       if( !co )
              return;

       if( co->ucoll )
       {
              ucol_close( co->ucoll );
              co->ucoll = NULL;
       }

       intl_error_reset( COLLATOR_ERROR_P( co ) TSRMLS_CC );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void collator_object_init ( Collator_object *co  TSRMLS_DC)

Definition at line 167 of file collator_class.c.

{
       if( !co )
              return;

       intl_error_init( COLLATOR_ERROR_P( co ) TSRMLS_CC );
}

Here is the call graph for this function:

Definition at line 137 of file collator_class.c.

{
       zend_class_entry ce;

       /* Create and register 'Collator' class. */
       INIT_CLASS_ENTRY( ce, "Collator", Collator_class_functions );
       ce.create_object = Collator_object_create;
       Collator_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );

       memcpy(&Collator_handlers, zend_get_std_object_handlers(),
              sizeof Collator_handlers);
       /* Collator has no usable clone semantics - ucol_cloneBinary/ucol_openBinary require binary buffer 
          for which we don't have the place to keep */  
       Collator_handlers.clone_obj = NULL; 

       /* Declare 'Collator' class properties. */
       if( !Collator_ce_ptr )
       {
              zend_error( E_ERROR,
                     "Collator: attempt to create properties "
                     "on a non-registered class." );
              return;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

zend_class_entry* Collator_ce_ptr

Definition at line 31 of file collator_class.c.