how to create a php extension for an object?
I am working on a php extension for c++ classes. How to create a link to a method that accepts as parameter an object of a class?

Can you give me some examples?
THX. APPRECIATE!

I succedded to create a link to a method that accepts as parameter a string or int. But I don't know how to do this for a method.

Here is a short example:

    PHP_METHOD(Access, method_string)
    {
    	Class1 *access;
    	char *strr=NULL;
    	
    	int strr_len;
    	 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &strr, &strr_len) == FAILURE) {
            RETURN_NULL();
        }
        access_object *obj = (access_object *)zend_object_store_get_object(
            getThis() TSRMLS_CC);
        access = obj->access;
        if (access != NULL) {
    		std::string s(strr);
           RETURN_BOOL(access->method_string(s));
        }
    
    }
how to create a php extension for an object?
===

I am working on a php extension for c++ classes. How to create a link to a method that accepts as parameter an object of a class?

Can you give me some examples?
THX. APPRECIATE!

I succedded to create a link to a method that accepts as parameter a string or int. But I don't know how to do this for a method.

Here is a short example:

    PHP_METHOD(Access, method_string)
    {
    	Class1 *access;
    	char *strr=NULL;
    	
    	int strr_len;
    	 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &strr, &strr_len) == FAILURE) {
            RETURN_NULL();
        }
        access_object *obj = (access_object *)zend_object_store_get_object(
            getThis() TSRMLS_CC);
        access = obj->access;
        if (access != NULL) {
    		std::string s(strr);
           RETURN_BOOL(access->method_string(s));
        }
    
    }