Back to index

php5  5.3.10
Functions | Variables
dateformat_class.c File Reference
#include <unicode/unum.h>
#include "dateformat_class.h"
#include "php_intl.h"
#include "dateformat_data.h"
#include "dateformat_format.h"
#include "dateformat_parse.h"
#include "dateformat.h"
#include "dateformat_attr.h"

Go to the source code of this file.

Functions

static void IntlDateFormatter_object_dtor (void *object, zend_object_handle handle TSRMLS_DC)
void IntlDateFormatter_object_free (zend_object *object TSRMLS_DC)
zend_object_value IntlDateFormatter_object_create (zend_class_entry *ce TSRMLS_DC)
zend_object_value IntlDateFormatter_object_clone (zval *object TSRMLS_DC)
void dateformat_register_IntlDateFormatter_class (TSRMLS_D)

Variables

zend_class_entry * IntlDateFormatter_ce_ptr = NULL
static zend_object_handlers IntlDateFormatter_handlers
static function_entry IntlDateFormatter_class_functions []

Function Documentation

Definition at line 180 of file dateformat_class.c.

{
       zend_class_entry ce;

       /* Create and register 'IntlDateFormatter' class. */
       INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions );
       ce.create_object = IntlDateFormatter_object_create;
       IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );

       memcpy(&IntlDateFormatter_handlers, zend_get_std_object_handlers(),
              sizeof IntlDateFormatter_handlers);
       IntlDateFormatter_handlers.clone_obj = IntlDateFormatter_object_clone;

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

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 84 of file dateformat_class.c.

{
       zend_object_value new_obj_val;
       zend_object_handle handle = Z_OBJ_HANDLE_P(object);
       IntlDateFormatter_object *dfo, *new_dfo;

       DATE_FORMAT_METHOD_FETCH_OBJECT;
       new_obj_val = IntlDateFormatter_ce_ptr->create_object(IntlDateFormatter_ce_ptr TSRMLS_CC);
       new_dfo = (IntlDateFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
       /* clone standard parts */  
       zend_objects_clone_members(&new_dfo->zo, new_obj_val, &dfo->zo, handle TSRMLS_CC);
       /* clone formatter object */
       DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo),  &INTL_DATA_ERROR_CODE(new_dfo));
       if(U_FAILURE(INTL_DATA_ERROR_CODE(new_dfo))) {
              /* set up error in case error handler is interested */
              intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_dfo), "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
              IntlDateFormatter_object_dtor(new_dfo, new_obj_val.handle TSRMLS_CC); /* free new object */
              zend_error(E_ERROR, "Failed to clone IntlDateFormatter object");
       }
       return new_obj_val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

zend_object_value IntlDateFormatter_object_create ( zend_class_entry *ce  TSRMLS_DC)

Definition at line 58 of file dateformat_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 34 of file dateformat_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 IntlDateFormatter_object_free ( zend_object *object  TSRMLS_DC)

Definition at line 41 of file dateformat_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

zend_class_entry* IntlDateFormatter_ce_ptr = NULL

Definition at line 26 of file dateformat_class.c.

Initial value:

Definition at line 154 of file dateformat_class.c.

zend_object_handlers IntlDateFormatter_handlers [static]

Definition at line 27 of file dateformat_class.c.