Skip navigation.
Home

zend_register_internal_class_ex()

Registers a class which inherts from a parent class

zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC)


Returns:

zend_class_entry*

Parameters:

type parameter description
zend_class_entry* class_entry class entry of the class you are registering
zend_class_entry* parent_ce class entry of the parent from which this inherits
char* parent_name name of the parent class
void*** TSRMLS_DC used to pass a reference to the current thread; you should generally pass the TSRMLS_C macro for this paremeter (or skip the comma in front of it and use TSRMLS_CC)

If parent_ce is not NULL then it inherits from parent_ce

If parent_ce is NULL and parent_name isn't then it looks for the parent and inherits from it

If both parent_ce and parent_name are NULL it does a regular class registration

If parent_name is specified but not found NULL is returned

Example:

myChild = zend_register_internal_class_ex(&myChild_ce,&myParent_ce,NULL TSRMLS_CC);