help on creating an object method inside an extension
| From: | Gustavo Badauy | Date: | Tue, 22 Aug 2000 20:34:31 +0000 |
| Subject: | help on creating an object method inside an extension | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-30244@lists.php.net to get a copy of this message | ||
Hi,
I'm having some problems when trying to create a method in my extension.
I've donne as said in the apidoc.txt and I'm getting some errors.
Inside my extension code I've done this:
{
...
object_init (return_value);
add_property_long(return_value,"AreaCode",AreaCode);
...
add_method(return_value,"Dial",php_if_dial);
...
}
PHP_FUNCTION(dial)
{
}
When I try to run the function that returns the object I get
add_assoc_function() is no longer supported in
/export/home/gbadauy/web/dialer.php on line 2.
Another question is related to the "dial" function. According to the apidoc,
I should be able to get the value of the property AreaCode using this? I
haven't been able to check, due to the first error.
zval **value_ptr; **value2_ptr;
result = zend_hash_find (EG(active_symbol_table), "this", strlen("this") +1,
(void **)&value_ptr);
result = zend_hash_find (HASH_OF(value_ptr), "Dial",strlen("Dial") +1,(void
**)&value2_ptr);
Does anyone have any ideias?
Thanks a lot
Gustavo Badauy
gbadauy@yahoo.com