PHP extension pass an object as parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

i trie to port the PEAR HTML_Template_Sigma Class to an PHP extension.

in the PHP Class are some callback functions registert

$this->setCallbackFunction('e', array(&$this, '_htmlentities'));
$this->setCallbackFunction('u', 'urlencode');

the easier callback's to a php function i managed with this code


 zval tplFunction;
 ZVAL_STRING(&tplFunction,"u");
 zval callback;
 ZVAL_STRING(&callback,"urlencode");

 zend_call_method_with_2_params ( obj,Template_Sigma, NULL,
"setcallbackfunction", NULL, &tplFunction, &callback);


but how can i pass the object from a private method of the PHP extension
class to the  setcallbackfunction as it is down in PHP with

array(&$this, '_htmlentities')


Best Regards Torsten


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux