Jump to content

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/155337-unable-to-read-zend-object-property/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.