RE: [PHP-DEV] advice
| From: | Marc Boeren | Date: | Mon, 19 Mar 2001 08:39:12 +0000 |
| Subject: | RE: [PHP-DEV] advice | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49326@lists.php.net to get a copy of this message | ||
Hi
>If there aren't any guides, then some sample code would be much appreciated
:)
I can give you some samples for creating an object and adding members, but I
haven't added any member functions, but this shouldn't be more difficult, I
feel...
if (object_init(return_value) != SUCCESS) {
zend_error(E_ERROR, "dbx: unable to create resulting object...");
RETURN_LONG(0);
}
zend_hash_update(return_value->value.obj.properties, "handle", 7, (void
*)&(rv_dbx_result_handle), sizeof(zval *), NULL);
add_property_long(return_value, "rows", row_count);
zend_hash_update can be used vor zval that are already allocated etc.,
add_property_* for other values
Hope this helps!
Cheerio, Marc.