Jump to content

witheredOldMale

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by witheredOldMale

  1. After calling a method that throws an exception, I do zval *ex = EG(exception); if(ex != NULL) { zend_class_entry *exce = Z_OBJCE_P(ex); zval *zmsg = zend_call_method(&ex,exce,NULL,"getMessage",11,&zCtorRet,0,NULL,NULL); char *msg = Z_STRVAL_P(zmsg); } It fails with <b>Fatal error</b>: Couldn't find implementation for method Exception::getMessage What’s wrong here? Thanks OldMale.
  2. Hello I have registered a property headers with the class YahooRestMessage as follows: zend_class_entry zceMessage; INIT_CLASS_ENTRY(zceMessage, “YahooRestMessage”, WsslPhpRestMessageFunctions); Zend_class_entry* wssl_php_YahooRestMessage_entry = zend_register_internal_class(&zceMessage TSRMLS_CC); zend_declare_property_null(wssl_php_YahooRestMessage_entry,"headers",7,ZEND_ACC_PUBLIC); In the userspace , on an object of type YahooRestMessage I set the headers object directly: $msg->headers = $hdrs; I’ve implemented the YahooRestMessage::getHeaders() method to read the object property headers (from my understanding) as follows: zval *zMemName = NULL; MAKE_STD_ZVAL(zMemName); ZVAL_STRING(zMemName, "headers", 0); zval **zHdrs = zend_get_std_object_handlers()->get_property_ptr_ptr(zvalObject,zMemName); But *zHdrs thus got is not an object. Please help, as I’m stuck and I couldn’t find any usage examples and even the 2nd parameter to get_property_ptr_ptr's meaning is not clear. Thanks kannan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.