Back to index

php5  5.3.10
Functions | Variables
msgformat_class.c File Reference
#include <unicode/unum.h>
#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"

Go to the source code of this file.

Functions

static void MessageFormatter_object_dtor (void *object, zend_object_handle handle TSRMLS_DC)
void MessageFormatter_object_free (zend_object *object TSRMLS_DC)
zend_object_value MessageFormatter_object_create (zend_class_entry *ce TSRMLS_DC)
zend_object_value MessageFormatter_object_clone (zval *object TSRMLS_DC)
void msgformat_register_class (TSRMLS_D)

Variables

zend_class_entry * MessageFormatter_ce_ptr = NULL
static zend_object_handlers MessageFormatter_handlers
static function_entry MessageFormatter_class_functions []

Function Documentation

zend_object_value MessageFormatter_object_clone ( zval *object  TSRMLS_DC)

Definition at line 77 of file msgformat_class.c.

{
       zend_object_value new_obj_val;
       zend_object_handle handle = Z_OBJ_HANDLE_P(object);
       MessageFormatter_object *mfo, *new_mfo;

       MSG_FORMAT_METHOD_FETCH_OBJECT;
       new_obj_val = MessageFormatter_ce_ptr->create_object(MessageFormatter_ce_ptr TSRMLS_CC);
       new_mfo = (MessageFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
       /* clone standard parts */  
       zend_objects_clone_members(&new_mfo->zo, new_obj_val, &mfo->zo, handle TSRMLS_CC);
       /* clone formatter object */
       MSG_FORMAT_OBJECT(new_mfo) = umsg_clone(MSG_FORMAT_OBJECT(mfo),  &INTL_DATA_ERROR_CODE(new_mfo));
       if(U_FAILURE(INTL_DATA_ERROR_CODE(new_mfo))) {
              /* set up error in case error handler is interested */
              intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_mfo), "Failed to clone MessageFormatter object", 0 TSRMLS_CC );
              MessageFormatter_object_dtor(new_mfo, new_obj_val.handle TSRMLS_CC); /* free new object */
              zend_error(E_ERROR, "Failed to clone MessageFormatter object");
       }
       return new_obj_val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

zend_object_value MessageFormatter_object_create ( zend_class_entry *ce  TSRMLS_DC)

Definition at line 55 of file msgformat_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void MessageFormatter_object_dtor ( void *  object,
zend_object_handle handle  TSRMLS_DC 
) [static]

Definition at line 35 of file msgformat_class.c.

{
       zend_objects_destroy_object( object, handle TSRMLS_CC );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void MessageFormatter_object_free ( zend_object *object  TSRMLS_DC)

Definition at line 42 of file msgformat_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 154 of file msgformat_class.c.

{
       zend_class_entry ce;

       /* Create and register 'MessageFormatter' class. */
       INIT_CLASS_ENTRY( ce, "MessageFormatter", MessageFormatter_class_functions );
       ce.create_object = MessageFormatter_object_create;
       MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );

       memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(),
              sizeof MessageFormatter_handlers);
       MessageFormatter_handlers.clone_obj = MessageFormatter_object_clone;

       /* Declare 'MessageFormatter' class properties. */
       if( !MessageFormatter_ce_ptr )
       {
              zend_error(E_ERROR, "Failed to register MessageFormatter class");
              return;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

zend_class_entry* MessageFormatter_ce_ptr = NULL

Definition at line 27 of file msgformat_class.c.

Initial value:

Definition at line 135 of file msgformat_class.c.

zend_object_handlers MessageFormatter_handlers [static]

Definition at line 28 of file msgformat_class.c.